The following objects are directly related to the map
API. 以下内容是关于拓扑图接口。
拓扑图对象具有以下属性 The map object has the following properties.
Property | Type | Description |
---|---|---|
sysmapid | string | (readonly) ID of the map. 拓扑图id |
height (required) |
integer | Height of the map in pixels. 拓扑图画布高度 |
name (required) |
string | Name of the map. 拓扑图名称 |
width (required) |
integer | Width of the map in pixels.拓扑图宽度 |
backgroundid | string | ID of the image used as the background for the map.拓扑图背景图像id |
expand_macros | integer | Whether to expand macros in labels when configuring the map. Possible values: 0 - (default) do not expand macros; 1 - expand macros. 配置拓扑图时是否展开标签中的宏 可能的值: 0 - (默认) 不展开; 1 - 展开. |
expandproblem | integer | Whether the the problem trigger will be displayed for elements with a single problem. Possible values: 0 - always display the number of problems; 1 - (default) display the problem trigger if there's only one problem. 如果只有一个触发器告警是否显示详情, \\可能的值: 0是只显示数目,\\1是显示触发器详情 |
grid_align | integer | Whether to enable grid aligning. Possible values: 0 - disable grid aligning; 1 - (default) enable grid aligning. 是否启用网格对齐 \\可能的值: 0是不用 1是使用 |
grid_show | integer | Whether to show the grid on the map. Possible values: 0 - do not show the grid; 1 - (default) show the grid. 是否显示拓扑图网格 \\可能的值: 0是不显示 1是显示 |
grid_size | integer | Size of the map grid in pixels. Supported values: 20, 40, 50, 75 and 100. Default: 50. 拓扑图网格的大小(以像素为单位) 支持20, 40, 50, 75,100像素, \\默认是50 |
highlight | integer | Whether icon highlighting is enabled. Possible values: 0 - highlighting disabled; 1 - (default) highlighting enabled. 是否启用图标高亮显示, \\可能的值: 0是不用 1是使用 |
iconmapid | string | ID of the icon map used on the map. 拓扑图使用图表的ID |
label_format | integer | Whether to enable advanced labels. Possible values: 0 - (default) disable advanced labels; 1 - enable advanced labels. 是否启用高级标签 \\可能的值: 0是不用 1是使用 |
label_location | integer | Location of the map element label. Possible values: 0 - (default) bottom; 1 - left; 2 - right; 3 - top. 拓扑图标签的位置 \\可能的值: 0是底部 1是左边 2是右边 3是顶部 |
label_string_host | string | Custom label for host elements. Required for maps with custom host label type. 主机元素自定义标签 ;需要拓扑图中的主机自定义标签类型 |
label_string_hostgroup | string | Custom label for host group elements. Required for maps with custom host group label type. 主机组元素自定义标签 ;需要拓扑图中的主机组自定义标签类型 |
label_string_image | string | Custom label for image elements. Required for maps with custom image label type. 图像元素的自定义标签。 |
label_string_map | string | Custom label for map elements. Required for maps with custom map label type. 拓扑图元素自定义标签 |
label_string_trigger | string | Custom label for trigger elements. Required for maps with custom trigger label type. 触发器元素自定义标签 |
label_type | integer | Map element label type. Possible values: 0 - label; 1 - IP address; 2 - (default) element name; 3 - status only; 4 - nothing. 拓扑图元素的标签类型 可能的类型:0:标签 1:IP地址 2:元素名称(默认) 3:状态 4:没有 |
label_type_host | integer | Label type for host elements. Possible values: 0 - label; 1 - IP address; 2 - (default) element name; 3 - status only; 4 - nothing; 5 - custom. 主机元素的标签类型 可能的值:0:标签 1:ip地址 2:元素名称(默认)3:状态 4:没有 5:自定义 |
label_type_hostgroup | integer | Label type for host group elements. Possible values: 0 - label; 2 - (default) element name; 3 - status only; 4 - nothing; 5 - custom. 主机组元素的标签类型 可能的值:0:标签 1:ip地址 2:元素名称(默认)3:状态 4:没有 5:自定义 |
label_type_image | integer | Label type for host group elements. Possible values: 0 - label; 2 - (default) element name; 4 - nothing; 5 - custom. 图像元素的标签类型 可能的值:0:标签 1:ip地址 2:元素名称(默认)3:状态 4:没有 5:自定义 |
label_type_map | integer | Label type for map elements. Possible values: 0 - label; 2 - (default) element name; 3 - status only; 4 - nothing; 5 - custom. 拓扑图元素的标签类型 可能的值:0:标签 1:ip地址 2:元素名称(默认)3:状态 4:没有 5:自定义 |
label_type_trigger | integer | Label type for trigger elements. Possible values: 0 - label; 2 - (default) element name; 3 - status only; 4 - nothing; 5 - custom. 触发器元素的标签类型 可能的值:0:标签 1:ip地址 2:元素名称(默认)3:状态 4:没有 5:自定义 |
markelements | integer | Whether to highlight map elements that have recently changed their status. Possible values: 0 - (default) do not highlight elements; 1 - highlight elements. 是否突出显示最近更改其状态的拓扑图元素 可能的值:0:不高亮 1:显示高亮 |
severity_min | integer | Minimum severity of the triggers that will be displayed on the map. Refer to the trigger "severity" property for a list of supported trigger severities. 显示在拓扑图上的严重程度最小触发器。参考trigger "severity" property,获取支持的触发器严重程度列表。 |
show_unack | integer | How problems should be displayed. Possible values: 0 - (default) display the count of all problems; 1 - display only the count of unacknowledged problems; 2 - display the count of acknowledged and unacknowledged problems separately. 如何显示问题, 可能的值: 0:显示所有问题的总数 1:仅显示未确认问题的总数 2:分别显示已确认和未确认的数目 |
userid | string | Map owner user ID. 拓扑图所有用户的id |
private | integer | Type of map sharing. Possible values: 0 - public map; 1 - (default) private map. 拓扑图的共享类型 可能的值:0:公共的拓扑图 1:私有的拓扑图 |
The map element object defines an object displayed on a map. It has the following properties. 拓扑图元素对象定义显示在拓扑图上的对象。它具有以下属性。
Property | Type | Description |
---|---|---|
selementid | string | (readonly) ID of the map element. 拓扑图元素的id |
elements (required) |
array | Element data object. Required for host, host group, trigger and map type elements.元素数据对象。需要主机、主机组、触发器和拓扑图类型元素。 |
elementtype (required) |
integer | Type of map element. Possible values: 0 - host; 1 - map; 2 - trigger; 3 - host group; 4 - image. 拓扑图元素类型 可能的值:\\0-主机 1-拓扑图 2-触发器 3-主机组 4-图像 |
iconid_off (required) |
string | ID of the image used to display the element in default state. 用于在默认状态下显示元素的图像的ID。 |
areatype | integer | How separate host group hosts should be displayed. Possible values: 0 - (default) the host group element will take up the whole map; 1 - the host group element will have a fixed size. 应该如何显示独立的主机组主机。 \\可能的值 0-主机组元素占用整个拓扑图 1-主机组元素的大小是固定的 |
application | string | Name of the application to display problems from. Used only for host and host group map elements. 显示问题的应用程序的名称。只用于主机和主机组映射元素。 |
elementsubtype | integer | How a host group element should be displayed on a map. Possible values: 0 - (default) display the host group as a single element; 1 - display each host in the group separately. 一个主机组元素如何显示在拓扑图上 可能的值: 0- 显示主机组作为一个单独的元素 1-分别显示组中的每个主机 |
height | integer | Height of the fixed size host group element in pixels. Default: 200. 固定大小的主机组元素的高度(以像素为单位)。 默认是:200 |
iconid_disabled | string | ID of the image used to display disabled map elements. Unused for image elements. 用于显示禁用映射元素的图像的ID。未使用的图像元素。 |
iconid_maintenance | string | ID of the image used to display map elements in maintenance. Unused for image elements. 用于显示维护中的拓扑图元素的图像的ID。未使用的图像元素。 |
iconid_on | string | ID of the image used to display map elements with problems. Unused for image elements. 用于显示有问题的拓扑图元素的图像的ID。未使用的图像元素。 |
label | string | Label of the element. 元素的标签 |
label_location | integer | Location of the map element label. Possible values: -1 - (default) default location; 0 - bottom; 1 - left; 2 - right; 3 - top. 映射元素标签的位置 \\可能的值: -1: 默认的位置 0-底部 1-左边 2-右边 3-上边 |
permission | integer | Type of permission level. Possible values: -1 - none; 2 - read only; 3 - read-write. 类型的权限级别 可能的值: -1:-没有权限 2-只读权限 3-读写权限 |
sysmapid | string | (readonly) ID of the map that the element belongs to. 元素所述拓扑图的ID |
urls | array | Map element URLs. The map element URL object is described in detail below. 拓扑图元素的URLS \ |
use_iconmap | integer | Whether icon mapping must be used for host elements. Possible values: 0 - do not use icon mapping; 1 - (default) use icon mapping. 是否必须为主机元素使用图标映射。 \\可能的值: 0-不使用图标映射 1-使用图表映射(默认的) |
viewtype | integer | Host group element placing algorithm. Possible values: 0 - (default) grid. 主机组元素放置算法 \\可能的值: 0-网格 |
width | integer | Width of the fixed size host group element in pixels. Default: 200. 主机组元素固定的像素宽度。 默认是:200 |
x | integer | X-coordinates of the element in pixels. Default: 0. 元素的x坐标,单位为像素。 默认是:0 |
y | integer | Y-coordinates of the element in pixels. Default: 0. 元素的y坐标,单位为像素。 默认是:0 |
The map element Host object defines one host element. 拓扑图元素中的主机对象定义是一个主机元素
Property | Type | Description |
---|---|---|
hostid | string | Host ID |
The map element Host group object defines one host group element. 拓扑图元素中的主机组对象定义是一个主机组元素。
Property | Type | Description |
---|---|---|
groupid | string | Host group ID |
The map element Map object defines one map element. 拓扑图元素中的拓扑图对象默认是一个拓扑图元素
Property | Type | Description |
---|---|---|
sysmapid | string | Map ID |
The map element Trigger object defines one or more trigger elements. 拓扑图元素中的触发器对象定义的是一个或者多个触发器元素
Property | Type | Description |
---|---|---|
triggerid | string | Trigger ID |
The map element URL object defines a clickable link that will be available for a specific map element. It has the following properties: 拓扑图元素URL对象定义了一个可单击的链接,该链接将对特定的map元素可用。它具有以下特性:
Property | Type | Description |
---|---|---|
sysmapelementurlid | string | (readonly) ID of the map element URL. |
name (required) |
string | Link caption. |
url (required) |
string | Link URL. |
selementid | string | ID of the map element that the URL belongs to. |
The map link object defines a link between two map elements. It has the following properties. 拓扑图链接对象定义两个映射元素之间的链接。它具有以下属性。
Property | Type | Description |
---|---|---|
linkid | string | (readonly) ID of the map link. |
selementid1 (required) |
string | ID of the first map element linked on one end. 在一端连接的第一个拓扑图元素的ID。 |
selementid2 (required) |
string | ID of the first map element linked on the other end. 另一端连接的第一个拓扑图元素的ID。 |
color | string | Line color as a hexadecimal color code. Default: 000000 . 行颜色作为十六进制颜色代码。默认是:“000000” |
drawtype | integer | Link line draw style. Possible values: 0 - (default) line; 2 - bold line; 3 - dotted line; 4 - dashed line. 链接线画的风格。 可能的值:0-线(默认)2-粗线 3-点线 4-虚线 |
label | string | Link label. 行标签 |
linktriggers | array | Map link triggers to use as link status indicators. The map link trigger object is described in detail below. 拓扑图链接触发器用作链接状态指示器。 |
permission | integer | Type of permission level. Possible values: -1 - none; 2 - read only; 3 - read-write. 权限等级类型 \\可能的值: -1-没有 2-只读 3-可读可写 |
sysmapid | string | ID of the map the link belongs to. 该关联所属拓扑图ID |
The map link trigger object defines a map link status indicator based on the state of a trigger. It has the following properties: 拓扑图链接触发器对象根据触发器的状态定义一个拓扑图链接状态指示器。它具有以下特性:
Property | Type | Description |
---|---|---|
linktriggerid | string | (readonly) ID of the map link trigger. |
triggerid (reqiuired) |
string | ID of the trigger used as a link indicator. |
color | string | Indicator color as a hexadecimal color code. Default: DD0000 . |
drawtype | integer | Indicator draw style. Possible values: 0 - (default) line; 2 - bold line; 3 - dotted line; 4 - dashed line. 指标画的风格 \\可能的值: 0-线(默认)2-粗线 3-点线 4-虚线 |
linkid | string | ID of the map link that the link trigger belongs to.关联触发器所属拓扑图ID |
The map URL object defines a clickable link that will be available for all elements of a specific type on the map. It has the following properties: 拓扑图URL对象定义了一个可单击的链接,该链接可用于映射上特定类型的所有元素。它具有以下特性:
Property | Type | Description |
---|---|---|
sysmapurlid | string | (readonly) ID of the map URL. 拓扑图URL ID |
name (required) |
string | Link caption. 链接标题。 |
url (required) |
string | Link URL. 链接URL |
elementtype | integer | Type of map element for which the URL will be available. Refer to the map element "type" property for a list of supported types. Default: 0. 拓扑图元素可用URL类型 默认:0 |
sysmapid | string | ID of the map that the URL belongs to. 所属URL的拓扑图ID |
List of map permissions based on users. It has the following properties: 基于用户的拓扑图权限列表。它具有以下特性:
Property | Type | Description |
---|---|---|
sysmapuserid | string | (readonly) ID of the map user. 拓扑图用户ID |
userid (required) |
string | User ID. |
permission (required) |
integer | Type of permission level. Possible values: 2 - read only; 3 - read-write; 权限等级类型 \\可能的值: -1-没有 2-只读 3-可读可写 |
List of map permissions based on user groups. It has the following properties: 基于用户组的拓扑图权限列表。它具有以下特性:
Property | Type | Description |
---|---|---|
sysmapusrgrpid | string | (readonly) ID of the map user group. 拓扑图用户组的ID |
usrgrpid (required) |
string | User group ID. |
permission (required) |
integer | Type of permission level. Possible values: 2 - read only; 3 - read-write;权限等级类型 \\可能的值: -1-没有 2-只读 3-可读可写 |
The map shape object defines an geometric shape (with or without text) displayed on a map. It has the following properties: 拓扑图形状对象定义了显示在拓扑图上的几何形状(包含或不包含文本)。它具有以下特性:
Property | Type | Description |
---|---|---|
sysmap_shapeid | string | (readonly) ID of the map shape element. 拓扑图形状元素的ID |
type (required) | integer | Type of map shape element. Possible values: 0 - rectangle; 1 - ellipse. Property is required when new shapes are created. 拓扑图形状元素的类型 可能的值: 0-矩形 1-椭圆 创建新形状时需要属性。 |
x | integer | X-coordinates of the shape in pixels. Default: 0. 元素的x坐标,单位为像素。 默认是:0 |
y | integer | Y-coordinates of the shape in pixels. Default: 0. 元素的y坐标,单位为像素。 默认是:0 |
width | integer | Width of the shape in pixels. Default: 200. 以像素为单位的形状宽度。 \\默认是:200 |
height | integer | Height of the shape in pixels. Default: 200. 以像素为单位的形状高度。 \\默认是:200 |
text | string | Text of the shape. 文本的形状。 |
font | integer | Font of the text within shape. Possible values: 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 Default: 9. Font of the text within shape. 可能的值: 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 默认是:9 |
font_size | integer | Font size in pixels. Default: 11. 字体大小,单位是像素 默认:11 |
font_color | string | Font color. Default: '000000'. 字体颜色 默认是:“000000” |
text_halign | integer | Horizontal alignment of text. Possible values: 0 - center; 1 - left; 2 - right. Default: 0. 水平对齐的文本 \\可能的值: 0-中间(默认) 1-左边 2-右边 |
text_valign | integer | Vertical alignment of text. Possible values: 0 - middle; 1 - top; 2 - bottom. Default: 0. 垂直对齐文本 \\可能的值: 0-中间(默认) 1-顶部 2-底部 |
border_type | integer | Type of the border. Possible values: 0 - none; 1 - ————— ;2 - ····· ;3 - - - - .Default: 0. 边界类型 可能的值: 0-没有(默认) 1 - ————— 2 - ····· 3 - - - - |
border_width | integer | Width of the border in pixels. Default: 0. 边框的宽度,以像素为单位 \\默认:0 |
border_color | string | Border color. Default: '000000'. 边界的颜色 \\默认:‘000000’ |
background_color | string | Background color (fill color). Default: (empty) . 背景颜色(填充颜色)默认是:无 |
zindex | integer | Value used to order shapes (z-index). Default: 0. 用于定制形状的值(z-index)。 默认是:0 |
The map line object defines an line displayed on a map. It has the following properties: 拓扑图线对象定义显示在拓扑图上的行。它具有以下特性:
Property | Type | Description |
---|---|---|
sysmap_shapeid | string | (readonly) ID of the map shape element. 拓扑图形状元素的ID |
x1 | integer | X-coordinates of the line point 1 in pixels. Default: 0. 以像素为单位的直线点1的x坐标。 \\默认是:0 |
y1 | integer | Y-coordinates of the line point 1 in pixels. Default: 0. 以像素为单位的直线点1的y坐标。 \\默认是:0 |
x2 | integer | X-coordinates of the line point 2 in pixels. Default: 200. 以像素为单位的直线点2的x坐标。 \\默认是:200 |
y2 | integer | Y-coordinates of the line point 2 in pixels. Default: 200. 以像素为单位的直线点2的x坐标。 \\默认是:200 |
line_type | integer | Type of the border. Possible values: 0 - none; 1 - ————— ;2 - ····· ;3 - - - - .Default: 0. 边界类型 可能的值: 0-没有(默认) 1 - ————— 2 - ····· 3 - - - - |
line_width | integer | Width of the border in pixels. Default: 0. 边框的宽度,以像素为单位 \\默认:0 |
line_color | string | Border color. Default: '000000'. 边界的颜色 \\默认:‘000000’ |
zindex | integer | Value used to order shapes (z-index). Default: 0. 用于定制形状的值(z-index)。 默认是:0 |
The map line object defines an line displayed on a map. It has the following properties:
Property | Type | Description |
---|---|---|
sysmap_shapeid | string | (readonly) ID of the map shape element. |
x1 | integer | X-coordinates of the line point 1 in pixels. Default: 0. |
y1 | integer | Y-coordinates of the line point 1 in pixels. Default: 0. |
x2 | integer | X-coordinates of the line point 2 in pixels. Default: 200. |
y2 | integer | Y-coordinates of the line point 2 in pixels. Default: 200. |
line_type | integer | Type of the line. Possible values: 0 - none; 1 - ————— ;2 - ····· ;3 - - - - .Default: 0. |
line_width | integer | Width of the line in pixels. Default: 0. |
line_color | string | Line color. Default: '000000'. |
zindex | integer | Value used to order all shapes and lines (z-index). Default: 0. |