NAME
Monitoring::Availability - Calculate Availability Data from Nagios and Icinga Logfiles.
SYNOPSIS
use Monitoring::Availability;
my $ma = Monitoring::Availability->new();
DESCRIPTION
This module calculates the availability for hosts/server from given logfiles. The Logfileformat is Nagios/Icinga only.
REPOSITORY
Git: http://github.com/sni/Monitoring-Availability
CONSTRUCTOR
new ( [ARGS] )
Creates an Monitoring::Availability
object. new
takes at least the logs parameter. Arguments are in key-value pairs.
- rpttimeperiod
-
report timeperiod. defines a timeperiod for this report. Will use 24x7 if not specified.
- assumeinitialstates
-
Assume the initial host/service state if none is found.
- assumestateretention
-
Assume state retention
- assumestatesduringnotrunning
-
Assume state during times when the monitoring process is not running
- includesoftstates
-
Include soft states in the calculation. Only hard states are used otherwise.
- initialassumedhoststate
-
Assumed host state if none is found
- initialassumedservicestate
-
Assumed service state if none is found
- backtrack
-
Go back this amount of days to find initial states
- verbose
-
verbose mode
METHODS
calculate
calculate()
Calculate the availability
- start
-
Timestamp of start
- end
-
Timestamp of end
- log_string
-
String containing the logs
- log_file
-
File containing the logs
- log_dir
-
Directory containing *.log files
- log_livestatus
-
Array with logs from a livestatus query
a sample query could be: selectall_arrayref(GET logs...\nColumns: time type options, {Slice => 1})
BUGS
Please report any bugs or feature requests to http://github.com/sni/Monitoring-Availability/issues.
SEE ALSO
You can also look for information at:
Search CPAN
Github
AUTHOR
Sven Nierlein, <nierlein@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2010 by Sven Nierlein
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.