event handler debug
fatcharly at gmx.de
fatcharly at gmx.de
Tue Nov 27 18:45:39 CET 2012
I forgot to mention that log_event_handlers is set to 1.
Kind regards
fatcharly
-------- Original-Nachricht --------
> Datum: Tue, 27 Nov 2012 18:32:58 +0100
> Von: fatcharly at gmx.de
> An: " nagios-list" <nagios-users at lists.sourceforge.net>
> Betreff: [Nagios-users] event handler debug
> Hi,
>
> I`m using a nagios 3.0.3 on a CentOS 5.8 and I´m a little stuck with a
> eventhandeler problem- I can`t see it running and I can´t find a problem in
> the logfiles. Here a short overview:
>
> define service{
> use generic-service
> host_name hostname
> service_description host_hh_prod1_1
> check_command check_nrpe!hh_prod1_1
> event_handler hh_prod11_down
> notifications_enabled 1
> }
>
>
> in commands.cfg is defined:
>
> define command{
> command_name hh_prod11_down
> command_line
> /usr/local/nagios/libexec/eventhandlers/hh_prod1_1_down.sh $HOSTSTATE$ $HOSTSTATETYPE$ $HOSTATTEMPT$
> }
>
>
> /usr/local/nagios/libexec/eventhandlers/hh_prod1_1_down.sh :
>
> #/bin/bash
> # $1=State $2=Zustandstyp hard oder soft $3= Versuch
> case $1 in
> OK)
> #/usr/local/nagios/libexec/check_nrpe -H 192.168.18.30 -c
> route_back_1
> echo `date`"route hh_prod1_1 ok" >>/var/log/ipsecrouting_beth.log
> ;;
> CRITICAL)
> if [ $2 == "HARD" ] || [[ $2="SOFT" && $3 -gt 0 ]]; then
> /usr/local/nagios/libexec/check_nrpe -H 192.168.16.4 -c
> check_hhprod11
> echo `date`"route hh_prod1_1 down"
> >>/var/log/ipsecrouting_beth.log
> fi
> ;;
> UNKNOWN)
> echo `date`"route hh_prod1_1 down unkonwn error kein event"
> >>/var/log/ipsecrouting_beth.log
> ;;
> esac
> exit 0
>
> When I call the hh_prod1_1_down.sh manuell with the appropriate numbers, I
> get entries in the ipsecrouting_beth.log-file and the command is executed,
> but when I let it run by nagios nothing is happening.
>
>
> Any suggestions or hints to debug (I already switched the debug to -1 but
> nothing can be found about the event handler) are welcome.
>
> Kind regards
>
> fatcharly
>
> ------------------------------------------------------------------------------
> Monitor your physical, virtual and cloud infrastructure from a single
> web console. Get in-depth insight into apps, servers, databases, vmware,
> SAP, cloud infrastructure, etc. Download 30-day Free Trial.
> Pricing starts from $795 for 25 servers or applications!
> http://p.sf.net/sfu/zoho_dev2dev_nov
> _______________________________________________
> 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
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
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