NAME
OSLV::Monitor - OS level virtualization monitoring extend for LibreNMS.
VERSION
Version 1.0.2
SYNOPSIS
Quick summary of what the module does.
Perhaps a little code snippet.
use OSLV::Monitor;
my $monitor = OSLV::Monitor->new();
eval { $monitor->load; };
if ($@) {
print encode_json( { version => 1, data => {}, error => 1, errorString => 'load failed... ' . $@ } ) . "\n";
exit 1;
}
my $data = encode_json( $monitor->run );
print $data."\n";
METHODS
Inits the object.
One option is taken and that is a hash ref.
# init with the cbsd backend
my $monitor->new(backend=>'FreeBSD');
The keys are list as below.
- backend :: The name of the backend to use. If undef, it is choosen based on $^O
freebsd :: FreeBSD
linux :: cgroups
- base_dir :: The dir to use for any caches as well as output.
Default :: /var/cache/oslv_monitor
- include :: An array of regexps to match names against for seeing if they should
be included or not. By default everything is return.
- Default :: ['^.*$']
- exclude :: An array of regexps to exclude. By default this array is empty. It is
processed after the include array.
- Default :: []
- time_divider :: What to pass to the backend for the time_divider for that if needed.
Default :: 1000000
load
This loads the specified backend.
eval{ $monitor->load; };
if ( $@ ){
print "Failed to load the backend... ".$@;
}
run
Runs the poller backend and report the results.
If nothing is nothing is loaded, load will be called.
my $status=$monitor->run;
AUTHOR
Zane C. Bowers-Hadley, <vvelox at vvelox.net>
BUGS
Please report any bugs or feature requests to bug-oslv-monitor at rt.cpan.org
, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=OSLV-Monitor. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc OSLV::Monitor
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
This software is Copyright (c) 2024 by Zane C. Bowers-Hadley.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)