Skip to content

Instantly share code, notes, and snippets.

@joemiller
Last active December 25, 2017 14:14
Show Gist options
  • Save joemiller/6041941 to your computer and use it in GitHub Desktop.
Save joemiller/6041941 to your computer and use it in GitHub Desktop.
leveraging systemd instantiated units for graphite carbon-cache instances
[Unit]
Description=carbon-cache instance %i (graphite)
[Service]
User=graphite
Group=graphite
ExecStartPre=/bin/rm -f /opt/graphite/storage/carbon-cache-%i.pid
ExecStart=/opt/graphite/bin/carbon-cache.py --instance=%i start
Type=forking
PIDFile=/opt/graphite/storage/carbon-cache-%i.pid
LimitNOFILE=128000
[Install]
WantedBy=multi-user.target
@iptizer
Copy link

iptizer commented Apr 2, 2017

Hi,
maybe you can consider my additional "--pidfile" option in ExecStart, see https://gist.github.com/iptizer/ed43cee36ca2e263cd355388e09734c5 . It did not work for me otherwise and it took me about 2 hours to figure it out ;).

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment