File: service

package info (click to toggle)
mtail 3.2.24-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,384 kB
  • sloc: yacc: 647; makefile: 226; sh: 78; lisp: 77; awk: 17
file content (53 lines) | stat: -rw-r--r-- 1,295 bytes parent folder | download
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
[Unit]
Description=mtail - extract internal monitoring data from application logs for collection in a timeseries database
Documentation=https://jaqx0r.github.io/mtail/
Requires=local-fs.target network.target
Before=nss-user-lookup.target
After=local-fs.target network.target

[Service]
Type=exec
Restart=on-failure
User=mtail

Environment=HOST=::
Environment=PORT=3903
Environment=EXTRA_ARGS=
EnvironmentFile=/etc/default/mtail

ExecCondition=/usr/bin/test -n "${LOGS}"
ExecStart=/bin/sh -c 'exec /usr/bin/mtail --progs /etc/mtail --logtostderr $${HOST:+--address $$HOST} $${PORT:+--port $$PORT} --logs "$LOGS" $EXTRA_ARGS'
ExecReload=/bin/kill -HUP $MAINPID
TimeoutStopSec=20s

# Limit memory leaks
MemoryMax=1G
MemorySwapMax=0

# Various hardening options
ProtectSystem=full
AmbientCapabilities=
CapabilityBoundingSet=
KeyringMode=private
LockPersonality=yes
MemoryDenyWriteExecute=yes
MountFlags=private
NoNewPrivileges=yes
PrivateDevices=yes
PrivateTmp=yes
PrivateUsers=yes
ProtectClock=yes
ProtectControlGroups=yes
ProtectHome=yes
ProtectHostname=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
RemoveIPC=yes
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes

[Install]
WantedBy=multi-user.target