From f2a1639fa345a53587684dd0628066781ecba6cf Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 26 Aug 2023 15:13:04 +0200 Subject: promeheus/exporter: update chrony and make dns lookups optional --- roles/monitoring/prometheus/exporter/chrony/defaults/main.yml | 1 + roles/monitoring/prometheus/exporter/chrony/templates/service.j2 | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'roles/monitoring/prometheus/exporter/chrony') 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= -- cgit v1.2.3