Zabbix系统接口文档

          https://blog.csdn.net/u012469528/article/details/80916163             

     Zabbix系统接口文档
                                                                                     (V1.0)

                                                                                       2018.3   

目录
Zabbix系统接口文档 - 1 -

目录 - 2 -

1. 获取API版本 - 1 -

2. 关联(3.2版本开始有) - 1 -

2.1. correlation.create - 1 -

2.2. correlation.delete - 4 -

2.3. correlation.get - 5 -

2.4. correlation.update - 6 -

3. 监控项 - 8 -

3.1. item.create - 8 -

3.2. item.delete - 10 -

3.3. item.get - 10 -

3.4. item.update - 16 -

3.5. item.isreadable - 17 -

3.6. item.iswritable - 18 -

4. 主机 - 18 -

4.1. host.create - 18 -

4.2. host.delete - 20 -

4.3. host.get - 21 -

4.4. host.update - 28 -

4.5. host.massadd - 31 -

4.6. host.massremove - 32 -

4.7. host.massupdate - 33 -

4.8. host.isreadable - 34 -

4.9. host.iswritable - 34 -

5. 主机组 - 35 -

5.1. hostgroup.create - 35 -

5.2. hostgroup.delete - 36 -

5.3. hostgroup.get - 37 -

5.4. hostgroup.update - 38 -

5.5. hostgroup.massadd - 39 -

5.6. hostgroup.massremove - 40 -

5.7. hostgroup.massupdate - 41 -

5.8. hostgroup.isreadable - 42 -

5.9. hostgroup.iswritable - 42 -

6. Web场景 - 43 -

6.1. httptest.create - 43 -

6.2. httptest.delete - 44 -

6.3. httptest.get - 45 -

6.4. httptest.update - 48 -

6.5. httptest.isreadable - 49 -

6.6. httptest.iswritable - 49 -

7. 模板 - 50 -

7.1. template.create - 50 -

7.2. template.delete - 51 -

7.3. template.get - 52 -

7.4. template.update - 55 -

7.5. template.massadd - 55 -

7.6. template.massremove - 57 -

7.7. template.massupdate - 59 -

7.8. template.isreadable - 60 -

7.9. template.iswritable - 60 -

8. 发现主机 - 61 -

8.1. dhost.get - 61 -

9. 发现服务 - 64 -

9.1. dservice.get - 64 -

10. 发现检查 - 66 -

10.1. dcheck.get - 66 -

11. 发现规则 - 68 -

11.1. drule.create - 68 -

11.2. drule.delete - 69 -

11.3. drule.get - 70 -

11.4. drule.update - 72 -

11.5. drule.isreadable - 73 -

11.6. drule.iswritable - 74 -

12. 应用集 - 74 -

12.1. application.create - 74 -

12.2. application.delete - 75 -

12.3. application.get - 76 -

12.4. application.update - 77 -

12.5. application.massadd - 78 -

13. 触发器 - 79 -

13.1. trigger.create - 79 -

13.2. trigger.delete - 80 -

13.3. trigger.get - 81 -

13.4. trigger.update - 85 -

13.5. trigger.adddependencies - 85 -

13.6. trigger.deletedependencies - 86 -

13.7. trigger.isreadable - 87 -

13.8. trigger.iswritable - 88 -

14. 图像 - 89 -

14.1. image.create - 89 -

14.2. image.delete - 90 -

14.3. image.get - 91 -

14.4. image.update - 92 -

15. 聚合图形项目 - 93 -

15.1. screenitem.create - 93 -

15.2. screenitem.delete - 95 -

15.3. screenitem.get - 95 -

15.4. screenitem.update - 100 -

15.5. screenitem.updatebyposition - 100 -

15.6. screenitem.isreadable - 101 -

15.7. screenitem.iswritable - 102 -

16. 聚合图形 - 103 -

16.1. screen.create - 103 -

16.2. screen.delete - 105 -

16.3. screen.get - 106 -

16.4. screen.update - 108 -

17. 图形项 - 110 -

17.1. graphitem.get - 110 -

18. 图形 - 112 -

18.1. graph.create - 112 -

18.2. graph.delete - 113 -

