I put the commands in a script alert.sh and call that script in hobbit-alerts.cfg:
HOST=my_linux SERVICE=disk SCRIPT alert.sh my_linux
But still failed, no alert messages sent while disk state went to warning level, color was changed.
alert.sh:
#!/bin/sh echo "$RCPT disk went to warning state" |smbclient -M cici echo "$BBHOSTNAME disk reached warning state" |write hobbit
This test script works well in terminal mode.
[hobbit at my_linux etc]$ ../bin/bbcmd hobbitd_alert --test my_linux disk 2007-05-31 06:04:23 Using default environment file /home/hobbit/server/etc/hobbitserver.cfg 00005798 2007-05-31 06:04:23 send_alert my_linux:disk state Paging 00005798 2007-05-31 06:04:23 Matching host:service:page 'my_linux:disk:' against rule line 120 00005798 2007-05-31 06:04:23 *** Match with 'HOST=my_linux SERVICE=disk' *** 00005798 2007-05-31 06:04:23 Matching host:service:page 'my_linux:disk:' against rule line 120 00005798 2007-05-31 06:04:23 *** Match with 'HOST=my_linux SERVICE=disk' *** 00005798 2007-05-31 06:04:23 Script alert with command 'alert.sh' and recipient my_linux
The call looked like invalid, any other detail debug mechanism available?
Thanks again.
Case
On Wed, Jun 06, 2007 at 09:07:07PM +0800, casedj wrote:
I put the commands in a script alert.sh and call that script in hobbit-alerts.cfg:
HOST=my_linux SERVICE=disk SCRIPT alert.sh my_linux
You'd better use the full path to the script.
Henrik
I have my server as part of the hobbit monitoring pages.
However as this is the only system that it looks for bbgen and hobbitlaunch, I want to remove these. (one is yellow and one is purple so I just want to get rid of them)
Also on this server the mysql section is also constant orange, saying mysql has been restarted recently, when I know for a fact it hasn't. how do I resolve this? (Or even just remove it altogether)
B
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. If you are not the intended addressee please contact the sender and dispose of this e-mail. Thank you.
On Wednesday, 6 June 2007, Brian O'Mahony wrote:
I have my server as part of the hobbit monitoring pages.
However as this is the only system that it looks for bbgen and hobbitlaunch, I want to remove these. (one is yellow and one is purple so I just want to get rid of them)
If you want to get rid of the yellow, rather address the problems reported on that page (as there is a good reason it is yellow ...).
To get rid of the purple, drop it (see the bb man page), something like: $ ~hobbit/bin/bb localhost 'drop localhost hobbitlaunch'
Also on this server the mysql section is also constant orange, saying mysql has been restarted recently, when I know for a fact it hasn't. how do I resolve this? (Or even just remove it altogether)
AFAIK there is no built-in mysql check that does this, so this is probably running as an extension script. The published ones are client-side, meaning there is most likely a script on the host being monitored, which needs fixing (or removal, and subsequent dropping of the check as above). It could be running out of cron, or from clientlaunch.cfg on the client.
However, you may rather want to replace this check with dbcheck.pl from http://sourceforge.net/projects/hobbit-perl-cl/ (which runs server-side and works relatively well).
Regards, Buchan
-- Buchan Milne ISP Systems Specialist - Monitoring/Authentication Team Leader B.Eng,RHCE(803004789010797),LPIC-2(LPI000074592)
you can look at these logs
/var/log/hobbit/notifications.cfg /var/log/hobbit/page.log
Daniel Bourque Systems/Network Administrator Weather Data Inc
Office (316) 266-8013 Office (316) 265-9127 ext. 3013 Mobile (316) 640-1024
casedj wrote:
I put the commands in a script alert.sh and call that script in hobbit-alerts.cfg: HOST=my_linux SERVICE=disk SCRIPT alert.sh my_linux But still failed, no alert messages sent while disk state went to warning level, color was changed.
alert.sh:
#!/bin/sh echo "$RCPT disk went to warning state" |smbclient -M cici echo "$BBHOSTNAME disk reached warning state" |write hobbit This test scriptworks well in terminal mode. [hobbit at my_linux etc]$ ../bin/bbcmd hobbitd_alert --test my_linux disk 2007-05-31 06:04:23 Using default environment file /home/hobbit/server/etc/hobbitserver.cfg 00005798 2007-05-31 06:04:23 send_alert my_linux:disk state Paging 00005798 2007-05-31 06:04:23 Matching host:service:page 'my_linux:disk:' against rule line 120 00005798 2007-05-31 06:04:23 *** Match with 'HOST=my_linux SERVICE=disk' *** 00005798 2007-05-31 06:04:23 Matching host:service:page 'my_linux:disk:' against rule line 120 00005798 2007-05-31 06:04:23 *** Match with 'HOST=my_linux SERVICE=disk' *** 00005798 2007-05-31 06:04:23 Script alert with command 'alert.sh' and recipient my_linux The call looked like invalid, any other detail debug mechanism available? Thanks again. Case
participants (5)
-
bgmilne@staff.telkomsa.net
-
brian.omahony@curamsoftware.com
-
casedj@21cn.com
-
dbourque@weatherdata.com
-
henrik@hswn.dk