So I am trying to get monit to work correctly for a client.
When I have the start stop actions set up like
start = "/etc/init.d/httpd start"
stop = "/etc/init.d/httpd stop"
or
start program = "/etc/init.d/httpd start"
stop program = "/etc/init.d/httpd stop"
It cannot stop or start the httpd process.
I get results like:
Monitoring disabled -- service apache
'apache' stop: /etc/init.d/httpd
monit daemon at 2425 awakened
'apache' failed to stop
-------------------------------------------------------------------------------
monit [0x805442e]
monit(LogError+0x22) [0x8054842]
monit(Event_post+0x382) [0x8051f22]
monit [0x804fb8f]
monit(control_service+0x10c) [0x804ff6c]
monit [0x8066098]
monit(validate+0x78) [0x8066188]
monit [0x80567aa]
monit(main+0x55f) [0x805710f]
/lib/libc.so.6(__libc_start_main+0xdc) [0x3ace9c]
monit [0x804ee51]
-------------------------------------------------------------------------------
Execution failed notification is sent to ...
To debug I added an intermediary script to do some logging and of course
as all debugging actions do, its mere presence solved the problem.
Here is my current start stop:
start = "/root/startapache"
stop = "/root/stopapache"
Here are the contents:
[root@~]# cat /root/startapache
#!/bin/sh
echo "/root/startapache called" >>/root/httpds.log
/etc/init.d/httpd start
[root@~]# cat /root/stopapache
#!/bin/sh
echo "/root/stopapache called" >>/root/httpds.log
/etc/init.d/httpd stop
[root@~]#
What does this indicate? I'm stopped right here in the configuration
and roll out because if it doesn't work for apache, how likely is it to
work for any other service like named which is setup the same way.
One thing that bothered me when I ran monit -Iv is that it gives the result:
'apache' stop: /etc/init.d/httpd
Shouldn't that be:
'apache' stop: /etc/init.d/httpd stop
HELP! thanks!
--
Brian Layman
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general