Skip to content

Instantly share code, notes, and snippets.

@obervinov
Created June 11, 2025 16:35
Show Gist options
  • Save obervinov/587a4bdab03b59eade7f79ca3f6f7357 to your computer and use it in GitHub Desktop.
Save obervinov/587a4bdab03b59eade7f79ca3f6f7357 to your computer and use it in GitHub Desktop.
Systemd unit for Grafana Alloy
[Unit]
Description= Vendor-agnostic OpenTelemetry Collector distribution with programmable pipelines
Documentation=https://grafana.com/docs/alloy
Wants=network-online.target
After=network-online.target
[Service]
Restart=always
User=root
Environment=HOSTNAME=%H
Environment=ALLOY_DEPLOY_MODE=deb
EnvironmentFile=/etc/default/alloy
WorkingDirectory=/var/lib/alloy
ExecStart=/usr/bin/alloy run $CUSTOM_ARGS --storage.path=/var/lib/alloy/data $CONFIG_FILE
ExecReload=/usr/bin/env kill -HUP $MAINPID
TimeoutStopSec=20s
SendSIGKILL=no
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment