From dbfbf6b9eea6455c62ca6d2dd4ddbff62b913227 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 6 Nov 2022 18:15:09 +0100 Subject: monitoring/prometheus: add smokeping-prober --- .../exporter/smokeping/templates/config.yml.j2 | 4 +++ .../exporter/smokeping/templates/service.j2 | 30 ++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 roles/monitoring/prometheus/exporter/smokeping/templates/config.yml.j2 create mode 100644 roles/monitoring/prometheus/exporter/smokeping/templates/service.j2 (limited to 'roles/monitoring/prometheus/exporter/smokeping/templates') diff --git a/roles/monitoring/prometheus/exporter/smokeping/templates/config.yml.j2 b/roles/monitoring/prometheus/exporter/smokeping/templates/config.yml.j2 new file mode 100644 index 00000000..f4d9020a --- /dev/null +++ b/roles/monitoring/prometheus/exporter/smokeping/templates/config.yml.j2 @@ -0,0 +1,4 @@ +# {{ ansible_managed }} + +targets: + {{ prometheus_exporter_smokeping_targets | to_nice_yaml(indent=2) | indent(2) }} diff --git a/roles/monitoring/prometheus/exporter/smokeping/templates/service.j2 b/roles/monitoring/prometheus/exporter/smokeping/templates/service.j2 new file mode 100644 index 00000000..5250f752 --- /dev/null +++ b/roles/monitoring/prometheus/exporter/smokeping/templates/service.j2 @@ -0,0 +1,30 @@ +[Unit] +Description=Prometheus smokeping prober + +[Service] +Restart=always +User=prometheus-exporter +ExecStart=/usr/bin/prometheus-smokeping-prober --web.listen-address="127.0.0.1:9374" --config.file /etc/prometheus/exporter/smokeping/config.yml + +# systemd hardening-options +AmbientCapabilities=CAP_NET_RAW +CapabilityBoundingSet=CAP_NET_RAW +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 -- cgit v1.2.3