Opsview::REST - Interface to the Opsview REST API
use Opsview::REST; my $ops = Opsview::REST->new( base_url => 'http://opsview.example.com/rest', user => 'username', pass => 'password', ); # These are equivalent my $status = $ops->get('/status/hostgroup?hostgroupid=1&...'); my $status = $ops->status( 'hostgroup', 'hostgroupid' => [1, 2], 'filter' => 'unhandled', ... );
Opsview::REST is a set of modules to access the Opsview REST API, which is the recommended method for scripting configuration changes or any other form of integration since version 3.9.0
Return an instance of the Opsview::REST.
Base url where the REST API resides. By default it is under
Username to login as.
Either the pass or the auth_tkt MUST be passed. It will die horribly if none of these are found.
Makes a "GET" request to the API. The response is properly deserialized and returned as a Perl data structure.
Convenience method to request the "status" part of the API.
$endpoint is the endpoint to send the query to.
%args is a hash which will get properly translated to URL arguments.
Downtime related methods.
Get events. An event is considered to be either:
Lists the problems which the current logged in user has permission to acknowledge.
Initiates a synchronous reload. Be careful: if your opsview reload takes more than 60 seconds to run, this call will time out. The returned data contains the info of the reload.
Get status of reload.
This software is copyright (c) 2012 by Miquel Ruiz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.