Re: [Nagios-users] event handler debug

2012-11-27 Thread Matthew Jurgens
For shell based event handlers I normally add these lines to the top of 
the script:


set -x
exec >> /tmp/event.log 2>&1
echo "= Started `date` "
set

This way, everything the event handler does is written to the file 
/tmp/event.log


Also, this page: http://edcint.co.nz/checkwmiplus/?q=genericeventhandler
is about a generic event handler which could replace your event handler 
just by passing it some parameters. The other advantage of the generic 
event handler is that is has good logging and debug features.


This page: http://edcint.co.nz/checkwmiplus/?q=faq_worksoncommandline
is about plugins that don't work in Nagios but work on the command line. 
Most of the pointers here also apply to event handlers.


On 28/11/2012 6:16 AM, Assaf Flatto wrote:

On 27/11/12 17:32, fatcha...@gmx.de wrote:

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:






--
Smartmon System Monitoring 
www.smartmon.com.au 
--
Keep yourself connected to Go Parallel: 
DESIGN Expert tips on starting your parallel project right.
http://goparallel.sourceforge.net___
Nagios-users mailing list
Nagios-users@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

Re: [Nagios-users] event handler debug

2012-11-27 Thread Assaf Flatto
On 27/11/12 17:32, fatcha...@gmx.de wrote:
> 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_namehh_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@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
can you see anything on the nrpe side ?

when you are testing , are you running it as the nagios user or as root?

Where are you passing the parameters to the eventhandler in your command 
definition ?

--
Keep yourself connected to Go Parallel: 
DESIGN Expert tips on starting your parallel project right.
http://goparallel.sourceforge.net
___
Nagios-users mailing list
Nagios-users@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

Re: [Nagios-users] event handler debug

2012-11-27 Thread fatcharly

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: fatcha...@gmx.de
> An: " nagios-list" 
> 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_namehh_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@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@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

Re: [Nagios-users] Event Handler Question

2011-07-28 Thread Mathew Walker

May or may not be related... When testing new plugins and scripts, make sure 
you're testing them as the "nagios" user the scripts will be running as when 
integrated w/ Nagios.

I documented what I did for a previous employer awhile back here:
http://www.techadre.com/content/nagios-event-handler-restarting-service

Perhaps something in there may be useful.

-- 
Mat W. 

> From: marcel.ga...@trans4mation.de
> To: nagios-users@lists.sourceforge.net
> Date: Wed, 27 Jul 2011 11:46:18 +0200
> Subject: Re: [Nagios-users] Event Handler Question
> 
> Hey Chris,
> 
> have you taken a look into the Docu and verified that the used macros are 
> available in your context? Have you tried the debug option?
> 
> Marcel
> 
> 
> >From: Chris Zimmerman [mailto:czim...@wczimmerman.dyndns.org] 
> >Sent: Wednesday, July 27, 2011 12:27 AM
> >To: nagios-users@lists.sourceforge.net
> >Subject: [Nagios-users] Event Handler Question
> >
> >I am having an issue with a very basic event handler on Nagios 3.2.3.  I 
> >have the event handler defined with 3 macros: $HOSTSTATE$ $HOSTSTATETYPE$ 
> >$HOSTADDRESS$ all passed to a wrapper shell script that takes each macro as 
> >$1, $2, and $3.  In the >wrapper script I added some echo statements as part 
> >of my troubleshooting to figure out why my script wasn't working.  If I run 
> >the script manually and pass the arguments as I expect, the script runs 
> >fine.  When Nagios executes it, as verified in the log, >nothing is 
> >happening and it is because the first 2 arguments are not being passed to 
> >the script.  Interestingly, the third one is passed to the script.  
> >
> >So, what could be the issue with the command definition not passing the 
> >first 2 arguments?
> >
> >Thanks,
> >Chris
> 
> --
> Got Input?   Slashdot Needs You.
> Take our quick survey online.  Come on, we don't ask for help often.
> Plus, you'll get a chance to win $100 to spend on ThinkGeek.
> http://p.sf.net/sfu/slashdot-survey
> ___
> Nagios-users mailing list
> Nagios-users@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
  --
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey___
Nagios-users mailing list
Nagios-users@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

Re: [Nagios-users] Event Handler Question

2011-07-27 Thread Marcel Galke - Trans4mation IT GmbH
Hey Chris,

have you taken a look into the Docu and verified that the used macros are 
available in your context? Have you tried the debug option?

Marcel


>From: Chris Zimmerman [mailto:czim...@wczimmerman.dyndns.org] 
>Sent: Wednesday, July 27, 2011 12:27 AM
>To: nagios-users@lists.sourceforge.net
>Subject: [Nagios-users] Event Handler Question
>
>I am having an issue with a very basic event handler on Nagios 3.2.3.  I have 
>the event handler defined with 3 macros: $HOSTSTATE$ $HOSTSTATETYPE$ 
>$HOSTADDRESS$ all passed to a wrapper shell script that takes each macro as 
>$1, $2, and $3.  In the >wrapper script I added some echo statements as part 
>of my troubleshooting to figure out why my script wasn't working.  If I run 
>the script manually and pass the arguments as I expect, the script runs fine.  
>When Nagios executes it, as verified in the log, >nothing is happening and it 
>is because the first 2 arguments are not being passed to the script.  
>Interestingly, the third one is passed to the script.  
>
>So, what could be the issue with the command definition not passing the first 
>2 arguments?
>
>Thanks,
>Chris

--
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler & flapping

2010-04-26 Thread Giorgio Zarrelli
Try with environment variables, they Are described in the manual.  
Mauve they can help!

Ciao,

Giorgio

Il giorno 26/apr/2010, alle ore 18.54, alexus  ha  
scritto:

> On Mon, Apr 26, 2010 at 11:20 AM, Flyinvap  wrote:
>> Le Mon, 26 Apr 2010 10:25:37 -0400,
>> alexus  a écrit :
>>
>>> is there a way to incorporate flapping state into event handler?
>>
>> May be test $HOSTPERCENTCHANGE$, $SERVICEPERCENTCHANGE$ or
>> $NOTIFICATIONTYPE$ macros in your event handler script ?
>>
>> --
>> Fly
>>
>>
>>
>> --- 
>> --- 
>> --- 
>> -
>> ___
>> Nagios-users mailing list
>> Nagios-users@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
>
> I'm trying to pass $NOTIFICATIONTYPE$ into my event handler but I'm
> not sure why, it won't get passed...
> I even turn on debuging and I see my event handler kicks in, yet
> nothing get passed for NOTIFICATIONTYPE, yet all other stuff get
> passed that I was doing before such as SERVICESTATE SERVICESSTATETYPE
> and SERVICEATTEMPTS
>
> -- 
> http://alexus.org/
>
> --- 
> --- 
> --- 
> -
> ___
> Nagios-users mailing list
> Nagios-users@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

--
___
Nagios-users mailing list
Nagios-users@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

Re: [Nagios-users] event handler & flapping

2010-04-26 Thread alexus
On Mon, Apr 26, 2010 at 11:20 AM, Flyinvap  wrote:
> Le Mon, 26 Apr 2010 10:25:37 -0400,
> alexus  a écrit :
>
>> is there a way to incorporate flapping state into event handler?
>
> May be test $HOSTPERCENTCHANGE$, $SERVICEPERCENTCHANGE$ or
> $NOTIFICATIONTYPE$ macros in your event handler script ?
>
> --
> Fly
>
>
>
> --
> ___
> Nagios-users mailing list
> Nagios-users@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

I'm trying to pass $NOTIFICATIONTYPE$ into my event handler but I'm
not sure why, it won't get passed...
I even turn on debuging and I see my event handler kicks in, yet
nothing get passed for NOTIFICATIONTYPE, yet all other stuff get
passed that I was doing before such as SERVICESTATE SERVICESSTATETYPE
and SERVICEATTEMPTS

-- 
http://alexus.org/

--
___
Nagios-users mailing list
Nagios-users@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

Re: [Nagios-users] event handler & flapping

2010-04-26 Thread Flyinvap
Le Mon, 26 Apr 2010 10:25:37 -0400,
alexus  a écrit :

> is there a way to incorporate flapping state into event handler?

May be test $HOSTPERCENTCHANGE$, $SERVICEPERCENTCHANGE$ or
$NOTIFICATIONTYPE$ macros in your event handler script ?

-- 
Fly



--
___
Nagios-users mailing list
Nagios-users@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

Re: [Nagios-users] event handler script not executing

2010-03-10 Thread Stuart Browne
> -Original Message-
> From: Rick Garland [mailto:rick.garl...@quantum.com]
> >On Mar 10, 2010, at 11:29 AM, Rick Garland wrote:
> >> Hi Marc:
> >>
> >> In the script I have it doing a couple of arcane things for testing.
> >> I have it touch a file called 'test' and I have it echo the macro
> >> values to a file as well.
> >> These are successful.
> >
> >> When trying to launch from nagios these files are not present.
> >




> Many thanks. The issue was the requiretty. This is a new issue on RH
> and
> CentOS 5 and above.
> I have done the cleanup on event_handler definition. Didn't matter
> either way, did make the log entries cleaner.
> 
> The tip from Stuart was the key to helping me resolve.
> 
> Again, my apologies for the extraneous posts.

#
# From /etc/sudoers on our Nagios server:
#
Defaults:nagios !requiretty

:)

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler script not executing

2010-03-10 Thread Rick Garland


>On Mar 10, 2010, at 11:29 AM, Rick Garland wrote:
>
>> Hi Marc:
>> 
>> In the script I have it doing a couple of arcane things for testing.
>> I have it touch a file called 'test' and I have it echo the macro 
>> values to a file as well.
>> These are successful.
>
>> When trying to launch from nagios these files are not present.
>
>Are the paths hard-coded in your script? Is the directory writable by
nagios? Is the script executable? Is the magic line present and
well-formed?
>
>Also try changing the event_handler parameter in the service definition
from
>
>event_handler
remount-nfs!$SERVICESTATE$!$SERVICESTATETYPE$!$SERVICEATTEMPT$
>
>to
>
>event_handler remount-nfs
>
>The other parameters aren't being used in your command{} definition.
>
>> I am unable to find any post from yesterday that would contain any 
>> suggestions that were provided.
>
>Ok, so I meant to say 'the other day when you posted originally' -
http://www.mail-archive.com/nagios-users@lists.sourceforge.net/msg31297.
html
>
>--
>Marc

Many thanks. The issue was the requiretty. This is a new issue on RH and
CentOS 5 and above.
I have done the cleanup on event_handler definition. Didn't matter
either way, did make the log entries cleaner.

The tip from Stuart was the key to helping me resolve. 

Again, my apologies for the extraneous posts.

--
The information contained in this transmission may be confidential. Any 
disclosure, copying, or further distribution of confidential information is not 
permitted unless such privilege is explicitly granted in writing by Quantum. 
Quantum reserves the right to have electronic communications, including email 
and attachments, sent across its networks filtered through anti virus and spam 
software programs and retain such messages in order to comply with applicable 
data security and retention requirements. Quantum is not responsible for the 
proper and complete transmission of the substance of this communication or for 
any delay in its receipt.

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler script not executing

2010-03-10 Thread Marc Powell

On Mar 10, 2010, at 11:29 AM, Rick Garland wrote:

> Hi Marc:
> 
> In the script I have it doing a couple of arcane things for testing.
> I have it touch a file called 'test' and I have it echo the macro values
> to a file as well.
> These are successful.

> When trying to launch from nagios these files are not present.

Are the paths hard-coded in your script? Is the directory writable by nagios? 
Is the script executable? Is the magic line present and well-formed?

Also try changing the event_handler parameter in the service definition from

event_handler   remount-nfs!$SERVICESTATE$!$SERVICESTATETYPE$!$SERVICEATTEMPT$

to

event_handler remount-nfs

The other parameters aren't being used in your command{} definition.

> I am unable to find any post from yesterday that would contain any
> suggestions that were provided.

Ok, so I meant to say 'the other day when you posted originally' - 
http://www.mail-archive.com/nagios-users@lists.sourceforge.net/msg31297.html

--
Marc
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler script not executing

2010-03-10 Thread Rick Garland
-Original Message-
From: Marc Powell [mailto:m...@ena.com] 
Sent: Wednesday, March 10, 2010 10:10 AM
To: Nagios Users List
Subject: Re: [Nagios-users] event handler script not executing


On Mar 10, 2010, at 10:34 AM, Rick Garland wrote:

> Hi Mark:
> 
> I have included the entry from the nagios.log file
>> The entry in the nagios.log
>> [1268099555] SERVICE_EVENT_HANDLER: my_host;NFS
>> CHECK;CRITCAL;SOFT;3;remount-nfs!CRITCAL!SOFT!3
> 
> Within nagios the event handler is being launched. But the executable
is not getting touched.
> When viewing the Event Log from the GUI, it has that little graphic
for the Event Handler as well.
> 
> But still, the bash script (perms 755 and owned by nagios) is not
being touched.

How do you know this?

Look back at the suggestions from yesterday.

--
Marc


Hi Marc:

In the script I have it doing a couple of arcane things for testing.
I have it touch a file called 'test' and I have it echo the macro values
to a file as well.
These are successful.

When trying to launch from nagios these files are not present.

I am unable to find any post from yesterday that would contain any
suggestions that were provided.

--
The information contained in this transmission may be confidential. Any 
disclosure, copying, or further distribution of confidential information is not 
permitted unless such privilege is explicitly granted in writing by Quantum. 
Quantum reserves the right to have electronic communications, including email 
and attachments, sent across its networks filtered through anti virus and spam 
software programs and retain such messages in order to comply with applicable 
data security and retention requirements. Quantum is not responsible for the 
proper and complete transmission of the substance of this communication or for 
any delay in its receipt.

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler script not executing

2010-03-10 Thread Marc Powell

On Mar 10, 2010, at 10:34 AM, Rick Garland wrote:

> Hi Mark:
> 
> I have included the entry from the nagios.log file
>> The entry in the nagios.log
>> [1268099555] SERVICE_EVENT_HANDLER: my_host;NFS
>> CHECK;CRITCAL;SOFT;3;remount-nfs!CRITCAL!SOFT!3
> 
> Within nagios the event handler is being launched. But the executable is not 
> getting touched.
> When viewing the Event Log from the GUI, it has that little graphic for the 
> Event Handler as well.
> 
> But still, the bash script (perms 755 and owned by nagios) is not being 
> touched.

How do you know this?

Look back at the suggestions from yesterday.

--
Marc


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler script not executing

2010-03-10 Thread Rick Garland
Hi Mark:

I have included the entry from the nagios.log file
 > The entry in the nagios.log
 > [1268099555] SERVICE_EVENT_HANDLER: my_host;NFS
 > CHECK;CRITCAL;SOFT;3;remount-nfs!CRITCAL!SOFT!3

Within nagios the event handler is being launched. But the executable is not 
getting touched.
When viewing the Event Log from the GUI, it has that little graphic for the 
Event Handler as well.

But still, the bash script (perms 755 and owned by nagios) is not being touched.






Rick Garland
Sr System Administrator
Quantum, Corp.
8560 Upland Dr.
Englewood, CO  80112
 
office   720-249-5984
cell  720-210-4671
rick.garl...@quantum.com

-Original Message-
From: Mark Elsen [mailto:mark.el...@gmail.com] 
Sent: Wednesday, March 10, 2010 8:47 AM
To: Nagios Users List
Subject: Re: [Nagios-users] event handler script not executing

> Hi all:
>
> Got Nagios core 3.2.0 on CentOS5. Been trying to get an event handler 
> to execute but it will not. My configs;
>
> define service{
>    use                               local_service
>    host_name                    my_host
>    service_description         NFS Check
>    check_period                  24x7
>    check_interval                20
>    max_check_attempts     4
>    check_command            check_nrpe!check_nfs_mounts
>    event_handler_enabled    1
>    event_handler
> remount-nfs!$SERVICESTATE$!$SERVICESTATETYPE$!$SERVICEATTEMPT$
>    notification_period           24x7
>    notification_interval          120
>    contact_groups              colorado }
>
> define command{
>    command_name            remount-nfs
>    command_line               $USER1$/eventhandlers/remount-nfs 
> $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ }
>
> enable_event_handlers=1 in the nagios.cfg file
>
> The script itself is very simple. At CRITICAL/SOFT/3 and 
> CRITCAL/HARD/4 the script will execute. Running at command line as UID=nagios 
> it runs fine.
> sudo is configured and nagios can mount NFS.
>
>
> The entry in the nagios.log
> [1268099555] SERVICE_EVENT_HANDLER: my_host;NFS
> CHECK;CRITCAL;SOFT;3;remount-nfs!CRITCAL!SOFT!3
>
> I have followed the process through and it will not execute the 
> remount-nfs event handler command.
>
> All perms, dir & file, have been checked. Everything else is working 
> as it should including the $SERVICE* macros. Just the script is not being 
> executed.
>
> What is missing?
>

   Check nagios event log or nagios.log 'physically' for starters, to 
check if the event handler is being launched.

M.

--
Download Intel® Parallel Studio Eval Try the new software tools for 
yourself. Speed compiling, find bugs proactively, and fine-tune applications 
for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Nagios-users mailing list
Nagios-users@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

--
The information contained in this transmission may be confidential. Any 
disclosure, copying, or further distribution of confidential information is not 
permitted unless such privilege is explicitly granted in writing by Quantum. 
Quantum reserves the right to have electronic communications, including email 
and attachments, sent across its networks filtered through anti virus and spam 
software programs and retain such messages in order to comply with applicable 
data security and retention requirements. Quantum is not responsible for the 
proper and complete transmission of the substance of this communication or for 
any delay in its receipt.

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler script not executing

2010-03-10 Thread Mark Elsen
> Hi all:
>
> Got Nagios core 3.2.0 on CentOS5. Been trying to get an event handler to 
> execute
> but it will not. My configs;
>
> define service{
>    use                               local_service
>    host_name                    my_host
>    service_description         NFS Check
>    check_period                  24x7
>    check_interval                20
>    max_check_attempts     4
>    check_command            check_nrpe!check_nfs_mounts
>    event_handler_enabled    1
>    event_handler
> remount-nfs!$SERVICESTATE$!$SERVICESTATETYPE$!$SERVICEATTEMPT$
>    notification_period           24x7
>    notification_interval          120
>    contact_groups              colorado
> }
>
> define command{
>    command_name            remount-nfs
>    command_line               $USER1$/eventhandlers/remount-nfs $SERVICESTATE$
> $SERVICESTATETYPE$ $SERVICEATTEMPT$
> }
>
> enable_event_handlers=1 in the nagios.cfg file
>
> The script itself is very simple. At CRITICAL/SOFT/3 and CRITCAL/HARD/4 the
> script will execute. Running at command line as UID=nagios it runs fine.
> sudo is configured and nagios can mount NFS.
>
>
> The entry in the nagios.log
> [1268099555] SERVICE_EVENT_HANDLER: my_host;NFS
> CHECK;CRITCAL;SOFT;3;remount-nfs!CRITCAL!SOFT!3
>
> I have followed the process through and it will not execute the remount-nfs
> event handler command.
>
> All perms, dir & file, have been checked. Everything else is working as it
> should including the $SERVICE* macros. Just the script is not being executed.
>
> What is missing?
>

   Check nagios event log or nagios.log 'physically' for
starters, to check if the event handler is being launched.

M.

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler script not executing

2010-03-10 Thread Rick Garland
Ping - anyresponses?
 


Rick Garland
Sr System Administrator
Quantum, Corp.
8560 Upland Dr.
Englewood, CO  80112
 
office   720-249-5984
cell  720-210-4671
rick.garl...@quantum.com

-Original Message-
From: Rick [mailto:rick.garl...@quantum.com] 
Sent: Tuesday, March 09, 2010 7:04 AM
To: nagios-users@lists.sourceforge.net
Subject: [Nagios-users] event handler script not executing

Hi all:
 
Got Nagios core 3.2.0 on CentOS5. Been trying to get an event handler to
execute but it will not. My configs;
 
define service{
use   local_service
host_namemy_host
service_description NFS Check
check_period  24x7
check_interval20
max_check_attempts 4
check_commandcheck_nrpe!check_nfs_mounts
event_handler_enabled1
event_handler   
remount-nfs!$SERVICESTATE$!$SERVICESTATETYPE$!$SERVICEATTEMPT$
notification_period   24x7
notification_interval  120
contact_groups  colorado
}
 
define command{
command_nameremount-nfs
command_line   $USER1$/eventhandlers/remount-nfs
$SERVICESTATE$
$SERVICESTATETYPE$ $SERVICEATTEMPT$
}
 
enable_event_handlers=1 in the nagios.cfg file
 
The script itself is very simple. At CRITICAL/SOFT/3 and CRITCAL/HARD/4
the script will execute. Running at command line as UID=nagios it runs
fine.
sudo is configured and nagios can mount NFS. 
 
 
The entry in the nagios.log
[1268099555] SERVICE_EVENT_HANDLER: my_host;NFS
CHECK;CRITCAL;SOFT;3;remount-nfs!CRITCAL!SOFT!3
 
I have followed the process through and it will not execute the
remount-nfs event handler command. 

All perms, dir & file, have been checked. Everything else is working as
it should including the $SERVICE* macros. Just the script is not being
executed.
 
What is missing?
 
Many thanks
 




--
Download Intel® Parallel Studio Eval Try the new software tools for
yourself. Speed compiling, find bugs proactively, and fine-tune
applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Nagios-users mailing list
Nagios-users@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

--
The information contained in this transmission may be confidential. Any 
disclosure, copying, or further distribution of confidential information is not 
permitted unless such privilege is explicitly granted in writing by Quantum. 
Quantum reserves the right to have electronic communications, including email 
and attachments, sent across its networks filtered through anti virus and spam 
software programs and retain such messages in order to comply with applicable 
data security and retention requirements. Quantum is not responsible for the 
proper and complete transmission of the substance of this communication or for 
any delay in its receipt.

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler script not executing

2010-03-10 Thread Assaf Flatto
You sent this issue in a previous thread , check the replies you got there .




Rick Garland wrote:
> Ping - any responses?
>  
>
>
> Rick Garland
> Sr System Administrator
> Quantum, Corp.
> 8560 Upland Dr.
> Englewood, CO  80112
>  
> office   720-249-5984
> cell  720-210-4671
> rick.garl...@quantum.com
>
> -Original Message-
> From: Rick [mailto:rick.garl...@quantum.com] 
> Sent: Tuesday, March 09, 2010 7:04 AM
> To: nagios-users@lists.sourceforge.net
> Subject: [Nagios-users] event handler script not executing
>
> Hi all:
>  
> Got Nagios core 3.2.0 on CentOS5. Been trying to get an event handler to
> execute but it will not. My configs;
>  
> define service{
> use   local_service
> host_namemy_host
> service_description NFS Check
> check_period  24x7
> check_interval20
> max_check_attempts 4
> check_commandcheck_nrpe!check_nfs_mounts
> event_handler_enabled1
> event_handler   
> remount-nfs!$SERVICESTATE$!$SERVICESTATETYPE$!$SERVICEATTEMPT$
> notification_period   24x7
> notification_interval  120
> contact_groups  colorado
> }
>  
> define command{
> command_nameremount-nfs
> command_line   $USER1$/eventhandlers/remount-nfs
> $SERVICESTATE$
> $SERVICESTATETYPE$ $SERVICEATTEMPT$
> }
>  
> enable_event_handlers=1 in the nagios.cfg file
>  
> The script itself is very simple. At CRITICAL/SOFT/3 and CRITCAL/HARD/4
> the script will execute. Running at command line as UID=nagios it runs
> fine.
> sudo is configured and nagios can mount NFS. 
>  
>  
> The entry in the nagios.log
> [1268099555] SERVICE_EVENT_HANDLER: my_host;NFS
> CHECK;CRITCAL;SOFT;3;remount-nfs!CRITCAL!SOFT!3
>  
> I have followed the process through and it will not execute the
> remount-nfs event handler command. 
>
> All perms, dir & file, have been checked. Everything else is working as
> it should including the $SERVICE* macros. Just the script is not being
> executed.
>  
> What is missing?
>  
> Many thanks
>   


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler script not executing

2010-03-10 Thread Rick Garland
Ping - any responses?
 


Rick Garland
Sr System Administrator
Quantum, Corp.
8560 Upland Dr.
Englewood, CO  80112
 
office   720-249-5984
cell  720-210-4671
rick.garl...@quantum.com

-Original Message-
From: Rick [mailto:rick.garl...@quantum.com] 
Sent: Tuesday, March 09, 2010 7:04 AM
To: nagios-users@lists.sourceforge.net
Subject: [Nagios-users] event handler script not executing

Hi all:
 
Got Nagios core 3.2.0 on CentOS5. Been trying to get an event handler to
execute but it will not. My configs;
 
define service{
use   local_service
host_namemy_host
service_description NFS Check
check_period  24x7
check_interval20
max_check_attempts 4
check_commandcheck_nrpe!check_nfs_mounts
event_handler_enabled1
event_handler   
remount-nfs!$SERVICESTATE$!$SERVICESTATETYPE$!$SERVICEATTEMPT$
notification_period   24x7
notification_interval  120
contact_groups  colorado
}
 
define command{
command_nameremount-nfs
command_line   $USER1$/eventhandlers/remount-nfs
$SERVICESTATE$
$SERVICESTATETYPE$ $SERVICEATTEMPT$
}
 
enable_event_handlers=1 in the nagios.cfg file
 
The script itself is very simple. At CRITICAL/SOFT/3 and CRITCAL/HARD/4
the script will execute. Running at command line as UID=nagios it runs
fine.
sudo is configured and nagios can mount NFS. 
 
 
The entry in the nagios.log
[1268099555] SERVICE_EVENT_HANDLER: my_host;NFS
CHECK;CRITCAL;SOFT;3;remount-nfs!CRITCAL!SOFT!3
 
I have followed the process through and it will not execute the
remount-nfs event handler command. 

All perms, dir & file, have been checked. Everything else is working as
it should including the $SERVICE* macros. Just the script is not being
executed.
 
What is missing?
 
Many thanks
 




--
Download Intel® Parallel Studio Eval Try the new software tools for
yourself. Speed compiling, find bugs proactively, and fine-tune
applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Nagios-users mailing list
Nagios-users@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

--
The information contained in this transmission may be confidential. Any 
disclosure, copying, or further distribution of confidential information is not 
permitted unless such privilege is explicitly granted in writing by Quantum. 
Quantum reserves the right to have electronic communications, including email 
and attachments, sent across its networks filtered through anti virus and spam 
software programs and retain such messages in order to comply with applicable 
data security and retention requirements. Quantum is not responsible for the 
proper and complete transmission of the substance of this communication or for 
any delay in its receipt.

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler command not executing

2010-03-08 Thread Justin Pryzby
4th guess: is it executable?

Justin

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler command not executing

2010-03-08 Thread Morris, Patrick
Rick Garland wrote:
> The script itself is very simple. At CRITICAL/SOFT/3 and 
> CRITCAL/HARD/4 the script will execute. Running at command line as 
> UID=nagios it runs fine.
> sudo is configured and nagios can mount NFS.
>  
>  
> The entry in the nagios.log
> [1268099555] SERVICE_EVENT_HANDLER: my_host;NFS 
> CHECK;CRITCAL;SOFT;3;remount-nfs!CRITCAL!SOFT!3
>  
> I have followed the process through and it will not execute the 
> remount-nfs event handler command.
>  
> What is missing?
>  

Does your script account for "CRITICAL" being spelled wrong?

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler command not executing

2010-03-08 Thread Stuart Browne
> -Original Message-
> From: Marc Powell [mailto:m...@ena.com]
>

> 
> Try adding a bit at the top of the script to touch a file or something
> to see if it really ran and is maybe failing further into the script
> (i.e. because of a potential sudo restriction).

exec > /tmp/$(/bin/basename $0).log 2>&1

One of my favourite pieces of bash trickery :P

Stuart

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler command not executing

2010-03-08 Thread Marc Powell

On Mar 8, 2010, at 7:58 PM, Rick Garland wrote:

> define command{
> command_nameremount-nfs
> command_line   $USER1$/eventhandlers/remount-nfs 
> $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$
> }
>  
> enable_event_handlers=1 in the nagios.cfg file
>  
> The script itself is very simple. At CRITICAL/SOFT/3 and CRITCAL/HARD/4 the 
> script will execute. Running at command line as UID=nagios it runs fine.
> sudo is configured and nagios can mount NFS.
>  
>  
> The entry in the nagios.log
> [1268099555] SERVICE_EVENT_HANDLER: my_host;NFS 
> CHECK;CRITCAL;SOFT;3;remount-nfs!CRITCAL!SOFT!3

Nagios is running it. This is good.

> I have followed the process through and it will not execute the remount-nfs 
> event handler command.

>  
> What is missing?

First guess: you have REQUIRETTY enabled in your sudoers file (run visudo and 
check).
Second guess: $USER1$ doesn't point to the location of 
{?}/eventhandlers/remount_nfs.
Third guess: you do not use hard-coded paths to programs used within 
remount-nfs. The working environment for scripts executed by nagios is very 
minimal. Don't depend on $PATH being as complete as it is during an interactive 
session. Hard code paths to everything. That should be a BCP anyway.

Try adding a bit at the top of the script to touch a file or something to see 
if it really ran and is maybe failing further into the script (i.e. because of 
a potential sudo restriction).

--
Marc


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler

2009-04-22 Thread Anirudh Srinivasan
Hi,
Thanks for your reply . Thats was a useful sugestion. But is there any
eventhandler for windows that supports NC_NET .  I tried using winexe but
had a hard time testing it any it never worked for me.

Why i am saying this is because we have over 50 windows machines that has
NC_NET , its going to be tough time replacing the client.

Thanks in Adv

Anirudh
--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p___
Nagios-users mailing list
Nagios-users@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

Re: [Nagios-users] event handler

2009-04-22 Thread Fernando Rocha
Hello Anirudh! 

If you change the check_nrpe to check_nt it will not work. 

This plugin uses nsclient++, that supports to run commands remotely over the 
nrpe. 

To add the event handlers you must change the the agent installed at hosts. 

To be easily, you can use the OpMon Agent, that is nsclient++ based, has 
built-in a similar plugin to control windows services and supports also yours 
check_nt commands. 

http://www.opservices.com.br/agentes 
opmonagent-2.8.2.0_autoinstall.exe 

So, just uninstall the current agent, install the OpMon Agent and use the 
check_nrpe to run the event handler. 

> define command{ 
> command_name win_service_restart 
> command_line $USER1$/ check_nrpe -H $HOSTADDRESS$ -p 5666 -c service_control 
> -n -a   
> } 

You have also get installed the nrpe on your nagios host, that provides the 
check_nrpe. 

-- 
Fernando Rocha  
OpServices - Porto Alegre - RS - Brasil 
+55 51 3275.3588 
www.opservices.com.br 
www.opmon.org 

- "Anirudh Srinivasan"  wrote: 
> Hey Folks 

> 
I am currently working on event handlers to restart services on Windows 
machines 

> 
I have NC_Net installed on all client windows machines. I was looking at this 
plugin " Windows Failed Service restart batch file" at Nagios Exchange. 

> 
File: win_service_restart.cmd 
> Author: Vadims Zenins http://vadimszenins.blogspot.com 
> Version: 1.03 
> Date: 16/12/2008 17:19 
> Windows Failed Service restart batch file for Nagios Event Handler 
> 
> Copy win_service_restart.cmd to \NSClient++\scripts\ folder. 
> 
> Nagios commands.cfg: 
> define command{ 
> command_name win_service_restart 
> command_line $USER1$/ check_nrpe -H $HOSTADDRESS$ -p 5666 -c 
> win_service_restart -a "$SERVICEDESC$" $SERVICESTATE$ $SERVICESTATETYPE$ 
> $SERVICEATTEMPT$ 
> } 
> 
> Nagios template-services_common-win.cfg.cfg 
> define service{ 
> name generic-service-win-wuauserv 
> service_description wuauserv 
> display_name Automatic Updates 
> event_handler win_service_restart 
> event_handler_enabled 1 
> check_command check_nt!SERVICESTATE!-d SHOWALL -l $SERVICEDESC$ 
> } 
> 
> NSCLIENT++ NSC.ini: 
> [NRPE] 
> allowed_hosts= 192.168.1.1/32 ; your Nagios server IP 
> allow_arguments=1 
> [External Script] 
> allow_arguments=1 
> allow_nasty_meta_chars=1 
> [NRPE Handlers] 
> command[win_service_restart]=scripts\win_service_restart.cmd "$ARG1$" $ARG2$ 
> $ARG3$ $ARG4$ 
> 

> 
It uses check_nrpe at the commands.cfg file, but here we use check_nt . 

> 
My question is, will this work if i change it to check_nt . Or is there any 
changes that has to be made. 

> 
Can anyone please shed light on this . 

> 
- 
> Anirudh Srinivasan 
> 
> 
> --
>  Stay on top of everything new and different, both inside and around Java 
> (TM) technology - register by April 22, and save $200 on the JavaOne (SM) 
> conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on 
> sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p 
> ___ Nagios-users mailing list 
> Nagios-users@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 --
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p___
Nagios-users mailing list
Nagios-users@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

Re: [Nagios-users] event handler notification

2008-08-22 Thread Taylor Dondich
That seems a bit weird?  In that case, why have an event handler
anyways?  You just tell notifications to be sent on the first soft
state change (max_check_attempts = 1).  Event Handlers are meant to
try and pro-actively resolve the issue before determining notification
is an appropriate step.

Taylor

On Fri, Aug 22, 2008 at 10:26 AM, Mikael Fridh <[EMAIL PROTECTED]> wrote:
> On Fri, Aug 22, 2008 at 6:02 PM, Marc Powell <[EMAIL PROTECTED]> wrote:
>>
>> On Aug 22, 2008, at 6:48 AM, Jordi Prats wrote:
>>
>>> Hi all,
>>> I've found no way to send a notification if a event handler is
>>> triggered. Is it possible?
>>
>> Please expand. The question above can be interpreted several ways.
>> There's no reason I am aware of that a normal notification wouldn't go
>> out if event handlers were enabled. If you want a notification that
>> the event handler itself fired, your event handler would have to do
>> that.
>
> Apologies Marc, for my erroneous reply to you.
>
> Jordi: An Event Handler can execute any command, so just define a command
> that executes your normal notification script.
> The official Nagios documentation should contain enough info.
>
> --
> Fridh
>
> -
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ___
> Nagios-users mailing list
> Nagios-users@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
>



-- 
Taylor
Check out my Shortcut with O'Reilly Press:
Network Monitoring with Nagios:
http://oreilly.com/catalog/9780596528195/index.html

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler notification

2008-08-22 Thread Mikael Fridh
On Fri, Aug 22, 2008 at 6:02 PM, Marc Powell <[EMAIL PROTECTED]> wrote:
>
> On Aug 22, 2008, at 6:48 AM, Jordi Prats wrote:
>
>> Hi all,
>> I've found no way to send a notification if a event handler is
>> triggered. Is it possible?
>
> Please expand. The question above can be interpreted several ways.
> There's no reason I am aware of that a normal notification wouldn't go
> out if event handlers were enabled. If you want a notification that
> the event handler itself fired, your event handler would have to do
> that.

Apologies Marc, for my erroneous reply to you.

Jordi: An Event Handler can execute any command, so just define a command
that executes your normal notification script.
The official Nagios documentation should contain enough info.

--
Fridh

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler notification

2008-08-22 Thread Marc Powell

On Aug 22, 2008, at 6:48 AM, Jordi Prats wrote:

> Hi all,
> I've found no way to send a notification if a event handler is
> triggered. Is it possible?

Please expand. The question above can be interpreted several ways.  
There's no reason I am aware of that a normal notification wouldn't go  
out if event handlers were enabled. If you want a notification that  
the event handler itself fired, your event handler would have to do  
that.

--
Marc



-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Event handler with null values

2008-06-22 Thread Thomas Guyot-Sionnest
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 22/06/08 11:49 AM, Marc Powell wrote:
> On Jun 22, 2008, at 8:40 AM, Lennard Bakker wrote:
> 
>> Hi,
>>
>> If have created an event handler for sync a time when needed. But when
>> nagios calls the event handler, it calls the handler with null values.
>>
>> [1214136751] SERVICE EVENT HANDLER: host;TIME;(null);(null); 
>> (null);synctime
>>
>> The macro's $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ all  
>> have
>> a null (empty) value.
>>
>> Something i did wrong?
> 
> 
> This may be a logging only issue. Does your script see correct values?  
> Can you post the service{} and event handler command{} definitions?  
> What version of nagios are you using?

I believe this was reported on IRC and the guy sent an email about it...
If I remember properly is was effectively a logging problem (I'm not
100% sure though),

Are you seeing this on Nagios 3.0.2? If so I'll look into it when I have
time and repost it.

Thanks

Thomas
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIXv3D6dZ+Kt5BchYRAgYzAKDIYdrNDqpoWGqzUxXY7i1hW8RWdQCghBOi
4aASvAiLHYxtaKJzIGc72GY=
=JHKh
-END PGP SIGNATURE-

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Event handler with null values

2008-06-22 Thread Marc Powell

On Jun 22, 2008, at 8:40 AM, Lennard Bakker wrote:

> Hi,
>
> If have created an event handler for sync a time when needed. But when
> nagios calls the event handler, it calls the handler with null values.
>
> [1214136751] SERVICE EVENT HANDLER: host;TIME;(null);(null); 
> (null);synctime
>
> The macro's $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ all  
> have
> a null (empty) value.
>
> Something i did wrong?


This may be a logging only issue. Does your script see correct values?  
Can you post the service{} and event handler command{} definitions?  
What version of nagios are you using?

--
Marc


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler not working

2008-06-11 Thread Marc Powell

On Jun 11, 2008, at 7:55 AM, Kevin Manuel wrote:

> Thanks Marc, it works now. Except there doesn't appear to be a way  
> to invoke
> the event handler when multiple OK states are reported, which was  
> the reason
> for creating the event handler in the first place. I guess I will  
> have to
> use something other than Nagios for this type of monitoring, but I
> appreciate all of your help.

I don't know what you're final goal is but you might consider creating  
a simple wrapper for the plugin you're executing and have it execute  
the event handler in the background, such that the wrapper script  
terminates before the nagios timeout, if the status meets your criteria.

--
Marc

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler question (if event handler is what I need?)

2008-06-11 Thread Yaniv
Marc

Thank you... the documentation is very good and it answered all my questions
about event handler...

And it works now... thanks again

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marc Powell
Sent: Tuesday, June 10, 2008 15:03
Cc: Nagios Users Mailinglist
Subject: Re: [Nagios-users] event handler question (if event handler is what
I need?)


On Jun 10, 2008, at 4:09 AM, Yaniv wrote:

> Hello Nagios users

Hello! Please send to this list using text/plain e-mail. Sending HTML  
does not-so-wonderful things for the archives and for users who  
receive the list via digest.

> I am new to nagios and have a question about event handlers. (if  
> event handler is what I need?)

Yes, that sounds like just what you need.


> I would like a script that I have located at /root/scripts/test.sh  
> to be executed if the hard drive get's to the warning state and  
> critical state.

Perfect, even down to running a script on the nagios box. Very  
straigtforward.

> How would I do that?

http://nagios.sourceforge.net/docs/3_0/eventhandlers.html

--
Marc


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Nagios-users mailing list
Nagios-users@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
No virus found in this incoming message.
Checked by AVG. 
Version: 8.0.100 / Virus Database: 270.2.0/1493 - Release Date: 09/06/2008
17:25


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler not working

2008-06-10 Thread Marc Powell

On Jun 10, 2008, at 9:32 AM, Kevin Manuel wrote:

> Hi,
>
> I can see where the event handler has been called in the log. Any  
> idea what
> the error message below would mean?

Yes, see below..


> Also, the service event handler is not called unless the state  
> changes (i.e.
> 2-OK's in a row - event handler only called for the first one). Do  
> you know
> if Is there a way to change this behaviour?

I do not believe that there is, at least for OK states. For non-OK  
states. is_volatile _might_ work for you --

http://nagios.sourceforge.net/docs/3_0/volatileservices.html

> [1213107234] SERVICE EVENT HANDLER: snmptrap_test;SNMP Trap
> Alert;CRITICAL;HARD;1;renotify-on-ok
> [1213107234] **ePN failed to compile
> /usr/local/nagios/libexec/renotify-on-ok: "Global symbol  
> "$contactEmail"
> requires explicit package name at (eval 12) line 40,
> Global symbol "$notificationNumber" requires explicit package name  
> at (eval
> 12) line 49.
> Global symbol "$notificationType" requires explicit package name at  
> (eval
> 12) line 5" at /usr/local/nagios/bin/p1.pl line 237.

These errors mean that you have compiled nagios with the embedded perl  
interpreter enabled. That means that perl programs executed by nagios  
must satisfy a higher standard of design to run 
(http://nagios.sourceforge.net/docs/3_0/epnplugins.html 
). This program does not. You have several options --

1) Disable use of ePN for this plugin specifically by changing the  
command line 'command_line /path/to/perl $USER1$/...' were path/to/ 
perl is the path to your perl binary or
2) If using nagios-3, include the text '# nagios: -epn' within your  
plugin (http://nagios.sourceforge.net/docs/3_0/embeddedperl.html) or
3) if using nagios-3, disable implicit use of the ePN 
(http://nagios.sourceforge.net/docs/3_0/configmain.html#use_embedded_perl_implicitly
 
) or
4) if using nagios-3, disable use of ePN globally 
(http://nagios.sourceforge.net/docs/3_0/configmain.html#enable_embedded_perl 
)

--
Marc

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler not working

2008-06-10 Thread Kevin Manuel
Hi, 

I can see where the event handler has been called in the log. Any idea what
the error message below would mean? 

