summaryrefslogtreecommitdiff
path: root/roles/monitoring/prometheus/exporter/ssl/templates
diff options
context:
space:
mode:
Diffstat (limited to 'roles/monitoring/prometheus/exporter/ssl/templates')
-rw-r--r--roles/monitoring/prometheus/exporter/ssl/templates/config.yml.j24
-rw-r--r--roles/monitoring/prometheus/exporter/ssl/templates/service.j230
2 files changed, 34 insertions, 0 deletions
diff --git a/roles/monitoring/prometheus/exporter/ssl/templates/config.yml.j2 b/roles/monitoring/prometheus/exporter/ssl/templates/config.yml.j2
new file mode 100644
index 00000000..1ef84541
--- /dev/null
+++ b/roles/monitoring/prometheus/exporter/ssl/templates/config.yml.j2
@@ -0,0 +1,4 @@
+# {{ ansible_managed }}
+
+modules:
+ {{ prometheus_exporter_ssl_modules | combine(prometheus_exporter_ssl_modules_extra) | to_nice_yaml(indent=2) | indent(2) }}
diff --git a/roles/monitoring/prometheus/exporter/ssl/templates/service.j2 b/roles/monitoring/prometheus/exporter/ssl/templates/service.j2
new file mode 100644
index 00000000..fdd754a4
--- /dev/null
+++ b/roles/monitoring/prometheus/exporter/ssl/templates/service.j2
@@ -0,0 +1,30 @@
+[Unit]
+Description=Prometheus ssl exporter
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/prometheus-ssl-exporter --web.listen-address="127.0.0.1:9219" --config.file=/etc/prometheus/exporter/ssl/config.yml
+ExecReload=/bin/kill -HUP $MAINPID
+
+# 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