Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


LinkBack Search this Thread
Old 07-04-2007, 03:18 PM   #1
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 517

Rep: Reputation: 39
Problem with Setting up monit


I've got a problem, within monit my first time of using it ever so still noob in it but in any case, am expanding my horizons. What i have a problem is, this part :

check process apache with pidfile /var/run/ 
   start program = "/etc/init.d/httpd start" 
   stop program  = "/etc/init.d/httpd stop" 
   if cpu > 60% for 2 cycles then alert 
   if cpu > 80% for 5 cycles then restart 
   if totalmem > 200.0 MB for 5 cycles then restart 
   if children > 250 then restart 
   if loadavg(5min) greater than 10 for 8 cycles then stop 
   if failed host port 80 protocol http 
      and request "/webwarning.htm" 
      then exec "/root/testing.bash" 
#    if failed port 443 type tcpssl protocol http 
#       with timeout 15 seconds 
#       then restart 
   if 3 restarts within 5 cycles then timeout 
#    depends on apache_bin 
   group server
its the (then exec "/root/testing.bash") i thought this should execute my script file, but it just doesn't work, even though the file is set as executable and works fine if i just run it as normal from the konsole.

This test all works fine and before hand it was just a (then alert) and i changed it because i wanted it to run my script instead which doesn't seem to happen.

Does anyone have an idea as to what the problem could be
Old 07-28-2007, 09:07 PM   #2
Registered: Jan 2005
Location: germany
Distribution: suse, opensuse, debian, others for testing
Posts: 307

Rep: Reputation: 32
does monit run as root ?

your script is in /root/.... maybe monit cannot get in there if it runs as some other user.
Old 07-29-2007, 04:24 PM   #3
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 517

Original Poster
Rep: Reputation: 39
no problems thanks for the reply all fixed now, ca't tell you the problem tried it on a different server and worked fine so...

Anyway cheers


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Server Monitoring With munin And monit On Debian Etch LXer Syndicated Linux News 0 05-15-2007 02:01 PM
LXer: Server Monitoring With munin And monit LXer Syndicated Linux News 0 05-07-2006 08:54 PM
postfix/ldap/monit : where does the problem lie topcat Linux - Software 1 11-23-2004 10:28 PM
monitoring daemons, filesystems and more (Monit v4.0B) markus1982 Linux - Software 2 09-14-2003 08:38 AM
INFO: configuring monit (process monitoring) markus1982 Linux - Software 0 05-25-2003 05:39 AM

All times are GMT -5. The time now is 06:51 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration