Skip to content

Instantly share code, notes, and snippets.

@saikat
Created September 19, 2010 01:12
Show Gist options
  • Save saikat/586242 to your computer and use it in GitHub Desktop.
Save saikat/586242 to your computer and use it in GitHub Desktop.
check process node with pidfile /path/to/pidfile/node.pid
start program = "/etc/init.d/my_prog start"
stop program = "/etc/init.d/my_prog stop"
if cpu is greater than 50% for 2 cycles then alert
if cpu is greater than 50% for 4 cycles then restart
if totalmem > 500.0 MB for 3 cycles then alert
if totalmem > 500.0 MB for 5 cycles then restart
if loadavg(5min) greater than 10 for 8 cycles then stop
if 3 restarts within 5 cycles then timeout
group server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment