-
Notifications
You must be signed in to change notification settings - Fork 26
/
filebeat.service.j2
38 lines (35 loc) · 1.09 KB
/
filebeat.service.j2
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
# container-filebeat.service
# based off
# podman generate systemd filebeat --restart-policy always --new --name
# with pid/cidfiles replaced with --sdnotify=conmon approach
[Unit]
Description=Podman container-filebeat.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=always
ExecStart=/usr/bin/podman run \
--network=host \
--sdnotify=conmon \
--cgroups=no-conmon \
--replace \
--name filebeat \
--user root \
--restart=always \
--security-opt label=disable \
--volume /var/log/:/logs:ro \
--volume /etc/filebeat/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro \
--detach=True docker.elastic.co/beats/filebeat-oss:{{ filebeat_version }} \
-e -strict.perms=false -d "*"
ExecStop=/usr/bin/podman stop --ignore filebeat -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f filebeat
KillMode=none
Type=notify
NotifyAccess=all
User={{ filebeat_podman_user }}
Group={{ filebeat_podman_user }}
TimeoutStartSec=180
[Install]
WantedBy=multi-user.target default.target