diff options
author | Christian Pointner <equinox@spreadspace.org> | 2023-05-18 17:36:05 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2023-05-18 17:36:05 +0200 |
commit | 6645af20158b84888b97ac03484a98579ed17cfb (patch) | |
tree | 8d1b14698c88850d0588b12dcf7503e0819289ee /roles/monitoring/prometheus/exporter/modbus/templates/service.j2 | |
parent | sk-tomnext-nc: increase size for /var/log (diff) |
prometheus: add modbus exporter
Diffstat (limited to 'roles/monitoring/prometheus/exporter/modbus/templates/service.j2')
-rw-r--r-- | roles/monitoring/prometheus/exporter/modbus/templates/service.j2 | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/roles/monitoring/prometheus/exporter/modbus/templates/service.j2 b/roles/monitoring/prometheus/exporter/modbus/templates/service.j2 new file mode 100644 index 00000000..242502a4 --- /dev/null +++ b/roles/monitoring/prometheus/exporter/modbus/templates/service.j2 @@ -0,0 +1,31 @@ +[Unit] +Description=Prometheus modbus exporter + +[Service] +Restart=always +User=prometheus-exporter +ExecStart=/usr/bin/prometheus-modbus-exporter --web.listen-address="127.0.0.1:9602" --config.file=/etc/prometheus/exporter/modbus/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 |