summaryrefslogtreecommitdiff
path: root/roles/monitoring/prometheus
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2023-08-26 15:13:04 +0200
committerChristian Pointner <equinox@spreadspace.org>2023-08-26 15:13:04 +0200
commitf2a1639fa345a53587684dd0628066781ecba6cf (patch)
treeb807e5d99c124f127d28add6ae331eec75279e58 /roles/monitoring/prometheus
parentprometheus/exporter/snmp: switch to new config format (0.23.0+) (diff)
promeheus/exporter: update chrony and make dns lookups optional
Diffstat (limited to 'roles/monitoring/prometheus')
-rw-r--r--roles/monitoring/prometheus/exporter/chrony/defaults/main.yml1
-rw-r--r--roles/monitoring/prometheus/exporter/chrony/templates/service.j23
2 files changed, 3 insertions, 1 deletions
diff --git a/roles/monitoring/prometheus/exporter/chrony/defaults/main.yml b/roles/monitoring/prometheus/exporter/chrony/defaults/main.yml
index 699ed580..2cac4bed 100644
--- a/roles/monitoring/prometheus/exporter/chrony/defaults/main.yml
+++ b/roles/monitoring/prometheus/exporter/chrony/defaults/main.yml
@@ -1,6 +1,7 @@
---
# prometheus_exporter_chrony_version:
+prometheus_exporter_chrony_disable_dns_lookups: no
prometheus_exporter_chrony_enable_collectors:
- sources
- tracking
diff --git a/roles/monitoring/prometheus/exporter/chrony/templates/service.j2 b/roles/monitoring/prometheus/exporter/chrony/templates/service.j2
index cb806649..74d8ad0a 100644
--- a/roles/monitoring/prometheus/exporter/chrony/templates/service.j2
+++ b/roles/monitoring/prometheus/exporter/chrony/templates/service.j2
@@ -1,10 +1,11 @@
[Unit]
Description=Prometheus chrony exporter
+After=chrony.service
[Service]
Restart=always
User=_chrony
-ExecStart=/usr/bin/prometheus-chrony-exporter --web.listen-address="127.0.0.1:9123" --chrony.address=unix:///run/chrony/chronyd.sock {% for collector in prometheus_exporter_chrony_enable_collectors %} --collector.{{ collector }}{% endfor %}{{ '' }}
+ExecStart=/usr/bin/prometheus-chrony-exporter --web.listen-address="127.0.0.1:9123" --chrony.address=unix:///run/chrony/chronyd.sock {% for collector in prometheus_exporter_chrony_enable_collectors %} --collector.{{ collector }}{% endfor %}{% if prometheus_exporter_chrony_disable_dns_lookups %} --no-collector.dns-lookups{% endif %}{{ '' }}
# systemd hardening-options
AmbientCapabilities=