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

Proxy config request

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

namevalue typedescription
server→proxy:
requeststring‘proxy config’
<table>objectone or more objects with <table> data
fieldsarrayarray of field names
-stringfield name
dataarrayarray of rows
-arrayarray of columns
-string,numbercolumn value with type depending on column type in database schema
proxy→server:
responsestringthe request success information (‘success’ or ‘failed’)
versionstringthe proxy version (<major>.<minor>.<build>)

Example:

server→proxy:

  1. {
  2. "request": "proxy config",
  3. "globalmacro":{
  4. "fields":[
  5. "globalmacroid",
  6. "macro",
  7. "value"
  8. ],
  9. "data":[
  10. [
  11. 2,
  12. "{$SNMP_COMMUNITY}",
  13. "public"
  14. ]
  15. ]
  16. },
  17. "hosts":{
  18. "fields":[
  19. "hostid",
  20. "host",
  21. "status",
  22. "ipmi_authtype",
  23. "ipmi_privilege",
  24. "ipmi_username",
  25. "ipmi_password",
  26. "name",
  27. "tls_connect",
  28. "tls_accept",
  29. "tls_issuer",
  30. "tls_subject",
  31. "tls_psk_identity",
  32. "tls_psk"
  33. ],
  34. "data":[
  35. [
  36. 10001,
  37. "Template OS Linux",
  38. 3,
  39. -1,
  40. 2,
  41. "",
  42. "",
  43. "Template OS Linux",
  44. 1,
  45. 1,
  46. "",
  47. "",
  48. "",
  49. ""
  50. ],
  51. [
  52. 10050,
  53. "Template App Zabbix Agent",
  54. 3,
  55. -1,
  56. 2,
  57. "",
  58. "",
  59. "Template App Zabbix Agent",
  60. 1,
  61. 1,
  62. "",
  63. "",
  64. "",
  65. ""
  66. ],
  67. [
  68. 10105,
  69. "Logger",
  70. 0,
  71. -1,
  72. 2,
  73. "",
  74. "",
  75. "Logger",
  76. 1,
  77. 1,
  78. "",
  79. "",
  80. "",
  81. ""
  82. ]
  83. ]
  84. },
  85. "interface":{
  86. "fields":[
  87. "interfaceid",
  88. "hostid",
  89. "main",
  90. "type",
  91. "useip",
  92. "ip",
  93. "dns",
  94. "port",
  95. "bulk"
  96. ],
  97. "data":[
  98. [
  99. 2,
  100. 10105,
  101. 1,
  102. 1,
  103. 1,
  104. "127.0.0.1",
  105. "",
  106. "10050",
  107. 1
  108. ]
  109. ]
  110. },
  111. ...
  112. }

proxy→server:

  1. {
  2. "response": "success",
  3. "version": "5.0.0"
  4. }
Proxy request

The proxy data request is used to obtain host 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
host availabilityarray(optional) array of host availability data objects
hostidnumberhost identifier
availablenumberZabbix agent availability

0, HOSTAVAILABLE_UNKNOWN - unknown
1, HOST_AVAILABLE_TRUE - available
2, HOST_AVAILABLE_FALSE - unavailable
errorstringZabbix agent error message or empty string
snmp_availablenumberSNMP agent availability

0, HOST_AVAILABLE_UNKNOWN - unknown
1, HOST_AVAILABLE_TRUE - available
2, HOST_AVAILABLE_FALSE - unavailable
snmp_errorstringSNMP agent error message or empty string
ipmi_availablenumberIPMI agent availability

0, HOST_AVAILABLE_UNKNOWN - unknown
1, HOST_AVAILABLE_TRUE - available
2, HOST_AVAILABLE_FALSE - unavailable
ipmi_errorstringIPMI agent error message or empty string
jmx_availablenumberJMX agent availability