Also, the service event handler is not called unless the state changes (i.e.
2-OK's in a row - event handler only called for the first one). Do you know
if Is there a way to change this behaviour?

[1213107234] SERVICE EVENT HANDLER: snmptrap_test;SNMP Trap
Alert;CRITICAL;HARD;1;renotify-on-ok
[1213107234] **ePN failed to compile
/usr/local/nagios/libexec/renotify-on-ok: "Global symbol "$contactEmail"
requires explicit package name at (eval 12) line 40,
Global symbol "$notificationNumber" requires explicit package name at (eval
12) line 49.
Global symbol "$notificationType" requires explicit package name at (eval
12) line 5" at /usr/local/nagios/bin/p1.pl line 237.

Thanks in advance,

Keivn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marc Powell
Sent: June-09-08 5:28 PM
To: nagios Mailinglist
Subject: Re: [Nagios-users] event handler not working


On Jun 7, 2008, at 8:18 AM, Kevin Manuel wrote:

> Hi Marc,
>
> I am actually trying to use the event handler to send a message when  
> the
> host is already in an OK state and an additional service=OK is  
> received. I
> have not enable debug - how do I go about this?

See the last 4 directives of --

http://nagios.sourceforge.net/docs/3_0/configmain.html

--
Marc

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Nagios-users mailing list
Nagios-users@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


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler question (if event handler is what I need?)

2008-06-10 Thread Marc Powell

On Jun 10, 2008, at 4:09 AM, Yaniv wrote:

> Hello Nagios users

Hello! Please send to this list using text/plain e-mail. Sending HTML  
does not-so-wonderful things for the archives and for users who  
receive the list via digest.

> I am new to nagios and have a question about event handlers… (if  
> event handler is what I need?)

Yes, that sounds like just what you need.


> I would like a script that I have located at /root/scripts/test.sh  
> to be executed if the hard drive get’s to the warning state and  
> critical state…

Perfect, even down to running a script on the nagios box. Very  
straigtforward.

> How would I do that?

http://nagios.sourceforge.net/docs/3_0/eventhandlers.html

--
Marc


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler not working

2008-06-09 Thread Marc Powell

On Jun 7, 2008, at 8:18 AM, Kevin Manuel wrote:

> Hi Marc,
>
> I am actually trying to use the event handler to send a message when  
> the
> host is already in an OK state and an additional service=OK is  
> received. I
> have not enable debug - how do I go about this?

See the last 4 directives of --

http://nagios.sourceforge.net/docs/3_0/configmain.html

--
Marc

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler not working

2008-06-09 Thread Kevin Manuel
Hi Marc,

I am actually trying to use the event handler to send a message when the
host is already in an OK state and an additional service=OK is received. I
have not enable debug - how do I go about this?

Kevin

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marc Powell
Sent: June-06-08 11:40 AM
To: nagios Mailinglist
Subject: Re: [Nagios-users] event handler not working


On Jun 6, 2008, at 6:49 AM, Kevin Manuel wrote:

> I should add that I am trying to invoke the event handler through  
> passive
> service checks supplied by an external command (the external  
> commands and
> passive service checks work fine, but I'm wondering if something  
> needs to be
> configured differently for Nagios to call the event handler)
>

Based on my reading of the code, when it comes to event handlers  
there's no difference between an active and passive check. Nagios will  
_not_ run a service event handler if the host is in a non-OK state  
though. Is that the case for you? Have you enabled Debug? If so,  
what's the output during an event when a handler should fire?

--
Marc

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Nagios-users mailing list
Nagios-users@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


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler not working

2008-06-06 Thread Kevin Manuel
I should add that I am trying to invoke the event handler through passive
service checks supplied by an external command (the external commands and
passive service checks work fine, but I'm wondering if something needs to be
configured differently for Nagios to call the event handler)

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kevin
Manuel
Sent: June-06-08 8:04 AM
To: 'nagios Mailinglist'
Subject: Re: [Nagios-users] event handler not working

Hi,

Nagios.cfg contains the following but there is no log of the event handler
being called:

log_event_handlers=1

enable_event_handlers=1

Any suggestions? Thanks in advance,

Kevin

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marc Powell
Sent: June-05-08 4:28 PM
To: nagios Mailinglist
Subject: Re: [Nagios-users] event handler not working


On Jun 5, 2008, at 1:59 PM, Kevin Manuel wrote:

> Hi,
>
> I'm trying to get an event handler to work with no success so I'm  
> hoping
> somebody might have some suggestions. It appears as though Nagios is  
> not
> calling the event handler at all when a service check is performed.  
> I don't

Nagios should log if it does. You also need to enable event handlers  
in nagios.cfg --

$ grep enable_event_handlers etc/nagios.cfg
enable_event_handlers=1

--
Marc


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kevin
Manuel
Sent: June-05-08 4:00 PM
To: 'nagios Mailinglist'
Subject: [Nagios-users] event handler not working

Hi,

I'm trying to get an event handler to work with no success so I'm hoping
somebody might have some suggestions. It appears as though Nagios is not
calling the event handler at all when a service check is performed. I don't
think it's a permissions thing because the event handler works properly when
run by the nagios user at the command line:

i.e. [EMAIL PROTECTED] bin]# su - nagios -c
"/usr/local/nagios/libexec/eventhandlers/renotify-on-ok" 

I have removed all the arguments that are passed to the event handler to
simplify troubleshooting and at this point the event handler should simply
send an email message when the service check is performed. Code shown below.
Thanks in advance.


renotify-on-ok (only 3 lines):
==

#!/usr/bin/perl

$contactEmail = "[EMAIL PROTECTED]";

`/bin/echo -e ' event handler works! ' | /bin/mail -s '** event handler
works **' $contactEmail`;



misccommands.cfg:
=

define command{
command_namerenotify-on-ok
command_line$USER1$/eventhandlers/renotify-on-ok
}



In templates.cfg the service is defined as follows:
===

define service{
use generic-service ; Name of
service template to use
name  snmp-trap-alerting-service
service_description SNMP Trap Alert 
is_volatile 1
check_period24x7
active_checks_enabled   0
normal_check_interval 14400
retry_check_interval  14400
max_check_attempts  1
notification_interval   0
notification_period 24x7
notification_optionsw,u,c,r
check_command   check_none
stalking_options  o,w,u,c
event_handler renotify-on-ok
event_handler_enabled   1
  register0  
}


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Nagios-users mailing list
Nagios-users@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


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Nagios-users mailing list
Nagios-users@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


-

Re: [Nagios-users] event handler not working

2008-06-06 Thread Kevin Manuel
Hi,

Nagios.cfg contains the following but there is no log of the event handler
being called:

log_event_handlers=1

enable_event_handlers=1

Any suggestions? Thanks in advance,

Kevin

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marc Powell
Sent: June-05-08 4:28 PM
To: nagios Mailinglist
Subject: Re: [Nagios-users] event handler not working


On Jun 5, 2008, at 1:59 PM, Kevin Manuel wrote:

> Hi,
>
> I'm trying to get an event handler to work with no success so I'm  
> hoping
> somebody might have some suggestions. It appears as though Nagios is  
> not
> calling the event handler at all when a service check is performed.  
> I don't

Nagios should log if it does. You also need to enable event handlers  
in nagios.cfg --

$ grep enable_event_handlers etc/nagios.cfg
enable_event_handlers=1

--
Marc


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kevin
Manuel
Sent: June-05-08 4:00 PM
To: 'nagios Mailinglist'
Subject: [Nagios-users] event handler not working

Hi,

I'm trying to get an event handler to work with no success so I'm hoping
somebody might have some suggestions. It appears as though Nagios is not
calling the event handler at all when a service check is performed. I don't
think it's a permissions thing because the event handler works properly when
run by the nagios user at the command line:

i.e. [EMAIL PROTECTED] bin]# su - nagios -c
"/usr/local/nagios/libexec/eventhandlers/renotify-on-ok" 

I have removed all the arguments that are passed to the event handler to
simplify troubleshooting and at this point the event handler should simply
send an email message when the service check is performed. Code shown below.
Thanks in advance.


renotify-on-ok (only 3 lines):
==

#!/usr/bin/perl

$contactEmail = "[EMAIL PROTECTED]";

`/bin/echo -e ' event handler works! ' | /bin/mail -s '** event handler
works **' $contactEmail`;



misccommands.cfg:
=

define command{
command_namerenotify-on-ok
command_line$USER1$/eventhandlers/renotify-on-ok
}



In templates.cfg the service is defined as follows:
===

define service{
use generic-service ; Name of
service template to use
name  snmp-trap-alerting-service
service_description SNMP Trap Alert 
is_volatile 1
check_period24x7
active_checks_enabled   0
normal_check_interval 14400
retry_check_interval  14400
max_check_attempts  1
notification_interval   0
notification_period 24x7
notification_optionsw,u,c,r
check_command   check_none
stalking_options  o,w,u,c
event_handler renotify-on-ok
event_handler_enabled   1
  register0  
}


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Nagios-users mailing list
Nagios-users@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


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler not working

2008-06-05 Thread Marc Powell

On Jun 5, 2008, at 1:59 PM, Kevin Manuel wrote:

> Hi,
>
> I'm trying to get an event handler to work with no success so I'm  
> hoping
> somebody might have some suggestions. It appears as though Nagios is  
> not
> calling the event handler at all when a service check is performed.  
> I don't

Nagios should log if it does. You also need to enable event handlers  
in nagios.cfg --

$ grep enable_event_handlers etc/nagios.cfg
enable_event_handlers=1

--
Marc


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Event handler

2008-05-14 Thread Aaron Devey
Drew Weaver wrote:
>  $a = $argv[0];
> $b = $argv[1];
> $c = $argv[2];
> $d = $argv[3];
> $handle = fopen(“output”, “a+”);
> $content = “$a - $b - $c - $d\n”;
> $go = fwrite($handle, “$content”);
> ?>

You'll want to specify the full path to the 'output' file.  Nagios won't
necessarily call it from the same working directory that you used from
the shell.

-Aaron

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Nagios-users mailing list
Nagios-users@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

Re: [Nagios-users] Event handler

2007-08-09 Thread Marc Powell


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:nagios-users-
> [EMAIL PROTECTED] On Behalf Of Tony Delov
> Sent: Wednesday, August 08, 2007 9:51 PM
> To: nagios-users@lists.sourceforge.net
> Subject: [Nagios-users] Event handler
> 
> Hi,
> I'm trying to differentiate in my event handler script between a
recover
> from a critical state and one from an unknown state.
> I need to run a script upon a recovery, but only a recovery from a
> critical hard state?
> Is there a way to do this?

Not by a simple macro but you could probable get it by inference. My
approach would be to pass the $LASTSERVICEWARNING,CRITICAL,UNKNOWN$
macros to the script and see which one was most recent. That might get
you the information you need.

--
Marc


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Event Handler problems

