Page 1 of 1

Re: [Nagios-devel] External Command, scheduled downtime

Posted: Wed Feb 16, 2005 1:47 am
by Guest
Quoting Andreas Ericsson :

> [email protected] wrote:
> > Was sent to nagios-users before, but i think it should have gone
> > here..
> >
> > I've been investigating Nagios for a while now, having tried the
> last
> > stable, beta1 and now beta2.
> >
> > I have problems scheduling Service and Host downtime using
> external
> > commands. I haven't used it before and started with it in beta1.
> >
> > I have seen that multiple people have had this issue, though they
> > never got a reaction. I hope I will because I don't have much
> time
> > left for this investigation and using external commands to
> schedule
> > downtime is important in our system.
> >
> > When I use the Addon nagdtsched i get a message in the Event log:
> >
> > [2005-02-11 11:08:10] EXTERNAL COMMAND:
> >
>
SCHEDULE_SVC_DOWNTIME;linux1;PING;1108137600;1108195200;1;57600;nagios;Re=
gularly
> > Scheduled Dowtime
> >
> > but nothing shows up in the 'Downtime' page. If I schedule
> downtime
> > via the webinterface then everything goes ok.
> >
>
> Syntax might have changed. I believe nagdtsched was written for
> nagios
> 1.x. Read the docs and make the necessary adjustments.

Well tried looking up this command in the 2.x docs, but
'docs/extcommands.html' only shows some of the external commands and
I can't find other documantation about it anywhere else.
But anyway, the command itself seems to be right because:

echo "[`date +%s`] SCHEDULE_SVC_DOWNTIME;
linux1;PING;1108637600;1108695200;1;57600;nagios;Regularly" >>
nagios.cmd

gives the following in the Event Log:
(pointing-hand-icon) [2005-02-16 10:40:18] EXTERNAL COMMAND:
SCHEDULE_SVC_DOWNTIME;linux1;PING;1108637600;1108695200;1;57600;nagios;Re=
gularly

though if i change it to SCHEDULE_SERVICE_DOWNTIME it gives:
(I-icon) [2005-02-16 10:39:39] Warning: Unrecognized external command
->
SCHEDULE_SERVICE_DOWNTIME;linux1;PING;1108637600;1108695200;1;57600;nagio=
s;Regularly

Ofcourse the parameters to the SCHEDULE_SVC_COMMAND could be wrong,
for which I need the documentation, which I can't find. It would help
if Nagios would parse the parameters before logging to the Event Log
(so that a warning can be given on wrong input). Now the only thing I
can do is making wild assumptions on what the input should be.

>
> > I tried echo-ing to var/rw/nagios.cmd myself and that worked like
> > above. And both external commands for host and service downtime
> don't
> > work. I first tried all of this in beta1, but hoping beta2 might
> have
> > it fixed i installed that over 1, but that didn't help either.
> >
>
> Provided you echo the proper string when nagios is running it can't
> possibly fail to work since that is, in a way, exactly what the
> cmd.cgi
> does.
>
> > I have to admit that for this trial I don't have time to use this
> > anyway. But if we continue this, then we would like to schedule
> > downtime automatically.
> >
> > Also.. somewhere I came acros a patch or something, so that
> services
> > would be scheduled to be down when the host is. It could be that
> that
> > was for notification-hours only though. Nagios does support
> scheduling
> > downtime to children to host, it would be interesting to have the
> host
> > automatically increase its services 'downtime' field too.
> >
> > Regards,
> > Alex Haan
> >
> > ----------------------------------------------------------------
> > This message was sent using IMP, the Internet Messaging Program.
> >
> >
> > -------------------------------------------------------
> > SF email is sponsored by - The IT Product Guide
> > Read honest & candid reviews on hundreds of IT Products from real
> users.
> > Discover which products truly live up to the hype. Start reading
> now.
> > http://ads.osdn.com/?ad_ide95&alloc_id=14396&op=3Dclick
> > _______________________________________________
> > Nagios-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/lis ... gios-devel
> >
>
> --
> Andreas Ericsson [email protected]
> OP5 AB www.op5.se
> Lead Developer
>
>
> ---

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]