Zabbix API
Once you have your Zabbix server up and running, you would probably like to integrate it in the rest of your infrastructure. This is where the Zabbix API comes into picture. By using the API, we can extend Zabbix and integrate it with our other solutions. In this chapter, we will show you how to connect to the API and explain you the basics to interact with it.
Getting ready
In this recipe, we only need our Zabbix server with the super administration account.
How to do it...
- Make sure you have curl on your system. It should be there when you installed your system. If not run:
yum install curl
- Run the following command on your Zabbix server's prompt or from another machine but then replace the IP:
curl -s -i -X POST -H 'Content-Type: application/json-rpc' -d '{ "params": { "user": "<user>", "password": "<password>" }, "jsonrpc": "2.0", "method": "user.login", "...