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.
Module is compatible and tested with Zabbix 1.8, 2.0 and 2.2. But shuld work with any version.
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",
},
}
);
RPM package for Enterprise Linux 7 (comaptible with Fedora, just force it) could be found in COPR repository.
Code diverged a lot from original branch. Consider my additions as WTF-PL.