-
Notifications
You must be signed in to change notification settings - Fork 1
/
prometheus-weathermen.service
44 lines (43 loc) · 1.32 KB
/
prometheus-weathermen.service
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 weathermen service
After=multi-user.target
[Service]
ExecStart=/usr/local/bin/prometheus-weathermen
Restart=on-failure
# Let systemd dynamically create a non-privileged user
# You might need to change that to a static user if e.g. you need ACL based read permissions for TLS certificates
DynamicUser=yes
ProtectSystem=strict
ReadWritePaths=/tmp
ProtectHome=read-only
NoNewPrivileges=yes
PrivateDevices=yes
PrivateMounts=yes
PrivateTmp=yes
ProtectControlGroups=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectKernelLogs=yes
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
MemoryDenyWriteExecute=yes
LockPersonality=yes
CapabilityBoundingSet=
AmbientCapabilities=
TemporaryFileSystem=/:ro
# /usr/lib is bound here for dynamic libraries. For more exotic configurations, you might need to adjust the path
# You can also leave it out for statically linked binaries
BindReadOnlyPaths=/etc/prometheus-weathermen/weathermen.toml /usr/lib
ProtectClock=true
ProtectHome=true
ProtectHostname=true
RemoveIPC=true
ProtectProc=invisible
UMask=0777
RestrictRealtime=yes
SystemCallArchitectures=native
SystemCallFilter=~@swap @resources @reboot @raw-io @privileged @obsolete @mount @module @debug @cpu-emulation @clock
[Install]
WantedBy=multi-user.target