Allow specifying other services that should be started prior to the exporter daemon starting up in systemd. This is to handle situations where you want the service being monitored to be started before the exporter.
N/A (new feature)
<!--
Thank you for contributing to this project!
-->
Add package prometheus-node-exporter
package name for Debian.
Installation on Ubuntu 18.04
n/a
…orter
<!--
Thank you for contributing to this project!
-->
<!--
Replace this comment with a description of your pull request.
-->
<!--
Replace this comment with the list of issues or n/a.
Use format:
Fixes #123
Fixes #124
-->
This hooks the bind exporter in this puppet module. it is built on top of #303
Fixes #448
Fixes #434
Note: this PR is still Work-In-Progress as I have not tested all edge cases but it does work. Perhaps you have the time to take a look on your side and maybe your will either immediately tell me that is totally wrong or the other way around. I will get back to this when I will have more time.
This creates the necessary defaults on Debian to install Prometheus with the right settings from the Debian package.
The only major difference is the systemd unit file is kept in /etc/systemd/system
: that is outside the scope of this change, as it's part of the systemd
module.
Fixes: #32, #323
I was able to install the node-exporter with this configuration using
standard Debian packages. This is a Work In Progress (WIP) because I
haven't tested the other packages and especially the main prometheus
package. Hopefully it shouldn't be too much work to implement that as
well.
The change is mostly a noop when running on top of node-exporter already installed by hand using normal Debian packages.
Tests and documentation might also need an update.
<!--
Thank you for contributing to this project!
-->
Add support of ipsec exporter.
No issues requested this enhancement. I needed it for myself, offering it to upstream.
Together with #430 this PR adapts the Debian-defaults regarding package- and service-names like they are actually present in Debian. e.g. all exporters are prefixed with prometheus-
.
https://packages.debian.org/search?keywords=prometheus&searchon=names&suite=stable§ion=all
```bash
user@host:~$ for A in $(apt-cache search prometheus- | awk '{ print $1 }' | xargs); do apt-file show $A 2>&1 | grep -E '(systemd/system)'; done
prometheus-alertmanager: /lib/systemd/system/prometheus-alertmanager.service
prometheus-apache-exporter: /lib/systemd/system/prometheus-apache-exporter.service
prometheus-bind-exporter: /lib/systemd/system/prometheus-bind-exporter.service
prometheus-bird-exporter: /lib/systemd/system/prometheus-bird-exporter.service
prometheus-blackbox-exporter: /lib/systemd/system/prometheus-blackbox-exporter.service
prometheus-haproxy-exporter: /lib/systemd/system/prometheus-haproxy-exporter.service
prometheus-mongodb-exporter: /lib/systemd/system/prometheus-mongodb-exporter.service
prometheus-mysqld-exporter: /lib/systemd/system/prometheus-mysqld-exporter.service
prometheus-nginx-exporter: /lib/systemd/system/prometheus-nginx-exporter.service
prometheus-node-exporter: /lib/systemd/system/prometheus-node-exporter-apt.service
prometheus-node-exporter: /lib/systemd/system/prometheus-node-exporter-apt.timer
prometheus-node-exporter: /lib/systemd/system/prometheus-node-exporter-ipmitool-sensor.service
prometheus-node-exporter: /lib/systemd/system/prometheus-node-exporter-ipmitool-sensor.timer
prometheus-node-exporter: /lib/systemd/system/prometheus-node-exporter-mellanox-hca-temp.service
prometheus-node-exporter: /lib/systemd/system/prometheus-node-exporter-mellanox-hca-temp.timer
prometheus-node-exporter: /lib/systemd/system/prometheus-node-exporter-smartmon.service
prometheus-node-exporter: /lib/systemd/system/prometheus-node-exporter-smartmon.timer
prometheus-node-exporter: /lib/systemd/system/prometheus-node-exporter.service
prometheus-pgbouncer-exporter: /lib/systemd/system/prometheus-pgbouncer-exporter.service
prometheus-postgres-exporter: /lib/systemd/system/prometheus-postgres-exporter.service
prometheus-process-exporter: /lib/systemd/system/prometheus-process-exporter.service
prometheus-pushgateway: /lib/systemd/system/prometheus-pushgateway.service
prometheus-snmp-exporter: /lib/systemd/system/prometheus-snmp-exporter.service
prometheus-sql-exporter: /lib/systemd/system/prometheus-sql-exporter.service
prometheus-squid-exporter: /lib/systemd/system/prometheus-squid-exporter.service
prometheus-varnish-exporter: /lib/systemd/system/prometheus-varnish-exporter.service
prometheus-xmpp-alerts: /lib/systemd/system/prometheus-xmpp-alerts.service
```
<!--
Thank you for contributing to this project!
-->
<!--
Replace this comment with a description of your pull request.
-->
<!--
Replace this comment with the list of issues or n/a.
Use format:
Fixes #123
Fixes #124
-->
<!--
Thank you for contributing to this project!
-->
The config for services in puppet-prometheus module listen on 0.0.0.0 by default. However, when config listens to private IP,
services will fail to start because "After=network.target" doesn't ensure network interface up. It's safer to use "After=network-online.target"
No issue has been filed for this PR.
<!--
Thank you for contributing to this project!
-->
<!--
Replace this comment with a description of your pull request.
-->
<!--
Replace this comment with the list of issues or n/a.
Use format:
Fixes #123
Fixes #124
-->
With larger WAL segments, prometheus fails to write
a new checkpoint in TimeoutStopSec
time:
Oct 03 15:13:37 prometheus prometheus[2452]: level=info ts=2020-10-03T15:13:37.751Z caller=checkpoint.go:96 component=tsdb msg="Creating checkpoint" from_segment=85417 to_segment=85677 mint
Oct 03 15:15:06 prometheus systemd[1]: prometheus.service: State 'stop-sigterm' timed out. Killing.
Oct 03 15:15:06 prometheus systemd[1]: prometheus.service: Killing process 2452 (prometheus) with signal SIGKILL.
Oct 03 15:15:06 prometheus systemd[1]: prometheus.service: Main process exited, code=killed, status=9/KILL
Oct 03 15:15:06 prometheus systemd[1]: prometheus.service: Failed with result 'timeout'.
Oct 03 15:15:06 prometheus systemd[1]: Stopped Prometheus Monitoring framework.
This change adds a new parameter to define TimeoutStopSec
for prometheus.service
.
No issue previously created.
The required systemd unitfile overwrite could have been made locally as well - but as I suppose that others could also face similar issues, I decided to implement the parameter directly.