blob: d708d68d70c4923b51d87ccf86dcb7977e954c2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
[Unit]
Description=Prometheus exporter for S.M.A.R.T. metrics using smartctl
Requires=network-online.target
After=network-online.target
ConditionVirtualization=false
[Service]
EnvironmentFile=-/etc/conf.d/prometheus-smartctl-exporter
ExecStart=/usr/bin/prometheus-smartctl-exporter $SMARTCTL_EXPORTER_ARGS
User=root
Group=root
Restart=on-failure
NoNewPrivileges=true
LimitNOFILE=1048576
UMask=0077
ProtectSystem=strict
ProtectHome=true
#PrivateUsers=yes # this breaks smartctl
PrivateTmp=true
#PrivateDevices=true # this is actually needed to access the disks
ProtectHostname=true
#ProtectClock=true # this is actually needed - no idea why...
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
RestrictNamespaces=true
LockPersonality=true
MemoryDenyWriteExecute=true
RestrictRealtime=true
RestrictSUIDSGID=true
RemoveIPC=true
CapabilityBoundingSet=CAP_SYS_ADMIN CAP_SYS_RAWIO CAP_MKNOD
AmbientCapabilities=
SystemCallFilter=@system-service
SystemCallFilter=~@privileged @resources
SystemCallArchitectures=native
[Install]
WantedBy=multi-user.target
|