1 Server-proxy data exchange protocol

Overview

Server - proxy data exchange is based on JSON format.

Request and response messages must begin with header and data length.

Passive proxy

Configuration request

The server will first send an empty proxy config request. This request is sent every ProxyConfigFrequency (server configuration parameter) seconds.

The proxy responds with the current proxy version, session token and configuration revision. The server responds with the configuration data that need to be updated.

namevalue typedescription
server→proxy:
requeststring‘proxy config’
proxy→server:
versionstringProxy version (<major>.<minor>.<build>).
sessionstringProxy configuration session token.
config_revisionnumberProxy configuration revision.
server→proxy:
full_syncnumber1 - if full configuration data is sent; absent - otherwise (optional).
dataarrayObject of table data. Absent if configuration has not been changed (optional).
<table>objectOne or more objects with <table> data (optional, depending on changes).
fieldsarrayArray of field names.
-stringField name.
dataarrayArray of rows.
-arrayArray of columns.
-string,numberColumn value with type depending on column type in database schema.
macro.secretsobjectSecret macro information, absent if there are no changes in vault macros (optional).
config_revisionnumberConfiguration cache revision - sent with configuration data (optional).
del_hostidsarrayArray of removed hostids (optional).
-numberHost identifier.
del_macro_hostidsarrayArray of hostids with all macros removed (optional).
-numberHost identifier.
proxy→server:
responsestringRequest success information (‘success’ or ‘failed’).
versionstringProxy version (<major>.<minor>.<build>).

Example:

server→proxy:

server→proxy:

  1. {
  2. "request":"proxy config"
  3. }

proxy→server:

  1. {
  2. "version": "6.4.0",
  3. "session": "0033124949800811e5686dbfd9bcea98",
  4. "config_revision": 0
  5. }

server→proxy:

  1. {
  2. "full_sync": 1,
  3. "data": {
  4. "hosts": {
  5. "fields": ["hostid", "host", "status", "ipmi_authtype", "ipmi_privilege", "ipmi_username", "ipmi_password", "name", "tls_connect", "tls_accept", "tls_issuer", "tls_subject", "tls_psk_identity", "tls_psk"],
  6. "data": [
  7. [10084, "Zabbix server", 0, -1, 2, "", "", "Zabbix server", 1, 1, "", "", "", ""]
  8. ]
  9. },
  10. "interface": {
  11. "fields": ["interfaceid", "hostid", "main", "type", "useip", "ip", "dns", "port", "available"],
  12. "data": [
  13. [1, 10084, 1, 1, 1, "127.0.0.1", "", "10053", 1]
  14. ]
  15. },
  16. "interface_snmp": {
  17. "fields": ["interfaceid", "version", "bulk", "community", "securityname", "securitylevel", "authpassphrase", "privpassphrase", "authprotocol", "privprotocol", "contextname"],
  18. "data": []
  19. },
  20. "host_inventory": {
  21. "fields": ["hostid", "type", "type_full", "name", "alias", "os", "os_full", "os_short", "serialno_a", "serialno_b", "tag", "asset_tag", "macaddress_a", "macaddress_b", "hardware", "hardware_full", "software", "software_full", "software_app_a", "software_app_b", "software_app_c", "software_app_d", "software_app_e", "contact", "location", "location_lat", "location_lon", "notes", "chassis", "model", "hw_arch", "vendor", "contract_number", "installer_name", "deployment_status", "url_a", "url_b", "url_c", "host_networks", "host_netmask", "host_router", "oob_ip", "oob_netmask", "oob_router", "date_hw_purchase", "date_hw_install", "date_hw_expiry", "date_hw_decomm", "site_address_a", "site_address_b", "site_address_c", "site_city", "site_state", "site_country", "site_zip", "site_rack", "site_notes", "poc_1_name", "poc_1_email", "poc_1_phone_a", "poc_1_phone_b", "poc_1_cell", "poc_1_screen", "poc_1_notes", "poc_2_name", "poc_2_email", "poc_2_phone_a", "poc_2_phone_b", "poc_2_cell", "poc_2_screen", "poc_2_notes"],
  22. "data": [
  23. [10084, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "56.95387", "24.22067", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""]
  24. ]
  25. },
  26. "items": {
  27. "fields": ["itemid", "type", "snmp_oid", "hostid", "key_", "delay", "history", "status", "value_type", "trapper_hosts", "logtimefmt", "params", "ipmi_sensor", "authtype", "username", "password", "publickey", "privatekey", "flags", "interfaceid", "inventory_link", "jmx_endpoint", "master_itemid", "timeout", "url", "query_fields", "posts", "status_codes", "follow_redirects", "post_type", "http_proxy", "headers", "retrieve_mode", "request_method", "output_format", "ssl_cert_file", "ssl_key_file", "ssl_key_password", "verify_peer", "verify_host", "allow_traps"],
  28. "data": [
  29. [44161, 7, "", 10084, "agent.hostmetadata", "10s", "90d", 0, 1, "", "", "", "", 0, "", "", "", "", 0, null, 0, "", null, "3s", "", "", "", "200", 1, 0, "", "", 0, 0, 0, "", "", "", 0, 0, 0],
  30. [44162, 0, "", 10084, "agent.ping", "10s", "90d", 0, 3, "", "", "", "", 0, "", "", "", "", 0, 1, 0, "", null, "3s", "", "", "", "200", 1, 0, "", "", 0, 0, 0, "", "", "", 0, 0, 0]
  31. ]
  32. },
  33. "item_rtdata": {
  34. "fields": ["itemid", "lastlogsize", "mtime"],
  35. "data": [
  36. [44161, 0, 0],
  37. [44162, 0, 0]
  38. ]
  39. },
  40. "item_preproc": {
  41. "fields": ["item_preprocid", "itemid", "step", "type", "params", "error_handler", "error_handler_params"],
  42. "data": []
  43. },
  44. "item_parameter": {
  45. "fields": ["item_parameterid", "itemid", "name", "value"],
  46. "data": []
  47. },
  48. "globalmacro": {
  49. "fields": ["globalmacroid", "macro", "value", "type"],
  50. "data": [
  51. [2, "{$SNMP_COMMUNITY}", "public", 0]
  52. ]
  53. },
  54. "hosts_templates": {
  55. "fields": ["hosttemplateid", "hostid", "templateid", "link_type"],
  56. "data": []
  57. },
  58. "hostmacro": {
  59. "fields": ["hostmacroid", "hostid", "macro", "value", "type", "automatic"],
  60. "data": [
  61. [5676, 10084, "{$M}", "AppID=zabbix_server&Query=Safe=passwordSafe;Object=zabbix:Content", 2, 0]
  62. ]
  63. },
  64. "drules": {
  65. "fields": ["druleid", "name", "iprange", "delay"],
  66. "data": [
  67. [2, "Local network", "127.0.0.1", "10s"]
  68. ]
  69. },
  70. "dchecks": {
  71. "fields": ["dcheckid", "druleid", "type", "key_", "snmp_community", "ports", "snmpv3_securityname", "snmpv3_securitylevel", "snmpv3_authpassphrase", "snmpv3_privpassphrase", "uniq", "snmpv3_authprotocol", "snmpv3_privprotocol", "snmpv3_contextname", "host_source", "name_source"],
  72. "data": [
  73. [2, 2, 9, "system.uname", "", "10052", "", 0, "", "", 0, 0, 0, "", 1, 0]
  74. ]
  75. },
  76. "regexps": {
  77. "fields": ["regexpid", "name"],
  78. "data": [
  79. [1, "File systems for discovery"],
  80. [2, "Network interfaces for discovery"],
  81. [3, "Storage devices for SNMP discovery"],
  82. [4, "Windows service names for discovery"],
  83. [5, "Windows service startup states for discovery"]
  84. ]
  85. },
  86. "expressions": {
  87. "fields": ["expressionid", "regexpid", "expression", "expression_type", "exp_delimiter", "case_sensitive"],
  88. "data": [
  89. [1, 1, "^(btrfs|ext2|ext3|ext4|reiser|xfs|ffs|ufs|jfs|jfs2|vxfs|hfs|apfs|refs|ntfs|fat32|zfs)$", 3, ",", 0],
  90. [3, 3, "^(Physical memory|Virtual memory|Memory buffers|Cached memory|Swap space)$", 4, ",", 1],
  91. [5, 4, "^(MMCSS|gupdate|SysmonLog|clr_optimization_v2.0.50727_32|clr_optimization_v4.0.30319_32)$", 4, ",", 1],
  92. [6, 5, "^(automatic|automatic delayed)$", 3, ",", 1],
  93. [7, 2, "^Software Loopback Interface", 4, ",", 1],
  94. [8, 2, "^(In)?[Ll]oop[Bb]ack[0-9._]*$", 4, ",", 1],
  95. [9, 2, "^NULL[0-9.]*$", 4, ",", 1],
  96. [10, 2, "^[Ll]o[0-9.]*$", 4, ",", 1],
  97. [11, 2, "^[Ss]ystem$", 4, ",", 1],
  98. [12, 2, "^Nu[0-9.]*$", 4, ",", 1]
  99. ]
  100. },
  101. "config": {
  102. "fields": ["configid", "snmptrap_logging", "hk_history_global", "hk_history", "autoreg_tls_accept"],
  103. "data": [
  104. [1, 1, 0, "90d", 1]
  105. ]
  106. },
  107. "httptest": {
  108. "fields": ["httptestid", "name", "delay", "agent", "authentication", "http_user", "http_password", "hostid", "http_proxy", "retries", "ssl_cert_file", "ssl_key_file", "ssl_key_password", "verify_peer", "verify_host"],
  109. "data": []
  110. },
  111. "httptestitem": {
  112. "fields": ["httptestitemid", "httptestid", "itemid", "type"],
  113. "data": []
  114. },
  115. "httptest_field": {
  116. "fields": ["httptest_fieldid", "httptestid", "type", "name", "value"],
  117. "data": []
  118. },
  119. "httpstep": {
  120. "fields": ["httpstepid", "httptestid", "name", "no", "url", "timeout", "posts", "required", "status_codes", "follow_redirects", "retrieve_mode", "post_type"],
  121. "data": []
  122. },
  123. "httpstepitem": {
  124. "fields": ["httpstepitemid", "httpstepid", "itemid", "type"],
  125. "data": []
  126. },
  127. "httpstep_field": {
  128. "fields": ["httpstep_fieldid", "httpstepid", "type", "name", "value"],
  129. "data": []
  130. },
  131. "config_autoreg_tls": {
  132. "fields": ["autoreg_tlsid", "tls_psk_identity", "tls_psk"],
  133. "data": [
  134. [1, "", ""]
  135. ]
  136. }
  137. },
  138. "macro.secrets": {
  139. "AppID=zabbix_server&Query=Safe=passwordSafe;Object=zabbix": {
  140. "Content": "738"
  141. }
  142. },
  143. "config_revision": 2
  144. }

proxy→server:

  1. {
  2. "response": "success",
  3. "version": "6.4.0"
  4. }
Data request

The proxy data request is used to obtain host interface availability, historical, discovery and autoregistration data from proxy. This request is sent every ProxyDataFrequency (server configuration parameter) seconds.

namevalue typedescription
server→proxy:
requeststring‘proxy data’
proxy→server:
sessionstringData session token.
interface availabilityarray(optional) Array of interface availability data objects.
interfaceidnumberInterface identifier.
availablenumberInterface availability:

0, INTERFACEAVAILABLE_UNKNOWN - unknown
1, INTERFACE_AVAILABLE_TRUE - available
2, INTERFACE_AVAILABLE_FALSE - unavailable
errorstringInterface error message or empty string.
history dataarray(optional) Array of history data objects.
itemidnumberItem identifier.
clocknumberItem value timestamp (seconds).
nsnumberItem value timestamp (nanoseconds).
valuestring(optional) Item value.
idnumberValue identifier (ascending counter, unique within one data session).
timestampnumber(optional) Timestamp of log type items.
sourcestring(optional) Eventlog item source value.
severitynumber(optional) Eventlog item severity value.
eventidnumber(optional) Eventlog item eventid value.
statestring(optional) Item state:
0, ITEM_STATE_NORMAL
1, ITEM_STATE_NOTSUPPORTED
lastlogsizenumber(optional) Last log size of log type items.
mtimenumber(optional) Modification time of log type items.
discovery dataarray(optional) Array of discovery data objects.
clocknumberDiscovery data timestamp.
druleidnumberDiscovery rule identifier.
dcheckidnumberDiscovery check identifier or null for discovery rule data.
typenumberDiscovery check type:

-1 discovery rule data
0, SVC_SSH - SSH service check
1, SVC_LDAP - LDAP service check
2, SVC_SMTP - SMTP service check
3, SVC_FTP - FTP service check
4, SVC_HTTP - HTTP service check
5, SVC_POP - POP service check
6, SVC_NNTP - NNTP service check
7, SVC_IMAP - IMAP service check
8, SVC_TCP - TCP port availability check
9, SVC_AGENT - Zabbix agent
10, SVC_SNMPv1 - SNMPv1 agent
11, SVC_SNMPv2 - SNMPv2 agent
12, SVC_ICMPPING - ICMP ping
13, SVC_SNMPv3 - SNMPv3 agent
14, SVC_HTTPS - HTTPS service check
15, SVC_TELNET - Telnet availability check
ipstringHost IP address.
dnsstringHost DNS name.
portnumber(optional) Service port number.
keystring(optional) Item key for discovery check of type 9 SVC_AGENT
valuestring(optional) Value received from the service, can be empty for most of services.
statusnumber(optional) Service status:

0, DOBJECT_STATUS_UP - Service UP
1, DOBJECT_STATUS_DOWN - Service DOWN
auto registrationarray(optional) Array of autoregistration data objects.
clocknumberAutoregistration data timestamp.
hoststringHost name.
ipstring(optional) Host IP address.
dnsstring(optional) Resolved DNS name from IP address.
portstring(optional) Host port.
host_metadatastring(optional) Host metadata sent by agent (based on HostMetadata or HostMetadataItem agent configuration parameter).
tasksarray(optional) Array of tasks.
typenumberTask type:

0, ZBX_TM_TASK_PROCESS_REMOTE_COMMAND_RESULT - remote command result
statusnumberRemote-command execution status:

0, ZBX_TM_REMOTE_COMMAND_COMPLETED - remote command completed successfully
1, ZBX_TM_REMOTE_COMMAND_FAILED - remote command failed
errorstring(optional) Error message.
parent_taskidnumberParent task ID.
morenumber(optional) 1 - there are more history data to send.
clocknumber(optional) Data transfer timestamp (seconds).
nsnumber(optional) Data transfer timestamp (nanoseconds).
versionstringProxy version (<major>.<minor>.<build>).
server→proxy:
responsestringRequest success information (‘success’ or ‘failed’).
tasksarray(optional) Array of tasks.
typenumberTask type:

1, ZBX_TM_TASK_PROCESS_REMOTE_COMMAND - remote command
clocknumberTask creation time.
ttlnumberTime in seconds after which the task expires.
commandtypenumberRemote-command type:

0, ZBX_SCRIPT_TYPE_CUSTOM_SCRIPT - use custom script
1, ZBX_SCRIPT_TYPE_IPMI - use IPMI
2, ZBX_SCRIPT_TYPE_SSH - use SSH
3, ZBX_SCRIPT_TYPE_TELNET - use Telnet
4, ZBX_SCRIPT_TYPE_GLOBAL_SCRIPT - use global script (currently functionally equivalent to custom script)
commandstringRemote command to execute.
execute_onnumberExecution target for custom scripts:

0, ZBX_SCRIPT_EXECUTE_ON_AGENT - execute script on agent
1, ZBX_SCRIPT_EXECUTE_ON_SERVER - execute script on server
2, ZBX_SCRIPT_EXECUTE_ON_PROXY - execute script on proxy
portnumber(optional) Port for Telnet and SSH commands.
authtypenumber(optional) Authentication type for SSH commands.
usernamestring(optional) User name for Telnet and SSH commands.
passwordstring(optional) Password for Telnet and SSH commands.
publickeystring(optional) Public key for SSH commands.
privatekeystring(optional) Private key for SSH commands.
parent_taskidnumberParent task ID.
hostidnumberTarget host ID.

Example:

server→proxy:

  1. {
  2. "request": "proxy data"
  3. }

proxy→server:

  1. {
  2. "session": "12345678901234567890123456789012"
  3. "interface availability": [
  4. {
  5. "interfaceid": 1,
  6. "available": 1,
  7. "error": ""
  8. },
  9. {
  10. "interfaceid": 2,
  11. "available": 2,
  12. "error": "Get value from agent failed: cannot connect to [[127.0.0.1]:10049]: [111] Connection refused"
  13. },
  14. {
  15. "interfaceid": 3,
  16. "available": 1,
  17. "error": ""
  18. },
  19. {
  20. "interfaceid": 4,
  21. "available": 1,
  22. "error": ""
  23. }
  24. ],
  25. "history data":[
  26. {
  27. "itemid":"12345",
  28. "clock":1478609647,
  29. "ns":332510044,
  30. "value":"52956612",
  31. "id": 1
  32. },
  33. {
  34. "itemid":"12346",
  35. "clock":1478609647,
  36. "ns":330690279,
  37. "state":1,
  38. "value":"Cannot find information for this network interface in /proc/net/dev.",
  39. "id": 2
  40. }
  41. ],
  42. "discovery data":[
  43. {
  44. "clock":1478608764,
  45. "drule":2,
  46. "dcheck":3,
  47. "type":12,
  48. "ip":"10.3.0.10",
  49. "dns":"vdebian",
  50. "status":1
  51. },
  52. {
  53. "clock":1478608764,
  54. "drule":2,
  55. "dcheck":null,
  56. "type":-1,
  57. "ip":"10.3.0.10",
  58. "dns":"vdebian",
  59. "status":1
  60. }
  61. ],
  62. "auto registration":[
  63. {
  64. "clock":1478608371,
  65. "host":"Logger1",
  66. "ip":"10.3.0.1",
  67. "dns":"localhost",
  68. "port":"10050"
  69. },
  70. {
  71. "clock":1478608381,
  72. "host":"Logger2",
  73. "ip":"10.3.0.2",
  74. "dns":"localhost",
  75. "port":"10050"
  76. }
  77. ],
  78. "tasks":[
  79. {
  80. "type": 0,
  81. "status": 0,
  82. "parent_taskid": 10
  83. },
  84. {
  85. "type": 0,
  86. "status": 1,
  87. "error": "No permissions to execute task.",
  88. "parent_taskid": 20
  89. }
  90. ],
  91. "version":"6.4.0"
  92. }

server→proxy:

  1. {
  2. "response": "success",
  3. "tasks":[
  4. {
  5. "type": 1,
  6. "clock": 1478608371,
  7. "ttl": 600,
  8. "commandtype": 2,
  9. "command": "restart_service1.sh",
  10. "execute_on": 2,
  11. "port": 80,
  12. "authtype": 0,
  13. "username": "userA",
  14. "password": "password1",
  15. "publickey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe",
  16. "privatekey": "lsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ5QCqGKukO1De7zhd",
  17. "parent_taskid": 10,
  18. "hostid": 10070
  19. },
  20. {
  21. "type": 1,
  22. "clock": 1478608381,
  23. "ttl": 600,
  24. "commandtype": 1,
  25. "command": "restart_service2.sh",
  26. "execute_on": 0,
  27. "authtype": 0,
  28. "username": "",
  29. "password": "",
  30. "publickey": "",
  31. "privatekey": "",
  32. "parent_taskid": 20,
  33. "hostid": 10084
  34. }
  35. ]
  36. }

Active proxy

Configuration request

The proxy config request is sent by active proxy to obtain proxy configuration data. This request is sent every ProxyConfigFrequency (proxy configuration parameter) seconds.

namevalue typedescription
proxy→server:
requeststring‘proxy config’
hoststring
Proxy name.
versionstringProxy version (<major>.<minor>.<build>).
sessionstringProxy configuration session token.
config_revisionnumberProxy configuration revision.
server→proxy:
fullsyncnumber1 - if full configuration data is sent, absent otherwise (optional).
dataarrayObject of table data. Absent if configuration has not been changed (optional).
<table>objectOne or more objects with <table> data (optional, depending on changes).
fieldsarrayArray of field names.
-stringField name.
dataarrayArray of rows.
-arrayArray of columns.
-string,numberColumn value with type depending on column type in database schema.
macro.secretsobjectSecret macro information, absent if there are no changes in vault macros (optional).
config_revisionnumberConfiguration cache revision - sent with configuration data (optional).
del_hostidsarrayArray of removed hostids (optional).
-numberHost identifier.
del_macro_hostidsarrayArray of hostids with all macros removed (optional).
-numberHost identifier.

Example:

proxy→server:

  1. {
  2. "request": "proxy config",
  3. "host": "Zabbix proxy",
  4. "version":"6.4.0",
  5. "session": "fd59a09ff4e9d1fb447de1f04599bcf6",
  6. "config_revision": 0
  7. }

