summaryrefslogtreecommitdiff
path: root/roles/monitoring/prometheus/exporter/bind/templates
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2022-11-10 19:31:09 +0100
committerChristian Pointner <equinox@spreadspace.org>2022-11-10 19:31:09 +0100
commitb5406d18de64f273cbebb3875a84bc31074f0f00 (patch)
treee8774b1cb9b6124d14f5ec76ca103a7427de2b52 /roles/monitoring/prometheus/exporter/bind/templates
parentadd ch-pan and ch-mimas to prometheus monitoring (diff)
prometheus: add exporter for bind
Diffstat (limited to 'roles/monitoring/prometheus/exporter/bind/templates')
-rw-r--r--roles/monitoring/prometheus/exporter/bind/templates/service.j230
1 files changed, 30 insertions, 0 deletions
diff --git a/roles/monitoring/prometheus/exporter/bind/templates/service.j2 b/roles/monitoring/prometheus/exporter/bind/templates/service.j2
new file mode 100644
index 00000000..853fee18
--- /dev/null
+++ b/roles/monitoring/prometheus/exporter/bind/templates/service.j2
@@ -0,0 +1,30 @@
+[Unit]
+Description=Prometheus bind exporter
+
+[Service]
+Restart=always
+User=prometheus-exporter
+ExecStart=/usr/bin/prometheus-bind-exporter --web.listen-address="127.0.0.1:9119" --bind.stats-version="{{ prometheus_exporter_bind_stats_version }}" --bind.stats-groups="{{ prometheus_exporter_bind_stats_groups | join(',') }}"
+
+# systemd hardening-options
+AmbientCapabilities=
+CapabilityBoundingSet=
+DeviceAllow=/dev/null rw
+DevicePolicy=strict
+LockPersonality=true
+MemoryDenyWriteExecute=true
+NoNewPrivileges=true
+PrivateDevices=true
+PrivateTmp=true
+ProtectControlGroups=true
+ProtectHome=true
+ProtectKernelModules=true
+ProtectKernelTunables=true
+ProtectSystem=strict
+RemoveIPC=true
+RestrictNamespaces=true
+RestrictRealtime=true
+SystemCallArchitectures=native
+
+[Install]
+WantedBy=multi-user.target