How to Schedule regular weekly downtime?

Jim Avery jim at jimavery.me.uk
Mon Nov 23 14:10:41 CET 2009


2009/11/21 Les Fenison <les at deltatechnicalservices.com>:
> Looks like a nice idea but doesn't work on Nagios 3.2


In case you're tempted to try and get it working in Nagios 3 (as I
did), here are the changes I made to the perl script to get it
working:

# diff /usr/local/src/downtime-2.2/downtime_job.pl
/usr/local/nagios/bin/downtime_job.pl
32c32
< my($NAGDIR) = "/u02/nagios" ;  # Nagios root directory
---
> my($NAGDIR) = "/usr/local/nagios" ;  # Nagios root directory
36c36
< my($CMDFILE) =   "$NAGDIR/log/rw/nagios.cmd"; # Nagios CMD file
---
> my($CMDFILE) =   "$NAGDIR/var/rw/nagios.cmd"; # Nagios CMD file
38,39c38,40
< my($OBJECTS) =   "$NAGDIR/log/objects.cache"; # Nagios 2 objects file
< my($DOWNDAT) =   "$NAGDIR/log/downtime.dat";  # existing sched downtime
---
> my($OBJECTS) =   "$NAGDIR/var/objects.cache"; # Nagios 2 objects file
> # my($DOWNDAT) =   "$NAGDIR/var/downtime.dat";  # existing sched downtime
> my($DOWNDAT) =   "$NAGDIR/var/retention.dat";  # existing sched downtime
41,43c42,44
< my($STATUSLOG) = "$NAGDIR/log/status.log";    # Nagios status log file
< my($HGCFG) =     "$NAGDIR/etc/hostgroups.cfg";# needed if ver=1
< my($DOWNLOG) =   "$NAGDIR/log/downtime.log";  # existing sched downtime
---
> my($STATUSLOG) = "$NAGDIR/var/status.log";    # Nagios status log file
> my($HGCFG) =     "$NAGDIR/etc/objects/hostgroups.cfg";# needed if ver=1
> my($DOWNLOG) =   "$NAGDIR/var/downtime.log";  # existing sched downtime


Of course in Nagios 3.2 the side.html is now side.php, but that change
is trivial to work out too.

hth,

Jim

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list