如何通过zabbix API 获取指定主机的hostid信息?
- 内容介绍
- 文章标签
- 相关推荐
本文共计146个文字,预计阅读时间需要1分钟。
官方网站:https://www.zabbix.com文档:3.4zh manual api reference host get获取会话:curl -s -X POST -H Content-Type: application/json 官方网站https://www.zabbix.com/documentation/3.4/zh/manual/api/reference/host/get
官方网站www.zabbix.com/documentation/3.4/zh/manual/api/reference/host/get获取seesioncurl -s -X POST -H Content-Type:application/json -d {"jsonrpc": "2.0","method": "user.login","params": {"user": "Admin","password": "zabbix"},"id": 1} 10.0.0.7/zabbix/api_jsonrpc.php | python -mjson.tool720b4be755d6a4ae5e456ee9792a4b05
获取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
本文共计146个文字,预计阅读时间需要1分钟。
官方网站:https://www.zabbix.com文档:3.4zh manual api reference host get获取会话:curl -s -X POST -H Content-Type: application/json 官方网站https://www.zabbix.com/documentation/3.4/zh/manual/api/reference/host/get
官方网站www.zabbix.com/documentation/3.4/zh/manual/api/reference/host/get获取seesioncurl -s -X POST -H Content-Type:application/json -d {"jsonrpc": "2.0","method": "user.login","params": {"user": "Admin","password": "zabbix"},"id": 1} 10.0.0.7/zabbix/api_jsonrpc.php | python -mjson.tool720b4be755d6a4ae5e456ee9792a4b05
获取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

