Fabrice Gabolde > Zabbix-API > Zabbix::API::Map

Download:
Zabbix-API-0.009.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

Zabbix::API::Map -- Zabbix map objects

SYNOPSIS ^

  use Zabbix::API::Map;

  # TODO write the rest

DESCRIPTION ^

Handles CRUD for Zabbix map objects.

This is a subclass of Zabbix::API::CRUDE.

METHODS ^

hosts([HOSTS])

Specific mutator for the selements array. Setting the selements through this actually only has an effect on host type elements (that is, both elements that have the correct elementtype and elements that have a host element). All other types are ignored.

push()

This method handles extraneous host => Zabbix::API::Host attributes in the selements array, transforming them into elementid and elementtype attributes (and setting the label attribute to the hostname if it isn't set already), and pushing the hosts to the server if they don't exist already.

Overriden from Zabbix::API::CRUDE.

** WARNING ** Due to the way maps API calls are implemented in Zabbix, updating a map will delete it and create it anew. The sysmapid will change if you push an existing map.

EXPORTS ^

The various integers representing map element types are implemented as constants:

  MAP_ELEMENT_TYPE_HOST
  MAP_ELEMENT_TYPE_MAP
  MAP_ELEMENT_TYPE_TRIGGER
  MAP_ELEMENT_TYPE_HOSTGROUP
  MAP_ELEMENT_TYPE_IMAGE

Nothing is exported by default; you can use the tag :map_element_types (or import by name).

SEE ALSO ^

Zabbix::API::CRUDE.

AUTHOR ^

Fabrice Gabolde <fabrice.gabolde@uperto.com>

COPYRIGHT AND LICENSE ^

Copyright (C) 2011 SFR

This library is free software; you can redistribute it and/or modify it under the terms of the GPLv3.

syntax highlighting: