如何通过zabbix8和zabbixapi获取到指定主机的hostid?
- 内容介绍
- 文章标签
- 相关推荐
本文共计155个文字,预计阅读时间需要1分钟。
官方网址:https://www.zabbix.com文档:3.4 简体中文手册 -> API -> 参考 -> 主机 -> 获取
使用curl命令获取session:bashcurl -s -X POST -H Content-Type: application/json https://www.zabbix.com/documentation/3.4/zh/manual/api/reference/host/get
720b4be755d6a4ae5e456ee9792a4b05
获取hostid
curl -s -X POST -H Content-Type:application/json -d {"jsonrpc": "2.0","method": "host.get","params": {"output": ["hostid"]},"auth": "720b4be755d6a4ae5e456ee9792a4b05","id": 2} 10.0.0.7/zabbix/api_jsonrpc.php | python -mjson.tool
转:blog.51cto.com/13491150/2051088
本文共计155个文字,预计阅读时间需要1分钟。
官方网址:https://www.zabbix.com文档:3.4 简体中文手册 -> API -> 参考 -> 主机 -> 获取
使用curl命令获取session:bashcurl -s -X POST -H Content-Type: application/json https://www.zabbix.com/documentation/3.4/zh/manual/api/reference/host/get
720b4be755d6a4ae5e456ee9792a4b05
获取hostid
curl -s -X POST -H Content-Type:application/json -d {"jsonrpc": "2.0","method": "host.get","params": {"output": ["hostid"]},"auth": "720b4be755d6a4ae5e456ee9792a4b05","id": 2} 10.0.0.7/zabbix/api_jsonrpc.php | python -mjson.tool
转:blog.51cto.com/13491150/2051088

