Difference between revisions of "Zabbix API"
Jump to navigation
Jump to search
↑ https://techexpert.tips/zabbix/zabbix-api-quickstart-guide/
Tags: Mobile web edit, Mobile edit |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
[[curl]] -H "Content-Type: application/json-rpc" -X POST http://192.168.0.18/api_jsonrpc.php -d '{"jsonrpc":"2.0","method":"apiinfo.version","id":1,"auth":null,"params":{}}' | [[curl]] -H "Content-Type: application/json-rpc" -X POST http://192.168.0.18/api_jsonrpc.php -d '{"jsonrpc":"2.0","method":"apiinfo.version","id":1,"auth":null,"params":{}}' | ||
{"jsonrpc":"2.0","result":"4.4.6","id":1} | {"jsonrpc":"2.0","result":"4.4.6","id":1} | ||
+ | |||
+ | curl -s -X POST -H 'Content-Type: application/json-rpc' -d '{ "params": { "user": "Admin", "password": "zabbix" }, "jsonrpc": "2.0", "method": "user.login", "id": 0 }' 'http://192.168.0.18/api_jsonrpc.php' | [[jq]] . <ref>https://techexpert.tips/zabbix/zabbix-api-quickstart-guide/</ref> | ||
Line 13: | Line 15: | ||
== See also == | == See also == | ||
* {{Zabbix}} | * {{Zabbix}} | ||
+ | |||
+ | |||
+ | [[Category:Zabbix]] |
Latest revision as of 06:03, 21 May 2020
This article is a Draft. Help us to complete it.
curl -H "Content-Type: application/json-rpc" -X POST http://192.168.0.18/api_jsonrpc.php -d '{"jsonrpc":"2.0","method":"apiinfo.version","id":1,"auth":null,"params":{}}' {"jsonrpc":"2.0","result":"4.4.6","id":1}
curl -s -X POST -H 'Content-Type: application/json-rpc' -d '{ "params": { "user": "Admin", "password": "zabbix" }, "jsonrpc": "2.0", "method": "user.login", "id": 0 }' 'http://192.168.0.18/api_jsonrpc.php' | jq . [1]
Related terms[edit]
See also[edit]
- Zabbix, Zabbix releases, Install Zabbix using Docker, Zabbix agent (
zabbix_agentd.conf
), Zabbix API,zabbix_server
,zabbix_get
,zabbix_sender
,/etc/zabbix/zabbix_server.conf
Advertising: