LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices



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

Rep: Reputation: 39
Problem with Setting up monit


Hey,

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 :

Code:
check process apache with pidfile /var/run/httpd.pid 
   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 192.168.1.2 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, 10:07 PM   #2
rtspitz
Member
 
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, 05:24 PM   #3
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

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
 
  


Reply


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


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 03:01 PM
LXer: Server Monitoring With munin And monit LXer Syndicated Linux News 0 05-07-2006 09:54 PM
postfix/ldap/monit : where does the problem lie topcat Linux - Software 1 11-23-2004 11:28 PM
monitoring daemons, filesystems and more (Monit v4.0B) markus1982 Linux - Software 2 09-14-2003 09:38 AM
INFO: configuring monit (process monitoring) markus1982 Linux - Software 0 05-25-2003 06:39 AM


All times are GMT -5. The time now is 07:57 AM.

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