Steve Shipway 2007-2010
Downtime scheduler Ver 3.0 for Nagios
Web-configurable recurring downtime scheduler for Nagios 1.x, 2.x and 3.x
WARNING: This does not have any integrated security. It does not check for external commands being enabled. It does not check that you are authorised to the host you are scheduling for. Your web server can check individual logins, so I suggest you restrict the use of this to Nagios admins only.
HOW TO INSTALL:
- Create the file schedule.cfg, probably in your nagios/etc directory. This must be writeable by the web user.
- Edit downtime_job.pl. Put the correct path for perl in the first line. Correct NAGDIR to point to your Nagios install root. Correct the CFGFILE path to point to the file created in step 1 if necessary. Correct any other paths as required.
- Edit downtime_sched.cgi Put the correct path for perl in the first line. Correct the CFGFILE path to point to the file created in step 1. Correct the STATUSLOG path to point to your nagios/log/status.log file, if you want to have some validity checking done.
- Copy downtime_sched.cgi into your nagios/lib/cgi directory, with read and exec permissions for all.
- Copy downtime_job.pl into your nagios/bin directory, with read and exec permissions.
- Add the entry in the crontab file to the crontabs for the nagios user. Dont forget to change the paths if necessary.
- Add the contents of the side.html file into the middle of your nagios/share/side.html menu file, probably after the Downtime part. This is NOT A REPLACEMENT for the side.html file, it is an ADDITION! If you are using Nagios 3.x, you will need to use the side.php snippet instead of the side.html snippet.
This should be all you need. You can now check that you get the new link in the side menu, and that it allows you to define new recurring schedules. The crontab entry will run every morning, and add the downtime for the next 24 hours, according to the schedule.
The schedule.cfg file is human-readable and preserves comments. It is a bit picky about formatting, though.
Do you like this program? Then visit http://www.steveshipway.org/software/wishlist.html and see how you can show appreciation!
For support == http://www.steveshipway.org/forum/ email@example.com