Editing downtime.dat with an external program
Aaron M. Segura
aaron.segura at cabelas.com
Wed Jan 30 23:22:19 CET 2008
On Wed, 2008-01-30 at 17:19 -0500, Edson Manners wrote:
> Using - Nagios 2.10
> RHEL 5
>
> Hi everyone,
> I'm in the process of creating an external webpage in PHP that allows
> our team to set bulk downtimes after, say, a round of MS patches.
>
> I am at the point where my PHP page outputs the following for each host
> chosen with the idea that it'll be appended to downtime.dat:
>
> hostdowntime {
> host_name=nagios.fsu.edu
> downtime_id=11
> entry_time=1201704159
> start_time=1201704115
> end_time=1201711315
> triggered_by=0
> fixed=1
> duration=7200
> author=Edson Manners
> comment=Blahh
> }
>
>
> This is in the format of the downtime.dat file. However the top of the
> downtime.dat file warns that it should not be modified but by nagios
> itself. Is there some API supported way to add downtime to nagios using
> external programs or is this the way to do it?
> Thanks
External Commands:
http://nagios.sourceforge.net/docs/2_0/extcommands.html
I have written a PHP script that will use external commands to schedule
downtime from the command line:
http://www.nagiosexchange.org/Downtimes.38.0.html?&tx_netnagext_pi1[p_view]=628
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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