当前位置 : 主页 > 网络编程 > 其它编程 >

zabbix8:zabbixapi获取hostid

来源:互联网 收集:自由互联 发布时间:2023-07-02
官方网站https:www.zabbix.comdocumentation3.4zhmanualapireferencehostget获取seesioncurl-s-XPOST-H 官方网站https://www.zabbix.com/documentation/3.4/zh/manual/api/reference/host/get获取seesioncurl -s -X POST -H Content-Type:applicat
官方网站https:www.zabbix.comdocumentation3.4zhmanualapireferencehostget获取seesioncurl-s-XPOST-H

官方网站https://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} http://10.0.0.7/zabbix/api_jsonrpc.php | python -mjson.tool

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} http://10.0.0.7/zabbix/api_jsonrpc.php | python -mjson.tool

转:https://blog.51cto.com/13491150/2051088

网友评论