Skip to content

Instantly share code, notes, and snippets.

@asachs01
Created May 15, 2019 20:09
Show Gist options
  • Save asachs01/497ede01e9905e7917d577451ac51c1b to your computer and use it in GitHub Desktop.
Save asachs01/497ede01e9905e7917d577451ac51c1b to your computer and use it in GitHub Desktop.
Systemd unit files for sensu-agent and sensu-backend
[Unit]
Description=The Sensu Agent process.
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=sensu
Group=sensu
# Load env vars from /etc/default/ and /etc/sysconfig/ if they exist.
# Prefixing the path with '-' makes it try to load, but if the file doesn't
# exist, it continues onward.
EnvironmentFile=-/etc/default/sensu-agent
EnvironmentFile=-/etc/sysconfig/sensu-agent
LimitNOFILE=65535
ExecStart=/usr/sbin/sensu-agent start
Restart=always
WorkingDirectory=/
[Install]
WantedBy=multi-user.target
[Unit]
Description=The Sensu Backend service.
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=sensu
Group=sensu
# Load env vars from /etc/default/ and /etc/sysconfig/ if they exist.
# Prefixing the path with '-' makes it try to load, but if the file doesn't
# exist, it continues onward.
EnvironmentFile=-/etc/default/sensu-backend
EnvironmentFile=-/etc/sysconfig/sensu-backend
LimitNOFILE=65535
ExecStart=/usr/sbin/sensu-backend start -c /etc/sensu/backend.yml
Restart=always
WorkingDirectory=/
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment