Created
January 14, 2011 21:49
-
-
Save gjnoonan/780324 to your computer and use it in GitHub Desktop.
A monit script for memcached
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
check process memcached with pidfile /var/pids/memcached.pid | |
start program = "/usr/local/bin/memcached -d -P /var/pids/memcached.pid -u root -m 512 -l 127.0.0.1 -p 11211" | |
stop program = "/bin/kill -9 `cat /var/pids/memcached.pid`; rm /var/pids/memcached.pid" | |
if failed host 127.0.0.1 port 11211 then restart | |
if cpu > 60% for 2 cycles then alert | |
if cpu > 98% for 5 cycles then restart | |
if 2 restarts within 3 cycles then timeout | |
group cache |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment