From c49412b8f31f551ec90b3dcd1d8e8e867a2b1680 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 28 Sep 2021 18:02:27 +0200 Subject: prometheus: add ssl exporter --- .../exporter/ssl/templates/config.yml.j2 | 4 +++ .../prometheus/exporter/ssl/templates/service.j2 | 30 ++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 roles/monitoring/prometheus/exporter/ssl/templates/config.yml.j2 create mode 100644 roles/monitoring/prometheus/exporter/ssl/templates/service.j2 (limited to 'roles/monitoring/prometheus/exporter/ssl/templates') 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 -- cgit v1.2.3