1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2025-01-18 08:06:16 +01:00
infrastructure/roles/prometheus_exporters/templates/prometheus-smart-textcollector.service.j2
Jelle van der Waa bf5a165303
Add smart monitoring using a textcollector
Collects the smart data using smartctl and outputs them in the
textcollector dir. This expects smartd to be configured to regularly
self tests on a regular interval to detect if a disk is broken.
2022-01-04 21:25:41 +01:00

31 lines
616 B
Django/Jinja

[Unit]
Description=Prometheus Smart Exporter TextCollector
[Service]
Type=oneshot
ExecStart=/usr/local/bin/smart-textcollector.sh {{ prometheus_textfile_dir }}
NoNewPrivileges=true
LockPersonality=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=read-only
ReadWritePaths={{ prometheus_textfile_dir }}
MemoryDenyWriteExecute=true
RemoveIPC=true
RestrictRealtime=true
RestrictNamespaces=true
RestrictSUIDSGID=true
PrivateNetwork=true
ProtectHostname=true
ProtectControlGroups=true
ProtectKernelLogs=true
ProtectKernelTunables=true
ProtectKernelModules=true
#ProtectClock=true
SystemCallArchitectures=native