Zabbix2::API::GraphItem -- Zabbix graph item objects
my $graph = $zabbix->fetch_single('Graph', params => { ... }); # get existing GraphItem objects my $graph_items = $graph->graphitems; # create some more my $items = $zabbix->fetch('Item', params => { ... }); $graph->add_items(@{$items}); $graph->update;
While technically a subclass of Zabbix2::API::CRUDE, this class does not actually implement all methods necessary to behave as a full-fledged Zabbix object. Instead, we recommend using Zabbix2::API::GraphItem objects via their parent Zabbix2::API::Graph object. This is in part due to the fact that the server's API does not implement all methods, only graphitem.get. Calls to unimplemented methods will throw an exception.
graphitem.get
Zabbix2::API::GraphItem objects will be automatically created from a Zabbix2::API::Graph object's properties whenever it is pulled from the server. Conversely, if you call the Zabbix2::API::Graph add_items method, which creates new Zabbix2::API::GraphItem objects for you, or if you add them manually to a Zabbix2::API::Graph object (for greater control and customization), the Zabbix2::API::GraphItem objects will be automatically turned into properties just before a call to create or update, causing the relevant graph item objects to be created or updated on the server.
add_items
create
update
Zabbix2::API::CRUDE, Zabbix2::API::Graph
Fabrice Gabolde <fga@cpan.org>
Copyright (C) 2014 Fabrice Gabolde
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.
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.