0, HOST_AVAILABLE_UNKNOWN - unknown
1, HOST_AVAILABLE_TRUE - available
2, HOST_AVAILABLE_FALSE - unavailable
jmx_errorstringJMX agent 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) modify time of log type items
discovery dataarray(optional) array of discovery data objects
clocknumberthe discovery data timestamp
druleidnumberthe discovery rule identifier
dcheckidnumberthe discovery check indentifier or null for discovery rule data
typenumberthe discovery 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, SVCFTP - FTP service check
4, SVCHTTP - 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
ipstringthe host IP address
dnsstringthe host DNS name
portnumber(optional) service port number
keystring(optional) the 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
clocknumberthe autoregistration data timestamp
hoststringthe host name
ipstring(optional) the host IP address
dnsstring(optional) the resolved DNS name from IP address
portstring(optional) the host port
host_metadatastring(optional) the host metadata sent by agent (based on HostMetadata or HostMetadataItem agent configuration parameter)
tasksarray(optional) array of tasks
typenumberthe task type:

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

0, ZBX_TM_REMOTE_COMMAND_COMPLETED - the remote command completed successfully
1, ZBX_TM_REMOTE_COMMAND_FAILED - the remote command failed
errorstring(optional) the error message
parent_taskidnumberthe parent task id
morenumber(optional) 1 - there are more history data to send
clocknumber(optional) data transfer timestamp (seconds)
nsnumber(optional) data transfer timestamp (nanoseconds)
versionstringthe proxy version (<major>.<minor>.<build>)
server→proxy:
responsestringthe request success information (‘success’ or ‘failed’)
tasksarray(optional) array of tasks
typenumberthe task type:

1, ZBX_TM_TASK_PROCESS_REMOTE_COMMAND - remote command
clocknumberthe task creation time
ttlnumberthe time in seconds after which task expires
commandtypenumberthe remote 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)
commandstringthe remote command to execute
execute_onnumberthe execution 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) the port for telnet and ssh commands
authtypenumber(optional) the authentication type for ssh commands
usernamestring(optional) the user name for telnet and ssh commands
passwordstring(optional) the password for telnet and ssh commands
publickeystring(optional) the public key for ssh commands
privatekeystring(optional) the private key for ssh commands
parent_taskidnumberthe parent task id
hostidnumbertarget hostid

Example:

server→proxy:

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

proxy→server:

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

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

Proxy heartbeat request

The proxy heartbeat request is sent by proxy to report that proxy is running. This request is sent every HeartbeatFrequency (proxy configuration parameter) seconds.

namevalue typedescription
proxy→server:
requeststring‘proxy heartbeat’
hoststringthe proxy name
versionstringthe proxy version (<major>.<minor>.<build>)
server→proxy:
responsestringthe request success information (‘success’ or ‘failed’)

proxy→server:

  1. {
  2. "request": "proxy heartbeat",
  3. "host": "Proxy #12",
  4. "version": "5.0.0"
  5. }

server→proxy:

  1. {
  2. "response": "success"
  3. }
Proxy config request

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

namevalue typedescription
proxy→server:
requeststring‘proxy config’
hoststringproxy name
versionstringthe proxy version (<major>.<minor>.<build>)
server→proxy:
requeststring‘proxy config’
<table>objectone or more objects with <table> data
fieldsarrayarray of field names
-stringfield name
dataarrayarray of rows
-arrayarray of columns
-string,numbercolumn value with type depending on column type in database schema
proxy→server:
responsestringthe request success information (‘success’ or ‘failed’)

Example:

proxy→server:

  1. {
  2. "request": "proxy config",
  3. "host": "Proxy #12",
  4. "version":"5.0.0"
  5. }

