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 21
echo $0 IFP service check ($1) ($2) ($3) ($4)...   $LOGFILE 21

And lines like the following at appropriate places --

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

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.phpp=sourceforgeCID=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=lnkkid=120709bid=263057dat=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=lnkkid=120709bid=263057dat=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=lnkkid=120709bid=263057dat=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=lnkkid=120709bid=263057dat=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=lnkkid=120709bid=263057dat=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=lnkkid=120709bid=263057dat=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=lnkkid=120709bid=263057dat=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=lnkkid=120709bid=263057dat=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=lnkkid=120709bid=263057dat=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