Zabbix2::API::Trigger -- Zabbix trigger objects
use Zabbix2::API::Trigger; # fetch a single trigger... my $trigger = $zabbix->fetch_single('Trigger', params => { triggerids => [ 22379 ] }); # manipulate its properties: make it "average" severity $trigger->data->{priority} = 3; # and update the properties on the server. $trigger->update; # create a new trigger my $new_trigger = Zabbix2::API::Trigger->new( root => $zabbix, data => { description => 'some trigger', expression => '{Zabbix server:system.uptime.last(0)}<600', }); $new_trigger->create; # get the triggers that have been triggered and not acked yet, and # their parent hosts' IDs in the "hosts" property my $triggers = $zabbix->fetch( 'Trigger', params => { filter => { value => 1 }, withLastEventUnacknowledged => 1, selectHosts => ['hostid'], });
Handles CRUD for Zabbix trigger objects.
This is a subclass of Zabbix2::API::CRUDE; see there for inherited methods.
Zabbix2::API::CRUDE
Zabbix::API::Trigger used to have rudimentary dependency support; this version doesn't, because I don't need it right now. Patches welcome.
Zabbix2::API::CRUDE.
Fabrice Gabolde <fga@cpan.org>
Constants provided by Ray Link.
Copyright (C) 2011, 2014 Devoteam
This library is free software; you can redistribute it and/or modify it under the terms of the GPLv3.
To install Zabbix2::API, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Zabbix2::API
CPAN shell
perl -MCPAN -e shell install Zabbix2::API
For more information on module installation, please visit the detailed CPAN module installation guide.