server→proxy:

  1. {
  2. "full_sync": 1,
  3. "data": {
  4. "hosts": {
  5. "fields": ["hostid", "host", "status", "ipmi_authtype", "ipmi_privilege", "ipmi_username", "ipmi_password", "name", "tls_connect", "tls_accept", "tls_issuer", "tls_subject", "tls_psk_identity", "tls_psk"],
  6. "data": [
  7. [10084, "Zabbix server", 0, -1, 2, "", "", "Zabbix server", 1, 1, "", "", "", ""]
  8. ]
  9. },
  10. "interface": {
  11. "fields": ["interfaceid", "hostid", "main", "type", "useip", "ip", "dns", "port", "available"],
  12. "data": [
  13. [1, 10084, 1, 1, 1, "127.0.0.1", "", "10053", 1]
  14. ]
  15. },
  16. "interface_snmp": {
  17. "fields": ["interfaceid", "version", "bulk", "community", "securityname", "securitylevel", "authpassphrase", "privpassphrase", "authprotocol", "privprotocol", "contextname"],
  18. "data": []
  19. },
  20. "host_inventory": {
  21. "fields": ["hostid", "type", "type_full", "name", "alias", "os", "os_full", "os_short", "serialno_a", "serialno_b", "tag", "asset_tag", "macaddress_a", "macaddress_b", "hardware", "hardware_full", "software", "software_full", "software_app_a", "software_app_b", "software_app_c", "software_app_d", "software_app_e", "contact", "location", "location_lat", "location_lon", "notes", "chassis", "model", "hw_arch", "vendor", "contract_number", "installer_name", "deployment_status", "url_a", "url_b", "url_c", "host_networks", "host_netmask", "host_router", "oob_ip", "oob_netmask", "oob_router", "date_hw_purchase", "date_hw_install", "date_hw_expiry", "date_hw_decomm", "site_address_a", "site_address_b", "site_address_c", "site_city", "site_state", "site_country", "site_zip", "site_rack", "site_notes", "poc_1_name", "poc_1_email", "poc_1_phone_a", "poc_1_phone_b", "poc_1_cell", "poc_1_screen", "poc_1_notes", "poc_2_name", "poc_2_email", "poc_2_phone_a", "poc_2_phone_b", "poc_2_cell", "poc_2_screen", "poc_2_notes"],
  22. "data": [
  23. [10084, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "56.95387", "24.22067", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""]
  24. ]
  25. },
  26. "items": {
  27. "fields": ["itemid", "type", "snmp_oid", "hostid", "key_", "delay", "history", "status", "value_type", "trapper_hosts", "logtimefmt", "params", "ipmi_sensor", "authtype", "username", "password", "publickey", "privatekey", "flags", "interfaceid", "inventory_link", "jmx_endpoint", "master_itemid", "timeout", "url", "query_fields", "posts", "status_codes", "follow_redirects", "post_type", "http_proxy", "headers", "retrieve_mode", "request_method", "output_format", "ssl_cert_file", "ssl_key_file", "ssl_key_password", "verify_peer", "verify_host", "allow_traps"],
  28. "data": [
  29. [44161, 7, "", 10084, "agent.hostmetadata", "10s", "90d", 0, 1, "", "", "", "", 0, "", "", "", "", 0, null, 0, "", null, "3s", "", "", "", "200", 1, 0, "", "", 0, 0, 0, "", "", "", 0, 0, 0],
  30. [44162, 0, "", 10084, "agent.ping", "10s", "90d", 0, 3, "", "", "", "", 0, "", "", "", "", 0, 1, 0, "", null, "3s", "", "", "", "200", 1, 0, "", "", 0, 0, 0, "", "", "", 0, 0, 0]
  31. ]
  32. },
  33. "item_rtdata": {
  34. "fields": ["itemid", "lastlogsize", "mtime"],
  35. "data": [
  36. [44161, 0, 0],
  37. [44162, 0, 0]
  38. ]
  39. },
  40. "item_preproc": {
  41. "fields": ["item_preprocid", "itemid", "step", "type", "params", "error_handler", "error_handler_params"],
  42. "data": []
  43. },
  44. "item_parameter": {
  45. "fields": ["item_parameterid", "itemid", "name", "value"],
  46. "data": []
  47. },
  48. "globalmacro": {
  49. "fields": ["globalmacroid", "macro", "value", "type"],
  50. "data": [
  51. [2, "{$SNMP_COMMUNITY}", "public", 0]
  52. ]
  53. },
  54. "hosts_templates": {
  55. "fields": ["hosttemplateid", "hostid", "templateid", "link_type"],
  56. "data": []
  57. },
  58. "hostmacro": {
  59. "fields": ["hostmacroid", "hostid", "macro", "value", "type", "automatic"],
  60. "data": [
  61. [5676, 10084, "{$M}", "AppID=zabbix_server&Query=Safe=passwordSafe;Object=zabbix:Content", 2, 0]
  62. ]
  63. },
  64. "drules": {
  65. "fields": ["druleid", "name", "iprange", "delay"],
  66. "data": [
  67. [2, "Local network", "127.0.0.1", "10s"]
  68. ]
  69. },
  70. "dchecks": {
  71. "fields": ["dcheckid", "druleid", "type", "key_", "snmp_community", "ports", "snmpv3_securityname", "snmpv3_securitylevel", "snmpv3_authpassphrase", "snmpv3_privpassphrase", "uniq", "snmpv3_authprotocol", "snmpv3_privprotocol", "snmpv3_contextname", "host_source", "name_source"],
  72. "data": [
  73. [2, 2, 9, "system.uname", "", "10052", "", 0, "", "", 0, 0, 0, "", 1, 0]
  74. ]
  75. },
  76. "regexps": {
  77. "fields": ["regexpid", "name"],
  78. "data": [
  79. [1, "File systems for discovery"],
  80. [2, "Network interfaces for discovery"],
  81. [3, "Storage devices for SNMP discovery"],
  82. [4, "Windows service names for discovery"],
  83. [5, "Windows service startup states for discovery"]
  84. ]
  85. },
  86. "expressions": {
  87. "fields": ["expressionid", "regexpid", "expression", "expression_type", "exp_delimiter", "case_sensitive"],
  88. "data": [
  89. [1, 1, "^(btrfs|ext2|ext3|ext4|reiser|xfs|ffs|ufs|jfs|jfs2|vxfs|hfs|apfs|refs|ntfs|fat32|zfs)$", 3, ",", 0],
  90. [3, 3, "^(Physical memory|Virtual memory|Memory buffers|Cached memory|Swap space)$", 4, ",", 1],
  91. [5, 4, "^(MMCSS|gupdate|SysmonLog|clr_optimization_v2.0.50727_32|clr_optimization_v4.0.30319_32)$", 4, ",", 1],
  92. [6, 5, "^(automatic|automatic delayed)$", 3, ",", 1],
  93. [7, 2, "^Software Loopback Interface", 4, ",", 1],
  94. [8, 2, "^(In)?[Ll]oop[Bb]ack[0-9._]*$", 4, ",", 1],
  95. [9, 2, "^NULL[0-9.]*$", 4, ",", 1],
  96. [10, 2, "^[Ll]o[0-9.]*$", 4, ",", 1],
  97. [11, 2, "^[Ss]ystem$", 4, ",", 1],
  98. [12, 2, "^Nu[0-9.]*$", 4, ",", 1]
  99. ]
  100. },
  101. "config": {
  102. "fields": ["configid", "snmptrap_logging", "hk_history_global", "hk_history", "autoreg_tls_accept"],
  103. "data": [
  104. [1, 1, 0, "90d", 1]
  105. ]
  106. },
  107. "httptest": {
  108. "fields": ["httptestid", "name", "delay", "agent", "authentication", "http_user", "http_password", "hostid", "http_proxy", "retries", "ssl_cert_file", "ssl_key_file", "ssl_key_password", "verify_peer", "verify_host"],
  109. "data": []
  110. },
  111. "httptestitem": {
  112. "fields": ["httptestitemid", "httptestid", "itemid", "type"],
  113. "data": []
  114. },
  115. "httptest_field": {
  116. "fields": ["httptest_fieldid", "httptestid", "type", "name", "value"],
  117. "data": []
  118. },
  119. "httpstep": {
  120. "fields": ["httpstepid", "httptestid", "name", "no", "url", "timeout", "posts", "required", "status_codes", "follow_redirects", "retrieve_mode", "post_type"],
  121. "data": []
  122. },
  123. "httpstepitem": {
  124. "fields": ["httpstepitemid", "httpstepid", "itemid", "type"],
  125. "data": []
  126. },
  127. "httpstep_field": {
  128. "fields": ["httpstep_fieldid", "httpstepid", "type", "name", "value"],
  129. "data": []
  130. },
  131. "config_autoreg_tls": {
  132. "fields": ["autoreg_tlsid", "tls_psk_identity", "tls_psk"],
  133. "data": [
  134. [1, "", ""]
  135. ]
  136. }
  137. },
  138. "macro.secrets": {
  139. "AppID=zabbix_server&Query=Safe=passwordSafe;Object=zabbix": {
  140. "Content": "738"
  141. }
  142. },
  143. "config_revision": 2
  144. }
Data request

The proxy data request is sent by proxy to provide host interface availability, history, discovery and autoregistration data. This request is sent every DataSenderFrequency (proxy configuration parameter) seconds. Note that active proxy will still poll Zabbix server every second for remote command tasks (with an empty proxy data request).

namevalue typedescription
proxy→server:
requeststring‘proxy data’
hoststringProxy name.
sessionstringData session token.
interface availabilityarray(optional) Array of interface availability data objects.
interfaceidnumberInterface identifier.
availablenumberInterface availability:

0, INTERFACEAVAILABLE_UNKNOWN - unknown
1, INTERFACE_AVAILABLE_TRUE - available
2, INTERFACE_AVAILABLE_FALSE - unavailable
errorstringInterface error message or empty string.
history dataarray(optional) Array of history data objects.
itemidnumberItem identifier.
clocknumberItem value timestamp (seconds).
nsnumberItem value timestamp (nanoseconds).
valuestring(optional) Item value.
idnumberValue identifier (ascending counter, unique within one data session).
timestampnumber(optional) Timestamp of log type items.
sourcestring(optional) Eventlog item source value.
severitynumber(optional) Eventlog item severity value.
eventidnumber(optional) Eventlog item eventid value.
statestring(optional) Item state:
0, ITEM_STATE_NORMAL
1, ITEM_STATE_NOTSUPPORTED
lastlogsizenumber(optional) Last log size of log type items.
mtimenumber(optional) Modification time of log type items.
discovery dataarray(optional) Array of discovery data objects.
clocknumberDiscovery data timestamp.
druleidnumberDiscovery rule identifier.
dcheckidnumberDiscovery check identifier or null for discovery rule data.
typenumberDiscovery check type:

-1 discovery rule data
0, SVC_SSH - SSH service check
1, SVC_LDAP - LDAP service check
2, SVC_SMTP - SMTP service check
3, SVC_FTP - FTP service check
4, SVC_HTTP - HTTP service check
5, SVC_POP - POP service check
6, SVC_NNTP - NNTP service check
7, SVC_IMAP - IMAP service check
8, SVC_TCP - TCP port availability check
9, SVC_AGENT - Zabbix agent
10, SVC_SNMPv1 - SNMPv1 agent
11, SVC_SNMPv2 - SNMPv2 agent
12, SVC_ICMPPING - ICMP ping
13, SVC_SNMPv3 - SNMPv3 agent
14, SVC_HTTPS - HTTPS service check
15, SVC_TELNET - Telnet availability check
ipstringHost IP address.
dnsstringHost DNS name.
portnumber(optional) Service port number.
keystring(optional) Item key for discovery check of type 9 SVC_AGENT
valuestring(optional) Value received from the service, can be empty for most services.
statusnumber(optional) Service status:

0, DOBJECT_STATUS_UP - Service UP
1, DOBJECT_STATUS_DOWN - Service DOWN
autoregistrationarray(optional) Array of autoregistration data objects.
clocknumberAutoregistration data timestamp.
hoststringHost name.
ipstring(optional) Host IP address.
dnsstring(optional) Resolved DNS name from IP address.
portstring(optional) Host port.
host_metadatastring(optional) Host metadata sent by agent (based on HostMetadata or HostMetadataItem agent configuration parameter).
tasksarray(optional) Array of tasks.
typenumberTask type:

