Sec42 / Net-Zabbix

Perl wrapper for Zabbix API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Net::Zabbix is simple and thin layer between Zabbix API and your code. It doesn't implement much, except authentication and request counting. There are few helper methods to simplify calling methods such as create/get/update/delete/exists. There is no checking of method parameters, as that is work for-and already implemented on server side.

Consult Zabbix API documentation for details.

Note

Module is compatible and tested with Zabbix 1.8, 2.0 and 2.2. But shuld work with any version.

Example

This will list hosts like 'test', limited only by access level for API user. So, remember to add user to appropriate groups and assign enough permissions.

use Net::Zabbix;

my $z = Net::Zabbix->new(
	url => "https://server/zabbix/", 
	username => 'APIUser', 
	password => 'calvin',
	verify_ssl => 0,
	debug => 1,
	trace => 0,
);

my $r = $z->get("host", {
        filter => undef,
        search => {
            host => "test",
        },
    }
);

Package

RPM package for Enterprise Linux 7 (comaptible with Fedora, just force it) could be found in COPR repository.

License

Code diverged a lot from original branch. Consider my additions as WTF-PL.

About

Perl wrapper for Zabbix API


Languages

Language:Perl 94.9%Language:Shell 5.1%