Monitoring::Availability(3pm) | User Contributed Perl Documentation | Monitoring::Availability(3pm) |
Monitoring::Availability - Calculate Availability Data from Nagios / Icinga and Shinken Logfiles.
use Monitoring::Availability; my $ma = Monitoring::Availability->new();
This module calculates the availability for hosts/server from given logfiles. The Logfileformat is Nagios/Icinga only.
Git: http://github.com/sni/Monitoring-Availability
Creates an "Monitoring::Availability" object. "new" takes at least the logs parameter. Arguments are in key-value pairs.
valid options are: unspecified, current, up, down and unreachable
valid options are: unspecified, current, ok, warning, unknown and critical
adds additional 'breakdown' hash to each result with broken down results
calculate()
Calculate the availability
a sample query could be: selectall_arrayref(GET logs...\nColumns: time type options, {Slice => 1})
Iterator object for logentry objects. For example a L<MongoDB::Cursor> object.
[{host => 'hostname', service => 'description'}, ...]
{ hosts => { 'hostname' => 'ok', ... }, services => { 'hostname' => { 'description' => 'warning', ... } } }
valid values for hosts are: up, down and unreachable
valid values for services are: ok, warning, unknown and critical
get_condensed_logs()
returns an array of hashes with the condensed log used for this report
get_full_logs()
returns an array of hashes with the full log used for this report
Please report any bugs or feature requests to <http://github.com/sni/Monitoring-Availability/issues>.
You may enable the debug mode by setting MONITORING_AVAILABILITY_DEBUG environment variable. This will create a logfile: /tmp/Monitoring-Availability-Debug.log which gets overwritten with every calculation. You will need the Log4Perl module to create this logfile.
You can also look for information at:
<http://search.cpan.org/dist/Monitoring-Availability/>
<http://github.com/sni/Monitoring-Availability>
Sven Nierlein, <nierlein@cpan.org>
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.
2024-02-17 | perl v5.38.2 |