Nagios::Downtime - control downtime schedualing!
Version 0.01
This module lets you schedual and cancel downtime for hosts and hostgroups.
usage:
use Nagios::Downtime;
new object:
my $dt = Nagios::Downtime->new( downtime_dat_file => '/usr/nagios_2.6/var/downtime.dat', nagios_cmd_file => '/usr/nagios_2.6/var/rw/nagios.cmd', nagios_hostgroups_file => '/etc/nagios/hostgroups.cfg' );
or:
my $dt = new Nagios::Downtime; $dt->downtime_dat_file('/usr/nagios_2.6/var/downtime.dat'); $dt->nagios_cmd_file('/usr/nagios_2.6/var/rw/nagios.cmd'); $dt->nagios_hostgroups_file('/etc/nagios/hostgroups.cfg');
to schedual a single host 'web1' for 5 hours downtime with commnet 'testing module' by author 'quatrix':
$dt->start_host_downtime('web1',60 * 60 * 5,'quatrix','testing module');
same, but to schedual downtime for an entire host-group 'web-group':
$dt->start_hostgroup_downtime('web-group',60 * 60 * 5, 'quatrix','testing module');
to cancel schedualed downtime for host 'web1':
$dt->stop_host_downtime('web1');
to cancel schedualed downtime for entire host-group 'web-group':
$dt->stop_hostgroup_downtime('web-group');
nothing is exported, you should use it OO style only.
takes 4 arguments: hostgroup_name, downtime time in seconds, author, comment
needs 'nagios_cmd_file' defined
i.e:
$dt->start_hostgroup_downtime('web-group',600,'quatrix','for kicks');
same as before, but instade hostgroup_name, it takes host_name
also, needs 'nagios_cmd_file' defined
$dt->start_host_downtime('web1',600,'quatrix','no one needs to know');
needs 'nagios_cmd_file' 'nagios_hostgroups_file' and 'downtime_dat_file' defined
needs 'nagios_cmd_file' and 'downtime_dat_file' defined.
quatrix, <evil.legacy AT gmail.com>
<evil.legacy AT gmail.com>
Please report any bugs or feature requests to bug-nagios-downtime at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Nagios-Downtime. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-nagios-downtime at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Nagios::Downtime
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Nagios-Downtime
CPAN Ratings
http://cpanratings.perl.org/d/Nagios-Downtime
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Nagios-Downtime
Search CPAN
http://search.cpan.org/dist/Nagios-Downtime
Copyright 2007 quatrix, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Nagios::Downtime, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Nagios::Downtime
CPAN shell
perl -MCPAN -e shell install Nagios::Downtime
For more information on module installation, please visit the detailed CPAN module installation guide.