Network map export contains:
Not exported are host groups, hosts, triggers, other maps or any other elements that may be related to the exported map. Thus, if at least one of the elements the map refers to is missing, importing it will fail.
Network map export/import is supported since Zabbix 1.8.2.
To export network maps, do the following:
Selected maps are exported to a local XML file with default name zabbix_export_maps.xml.
To import network maps, do the following:
All mandatory input fields are marked with a red asterisk.
A success or failure message of the import will be displayed in the frontend.
Import rules:
Rule | Description |
---|---|
Update existing | Existing maps will be updated with data taken from the import file. Otherwise they will not be updated. |
Create new | The import will add new maps using data from the import file. Otherwise it will not add them. |
If you uncheck both map options and check the respective options for images, images only will be imported. Image importing is only available to Zabbix Super Admin users.
If replacing an existing image, it will affect all maps that are using this image.
Exporting a small network map with three elements, their images and some links between them. Note that images are truncated to save space.
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>5.0</version>
<date>2021-08-31T12:46:49Z</date>
<images>
<image>
<name>Zabbix_server_3D_(128)</name>
<imagetype>1</imagetype>
<encodedImage>iVBOR...CYII=</encodedImage>
</image>
</images>
<maps>
<map>
<name>Local network</name>
<width>680</width>
<height>200</height>
<label_type>0</label_type>
<label_location>0</label_location>
<highlight>1</highlight>
<expandproblem>1</expandproblem>
<markelements>1</markelements>
<show_unack>0</show_unack>
<severity_min>0</severity_min>
<show_suppressed>0</show_suppressed>
<grid_size>50</grid_size>
<grid_show>1</grid_show>
<grid_align>1</grid_align>
<label_format>0</label_format>
<label_type_host>2</label_type_host>
<label_type_hostgroup>2</label_type_hostgroup>
<label_type_trigger>2</label_type_trigger>
<label_type_map>2</label_type_map>
<label_type_image>2</label_type_image>
<label_string_host/>
<label_string_hostgroup/>
<label_string_trigger/>
<label_string_map/>
<label_string_image/>
<expand_macros>1</expand_macros>
<background/>
<iconmap/>
<urls/>
<selements>
<selement>
<elementtype>0</elementtype>
<label>{HOST.NAME}
{HOST.CONN}</label>
<label_location>0</label_location>
<x>111</x>
<y>61</y>
<elementsubtype>0</elementsubtype>
<areatype>0</areatype>
<width>200</width>
<height>200</height>
<viewtype>0</viewtype>
<use_iconmap>0</use_iconmap>
<selementid>1</selementid>
<elements>
<element>
<host>Zabbix server</host>
</element>
</elements>
<icon_off>
<name>Zabbix_server_3D_(128)</name>
</icon_off>
<icon_on/>
<icon_disabled/>
<icon_maintenance/>
<application/>
<urls/>
</selement>
</selements>
<shapes>
<shape>
<type>0</type>
<x>0</x>
<y>0</y>
<width>680</width>
<height>15</height>
<border_type>0</border_type>
<border_width>0</border_width>
<border_color>000000</border_color>
<text>{MAP.NAME}</text>
<font>9</font>
<font_size>11</font_size>
<font_color>000000</font_color>
<text_halign>0</text_halign>
<text_valign>0</text_valign>
<background_color/>
<zindex>0</zindex>
</shape>
</shapes>
<lines/>
<links/>
</map>
</maps>
</zabbix_export>
Element tag values are explained in the table below.
Element | Element property | Type | Range | Description |
---|---|---|---|---|
images | Root element for images. | |||
image | Individual image. | |||
name | string |
Unique image name. | ||
imagetype | integer |
1 - image 2 - background |
Image type. | |
encodedImage | Base64 encoded image. | |||
maps | Root element for maps. | |||
map | Individual map. | |||
name | string |
Unique map name. | ||
width | integer |
Map width, in pixels. | ||
height | integer |
Map height, in pixels. | ||
label_type | integer |
0 - label 1 - host IP address 2 - element name 3 - status only 4 - nothing |
Map element label type. | |
label_location | integer |
0 - bottom 1 - left 2 - right 3 - top |
Map element label location by default. | |
highlight | integer |
0 - no 1 - yes |
Enable icon highlighting for active triggers and host statuses. | |
expandproblem | integer |
0 - no 1 - yes |
Display problem trigger for elements with a single problem. | |
markelements | integer |
0 - no 1 - yes |
Highlight map elements that have recently changed their status. | |
show_unack | integer |
0 - count of all problems 1 - count of unacknowledged problems 2 - count of acknowledged and unacknowledged problems separately |
Problem display. | |
severity_min | integer |
0 - not classified 1 - information 2 - warning 3 - average 4 - high 5 - disaster |
Minimum trigger severity to show on the map by default. | |
show_suppressed | integer |
0 - no 1 - yes |
Display problems which would otherwise be suppressed (not shown) because of host maintenance. | |
grid_size | integer |
20, 40, 50, 75 or 100 | Cell size of a map grid in pixels, if "grid_show=1" | |
grid_show | integer |
0 - yes 1 - no |
Display a grid in map configuration. | |
grid_align | integer |
0 - yes 1 - no |
Automatically align icons in map configuration. | |
label_format | integer |
0 - no 1 - yes |
Use advanced label configuration. | |
label_type_host | integer |
0 - label 1 - host IP address 2 - element name 3 - status only 4 - nothing 5 - custom label |
Display as host label, if "label_format=1" | |
label_type_hostgroup | integer |
0 - label 2 - element name 3 - status only 4 - nothing 5 - custom label |
Display as host group label, if "label_format=1" | |
label_type_trigger | integer |
0 - label 2 - element name 3 - status only 4 - nothing 5 - custom label |
Display as trigger label, if "label_format=1" | |
label_type_map | integer |
0 - label 2 - element name 3 - status only 4 - nothing 5 - custom label |
Display as map label, if "label_format=1" | |
label_type_image | integer |
0 - label 2 - element name 4 - nothing 5 - custom label |
Display as image label, if "label_format=1" | |
label_string_host | string |
Custom label for host elements, if "label_type_host=5" | ||
label_string_hostgroup | string |
Custom label for host group elements, if "label_type_hostgroup=5" | ||
label_string_trigger | string |
Custom label for trigger elements, if "label_type_trigger=5" | ||
label_string_map | string |
Custom label for map elements, if "label_type_map=5" | ||
label_string_image | string |
Custom label for image elements, if "label_type_image=5" | ||
expand_macros | integer |
0 - no 1 - yes |
Expand macros in labels in map configuration. | |
background | id |
ID of the background image (if any), if "imagetype=2" | ||
iconmap | id |
ID of the icon mapping (if any). | ||
urls | Used by maps or each map element. | |||
url | Individual URL. | |||
name | string |
Link name. | ||
url | string |
Link URL. | ||
elementtype | integer |
0 - host 1 - map 2 - trigger 3 - host group 4 - image |
Map item type the link belongs to. | |
selements | ||||
selement | Individual map element. | |||
elementtype | integer |
0 - host 1 - map 2 - trigger 3 - host group 4 - image |
Map element type. | |
label | string |
Icon label. | ||
label_location | integer |
-1 - use map default 0 - bottom 1 - left 2 - right 3 - top |
||
x | integer |
Location on the X axis. | ||
y | integer |
Location on the Y axis. | ||
elementsubtype | integer |
0 - single host group 1 - all host groups |
Element subtype, if "elementtype=3" | |
areatype | integer |
0 - same as whole map 1 - custom size |
Area size, if "elementsubtype=1" | |
width | integer |
Width of area, if "areatype=1" | ||
height | integer |
Height of area, if "areatype=1" | ||
viewtype | integer |
0 - place evenly in the area | Area placement algorithm, if "elementsubtype=1" | |
use_iconmap | integer |
0 - no 1 - yes |
Use icon mapping for this element. Relevant only if iconmapping is activated on map level. | |
selementid | id |
Unique element record ID. | ||
application | string |
Application name filter. If an application name is given, only problems of triggers that belong to the given application will be displayed on the map. | ||
elements | ||||
element | Individual Zabbix entity that is represented on the map (map, hostgroup, host, etc). | |||
host | ||||
icon_off | Image to use when element is in 'OK' status. | |||
icon_on | Image to use when element is in 'Problem' status. | |||
icon_disabled | Image to use when element is disabled. | |||
icon_maintenance | Image to use when element is in maintenance. | |||
name | string |
Unique image name. | ||
shapes | ||||
shape | Individual shape. | |||
type | integer |
0 - rectangle 1 - ellipse |
Shape type. | |
x | integer |
X coordinates of the shape in pixels. | ||
y | integer |
Y coordinates of the shape in pixels. | ||
width | integer |
Shape width. | ||
height | integer |
Shape height. | ||
border_type | integer |
0 - none 1 - bold line 2 - dotted line 3 - dashed line |
Type of the border for the shape. | |
border_width | integer |
Width of the border in pixels. | ||
border_color | string |
Border color represented in hexadecimal code. | ||
text | string |
Text inside of shape. | ||
font | integer |
0 - Georgia, serif 1 - "Palatino Linotype", "Book Antiqua", Palatino, serif 2 - "Times New Roman", Times, serif 3 - Arial, Helvetica, sans-serif 4 - "Arial Black", Gadget, sans-serif 5 - "Comic Sans MS", cursive, sans-serif 6 - Impact, Charcoal, sans-serif 7 - "Lucida Sans Unicode", "Lucida Grande", sans-serif 8 - Tahoma, Geneva, sans-serif 9 - "Trebuchet MS", Helvetica, sans-serif 10 - Verdana, Geneva, sans-serif 11 - "Courier New", Courier, monospace 12 - "Lucida Console", Monaco, monospace |
Text font style. | |
font_size | integer |
Font size in pixels. | ||
font_color | string |
Font color represented in hexadecimal code. | ||
text_halign | integer |
0 - center 1 - left 2 - right |
Horizontal alignment of text. | |
text_valign | integer |
0 - middle 1 - top 2 - bottom |
Vertical alignment of text. | |
background_color | string |
Background (fill) color represented in hexadecimal code. | ||
zindex | integer |
Value used to order all shapes and lines (z-index). | ||
lines | ||||
line | Individual line. | |||
x1 | integer |
X coordinates of the line point 1 in pixels. | ||
y1 | integer |
Y coordinates of the line point 1 in pixels. | ||
x2 | integer |
X coordinates of the line point 2 in pixels. | ||
y2 | integer |
Y coordinates of the line point 2 in pixels. | ||
line_type | integer |
0 - none 1 - bold line 2 - dotted line 3 - dashed line |
Line type. | |
line_width | integer |
Line width in pixels. | ||
line_color | string |
Line color represented in hexadecimal code. | ||
zindex | integer |
Value used to order all shapes and lines (z-index). | ||
links | ||||
link | Individual link between map elements. | |||
drawtype | integer |
0 - line 2 - bold line 3 - dotted line 4 - dashed line |
Link style. | |
color | string |
Link color (6 symbols, hex). | ||
label | string |
Link label. | ||
selementid1 | id |
ID of one element to connect. | ||
selementid2 | id |
ID of the other element to connect. | ||
linktriggers | ||||
linktrigger | Individual link status indicator. | |||
drawtype | integer |
0 - line 2 - bold line 3 - dotted line 4 - dashed line |
Link style when trigger is in the 'Problem' state. | |
color | string |
Link color (6 symbols, hex) when trigger is in the 'Problem' state. | ||
trigger | Trigger used for indicating link status. | |||
description | string |
Trigger name. | ||
expression | string |
Trigger expression. | ||
recovery_expression | string |
Trigger recovery expression. |