5 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

Any host groups, hosts, triggers, other maps or other elements that may be related to the exported map are not exported. 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

5 Network maps - 图1

Depending on the selected format, maps are exported to a local file with a default name:

  • zabbix_export_maps.yaml - in YAML export (default option for export)
  • zabbix_export_maps.xml - in XML export
  • zabbix_export_maps.json - in JSON export

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

5 Network maps - 图2

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 Super Admin users.

A success or failure message of the import will be displayed in the frontend.

If replacing an existing image, it will affect all maps that are using this image.

Export format

Export to YAML:

  1. zabbix_export:
  2. version: '6.2'
  3. date: '2021-08-31T12:55:10Z'
  4. images:
  5. -
  6. name: Zabbix_server_3D_(128)
  7. imagetype: '1'
  8. encodedImage: iVBOR...5CYII=
  9. maps:
  10. -
  11. name: 'Local network'
  12. width: '680'
  13. height: '200'
  14. label_type: '0'
  15. label_location: '0'
  16. highlight: '1'
  17. expandproblem: '1'
  18. markelements: '1'
  19. show_unack: '0'
  20. severity_min: '0'
  21. show_suppressed: '0'
  22. grid_size: '50'
  23. grid_show: '1'
  24. grid_align: '1'
  25. label_format: '0'
  26. label_type_host: '2'
  27. label_type_hostgroup: '2'
  28. label_type_trigger: '2'
  29. label_type_map: '2'
  30. label_type_image: '2'
  31. label_string_host: ''
  32. label_string_hostgroup: ''
  33. label_string_trigger: ''
  34. label_string_map: ''
  35. label_string_image: ''
  36. expand_macros: '1'
  37. background: { }
  38. iconmap: { }
  39. urls: { }
  40. selements:
  41. -
  42. elementtype: '0'
  43. elements:
  44. -
  45. host: 'Zabbix server'
  46. label: |
  47. {HOST.NAME}
  48. {HOST.CONN}
  49. label_location: '0'
  50. x: '111'
  51. 'y': '61'
  52. elementsubtype: '0'
  53. areatype: '0'
  54. width: '200'
  55. height: '200'
  56. viewtype: '0'
  57. use_iconmap: '0'
  58. selementid: '1'
  59. icon_off:
  60. name: Zabbix_server_3D_(128)
  61. icon_on: { }
  62. icon_disabled: { }
  63. icon_maintenance: { }
  64. urls: { }
  65. evaltype: '0'
  66. shapes:
  67. -
  68. type: '0'
  69. x: '0'
  70. 'y': '0'
  71. width: '680'
  72. height: '15'
  73. text: '{MAP.NAME}'
  74. font: '9'
  75. font_size: '11'
  76. font_color: '000000'
  77. text_halign: '0'
  78. text_valign: '0'
  79. border_type: '0'
  80. border_width: '0'
  81. border_color: '000000'
  82. background_color: ''
  83. zindex: '0'
  84. lines: { }
  85. links: { }

Element tags

Element tag values are explained in the table below.

ElementElement propertyTypeRangeDescription
imagesRoot element for images.
namestringUnique image name.
imagetypeinteger1 - image
2 - background
Image type.
encodedImageBase64 encoded image.
mapsRoot element for maps.
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).
urlsUsed by maps or each map element.
namestringLink name.
urlstringLink URL.
elementtypeinteger0 - host
1 - map
2 - trigger
3 - host group
4 - image
Map item type the link belongs to.
selements
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.
evaltypeintegerEvaluation type for tags.
tagsProblem tags (for host and host group elements). If tags are given, only problems with these tags will be displayed on the map.
tagTag name.
valueTag value.
operatorOperator.
elementsZabbix entities that are represented on the map (host, host group, map 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.
shapes
typeinteger0 - rectangle
1 - ellipse
Shape type.
xintegerX coordinates of the shape in pixels.
yintegerY coordinates of the shape in pixels.
widthintegerShape width.
heightintegerShape height.
border_typeinteger0 - none
1 - bold line
2 - dotted line
3 - dashed line
Type of the border for the shape.
border_widthintegerWidth of the border in pixels.
border_colorstringBorder color represented in hexadecimal code.
textstringText inside of shape.
fontinteger0 - 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_sizeintegerFont size in pixels.
font_colorstringFont color represented in hexadecimal code.
text_haligninteger0 - center
1 - left
2 - right
Horizontal alignment of text.
text_valigninteger0 - middle
1 - top
2 - bottom
Vertical alignment of text.
background_colorstringBackground (fill) color represented in hexadecimal code.
zindexintegerValue used to order all shapes and lines (z-index).
lines
x1integerX coordinates of the line point 1 in pixels.
y1integerY coordinates of the line point 1 in pixels.
x2integerX coordinates of the line point 2 in pixels.
y2integerY coordinates of the line point 2 in pixels.
line_typeinteger0 - none
1 - bold line
2 - dotted line
3 - dashed line
Line type.
line_widthintegerLine width in pixels.
line_colorstringLine color represented in hexadecimal code.
zindexintegerValue used to order all shapes and lines (z-index).
linksLinks 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.
linktriggersLink status indicators.
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.