[omd-users] Scheduled downtime

Andreas Döhler andreas.doehler at gmail.com
Mon Feb 5 22:26:07 CET 2018


Hi Gregory,

for this you can use the Multisite as a web service.
The following example will schedule a downtime for two hours from now on
localhost and service "Dummy".

curl 'http://localhost/
<site>/check_mk/view.py?view.py?_do_confirm=yes&_transid=-1

&_do_actions=yes&service=Dummy&host=localhost&site=&view_name=service&_down_2h=2+hours

&_down_comment=TEST&_username=<automation_user>&_secret=<automation_secret>'

This URL is nearly the same as if you do it on the GUI by yourself.

Second option is to send your command via Livestatus direct to the core.
echo "COMMAND [$(date +%s)]
SCHEDULE_HOST_DOWNTIME;<host_name>;<start_time>;<end_time>;<fixed>;<trigger_id>;<duration>;<author>;<comment>"
| unixcat /omd/sites/<sitename>/tmp/run/live

With both options it should be possible to script the down times.

br
Andreas


Gregory Sloop <gregs at sloop.net> schrieb am Mo., 29. Jan. 2018 um 21:51 Uhr:

> Thanks, but I don't see how that's different than I already stated as an
> option, but mainly rejected for clumsy-ness;
>
> >Obviously, one can create a time-period that excludes the "down" time and
> apply that to either the notification/excalation or the check.
>
> >But that's a hassle if you have a lot of services/hosts that have a
> different time-period for their downtime - you end up creating a bunch of
> one-off time-periods and each service/host has it's own time-period. That's
> easy to screw-up, in so many ways. [Or you can create one time-period that
> excludes a wider time, and can handle more than one service/host - but that
> may be less granular than desired.]
>
> Essentially, I already do this, but the time-period excludes [IMO] too
> much time in an effort to cover all the hosts/services together and limit
> the number of time-periods. IMO, that's like killing flies with an axe. It
> works [kinda], but leaves [big] marks on the furniture. I'd hoped there was
> some more elegant method.
>
> -Greg
>
>
> Under ‘WATO’ select ‘Notifications’ and define a time period the service
> should notify.
>
> Under ‘WATO’ select ‘Host & Service Parameters’ and search for
> ‘Notification period of services’, where you can pair the time period and
> the service, including limiting by folder and/or host.
>
> *From:* omd-users [mailto:omd-users-bounces at lists.mathias-kettner.de] *On
> Behalf Of *Gregory Sloop
> *Sent:* Monday, January 29, 2018 1:24 PM
> *To:* omd-users at lists.mathias-kettner.de
> *Subject:* [omd-users] Scheduled downtime
>
> I've looked for quite some time, but can't find a way to accomplish it -
> but, for example;
>
> I might have a single host/service that's down from 1a-1.30a and I'd like
> to either/or suppress notifications or checks [Either would be fine, though
> knowing how to do either, depending on situation, would be best.]
>
> Obviously, one can create a time-period that excludes the "down" time and
> apply that to either the notification/excalation or the check.
>
> But that's a hassle if you have a lot of services/hosts that have a
> different time-period for their downtime - you end up creating a bunch of
> one-off time-periods and each service/host has it's own time-period. That's
> easy to screw-up, in so many ways. [Or you can create one time-period that
> excludes a wider time, and can handle more than one service/host - but that
> may be less granular than desired.]
>
> There doesn't seem to be a way to handle this elegantly in Nagios, but
> perhaps OMD has some features/options I'm not aware of. [Or perhaps I'm
> missing something obvious in Nagios.]
>
> What options exist to handle this?
>
> TIA
> -Greg
>
>
>
>
>
> *-- Gregory Sloop, Principal: Sloop Network & Computer Consulting Voice:
> 503.251.0452 x82 EMail: *gregs at sloop.net
> http://www.sloop.net
> *--- *
> _______________________________________________
> omd-users mailing list
> omd-users at lists.mathias-kettner.de
> http://lists.mathias-kettner.de/mailman/listinfo/omd-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mathias-kettner.de/pipermail/omd-users/attachments/20180205/88dbe8ef/attachment.html>


More information about the omd-users mailing list