Skip to content

Commit

Permalink
* Added memcache monitoring and enabled the embedded web server.
Browse files Browse the repository at this point in the history
  • Loading branch information
António P. P. Almeida committed Oct 12, 2010
1 parent 6a88aae commit 608ccbc
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
9 changes: 9 additions & 0 deletions 000-global
Expand Up @@ -31,3 +31,12 @@ set alert root@localhost
set eventqueue
basedir /var/monit # set the base directory where events will be stored
slots 100 # optionally limit the queue size


## Monit has an embedded web server which can be used to view status of
## services monitored and manage services from a web interface. See the
## Monit Wiki if you want to enable SSL for the web server.
set httpd port 2812 and
use address localhost # only accept connection from localhost
allow localhost # allow localhost to connect to the server and
allow appa:MntT126 # require user 'admin' with password 'monit'
28 changes: 28 additions & 0 deletions memcached
@@ -0,0 +1,28 @@
#-*- mode: conf; mode: flyspell-prog; mode: autopair; ispell-current-dictionary: american -*-

### Monitoring memcached.
check process memcache with pidfile /var/run/memcached.pid
group memcache
start program = "/etc/init.d/memcached start"
stop program = "/etc/init.d/memcached stop"
if failed port 11211 protocol memcache then restart
if 3 restarts within 5 cycles then timeout
depends on memcached
depends on memcached_init
alert root@localhost only on {timeout}

check file memcached with path /usr/bin/memcached
group memcache
if failed checksum then unmonitor
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
alert root@localhost

check file memcached_init with path /etc/init.d/memcached
group memcache
if failed checksum then unmonitor
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
alert root@localhost

0 comments on commit 608ccbc

Please sign in to comment.