SYNOPSIS

  use Zabbix::API::Map;

  # TODO write the rest

DESCRIPTION

Handles \s-1CRUD\s0 for Zabbix map objects.

This is a subclass of \*(C`Zabbix::API::CRUDE\*(C'.

METHODS

hosts([\s-1HOSTS\s0])

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

push()

This method handles extraneous \*(C`host => Zabbix::API::Host\*(C' attributes in the selements array, transforming them into \*(C`elementid\*(C' and \*(C`elementtype\*(C' attributes (and setting the \*(C`label\*(C' 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 \*(C`Zabbix::API::CRUDE\*(C'. ** \s-1WARNING\s0 ** Due to the way maps \s-1API\s0 calls are implemented in Zabbix, updating a map will delete it and create it anew. The \*(C`sysmapid\*(C' 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 \*(C`:map_element_types\*(C' (or import by name).

RELATED TO Zabbix::API::Map…

Zabbix::API::CRUDE.

AUTHOR

Fabrice Gabolde <[email protected]>

COPYRIGHT AND LICENSE

Copyright (C) 2011 \s-1SFR\s0

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