upgrade to 2.0b1 / event handlers broken

James jkmoseley at jump.net
Thu Jan 20 02:44:21 CET 2005


Like a dumb ass, I couldn't put two and two together...  The problem all along
was that the macro variable defined in the misccommands config file has become
outdated in version 2 of Nagios.  Updated the macro names according to docs and
all is fine now...

FYI and thanks.

James

Quoting James <jkmoseley at jump.net>:

> Like I said, I seriously doubt this is a 'shell' issue.  The event handlers
> were
> properly executed before the upgrade.  Everything else works OK after
> upgrading,
> except that the nagios process appears to *not* be calling the scripts...
> One
> script handler is supposed to be called when the check_nrpe check fails to
> detect the nagios process running on another box.  The check_nrpe plugin was
> recently built and an alarm condition is generated when Nagios is killed on
> the
> other system - so I don't think the problem is outdated plugins, either...
>
> James
>
> Quoting Andreas Ericsson <ae at op5.se>:
>
> > Steve Shipway wrote:
> > > James Mosley wrote:
> > >
> > >>[1106090538] SERVICE EVENT HANDLER:
> > >>tx-svr-1;NAGIOS;CRITICAL;HARD;2;handle-master-proc-event
> > >>[1106090658] SERVICE EVENT HANDLER:
> > >>tx-svr-1;NAGIOS;OK;HARD;2;handle-master-proc-event
> > >>
> > >>However, the event scripts simply aren't being called by the
> > >>nagios process as verified by modifications I made to them for
> > >>testing purposes.  Running the EV scripts manually works, so
> > >>it's not broken scripts.  Addtionally, all the config
> > >
> > >
> > > I've had similar behaviour under Nagios 1.2.  An event handler script
> > > (written in perl) ran fine from the command line, but not as an event
> > > handler.
> > >
> > > I found that, if I specified the perl executable on the commandline, or
> > even
> > > wrapped it in a shellscript,
> >
> > Shell-scripts always work with decently recent shells, since popen and
> > system actually "run /bin/sh -c <command>" to get things done.
> >
> > > it worked:
> > >  command_line    /usr/bin/perl $USER2$/eh-send-bb.pl $SERVICESTATE$
> > > $STATETYPE$ $SERVICEATTEMPT$ $HOSTADDRESS$ "$SERVICEDESC$"
> > >
> >
> > The shell should take care of it provided the +x bit is set for the user
> > who's trying to execute and a properly formatted hashbang line is
> > present at the very top of the script.
> > chmod 755 script takes care of the permissions. The hashbang line should
> > look like so;
> > #!/usr/bin/perl
> > (i.e. without spaces and such to ensure workability with older shells).
> >
> > > No idea why, but this might help you if the scripts are perl or shell
> > > scripts?
> > >
> > > Steve
> > >
> > > ---
> > > Steve Shipway: ITSS, University of Auckland
> > > Email: s.shipway at auckland.ac.nz  Web: http://www.steveshipway.org/
> > > ** We can only discover new oceans when we have the **
> > > ** courage to lose sight of the shore.              **
> >
> > --
> > Andreas Ericsson                   andreas.ericsson at op5.se
> > OP5 AB                             www.op5.se
> > Lead Developer
> >
> >
> > -------------------------------------------------------
> > The SF.Net email is sponsored by: Beat the post-holiday blues
> > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> > _______________________________________________
> > Nagios-users mailing list
> > Nagios-users at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/nagios-users
> > ::: Please include Nagios version, plugin version (-v) and OS when
> reporting
> > any issue.
> > ::: Messages without supporting info will risk being sent to /dev/null
> >
>
>
>
>
> ----------------------------------------------------
> This mail sent through jkm.NET secure webmail server
>




----------------------------------------------------
This mail sent through jkm.NET secure webmail server


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list