Using the Zabbix API for extending functionality
An API is your gateway to getting started with extending the functionality of any piece of software. Luckily, Zabbix offers a solid working API that we can use to extend our functionality with ease.
In this recipe, we'll explore the use of the Zabbix API to do some tasks, creating a good basis to start working with the Zabbix API in your actual production environments.
Getting ready
We are going to need a Zabbix server with some hosts. I'll be using our host lar-book-centos
from the previous chapters, but feel free to use any Zabbix server. I will also use another Linux host to do the API calls from, but this can be done from any Linux host.
We will need to install Python 3 on the Linux host, though, as we'll be using this to create our API calls.
Also, make sure you have an API user with an API token. It is recommended to use the one we created in the first recipe.
How to do it…
- First...