blob: d45cb972872a70d5cd4ca86b67ee54887145ff13 (
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# netdata systemd target
[Unit]
Description=netdata - Real-time performance monitoring
Documentation=man:netdata
Documentation=file:///usr/share/doc/netdata/html/index.html
Documentation=https://github.com/netdata/netdata
After=network-online.target httpd.service squid.service nfs-server.service mysqld.service named.service postfix.service
ConditionPathExists=/etc/netdata/netdata.conf
[Service]
Type=simple
Environment="netdata_LOG_LOCATION=/var/log/netdata/log"
ExecStart=/usr/sbin/netdata -D
TimeoutStopSec=10
KillMode=mixed
KillSignal=SIGTERM
OOMScoreAdjust=-900
User=netdata
Group=netdata
Restart=on-abnormal
RestartSec=2s
LimitNOFILE=65536
WorkingDirectory=/tmp
# Hardening
NoNewPrivileges=false
PermissionsStartOnly=true
# CAP_SETGID is required for setgroups()
# CAP_NET_RAW is needed by fping, see #864370
CapabilityBoundingSet=CAP_DAC_READ_SEARCH CAP_SYS_PTRACE CAP_SETGID CAP_SETUID CAP_NET_RAW CAP_AUDIT_WRITE
PrivateTmp=true
ProtectHome=read-only
ProtectSystem=full
ReadOnlyDirectories=/
ReadWriteDirectories=/dev
ReadWriteDirectories=/proc/self
ReadWriteDirectories=/var/cache/netdata
ReadWriteDirectories=/var/lib/netdata
ReadWriteDirectories=/var/log
ReadWriteDirectories=/var/spool
ReadWriteDirectories=/run
RuntimeDirectory=netdata
# Access to devices and kernel modules and tunables is required
PrivateDevices=no
ProtectKernelModules=no
ProtectKernelTunables=no
StandardOutput=syslog+console
StandardError=syslog+console
[Install]
WantedBy=multi-user.target
|