Would you like to learn how to use the Zabbix API feature of your Zabbix server?In this tutorial, we are going to Zabbix API examples to use on a computer running Ubnutu Linux.
• Ubuntu 18.04
• Ubuntu 19.04
• Zabbix 4.4.0
Zabbix Playlist:
On this page, we offer quick access to a list of videos related to Zabbix installation.
Don’t forget to subscribe to our youtube channel named FKIT.
Zabbix Related Tutorial:
On this page, we offer quick access to a list of tutorials related to Zabbix installation.
Tutorial Zabbix – API Quickstart Guide
On the Zabbix server install the required packages.
List the Zabbix version installed on the local server using the Zabbix API.
Here is the command output:
In our example, the Zabbix API reported that Zabbix version 4.4.0 is installed.
In order to insert, delete or request information from the Zabbix database, you need to authenticate your Zabbix API session.
Here is the command output:
We authenticated our session to the Zabbix API using the Admin account and the password zabbix.
Take note of the authentication result string, we are going to use this to authenticate our next requests.
Zabbix API Example – List all Host Groups
This Zabbix API example will list all host groups available on the Zabbix server.
We used the Zabbix API session 1b2117aa7845e4bdb4b78ce3bed05c93 to authenticate our request.
Here is the command output:
In our example, we listed all Zabbix host groups.
Zabbix API Example – List all Hosts
This Zabbix API example will list all hosts available on the Zabbix server.
We used the Zabbix API session 1b2117aa7845e4bdb4b78ce3bed05c93 to authenticate our request.
Here is the command output:
In our example, we listed all Zabbix host.
Zabbix API Example – List all Hosts using Regex
This Zabbix API example will list all hosts available on the Zabbix server which the hostname start with PF.
We used the Zabbix API session 1b2117aa7845e4bdb4b78ce3bed05c93 to authenticate our request.
Here is the command output:
In our example, we listed all Zabbix host that have PF on their hostname.
Zabbix API Example – List all Hosts
This Zabbix API example will list all hosts available on the Zabbix server, but only show the ID and name as output.
We used the Zabbix API session 1b2117aa7845e4bdb4b78ce3bed05c93 to authenticate our request.
Here is the command output:
In our example, we listed all Zabbix host names only.
Zabbix API Example – List all User Groups
This Zabbix API example will list all user groups available on the Zabbix server.
We used the Zabbix API session 1b2117aa7845e4bdb4b78ce3bed05c93 to authenticate our request.
Here is the command output:
In our example, we listed all Zabbix user groups.
Zabbix API Example – List all User Accounts
This Zabbix API example will list all user accounts available on the Zabbix server.
We used the Zabbix API session 1b2117aa7845e4bdb4b78ce3bed05c93 to authenticate our request.
Here is the command output:
In our example, we listed all Zabbix user accounts.