0, ZBX_TM_TASK_PROCESS_REMOTE_COMMAND_RESULT - remote command result
statusnumberRemote-command execution status:

0, ZBX_TM_REMOTE_COMMAND_COMPLETED - remote command completed successfully
1, ZBX_TM_REMOTE_COMMAND_FAILED - remote command failed
errorstring(optional) Error message.
parent_taskidnumberParent task ID.
morenumber(optional) 1 - there are more history data to send
clocknumber(optional) Data transfer timestamp (seconds).
nsnumber(optional) Data transfer timestamp (nanoseconds).
versionstringProxy version (<major>.<minor>.<build>).
server→proxy:
responsestringRequest success information (‘success’ or ‘failed’).
uploadstringUpload control for historical data (history, autoregistration, host availability, network discovery).

Possible values:
enabled - normal operation
disabled - server is not accepting data (possibly due to internal cache over limit)
tasksarray(optional) Array of tasks.
typenumberTask type:

1, ZBX_TM_TASK_PROCESS_REMOTE_COMMAND - remote command
clocknumberTask creation time.
ttlnumberTime in seconds after which the task expires.
commandtypenumberRemote-command type:

0, ZBX_SCRIPT_TYPE_CUSTOM_SCRIPT - use custom script
1, ZBX_SCRIPT_TYPE_IPMI - use IPMI
2, ZBX_SCRIPT_TYPE_SSH - use SSH
3, ZBX_SCRIPT_TYPE_TELNET - use Telnet
4, ZBX_SCRIPT_TYPE_GLOBAL_SCRIPT - use global script (currently functionally equivalent to custom script)
commandstringRemote command to execute.
execute_onnumberExecution target for custom scripts:

0, ZBX_SCRIPT_EXECUTE_ON_AGENT - execute script on agent
1, ZBX_SCRIPT_EXECUTE_ON_SERVER - execute script on server
2, ZBX_SCRIPT_EXECUTE_ON_PROXY - execute script on proxy
portnumber(optional) Port for Telnet and SSH commands.
authtypenumber(optional) Authentication type for SSH commands.
usernamestring(optional) User name for Telnet and SSH commands.
passwordstring(optional) Password for Telnet and SSH commands.
publickeystring(optional) Public key for SSH commands.
privatekeystring(optional) Private key for SSH commands.
parent_taskidnumberParent task ID.
hostidnumberTarget host ID.

Example:

proxy→server:

  1. {
  2. "request": "proxy data",
  3. "host": "Zabbix proxy",
  4. "session": "818cdd1b537bdc5e50c09ed4969235b6",
  5. "interface availability": [{
  6. "interfaceid": 1,
  7. "available": 1,
  8. "error": ""
  9. }],
  10. "history data": [{
  11. "id": 1114,
  12. "itemid": 44162,
  13. "clock": 1665730632,
  14. "ns": 798953105,
  15. "value": "1"
  16. }, {
  17. "id": 1115,
  18. "itemid": 44161,
  19. "clock": 1665730633,
  20. "ns": 811684663,
  21. "value": "58"
  22. }],
  23. "auto registration": [{
  24. "clock": 1665730633,
  25. "host": "Zabbix server",
  26. "ip": "127.0.0.1",
  27. "dns": "localhost",
  28. "port": "10053",
  29. "host_metadata": "58",
  30. "tls_accepted": 1
  31. }],
  32. "discovery data": [{
  33. "clock": 1665732232,
  34. "drule": 2,
  35. "dcheck": 2,
  36. "ip": "127.0.0.1",
  37. "dns": "localhost",
  38. "port": 10052,
  39. "status": 1
  40. }, {
  41. "clock": 1665732232,
  42. "drule": 2,
  43. "dcheck": null,
  44. "ip": "127.0.0.1",
  45. "dns": "localhost",
  46. "status": 1
  47. }],
  48. "host data": [{
  49. "hostid": 10084,
  50. "active_status": 1
  51. }],
  52. "tasks": [{
  53. "type": 3,
  54. "clock": 1665730985,
  55. "ttl": 0,
  56. "status": -1,
  57. "info": "Remote commands are not enabled",
  58. "parent_taskid": 3
  59. }],
  60. "version": "6.4.0",
  61. "clock": 1665730643,
  62. "ns": 65389964
  63. }

server→proxy:

  1. {
  2. "upload": "enabled",
  3. "response": "success",
  4. "tasks": [{
  5. "type": 2,
  6. "clock": 1665730986,
  7. "ttl": 600,
  8. "commandtype": 0,
  9. "command": "ping -c 3 127.0.0.1; case $? in [01]) true;; *) false;; esac",
  10. "execute_on": 2,
  11. "port": 0,
  12. "authtype": 0,
  13. "username": "",
  14. "password": "",
  15. "publickey": "",
  16. "privatekey": "",
  17. "alertid": 0,
  18. "parent_taskid": 4,
  19. "hostid": 10084
  20. }]
  21. }