NAME
Zabbix2::API::Host -- Zabbix host objects
SYNOPSIS
use Zabbix2::API::Host;
# fetch a single host by ID
my $host = $zabbix->fetch_single('Host', params => { hostids => [ 10105 ] });
# and delete it
$host->delete;
# helpers -- these all fire an API call
my $items = $host->items;
my $hostgroups = $host->hostgroups;
my $graphs = $host->graphs;
# this one doesn't
my $interfaces = $host->interfaces;
DESCRIPTION
Handles CRUD for Zabbix host objects.
This is a subclass of Zabbix2::API::CRUDE
; see there for inherited methods.
ATTRIBUTES
graphs
(read-only arrayref of Zabbix2::API::Graph objects)
This attribute is lazily populated with the host's graphs from the server.
hostgroups
(read-only arrayref of Zabbix2::API::HostGroup objects)
This attribute is lazily populated with the host's hostgroups from the server.
interfaces
(read-write arrayref of Zabbix2::API::HostInterface instances)
This attribute is populated automatically when the Perl object is updated from the "interfaces" server property (i.e. when the pull
method is called).
Likewise, it is automatically used to populate the "interfaces" property before either create
or update
are called.
Note that "interfaces" is a required property as far as the server is concerned, so you must defined it one way or another.
items
(read-only arrayref of Zabbix2::API::Item objects)
This attribute is lazily populated with the host's items from the server.
SEE ALSO
AUTHOR
Fabrice Gabolde <fga@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2011, 2014 SFR
This library is free software; you can redistribute it and/or modify it under the terms of the GPLv3.