add the ansible playbooks for the monitoring stack
This commit is contained in:
24
ansible/roles/promtail/templates/promtail.service.j2
Normal file
24
ansible/roles/promtail/templates/promtail.service.j2
Normal file
@@ -0,0 +1,24 @@
|
||||
[Unit]
|
||||
Description=Promtail Log Collector
|
||||
Documentation=https://grafana.com/docs/loki/latest/clients/promtail/
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
Group=root
|
||||
ExecStart=/usr/local/bin/promtail \
|
||||
-config.file=/etc/promtail/promtail.yml \
|
||||
-config.expand-env=true
|
||||
|
||||
SyslogIdentifier=promtail
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
# Need root for syslog port 514 and journal access
|
||||
# Can use CAP_NET_BIND_SERVICE instead if preferred
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user