[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: is monit just a pain in the arse or what ?
From: |
andrew taylor |
Subject: |
Re: is monit just a pain in the arse or what ? |
Date: |
Fri, 27 Jul 2007 08:35:58 -0500 |
User-agent: |
Thunderbird 2.0.0.5 (Windows/20070716) |
Ryan Dooley wrote:
On 7/26/07 6:03 PM, "andrew taylor" <address@hidden> wrote:
Normally, when I ask monit for status, I get this...
address@hidden:~# monit summary
monit: cannot read status from the monit daemon
This happens constantly and is frustrating and useless.
When I do get data, it tells me something like this...
Process 'rails_mongrel_9200' Execution failed
Process 'rails_mongrel_9201' Execution failed
Process 'rails_job' running
Process 'rails_mailer' Execution failed
uhh...not quite, if I ps, all the processes are running, all the pids
are there, everything is fine.
Would you mind posting your monitrc for your apps and your /etc/monitrc if
they are different? Properly sanitized of course :-)
For what it is worth, I do monitor puppet (well puppetmasterd) on a
particular host and it works quite well. Tomorrow, if it'd help any, I'll
filter mine back to this list.
Cheers,
Ryan
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general
Sure, here is the monitrc.
#===== basic setup
set daemon 60
set httpd port 2812 and allow admin:test
set logfile /var/log/monit.log
#===== include other configs
include /etc/monit/includes/*
#===== mysql
check process mysql
with pidfile "/var/run/mysqld/mysqld.pid"
start program = "/etc/init.d/mysql start"
stop program = "/etc/init.d/mysql stop"
group system
if failed port 3306 protocol mysql then restart
#===== apache
check process apache
with pidfile "/var/run/apache2.pid"
start program = "/etc/init.d/apache2 start"
stop program = "/etc/init.d/apache2 stop"
group system
#===== sshd
check process sshd
with pidfile "/var/run/sshd.pid"
start program = "/etc/init.d/ssh start"
stop program = "/etc/init.d/ssh stop"
group system
if failed port 22 protocol ssh then restart
#===== cron
check process cron
with pidfile "/var/run/crond.pid"
start program = "/etc/init.d/cron start"
stop program = "/etc/init.d/cron stop"
group system
#===== samba
check process smbd
with pidfile /var/run/samba/smbd.pid
start program = "/etc/init.d/samba start"
stop program = "/etc/init.d/samba stop"
group system
if failed port 139 type TCP then restart
#===== samba
check process nmbd
with pidfile "/var/run/samba/nmbd.pid"
start program = "/etc/init.d/samba start"
stop program = "/etc/init.d/samba stop"
group system
if failed port 138 type UDP then restart
if failed port 137 type UDP then restart
#===== vmware
check process guestd
with pidfile "/var/run/vmware-guestd.pid"
start program = "/etc/init.d/vmware-tools start"
stop program = "/etc/init.d/vmware-tools stop"
group system
#==== rails_toucan_myfavcreditunion_mongrel_9200
check process rails_toucan_myfavcreditunion_mongrel_9200
with pidfile "/home/me/workspace/app1/log/mongrel.9200.pid"
start program = "/usr/bin/mongrel_rails start -P
/home/me/workspace/app1/log/mongrel.9100.pid -d -e production -p 9200 -c
/home/me/workspace/app1 -t 30" as uid me and gid me
stop program = "/usr/bin/mongrel_rails stop -P
/home/me/workspace/app1/log/mongrel.9100.pid"
group app1
if mem usage > 50% then restart
#==== app1_mongrel_9201
check process app1_mongrel_9201
with pidfile "/home/me/workspace/app1/log/mongrel.9201.pid"
start program = "/usr/bin/mongrel_rails start -P
/home/me/workspace/app1/log/mongrel.9101.pid -d -e production -p 9201 -c
/home/me/workspace/app1 -t 30" as uid me and gid me
stop program = "/usr/bin/mongrel_rails stop -P
/home/me/workspace/app1/log/mongrel.9101.pid"
group app1
if mem usage > 50% then restart
#==== app1_jobs
check app1_jobs
with pidfile "/home/me/workspace/app1/app/daemons/job_daemon.rb.pid"
start program = "/home/me/workspace/app1/app/daemons/job_control.rb
start -f" as uid me and gid me
stop program = "/home/me/workspace/app1/app/daemons/job_control.rb
stop -f"
group app1
if mem usage > 50% then restart
Re: is monit just a pain in the arse or what ?, Jan-Henrik Haukeland, 2007/07/27