Files
gitlab-mirror/roles/alertmanager/templates/alertmanager.service.j2
2025-12-08 16:48:41 +03:00

27 lines
687 B
Django/Jinja

[Unit]
Description=Alertmanager Service
After=network.target
Documentation="https://prometheus.io/docs/alerting/latest/alertmanager/"
[Service]
User={{ alertmanager_user }}
Group={{ alertmanager_group }}
Type=simple
ExecStart=/usr/local/bin/alertmanager \
--config.file={{ alertmanager_config_dir }}/alertmanager.yml \
--storage.path={{ alertmanager_storage_dir }}
Restart=on-failure
# Security hardening
ReadWritePaths={{ alertmanager_storage_dir }}
ProtectSystem=strict
NoNewPrivileges=true
PrivateTmp=true
ProtectKernelModules=true
ProtectControlGroups=true
ProtectKernelTunables=true
ProtectClock=yes
RestrictSUIDSGID=true
[Install]
WantedBy=multi-user.target