4 Network maps

Overview

Network map export contains:

  • all related images

  • map structure - all map settings, all contained elements with their settings, map links and map link status indicators

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.

Exporting

To export network maps, do the following:

  • Go to: MonitoringMaps

  • Mark the checkboxes of the network maps to export

  • Click on Export below the list

4 Network maps - 图1

Selected maps are exported to a local XML file with default name zabbix_export_maps.xml.

Importing

To import network maps, do the following:

  • Go to: MonitoringMaps

  • Click on Import to the right

  • Select the import file

  • Mark the required options in import rules

  • Click on Import

4 Network maps - 图2

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:

RuleDescription
Update existingExisting maps will be updated with data taken from the import file. Otherwise they will not be updated.
Create newThe 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.

Export format

Exporting a small network map with three elements, their images and some links between them. Note that images are truncated to save space.

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <zabbix_export>
  3. <version>5.0</version>
  4. <date>2020-04-22T09:22:17Z</date>
  5. <images>
  6. <image>
  7. <name>Server_(64)</name>
  8. <imagetype>1</imagetype>
  9. <encodedImage>iVBOR...SuQmCC</encodedImage>
  10. </image>
  11. <image>
  12. <name>Workstation_(64)</name>
  13. <imagetype>1</imagetype>
  14. <encodedImage>iVBOR...SuQmCC</encodedImage>
  15. </image>
  16. <image>
  17. <name>Zabbix_server_3D_(96)</name>
  18. <imagetype>1</imagetype>
  19. <encodedImage>iVBOR...ggg==</encodedImage>
  20. </image>
  21. </images>
  22. <maps>
  23. <map>
  24. <name>Network</name>
  25. <width>590</width>
  26. <height>400</height>
  27. <label_type>0</label_type>
  28. <label_location>0</label_location>
  29. <highlight>1</highlight>
  30. <expandproblem>0</expandproblem>
  31. <markelements>1</markelements>
  32. <show_unack>0</show_unack>
  33. <severity_min>2</severity_min>
  34. <show_suppressed>0</show_suppressed>
  35. <grid_size>40</grid_size>
  36. <grid_show>1</grid_show>
  37. <grid_align>1</grid_align>
  38. <label_format>0</label_format>
  39. <label_type_host>2</label_type_host>
  40. <label_type_hostgroup>2</label_type_hostgroup>
  41. <label_type_trigger>2</label_type_trigger>
  42. <label_type_map>2</label_type_map>
  43. <label_type_image>2</label_type_image>
  44. <label_string_host/>
  45. <label_string_hostgroup/>
  46. <label_string_trigger/>
  47. <label_string_map/>
  48. <label_string_image/>
  49. <expand_macros>0</expand_macros>
  50. <background/>
  51. <iconmap/>
  52. <urls/>
  53. <selements>
  54. <selement>
  55. <elementtype>0</elementtype>
  56. <label>Host 1</label>
  57. <label_location>-1</label_location>
  58. <x>476</x>
  59. <y>28</y>
  60. <elementsubtype>0</elementsubtype>
  61. <areatype>0</areatype>
  62. <width>200</width>
  63. <height>200</height>
  64. <viewtype>0</viewtype>
  65. <use_iconmap>0</use_iconmap>
  66. <selementid>8</selementid>
  67. <elements>
  68. <element>
  69. <host>Discovered host</host>
  70. </element>
  71. </elements>
  72. <icon_off>
  73. <name>Server_(64)</name>
  74. </icon_off>
  75. <icon_on/>
  76. <icon_disabled/>
  77. <icon_maintenance/>
  78. <application/>
  79. <urls/>
  80. </selement>
  81. <selement>
  82. <elementtype>0</elementtype>
  83. <label>Zabbix server</label>
  84. <label_location>-1</label_location>
  85. <x>252</x>
  86. <y>50</y>
  87. <elementsubtype>0</elementsubtype>
  88. <areatype>0</areatype>
  89. <width>200</width>
  90. <height>200</height>
  91. <viewtype>0</viewtype>
  92. <use_iconmap>0</use_iconmap>
  93. <selementid>6</selementid>
  94. <elements>
  95. <element>
  96. <host>Zabbix server</host>
  97. </element>
  98. </elements>
  99. <icon_off>
  100. <name>Zabbix_server_3D_(96)</name>
  101. </icon_off>
  102. <icon_on/>
  103. <icon_disabled/>
  104. <icon_maintenance/>
  105. <application/>
  106. <urls/>
  107. </selement>
  108. <selement>
  109. <elementtype>0</elementtype>
  110. <label>New host</label>
  111. <label_location>-1</label_location>
  112. <x>308</x>
  113. <y>230</y>
  114. <elementsubtype>0</elementsubtype>
  115. <areatype>0</areatype>
  116. <width>200</width>
  117. <height>200</height>
  118. <viewtype>0</viewtype>
  119. <use_iconmap>0</use_iconmap>
  120. <selementid>7</selementid>
  121. <elements>
  122. <element>
  123. <host>Zabbix host</host>
  124. </element>
  125. </elements>
  126. <icon_off>
  127. <name>Workstation_(64)</name>
  128. </icon_off>
  129. <icon_on/>
  130. <icon_disabled/>
  131. <icon_maintenance/>
  132. <application/>
  133. <urls/>
  134. </selement>
  135. </selements>
  136. <links>
  137. <link>
  138. <drawtype>0</drawtype>
  139. <color>008800</color>
  140. <label/>
  141. <selementid1>6</selementid1>
  142. <selementid2>8</selementid2>
  143. <linktriggers/>
  144. </link>
  145. <link>
  146. <drawtype>2</drawtype>
  147. <color>00CC00</color>
  148. <label>100MBps</label>
  149. <selementid1>7</selementid1>
  150. <selementid2>6</selementid2>
  151. <linktriggers>
  152. <linktrigger>
  153. <drawtype>0</drawtype>
  154. <color>DD0000</color>
  155. <trigger>
  156. <description>Zabbix agent on {HOST.NAME} is unreachable for 5 minutes</description>
  157. <expression>{Zabbix host:agent.ping.nodata(5m)}=1</expression>
  158. <recovery_expression/>
  159. </trigger>
  160. </linktrigger>
  161. </linktriggers>
  162. </link>
  163. </links>
  164. </map>
  165. </maps>
  166. </zabbix_export>

Element tags

Element tag values are explained in the table below.

ElementElement propertyTypeRangeDescription
imagesRoot element for images.
imageIndividual image.
namestringUnique image name.
imagetypeinteger1 - image
2 - background
Image type.
encodedImageBase64 encoded image.
mapsRoot element for maps.
mapIndividual map.
namestringUnique map name.
widthintegerMap width, in pixels.
heightintegerMap height, in pixels.
label_typeinteger0 - label
1 - host IP address
2 - element name
3 - status only
4 - nothing
Map element label type.
label_locationinteger0 - bottom
1 - left
2 - right
3 - top
Map element label location by default.
highlightinteger0 - no
1 - yes
Enable icon highlighting for active triggers and host statuses.
expandprobleminteger0 - no
1 - yes
Display problem trigger for elements with a single problem.
markelementsinteger0 - no
1 - yes
Highlight map elements that have recently changed their status.
show_unackinteger0 - count of all problems
1 - count of unacknowledged problems
2 - count of acknowledged and unacknowledged problems separately
Problem display.
severity_mininteger0 - not classified
1 - information
2 - warning
3 - average
4 - high
5 - disaster
Minimum trigger severity to show on the map by default.
show_suppressedinteger0 - no
1 - yes
Display problems which would otherwise be suppressed (not shown) because of host maintenance.
grid_sizeinteger20, 40, 50, 75 or 100Cell size of a map grid in pixels, if “grid_show=1”
grid_showinteger0 - yes
1 - no
Display a grid in map configuration.
grid_aligninteger0 - yes
1 - no
Automatically align icons in map configuration.
label_formatinteger0 - no
1 - yes
Use advanced label configuration.
label_type_hostinteger0 - 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_hostgroupinteger0 - label
2 - element name
3 - status only
4 - nothing
5 - custom label
Display as host group label, if “label_format=1”
label_type_triggerinteger0 - label
2 - element name
3 - status only
4 - nothing
5 - custom label
Display as trigger label, if “label_format=1”
label_type_mapinteger0 - label
2 - element name
3 - status only
4 - nothing
5 - custom label
Display as map label, if “label_format=1”
label_type_imageinteger0 - label
2 - element name
4 - nothing
5 - custom label
Display as image label, if “label_format=1”
label_string_hoststringCustom label for host elements, if “label_type_host=5”
label_string_hostgroupstringCustom label for host group elements, if “label_type_hostgroup=5”
label_string_triggerstringCustom label for trigger elements, if “label_type_trigger=5”
label_string_mapstringCustom label for map elements, if “label_type_map=5”
label_string_imagestringCustom label for image elements, if “label_type_image=5”
expand_macrosinteger0 - no
1 - yes
Expand macros in labels in map configuration.
backgroundidID of the background image (if any), if “imagetype=2”
iconmapidID of the icon mapping (if any).
urls
urlIndividual URL.
namestringLink name.
urlstringLink URL.
elementtypeinteger0 - host
1 - map
2 - trigger
3 - host group
4 - image
Map item type the link belongs to.
selements
selementIndividual map element.
elementtypeinteger0 - host
1 - map
2 - trigger
3 - host group
4 - image
Map element type.
labelstringIcon label.
label_locationinteger-1 - use map default
0 - bottom
1 - left
2 - right
3 - top
xintegerLocation on the X axis.
yintegerLocation on the Y axis.
elementsubtypeinteger0 - single host group
1 - all host groups
Element subtype, if “elementtype=3”
areatypeinteger0 - same as whole map
1 - custom size
Area size, if “elementsubtype=1”
widthintegerWidth of area, if “areatype=1”
heightintegerHeight of area, if “areatype=1”
viewtypeinteger0 - place evenly in the areaArea placement algorithm, if “elementsubtype=1”
use_iconmapinteger0 - no
1 - yes
Use icon mapping for this element. Relevant only if iconmapping is activated on map level.
selementididUnique element record ID.
applicationstringApplication 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
elementIndividual Zabbix entity that is represented on the map (map, hostgroup, host, etc).
host
icon_offImage to use when element is in ‘OK’ status.
icon_onImage to use when element is in ‘Problem’ status.
icon_disabledImage to use when element is disabled.
icon_maintenanceImage to use when element is in maintenance.
namestringUnique image name.
links
linkIndividual link between map elements.
drawtypeinteger0 - line
2 - bold line
3 - dotted line
4 - dashed line
Link style.
colorstringLink color (6 symbols, hex).
labelstringLink label.
selementid1idID of one element to connect.
selementid2idID of the other element to connect.
linktriggers
linktriggerIndividual link status indicator.
drawtypeinteger0 - line
2 - bold line
3 - dotted line
4 - dashed line
Link style when trigger is in the ‘Problem’ state.
colorstringLink color (6 symbols, hex) when trigger is in the ‘Problem’ state.
triggerTrigger used for indicating link status.
descriptionstringTrigger name.
expressionstringTrigger expression.
recovery_expressionstringTrigger recovery expression.