获取拓扑图

    此方法适用于任何类型的用户. 调用该方法的权限可以在用户角色设置中撤销. 请参阅了解更多信息.

    参数

    (object) 定义所需输出的参数。

    (整型/数组) 返回其中之一:

    • 一个对象数组;
    • 如果使用countOutput参数,查询对象的数量.

    案例

    查询拓扑图

    检索关于拓扑图”3”的所有数据

    响应:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": [
    4. {
    5. "selements": [
    6. {
    7. "selementid": "10",
    8. "sysmapid": "3",
    9. "elementtype": "4",
    10. "evaltype": "0",
    11. "iconid_off": "1",
    12. "iconid_on": "0",
    13. "label": "Zabbix server",
    14. "label_location": "3",
    15. "x": "11",
    16. "y": "141",
    17. "iconid_disabled": "0",
    18. "iconid_maintenance": "0",
    19. "elementsubtype": "0",
    20. "areatype": "0",
    21. "width": "200",
    22. "height": "200",
    23. "tags": [
    24. {
    25. "tag": "service",
    26. "value": "mysqld",
    27. "operator": "0"
    28. }
    29. ],
    30. "viewtype": "0",
    31. "use_iconmap": "1",
    32. "urls": [],
    33. "elements": []
    34. },
    35. {
    36. "selementid": "11",
    37. "sysmapid": "3",
    38. "elementtype": "4",
    39. "evaltype": "0",
    40. "iconid_off": "1",
    41. "iconid_on": "0",
    42. "label": "Web server",
    43. "label_location": "3",
    44. "x": "211",
    45. "y": "191",
    46. "iconid_disabled": "0",
    47. "iconid_maintenance": "0",
    48. "elementsubtype": "0",
    49. "areatype": "0",
    50. "width": "200",
    51. "height": "200",
    52. "viewtype": "0",
    53. "use_iconmap": "1",
    54. "tags": [],
    55. },
    56. {
    57. "selementid": "12",
    58. "sysmapid": "3",
    59. "elementtype": "0",
    60. "evaltype": "0",
    61. "iconid_off": "185",
    62. "iconid_on": "0",
    63. "label": "{HOST.NAME}\r\n{HOST.CONN}",
    64. "label_location": "0",
    65. "x": "111",
    66. "y": "61",
    67. "iconid_disabled": "0",
    68. "iconid_maintenance": "0",
    69. "elementsubtype": "0",
    70. "areatype": "0",
    71. "width": "200",
    72. "height": "200",
    73. "viewtype": "0",
    74. "use_iconmap": "0",
    75. "tags": [],
    76. "urls": [],
    77. "elements": [
    78. {
    79. "hostid": "10084"
    80. }
    81. ]
    82. }
    83. ],
    84. "links": [
    85. {
    86. "linkid": "23",
    87. "sysmapid": "3",
    88. "selementid1": "10",
    89. "selementid2": "11",
    90. "drawtype": "0",
    91. "color": "00CC00",
    92. "label": "",
    93. "linktriggers": []
    94. }
    95. ],
    96. "users": [
    97. {
    98. "sysmapuserid": "1",
    99. "userid": "2",
    100. "permission": "2"
    101. }
    102. ],
    103. "userGroups": [
    104. {
    105. "sysmapusrgrpid": "1",
    106. "usrgrpid": "7",
    107. "permission": "2"
    108. }
    109. ],
    110. "shapes":[
    111. {
    112. "sysmap_shapeid":"1",
    113. "type":"0",
    114. "x":"0",
    115. "width":"680",
    116. "height":"15",
    117. "text":"{MAP.NAME}",
    118. "font_size":"11",
    119. "font_color":"000000",
    120. "text_halign":"0",
    121. "text_valign":"0",
    122. "border_type":"0",
    123. "border_width":"0",
    124. "border_color":"000000",
    125. "background_color":"",
    126. "zindex":"0"
    127. }
    128. ],
    129. "lines":[
    130. {
    131. "sysmap_shapeid":"2",
    132. "x1": 30,
    133. "y1": 10,
    134. "x2": 100,
    135. "y2": 50,
    136. "line_type": 1,
    137. "line_width": 10,
    138. "line_color": "009900",
    139. "zindex":"1"
    140. }
    141. ],
    142. "sysmapid": "3",
    143. "name": "Local nerwork",
    144. "width": "400",
    145. "height": "400",
    146. "backgroundid": "0",
    147. "label_type": "2",
    148. "label_location": "3",
    149. "highlight": "1",
    150. "expandproblem": "1",
    151. "markelements": "0",
    152. "show_unack": "0",
    153. "grid_size": "50",
    154. "grid_show": "1",
    155. "grid_align": "1",
    156. "label_format": "0",
    157. "label_type_host": "2",
    158. "label_type_hostgroup": "2",
    159. "label_type_trigger": "2",
    160. "label_type_map": "2",
    161. "label_type_image": "2",
    162. "label_string_host": "",
    163. "label_string_hostgroup": "",
    164. "label_string_trigger": "",
    165. "label_string_map": "",
    166. "label_string_image": "",
    167. "iconmapid": "0",
    168. "expand_macros": "0",
    169. "severity_min": "0",
    170. "userid": "1",
    171. "private": "1",
    172. "show_suppressed": "1"
    173. }
    174. ],
    175. }

    来源

    CMap::get() in ui/include/classes/api/services/CMap.php.