Scheduling Re-ocurring Downtime?


#1

Hi There,

We have a host that needs to restart every day at 2am.

Im wondering if you can schedule re-ocurring downtimes?

Thanks
Simon


#2

Not that I know of. But you could change the notification time period from 24x7 to something that excludes the 10 minutes it takes to reboot the system. That way if the host is down during that time no notifications will go out.


#3

It’s possible to define downtimes :

nagios.sourceforge.net/docs/3_0/downtime.html


#4

That will not work for recurring downtimes. Simonz wants to schedule a down time that starts at say midnight and lasts for 10 minutes but to have that downtime stay current for everyday. With what Hiii00 pointed too will not work for this situation. Nagios’ downtime function assumes that the downtime is a one-time thing or something that is planned many days in advance and will not reoccur for an unknown time.

The only way I know to do that is like I said above. Exclude your downtime from your timeperiod. Here is an example that works for 2.x

define timeperiod{
timeperiod_name rebooting_servername
alias Server that needs to be rebooted - must be windows
sunday 00:15-24:00
monday 00:15-24:00
tuesday 00:15-24:00
wednesday 00:15-24:00
thursday 00:15-24:00
friday 00:15-24:00
saturday 00:15-24:00
}

This will effectively make from midnight to 12:15am a no notify time.


#5

Thanks Wes - this worked a treat.

No - its actually a Centos VM which runs a apache module that links to a HORRIBLE HORRIBLE HORRIBLE HORRIBLE binary. The only way that we can keep the thing stable is to fully reboot the server totoally every night.