Skip to content

Instantly share code, notes, and snippets.

@monodeep12
Created February 11, 2016 05:30
Show Gist options
  • Save monodeep12/af72b741e8fc8becf77d to your computer and use it in GitHub Desktop.
Save monodeep12/af72b741e8fc8becf77d to your computer and use it in GitHub Desktop.
Monit script for memcached
check process memcached with pidfile /var/run/memcached.pid
start program = "/etc/init.d/memcached start"
stop program = "/etc/init.d/memcached stop"
if failed host 127.0.0.1 port 11211 protocol MEMCACHE then restart
if cpu > 70% for 2 cycles then alert
if cpu > 98% for 5 cycles then restart
if 2 restarts within 3 cycles then timeout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment