Event Handlers are not runing or logging.

Cook, Garry GWCOOK at mactec.com
Thu Aug 26 16:18:39 CEST 2004


nagios-users-admin at lists.sourceforge.net wrote:
> Hi,
> 
> Has anyone had any thoughts on what the cause on this problem (below)
> maybe? Do I need to provide more information or is everyone stumped?
> 
> Cheers,

Someone else already replied asking if the event handler is actually
defined in any of your service definitions. This is important, when a
service fails it needs to know to run the event handler. Also, if this
is defined and working properly, the problem could be in your script(s),
it looks as though you have two separate scripts to perform this restart
operation. Can you post those as well? And have you verified that they
work properly when run from the command line? If not, do this first.

Garry W. Cook, CCNA
Network Infrastructure Manager
MACTEC, Inc. - http://www.mactec.com/
303.308.6228 (Office) - 720.220.1862 (Mobile)
 
>> Bruce at WebFarm.co.nz       +64 06 7572881 |      (o o)
>> Systems Technician                       +---ooO-(_)-Ooo---+
>>                                                            |
>> WebFarm                           http://www.webfarm.co.nz |
>> FreeParking                   http://www.freeparking.co.nz |
> +------------------------------------------------------------+
> 
> ... FreeParking - NZ's best value Domain, WebHosting and
> email accounts
> - bar none
> ... WebFarm - NZ's eCommerce specialists since 1997
> 
> 
> 
> 
> Bruce wrote:
> 
>> Hi,
>> 
>> Ive been searching through the archives at sourceforge and cannot
>> seem to find what my problem here maybe (I searched for event, event
>> handler, handler and scroll through 10 pages about nothing even
>> related, I could have missed it though..) there was one that was
>> close but was for hosts... so ill post my one and see if anyone can
>> spot whats wrong. 
>> 
>> We have been using Nagios for around 12 months now, and its exelent
>> except for it keeps reporting that FreshClam or ClamD are not
>> running on a server, which is alright we login and restart it
>> manually. But to save time I thought I might set up an event handler
>> to call our existing root access module for the servers to do it.
>> Im trying to get it ruining from the host that monitors and not the
>> reporting host to avoid bandwidth usage, but even though it is
>> defined and everything looks right it will NOT run. and the logs say
>> nothing. 
>> 
>> Here is my dumbing down of the configs to see if it was something
>> else (which is wasnt):   (Yes, its running nagios 1.1)
>> 
>> -- nagios.cfg event stuff --
>> [root etc]# grep event nagios.cfg
>> log_event_handlers=1
>> #global_host_event_handler=somecommand
>> #global_service_event_handler=somecommand
>> event_handler_timeout=30
>> enable_event_handlers=1
>> --
>> 
>> -- checkcommands.cfg --
>> define command {
>> command_name                    allserver_freshclam_fix
>> command_line                    $USER1$/fix-w-allserver.sh
>> $HOSTADDRESS$ restartFreshClam.sh $SERVICESTATE$ $SERVICEATTEMPT$ }
>> --
>> 
>> -- hosts.cfg --
>> # Nagios hosts config
>> # Autogenerated file, do not modify
>> # Modify main etc hosts.cfg file
>> #
>> # Generated: 13-Aug-2004 06 pm
>> 
>> define host {
>>        use                            basic
>>        host_name                      creeper
>>        alias                          creeper
>>        address                        192.168.56.32
>> }



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list