server→proxy:

  1. {
  2. "globalmacro":{
  3. "fields":[
  4. "globalmacroid",
  5. "macro",
  6. "value"
  7. ],
  8. "data":[
  9. [
  10. 2,
  11. "{$SNMP_COMMUNITY}",
  12. "public"
  13. ]
  14. ]
  15. },
  16. "hosts":{
  17. "fields":[
  18. "hostid",
  19. "host",
  20. "status",
  21. "ipmi_authtype",
  22. "ipmi_privilege",
  23. "ipmi_username",
  24. "ipmi_password",
  25. "name",
  26. "tls_connect",
  27. "tls_accept",
  28. "tls_issuer",
  29. "tls_subject",
  30. "tls_psk_identity",
  31. "tls_psk"
  32. ],
  33. "data":[
  34. [
  35. 10001,
  36. "Template OS Linux",
  37. 3,
  38. -1,
  39. 2,
  40. "",
  41. "",
  42. "Template OS Linux",
  43. 1,
  44. 1,
  45. "",
  46. "",
  47. "",
  48. ""
  49. ],
  50. [
  51. 10050,
  52. "Template App Zabbix Agent",
  53. 3,
  54. -1,
  55. 2,
  56. "",
  57. "",
  58. "Template App Zabbix Agent",
  59. 1,
  60. 1,
  61. "",
  62. "",
  63. "",
  64. ""
  65. ],
  66. [
  67. 10105,
  68. "Logger",
  69. 0,
  70. -1,
  71. 2,
  72. "",
  73. "",
  74. "Logger",
  75. 1,
  76. 1,
  77. "",
  78. "",
  79. "",
  80. ""
  81. ]
  82. ]
  83. },
  84. "interface":{
  85. "fields":[
  86. "interfaceid",
  87. "hostid",
  88. "main",
  89. "type",
  90. "useip",
  91. "ip",
  92. "dns",
  93. "port",
  94. "bulk"
  95. ],
  96. "data":[
  97. [
  98. 2,
  99. 10105,
  100. 1,
  101. 1,
  102. 1,
  103. "127.0.0.1",
  104. "",
  105. "10050",
  106. 1
  107. ]
  108. ]
  109. },
  110. ...
  111. }

proxy→server:

  1. {
  2. "response": "success"
  3. }
Proxy data request

The proxy data request is sent by proxy to provide host availability, history, discovery and auto registation data. This request is sent every DataSenderFrequency (proxy configuration parameter) seconds.

namevalue typedescription
proxy→server:
requeststring‘proxy data’
hoststringthe proxy name
sessionstringdata session token
host availabilityarray(optional) array of host availability data objects
hostidnumberhost identifier
availablenumberZabbix agent availability

0, HOSTAVAILABLE_UNKNOWN - unknown
1, HOST_AVAILABLE_TRUE - available
2, HOST_AVAILABLE_FALSE - unavailable
errorstringZabbix agent error message or empty string
snmp_availablenumberSNMP agent availability

0, HOST_AVAILABLE_UNKNOWN - unknown
1, HOST_AVAILABLE_TRUE - available
2, HOST_AVAILABLE_FALSE - unavailable
snmp_errorstringSNMP agent error message or empty string
ipmi_availablenumberIPMI agent availability

0, HOST_AVAILABLE_UNKNOWN - unknown
1, HOST_AVAILABLE_TRUE - available
2, HOST_AVAILABLE_FALSE - unavailable
ipmi_errorstringIPMI agent error message or empty string
jmx_availablenumberJMX agent availability

0, HOST_AVAILABLE_UNKNOWN - unknown
1, HOST_AVAILABLE_TRUE - available
2, HOST_AVAILABLE_FALSE - unavailable
jmx_errorstringJMX agent 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) modify time of log type items
discovery dataarray(optional) array of discovery data objects
clocknumberthe discovery data timestamp
druleidnumberthe discovery rule identifier
dcheckidnumberthe discovery check indentifier or null for discovery rule data
typenumberthe discovery 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, SVCFTP - FTP service check
4, SVCHTTP - 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
ipstringthe host IP address
dnsstringthe host DNS name
portnumber(optional) service port number
keystring(optional) the 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
clocknumberthe autoregistration data timestamp
hoststringthe host name
ipstring(optional) the host IP address
dnsstring(optional) the resolved DNS name from IP address
portstring(optional) the host port
host_metadatastring(optional) the host metadata sent by agent (based on HostMetadata or HostMetadataItem agent configuration parameter)
tasksarray(optional) array of tasks
typenumberthe task type:

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

0, ZBX_TM_REMOTE_COMMAND_COMPLETED - the remote command completed successfully
1, ZBX_TM_REMOTE_COMMAND_FAILED - the remote command failed
errorstring(optional) the error message
parent_taskidnumberthe parent task id
morenumber(optional) 1 - there are more history data to send
clocknumber(optional) data transfer timestamp (seconds)
nsnumber(optional) data transfer timestamp (nanoseconds)
versionstringthe proxy version (<major>.<minor>.<build>)
server→proxy:
responsestringthe request success information (‘success’ or ‘failed’)
tasksarray(optional) array of tasks
typenumberthe task type:

1, ZBX_TM_TASK_PROCESS_REMOTE_COMMAND - remote command
clocknumberthe task creation time
ttlnumberthe time in seconds after which task expires
commandtypenumberthe remote 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)
commandstringthe remote command to execute
execute_onnumberthe execution 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) the port for telnet and ssh commands
authtypenumber(optional) the authentication type for ssh commands
usernamestring(optional) the user name for telnet and ssh commands
passwordstring(optional) the password for telnet and ssh commands
publickeystring(optional) the public key for ssh commands
privatekeystring(optional) the private key for ssh commands
parent_taskidnumberthe parent task id
hostidnumbertarget hostid

Example:

proxy→server:

  1. {
  2. "request": "proxy data",
  3. "host": "Proxy #12",
  4. "session": "12345678901234567890123456789012",
  5. "host availability":[
  6. {
  7. "hostid":10106,
  8. "available":1,
  9. "error":"",
  10. "snmp_available":0,
  11. "snmp_error":"",
  12. "ipmi_available":0,
  13. "ipmi_error":"",
  14. "jmx_available":0,
  15. "jmx_error":""
  16. },
  17. {
  18. "hostid":10107,
  19. "available":1,
  20. "error":"",
  21. "snmp_available":0,
  22. "snmp_error":"",
  23. "ipmi_available":0,
  24. "ipmi_error":"",
  25. "jmx_available":0,
  26. "jmx_error":""
  27. }
  28. ],
  29. "history data":[
  30. {
  31. "itemid":"12345",
  32. "clock":1478609647,
  33. "ns":332510044,
  34. "value":"52956612",
  35. "id": 1
  36. },
  37. {
  38. "itemid":"12346",
  39. "clock":1478609647,
  40. "ns":330690279,
  41. "state":1,
  42. "value":"Cannot find information for this network interface in /proc/net/dev.",
  43. "id": 2
  44. }
  45. ],
  46. "discovery data":[
  47. {
  48. "clock":1478608764,
  49. "drule":2,
  50. "dcheck":3,
  51. "type":12,
  52. "ip":"10.3.0.10",
  53. "dns":"vdebian",
  54. "status":1
  55. },
  56. {
  57. "clock":1478608764,
  58. "drule":2,
  59. "dcheck":null,
  60. "type":-1,
  61. "ip":"10.3.0.10",
  62. "dns":"vdebian",
  63. "status":1
  64. }
  65. ],
  66. "auto registration":[
  67. {
  68. "clock":1478608371,
  69. "host":"Logger1",
  70. "ip":"10.3.0.1",
  71. "dns":"localhost",
  72. "port":"10050"
  73. },
  74. {
  75. "clock":1478608381,
  76. "host":"Logger2",
  77. "ip":"10.3.0.2",
  78. "dns":"localhost",
  79. "port":"10050"
  80. }
  81. ],
  82. "tasks":[
  83. {
  84. "type": 2,
  85. "clock":1478608371,
  86. "ttl": 600,
  87. "commandtype": 2,
  88. "command": "restart_service1.sh",
  89. "execute_on": 2,
  90. "port": 80,
  91. "authtype": 0,
  92. "username": "userA",
  93. "password": "password1",
  94. "publickey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe",
  95. "privatekey": "lsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ5QCqGKukO1De7zhd",
  96. "parent_taskid": 10,
  97. "hostid": 10070
  98. },
  99. {
  100. "type": 2,
  101. "clock":1478608381,
  102. "ttl": 600,
  103. "commandtype": 1,
  104. "command": "restart_service2.sh",
  105. "execute_on": 0,
  106. "authtype": 0,
  107. "username": "",
  108. "password": "",
  109. "publickey": "",
  110. "privatekey": "",
  111. "parent_taskid": 20,
  112. "hostid": 10084
  113. }
  114. ],
  115. "tasks":[
  116. {
  117. "type": 0,
  118. "status": 0,
  119. "parent_taskid": 10
  120. },
  121. {
  122. "type": 0,
  123. "status": 1,
  124. "error": "No permissions to execute task.",
  125. "parent_taskid": 20
  126. }
  127. ],
  128. "version":"5.0.0"
  129. }

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. }