1 Server-proxy 数据交换协议

概述

Server - proxy 数据交换基于 JSON 格式.

请求和响应消息必须以header头部与数据长度开头.

被动代理

代理配置请求

服务器发送 proxy config 请求以提供代理配置数据. 此请求间隔ProxyConfigFrequency秒(服务器配置参数) .

名称值类型描述
server→proxy:
requeststring‘proxy config’
<table>object包含<table>数据的一个或多个对象
fieldsarray字段名称数组
-string字段名称
dataarray行数组
-array列数组
-string,number列值,其类型取决于数据库表结构中的类型
proxy→server:
responsestring请求成功信息 (‘success’ 或 ‘failed’)
versionstringproxy的版本信息 (<major>.<minor>.<build>)

例:

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. "Linux",
  38. 3,
  39. -1,
  40. 2,
  41. "",
  42. "",
  43. "Linux",
  44. 1,
  45. 1,
  46. "",
  47. "",
  48. "",
  49. ""
  50. ],
  51. [
  52. 10050,
  53. "Zabbix Agent",
  54. 3,
  55. -1,
  56. 2,
  57. "",
  58. "",
  59. "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.4.0"
  4. }
Proxy 请求

proxy data 请求用于从代理获取主机接口可用性、历史、自动发现数据。此请求发送间隔 ProxyDataFrequency秒 (服务器配置参数) .

名称值类型描述
server→proxy:
requeststring‘proxy data’
proxy→server:
sessionstring数据会话令牌
interface availabilityarray(可选) 接口可用性数据对象数组
interfaceidnumber接口标识符
availablenumber接口可用性

0, INTERFACEAVAILABLE_UNKNOWN - 未知
1, INTERFACE_AVAILABLE_TRUE - 可用
2, INTERFACE_AVAILABLE_FALSE - 不可用
errorstring接口错误消息或空字符串
history dataarray(可选) 历史数据对象数组
itemidnumber监控项标识符
clocknumber监控项值时间戳 (秒)
nsnumber监控项值时间戳 (纳秒)
valuestring(可选) 监控项值
idnumber值标识符(自增id,在一个数据会话中是唯一的)
timestampnumber(可选) 日志类型监控项的时间戳
sourcestring(可选) 事件日志监控项数据源
severitynumber(可选) 事件日志监控项严重性值
eventidnumber(可选) 事件日志监控项事件id
statestring(可选) 监控项状态
0, ITEM_STATE_NORMAL
1, ITEM_STATE_NOTSUPPORTED
lastlogsizenumber(可选) 最后一次监控项的大小
mtimenumber(可选) 监控项修改时间
discovery dataarray(可选) 自动发现数据对象数组
clocknumber自动发现数据是时间戳
druleidnumber自动发现规则id
dcheckidnumber自动发现规则数据的发现检查id 或 null
typenumber自动发现检查类型:

-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
ipstring主机 IP 地址
dnsstring主机 DNS 名称
portnumber(可选) 端口号
keystring(可选) 用于自动发现检查的项目key 9 SVC_AGENT
valuestring(可选) 从服务接收的值,对于大多数服务可以为空
statusnumber(可选) service status:

0, DOBJECT_STATUS_UP - 服务up
1, DOBJECT_STATUS_DOWN - 服务dwon
auto registrationarray(可选) 自动注册数据对象数组
clocknumber自动注册数据时间戳
hoststring主机名
ipstring(可选) IP
dnsstring(可选) DNS
portstring(可选) 端口
host_metadatastring(可选) agent发送的主机元数据(基于 HostMetadata 或 HostMetadataItem agent配置参数)
tasksarray(可选) 任务数组
typenumber任务类型:

0, ZBX_TM_TASK_PROCESS_REMOTE_COMMAND_RESULT - 远程命令结果
statusnumber远程命令执行状态:

0, ZBX_TM_REMOTE_COMMAND_COMPLETED - 远程命令已成功完成
1, ZBX_TM_REMOTE_COMMAND_FAILED - 远程命令失败
errorstring(可选) 错误信息
parent_taskidnumber父级任务 id
morenumber(可选) 1 - 还有更多历史数据要发送
clocknumber(可选) 数据传输时间戳(秒)
nsnumber(可选) 数据传输时间戳(秒纳秒
versionstringproxy 版本信息(<major>.<minor>.<build>)
server→proxy:
responsestring请求成功信息 (‘success’ 或 ‘failed’)
tasksarray(可选) 任务数组
typenumber任务类型:

1, ZBX_TM_TASK_PROCESS_REMOTE_COMMAND - 远程命令
clocknumber任务创建时间
ttlnumber任务过期时间(以秒为单位)
commandtypenumber远程命令类型:

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)
commandstring要执行的远程命令
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(可选) 远程登录和 ssh 端口
authtypenumber(可选) ssh 命令的身份验证类型
usernamestring(可选) telnet 和 ssh 命令的用户名
passwordstring(可选) 远程登录和 ssh 命令的密码
publickeystring(可选) ssh 命令的公钥
privatekeystring(可选) ssh 命令的私钥
parent_taskidnumber父级任务 ID
hostidnumber目标 hostid

例:

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":"5.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. }

主动代理

代理检测心跳请求

proxy heartbeat 请求由代理发送以报告代理正在运行。 每次发送此请求间隔 HeartbeatFrequency秒 (代理配置参数)

名称值类型描述
proxy→server:
requeststring‘proxy heartbeat’
hoststring代理名称
versionstring代理版本信息 (<major>.<minor>.<build>)
server→proxy:
responsestring请求成功信息 (‘success’ 或 ‘failed’)

proxy→server:

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

server→proxy:

  1. {
  2. "response": "success"
  3. }
代理配置请求

proxy config 请求由代理发送以获取代理配置数据。 每次发送此请求间隔 ConfigFrequency (代理配置参数)秒。

名称值类型描述
proxy→server:
requeststring‘proxy config’
hoststring代理名称
versionstring代理版本 (<major>.<minor>.<build>)
server→proxy:
requeststring‘proxy config’
<table>object包含 <table> 的一个或多个对象
fieldsarray数组字段名称
-string字段名
dataarray行数组
-array列数组
-string,number列值,其类型取决于数据库表结构的类型
proxy→server:
responsestring请求成功信息 (‘success’ 或 ‘failed’)

例:

proxy→server:

  1. {
  2. "request": "proxy config",
  3. "host": "Proxy #12",
  4. "version":"5.4.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. "Linux",
  37. 3,
  38. -1,
  39. 2,
  40. "",
  41. "",
  42. "Linux",
  43. 1,
  44. 1,
  45. "",
  46. "",
  47. "",
  48. ""
  49. ],
  50. [
  51. 10050,
  52. "Zabbix Agent",
  53. 3,
  54. -1,
  55. 2,
  56. "",
  57. "",
  58. "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 请求由代理发送,以提供主机可用性,历史记录,发现和自动注册数据。 每次发送此请求 DataSenderFrequency (代理配置参数)秒。

名称值类型描述
proxy→server:
requeststring‘proxy data’
hoststring代理名称
sessionstring数据会话令牌
interface availabilityarray(optional) 接口可用性数据对象数组
interfaceidnumber接口标识符
availablenumber接口可用性

0, INTERFACEAVAILABLE_UNKNOWN - unknown
1, INTERFACE_AVAILABLE_TRUE - available
2, INTERFACE_AVAILABLE_FALSE - unavailable
errorstring接口错误消息或空字符串
history dataarray(可选) 历史数据对象数组
itemidnumber监控项标识符
clocknumber监控项值时间戳 (秒)
nsnumber监控项值时间戳 (纳秒)
valuestring(可选) 监控项值
idnumber值标识符(自增id,在一个数据会话中是唯一的)
timestampnumber(可选) 日志类型监控项的时间戳
sourcestring(可选) 事件日志监控项数据源
severitynumber(可选) 事件日志监控项严重性值
eventidnumber(可选) 事件日志监控项事件id
statestring(可选) 监控项状态
0, ITEM_STATE_NORMAL
1, ITEM_STATE_NOTSUPPORTED
lastlogsizenumber(可选) 最后一次监控项的大小
mtimenumber(可选) 监控项修改时间
discovery dataarray(可选) 自动发现数据对象数组
clocknumber自动发现数据是时间戳
druleidnumber自动发现规则id
dcheckidnumber自动发现规则数据的发现检查id 或 null
typenumber自动发现检查类型:

-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
ipstring主机 IP 地址
dnsstring主机 DNS 名称
portnumber(可选) 端口号
keystring(可选) 用于自动发现检查的项目key 9 SVC_AGENT
valuestring(可选) 从服务接收的值,对于大多数服务可以为空
statusnumber(可选) 服务状态:

0, DOBJECT_STATUS_UP - 服务Up
1, DOBJECT_STATUS_DOWN - 服务Down
auto registrationarray(可选) 自动注册数据对象数组
clocknumber自动注册数据时间戳
hoststring主机名
ipstring(可选) IP
dnsstring(可选) DNS
portstring(可选) 端口号
host_metadatastring(可选) agent发送的主机元数据(基于 HostMetadata 或 HostMetadataItem agent配置参数)
tasksarray(可选) 任务数组
typenumber任务类型:

0, ZBX_TM_TASK_PROCESS_REMOTE_COMMAND_RESULT - 远程命令结果
statusnumber远程命令执行状态:

0, ZBX_TM_REMOTE_COMMAND_COMPLETED - 远程命令已成功完成
1, ZBX_TM_REMOTE_COMMAND_FAILED - 远程命令失败
errorstring(可选) 错误信息
parent_taskidnumber父级任务 id
morenumber(可选) 1 - 还有更多历史数据要发送
clocknumber(可选) 数据传输时间戳(秒)
nsnumber(可选) 数据传输时间戳(秒纳秒)
versionstring版本信息 (<major>.<minor>.<build>)
server→proxy:
responsestring请求成功信息 (‘success’ 或 ‘failed’)
tasksarray(可选) 任务数组
typenumber任务类型:

1, ZBX_TM_TASK_PROCESS_REMOTE_COMMAND - 远程命令
clocknumber任务创建时间
ttlnumber任务过期时间
commandtypenumber远程命令类型:

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)
commandstring要执行的远程命令
execute_onnumber自定义脚本的执行目标:

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(可选) 远程登录和 ssh 端口
authtypenumber(可选) ssh 命令的身份验证类型
usernamestring(可选) telnet 和 ssh 命令的用户名
passwordstring(可选) 远程登录和 ssh 命令的密码
publickeystring(可选) ssh 命令的公钥
privatekeystring(可选) ssh 命令的私钥
parent_taskidnumber父级任务 ID
hostidnumber目标 hostid

例:

proxy→server:

  1. {
  2. "request": "proxy data",
  3. "host": "Proxy #12",
  4. "session": "12345678901234567890123456789012",
  5. "interface availability": [
  6. {
  7. "interfaceid": 1,
  8. "available": 1,
  9. "error": ""
  10. },
  11. {
  12. "interfaceid": 2,
  13. "available": 2,
  14. "error": "Get value from agent failed: cannot connect to [[127.0.0.1]:10049]: [111] Connection refused"
  15. },
  16. {
  17. "interfaceid": 3,
  18. "available": 1,
  19. "error": ""
  20. },
  21. {
  22. "interfaceid": 4,
  23. "available": 1,
  24. "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": 2,
  83. "clock":1478608371,
  84. "ttl": 600,
  85. "commandtype": 2,
  86. "command": "restart_service1.sh",
  87. "execute_on": 2,
  88. "port": 80,
  89. "authtype": 0,
  90. "username": "userA",
  91. "password": "password1",
  92. "publickey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe",
  93. "privatekey": "lsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ5QCqGKukO1De7zhd",
  94. "parent_taskid": 10,
  95. "hostid": 10070
  96. },
  97. {
  98. "type": 2,
  99. "clock":1478608381,
  100. "ttl": 600,
  101. "commandtype": 1,
  102. "command": "restart_service2.sh",
  103. "execute_on": 0,
  104. "authtype": 0,
  105. "username": "",
  106. "password": "",
  107. "publickey": "",
  108. "privatekey": "",
  109. "parent_taskid": 20,
  110. "hostid": 10084
  111. }
  112. ],
  113. "tasks":[
  114. {
  115. "type": 0,
  116. "status": 0,
  117. "parent_taskid": 10
  118. },
  119. {
  120. "type": 0,
  121. "status": 1,
  122. "error": "No permissions to execute task.",
  123. "parent_taskid": 20
  124. }
  125. ],
  126. "version":"5.4.0"
  127. }

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