2007-03-01 Thread Marc Powell


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:nagios-users-
> [EMAIL PROTECTED] On Behalf Of Sandeep Narasimha Murthy
> Sent: Thursday, March 01, 2007 8:17 AM
> To: nagios-users@lists.sourceforge.net
> Subject: [Nagios-users] Event Handler problems
> 
> Hi,
> 
> I have been trying to set up the Nagios Eventhandler option for quite
> sometime in vain. I perused the link
> http://nagios.sourceforge.net/docs/1_0/eventhandlers.html and tried
out
> a number of time but the script to be execute by the event handler
never
> gets executed.. :(
> 
> In the nagios log, I see the Event Handler being invoked fine and
> nothing else happens.
> 
> Any ideas/ suggestions ?

Is your event handler executable by the nagios user? I'd add debug
output to the event handler that gets written to a file to make sure
that it's actually running and getting the input you expect. For
example, in all my event handlers written in sh, I have the following as
the first thing done --

LOGFILE=/usr/local/nagios/var/eventhandler.log; export LOGFILE

echo -n `date` . " " >> $LOGFILE 2>&1
echo "$0 IFP service check ($1) ($2) ($3) ($4)... " >> $LOGFILE 2>&1

And lines like the following at appropriate places --

echo -n `date` . " " >> $LOGFILE
2>/usr/local/nagios/var/eventhandler.log 2>&1
echo -n "$0 Restarting IFP service (2nd soft critical state) on $4... "
>> $LOGFILE 2>&1
/usr/bin/ssh $4 'sudo /etc/init.d/n2h2-ifpserver restart' >>$LOGFILE
2>&1

This allows for intimate tracing of the execution of the event handler
to catch any problems.

--
Marc

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Event Handler problems

2006-10-17 Thread Andreas Ericsson
Marc Powell wrote:
> It uses syslog so it's being logged to wherever *.info,*.notice, *.debug
> are being sent to in syslog.conf (usually something like
> /var/log/messages). I believe you can change the log file by adding
> 'nrpe.*   /some/other/file' to syslog.conf and HUP or restart syslogd.
> 

Nopes. This won't work as "nrpe" isn't recognized as a valid syslog 
facility. NRPE uses the daemon facility to log all its messages. With a 
line reading

daemon.*  /var/log/daemon.log

you will get all messages sent to the daemon facility in 
/var/log/daemon.log. Note that this will include messages from other 
daemons as well, but nrpe sets its ident (or TAG, according to rfc3164) 
to "NRPE", so you can easily grep the logfile for that string and find 
only the relevant entries.

-- 
Andreas Ericsson   [EMAIL PROTECTED]
OP5 AB www.op5.se
Tel: +46 8-230225  Fax: +46 8-230231

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Event Handler problems

2006-10-16 Thread Marc Powell
It uses syslog so it's being logged to wherever *.info,*.notice, *.debug
are being sent to in syslog.conf (usually something like
/var/log/messages). I believe you can change the log file by adding
'nrpe.*   /some/other/file' to syslog.conf and HUP or restart syslogd.

--
Marc

> -Original Message-
> From: Sandeep Narasimha Murthy [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 16, 2006 10:18 AM
> To: Marc Powell; nagios-users@lists.sourceforge.net
> Subject: RE: [Nagios-users] Event Handler problems
> 
> Hi,
> 
> I have the debug option on in the nrpe.cfg but still nothing is being
> logged. Can I specify another log file ??
> 
> Thanks
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Marc
> Powell
> Sent: segunda-feira, 16 de Outubro de 2006 15:27
> To: nagios-users@lists.sourceforge.net
> Subject: Re: [Nagios-users] Event Handler problems
> 
> 
> 
> > -Original Message-
> > From: Sandeep Narasimha Murthy [mailto:[EMAIL PROTECTED]
> > Sent: Monday, October 16, 2006 9:05 AM
> > To: Marc Powell; nagios-users@lists.sourceforge.net
> > Subject: RE: [Nagios-users] Event Handler problems
> >
> >
> > Hi,
> >
> > Thanks for the suggestion. I had already enabled logging of service
> > retries, host retries, and event handler commands. In fact, I
> discovered
> > that Nagios is invoking the Event Handler but the problem appears to
> be
> > in the remote host:
> >
> > [1160997995] EXTERNAL COMMAND:
> >
SCHEDULE_FORCED_SVC_CHECK;PRD7_WCMAUT01;CheckAutonomyServer;1160997969
> >
> > [1160998115] SERVICE ALERT:
> > PRD7_WCMAUT01;CheckAutonomyServer;CRITICAL;SOFT;4;CRITICAL: NOK, The
> > service apax is not running.
> > [1160998115] SERVICE EVENT HANDLER:
> >
PRD7_WCMAUT01;CheckAutonomyServer;CRITICAL;SOFT;4;start_autonomyServer
> >
> > I am using NRPE on my remote hosts (all solaris 5.9 machines). Where
> can
> > I view the plugins being invoked ?? I checked the /var/adm/messages
> and
> > /var/log/syslog but there appears no commands at all. Is there any
> other
> > log which I can consult or alternatively configure nrpe.cfg to log
all
> > the plugins being invoked ?
> 
> In nrpe.cfg --
> 
> # DEBUGGING OPTION
> # This option determines whether or not debugging messages are logged
to
> the
> # syslog facility.
> # Values: 0=debugging off, 1=debugging on
> 
> debug=0
> 
> Also, try running the command_line for start_autonomyServer exactly as
> it's defined and run it as the nagios user and watch for errors.
> 
> --
> marc
> 
>

> -
> Using Tomcat but need to do more? Need to support web services,
> security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
>
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> ___
> Nagios-users mailing list
> Nagios-users@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

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Event Handler problems

2006-10-16 Thread Sandeep Narasimha Murthy
Hi,

I have the debug option on in the nrpe.cfg but still nothing is being
logged. Can I specify another log file ??

Thanks

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marc
Powell
Sent: segunda-feira, 16 de Outubro de 2006 15:27
To: nagios-users@lists.sourceforge.net
Subject: Re: [Nagios-users] Event Handler problems



> -Original Message-
> From: Sandeep Narasimha Murthy [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 16, 2006 9:05 AM
> To: Marc Powell; nagios-users@lists.sourceforge.net
> Subject: RE: [Nagios-users] Event Handler problems
> 
> 
> Hi,
> 
> Thanks for the suggestion. I had already enabled logging of service
> retries, host retries, and event handler commands. In fact, I
discovered
> that Nagios is invoking the Event Handler but the problem appears to
be
> in the remote host:
> 
> [1160997995] EXTERNAL COMMAND:
> SCHEDULE_FORCED_SVC_CHECK;PRD7_WCMAUT01;CheckAutonomyServer;1160997969
> 
> [1160998115] SERVICE ALERT:
> PRD7_WCMAUT01;CheckAutonomyServer;CRITICAL;SOFT;4;CRITICAL: NOK, The
> service apax is not running.
> [1160998115] SERVICE EVENT HANDLER:
> PRD7_WCMAUT01;CheckAutonomyServer;CRITICAL;SOFT;4;start_autonomyServer
> 
> I am using NRPE on my remote hosts (all solaris 5.9 machines). Where
can
> I view the plugins being invoked ?? I checked the /var/adm/messages
and
> /var/log/syslog but there appears no commands at all. Is there any
other
> log which I can consult or alternatively configure nrpe.cfg to log all
> the plugins being invoked ?

In nrpe.cfg --

# DEBUGGING OPTION
# This option determines whether or not debugging messages are logged to
the
# syslog facility.
# Values: 0=debugging off, 1=debugging on

debug=0

Also, try running the command_line for start_autonomyServer exactly as
it's defined and run it as the nagios user and watch for errors.

--
marc


-
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Nagios-users mailing list
Nagios-users@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

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Event Handler problems

2006-10-16 Thread Marc Powell


> -Original Message-
> From: Sandeep Narasimha Murthy [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 16, 2006 9:05 AM
> To: Marc Powell; nagios-users@lists.sourceforge.net
> Subject: RE: [Nagios-users] Event Handler problems
> 
> 
> Hi,
> 
> Thanks for the suggestion. I had already enabled logging of service
> retries, host retries, and event handler commands. In fact, I
discovered
> that Nagios is invoking the Event Handler but the problem appears to
be
> in the remote host:
> 
> [1160997995] EXTERNAL COMMAND:
> SCHEDULE_FORCED_SVC_CHECK;PRD7_WCMAUT01;CheckAutonomyServer;1160997969
> 
> [1160998115] SERVICE ALERT:
> PRD7_WCMAUT01;CheckAutonomyServer;CRITICAL;SOFT;4;CRITICAL: NOK, The
> service apax is not running.
> [1160998115] SERVICE EVENT HANDLER:
> PRD7_WCMAUT01;CheckAutonomyServer;CRITICAL;SOFT;4;start_autonomyServer
> 
> I am using NRPE on my remote hosts (all solaris 5.9 machines). Where
can
> I view the plugins being invoked ?? I checked the /var/adm/messages
and
> /var/log/syslog but there appears no commands at all. Is there any
other
> log which I can consult or alternatively configure nrpe.cfg to log all
> the plugins being invoked ?

In nrpe.cfg --

# DEBUGGING OPTION
# This option determines whether or not debugging messages are logged to
the
# syslog facility.
# Values: 0=debugging off, 1=debugging on

debug=0

Also, try running the command_line for start_autonomyServer exactly as
it's defined and run it as the nagios user and watch for errors.

--
marc

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Event Handler problems

2006-10-16 Thread Sandeep Narasimha Murthy

Hi,

Thanks for the suggestion. I had already enabled logging of service
retries, host retries, and event handler commands. In fact, I discovered
that Nagios is invoking the Event Handler but the problem appears to be
in the remote host:

[1160997995] EXTERNAL COMMAND:
SCHEDULE_FORCED_SVC_CHECK;PRD7_WCMAUT01;CheckAutonomyServer;1160997969

[1160998115] SERVICE ALERT:
PRD7_WCMAUT01;CheckAutonomyServer;CRITICAL;SOFT;4;CRITICAL: NOK, The
service apax is not running.
[1160998115] SERVICE EVENT HANDLER:
PRD7_WCMAUT01;CheckAutonomyServer;CRITICAL;SOFT;4;start_autonomyServer

I am using NRPE on my remote hosts (all solaris 5.9 machines). Where can
I view the plugins being invoked ?? I checked the /var/adm/messages and
/var/log/syslog but there appears no commands at all. Is there any other
log which I can consult or alternatively configure nrpe.cfg to log all
the plugins being invoked ?

Thanks,
sg

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marc
Powell
Sent: segunda-feira, 16 de Outubro de 2006 14:53
To: nagios-users@lists.sourceforge.net
Subject: Re: [Nagios-users] Event Handler problems



> -Original Message-
> From: [EMAIL PROTECTED] [mailto:nagios-users-
> [EMAIL PROTECTED] On Behalf Of Sandeep Narasimha Murthy
> Sent: Monday, October 16, 2006 6:08 AM
> To: nagios-users@lists.sourceforge.net
> Subject: [Nagios-users] Event Handler problems
> 
> Hello,
> 
> I have an event handler configured in one of our services such that,
> when the service state hits critical or warning, it should activate
the
> event handler. I am quite sure I have it configured fine but it simply
> does not seem to work when the service states turns critical. I also
> confirmed this by forcing a critical feedback to the service and it
did
> not work.
> 
> Here is my service config. Has anyone faced any similar situations?
> Thanks in adv:
> 

No problems here. I'd suggest configuring nagios to log event handlers
to verify that an attempt is made to run them. If not, try enabling
enable_event_handlers in nagios.cfg.

--
Marc


-
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Nagios-users mailing list
Nagios-users@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

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Event Handler problems

2006-10-16 Thread Marc Powell


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:nagios-users-
> [EMAIL PROTECTED] On Behalf Of Sandeep Narasimha Murthy
> Sent: Monday, October 16, 2006 6:08 AM
> To: nagios-users@lists.sourceforge.net
> Subject: [Nagios-users] Event Handler problems
> 
> Hello,
> 
> I have an event handler configured in one of our services such that,
> when the service state hits critical or warning, it should activate
the
> event handler. I am quite sure I have it configured fine but it simply
> does not seem to work when the service states turns critical. I also
> confirmed this by forcing a critical feedback to the service and it
did
> not work.
> 
> Here is my service config. Has anyone faced any similar situations?
> Thanks in adv:
> 

No problems here. I'd suggest configuring nagios to log event handlers
to verify that an attempt is made to run them. If not, try enabling
enable_event_handlers in nagios.cfg.

--
Marc

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Nagios-users mailing list
Nagios-users@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


RE: [Nagios-users] event handler macros

2005-11-07 Thread Nathan Oyler
> Andreas Ericsson wrote:
> > The easiest is probably to set your script as notification command
for a
> contact. This will nicely bypass all the troubles (and be sane at the
> same time).
> 
> I thought about this, and may still go down this path. The one caveat
is
> that the script might take some time to run (ie do a traceroute to the
> external interface of a vpn session across the Internet timing out the
> majority of the way). In that case, my alert might come several
minutes
> after the actual event.
> 
> One way around it would be to generate the initial alert before doing
the
> time consuming stuff...
> 
> 

Or setup a contact dedicated to this script, and add it to every
contactgroup. Don't set it up as your own.


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler macros

2005-11-07 Thread Roy Kidder
Andreas Ericsson wrote:
> The easiest is probably to set your script as notification command for a
contact. This will nicely bypass all the troubles (and be sane at the
same time).

I thought about this, and may still go down this path. The one caveat is
that the script might take some time to run (ie do a traceroute to the
external interface of a vpn session across the Internet timing out the
majority of the way). In that case, my alert might come several minutes
after the actual event.

One way around it would be to generate the initial alert before doing the
time consuming stuff...







---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] event handler macros

2005-11-07 Thread Andreas Ericsson

Roy Kidder wrote:

I'm writing a perl script that will be called as an event handler for a
down/hard host. The idea behind the script is to generate some simple
debugging output and email it to the contact group for the down host.




You're aware that this is what the contact object and such are for, right?



The problem is that the contact group macro ($CONTACTEMAIL$) isn't
available to event handlers.

Does anyone have a suggestion on how I might determine the contact email
for a host in such a case?



You can do it in a number of obscure and ridiculous ways, all of which 
involve external files or weird name-standards.


The easiest is probably to set your script as notification command for a 
contact. This will nicely bypass all the troubles (and be sane at the 
same time).


--
Andreas Ericsson   [EMAIL PROTECTED]
OP5 AB www.op5.se
Tel: +46 8-230225  Fax: +46 8-230231


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Nagios-users mailing list
Nagios-users@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