Automatic downtime every two Weeks

Hello all,
I would like Icinga to automatically set a downtime on all hosts every second Friday of the month.

I am currently working out the best way to implement this. I would like to find out if you have any experience in implementing this.

My idea is a Python script that sets the downtime once a month via API for the date that is the second Friday.

Or do you have any further tips or suggestions for the implementation?

Best regards

Hi! We implemented also an API based script in PERL on same pourpose just for one host and a wrapper script to parse a csv file for a custom list of hosts. The wrapper takes as parameter the csv and calls the downtime script.

I would not use a scheduled downtime, but a TimePeriod with the hours and frequency you want to exclude in them. Then using that in conjunction with “check_period” (if you do not want the various checks to be done at all) or as part of a “Notification” set where is is the “period” so the checks are done, but not reported for the desired hours. You can use a Timeperiod with scheduled downtimes as well if that is what is needed.

See Icinga - Advanced topics - Time Periods for setting the 2nd & 4th Friday of a month.