18.3. graph.get - 114 -

18.4. graph.update - 117 -

19. 原型图 - 118 -

19.1. graphprototype.create - 118 -

19.2. graphprototype.delete - 119 -

19.3. graphprototype.get - 120 -

19.4. graphprototype.update - 122 -

20. 模板聚合图形项 - 122 -

20.1. templatescreenitem.get - 122 -

21. 模板聚合图形 - 125 -

21.1. templatescreen.create - 125 -

21.2. templatescreen.delete - 126 -

21.3. templatescreen.get - 127 -

21.4. templatescreen.update - 130 -

21.5. templatescreen.copy - 130 -

21.6. templatescreen.isreadable - 131 -

21.7. templatescreen.iswritable - 132 -

22. 历史数据 - 132 -

22.1. history.get - 132 -

23. 用户 - 135 -

23.1. user.create - 135 -

23.2. user.delete - 136 -

23.3. user.get - 137 -

23.4. user.update - 139 -

23.5. user.updateprofile - 140 -

23.6. user.addmedia - 140 -

23.7. user.deletemedia - 141 -

23.8. user.updatemedia - 142 -

23.9. user.login - 143 -

23.10. user.logout - 145 -

23.11. user.isreadable - 146 -

23.12. user.iswritable - 146 -

24. 用户组 - 147 -

24.1. usergroup.create - 147 -

24.2. usergroup.delete - 148 -

24.3. usergroup.get - 149 -

24.4. usergroup.update - 151 -

24.5. usergroup.massadd - 152 -

24.6. usergroup.massupdate - 153 -

24.7. usergroup.isreadable - 154 -

24.8. usergroup.iswritable - 154 -

25. 用户宏 - 155 -

25.1. usermacro.create - 155 -

25.2. usermacro.delete - 156 -

25.3. usermacro.get - 157 -

25.4. usermacro.update - 158 -

25.5. usermacro.createglobal - 159 -

25.6. usermacro.deleteglobal - 160 -

25.7. usermacro.updateglobal - 161 -

26. 主机接口 - 161 -

26.1. hostinterface.create - 161 -

26.2. hostinterface.delete - 163 -

26.3. hostinterface.get - 163 -

26.4. hostinterface.update - 165 -

26.5. hostinterface.massadd - 166 -

26.6. hostinterface.massremove - 167 -

26.7. hostinterface.replacehostinterfaces - 168 -

27. 主机原型 - 169 -

27.1. hostprototype.create - 169 -

27.2. hostprototype.delete - 170 -

27.3. hostprototype.get - 171 -

27.4. hostprototype.update - 173 -

27.5. hostprototype.isreadable - 173 -

27.6. hostprototype.iswritable - 174 -

28. LLD规则(待写。。。) - 175 -

28.1. discoveryrule.copy - 175 -

28.2. discoveryrule.create - 176 -

28.3. discoveryrule.delete - 176 -

28.4. discoveryrule.get - 176 -

28.5. discoveryrule.update - 176 -

28.6. discoveryrule.isreadable - 176 -

28.7. discoveryrule.iswritable - 176 -

29. 应用集(待写。。。) - 176 -

29.1. application.create - 176 -

29.2. application.delete - 176 -

29.3. application.get - 176 -

29.4. application.update - 176 -

29.5. application.massadd - 176 -

 

1. 获取API版本
 

Description

该方法用于获取 Zabbix API 版本

请求方法

POST

URL

http://192.168.3.132/zabbix/api_jsonrpc.php

Content-Type

application/json

Request

{

    "jsonrpc": "2.0",      //这是标准的JSON RPC参数以标示协议版本。所有的请求都会保持不变

    "method": "apiinfo.version", //这个参数定义了真实执行的操作。例如:host.create、item.update等等

    "params": [],  //请求的参数列表,采用键值对形式

"id": 1   //用于绑定JSON请求和响应.响应会跟请求有相同的"id"。在一次性发送多个请求时很有用,这些也不需要唯一或者连续

}

 

返回值

返回 Zabbix API 的版本

Response

{

    "jsonrpc": "2.0",

    "result": "3.0.14",

"id": 1

}

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值