Book Image

Zabbix 6 IT Infrastructure Monitoring Cookbook - Second Edition

By : Nathan Liefting, Brian van Baekel
Book Image

Zabbix 6 IT Infrastructure Monitoring Cookbook - Second Edition

By: Nathan Liefting, Brian van Baekel

Overview of this book

This updated second edition of the Zabbix 6 IT Infrastructure Monitoring Cookbook brings you new recipes, updated with Zabbix 6 functionality. You'll learn how to set up Zabbix with built-in high availability, use the improved Business Service Monitoring, set up automatic reporting, and create advanced triggers. Zabbix offers useful insights into your infrastructure performance and issues and enables you to enhance your monitoring setup with its powerful features. This book covers hands-on, easy-to-follow recipes for using Zabbix 6 to monitor effectively the performance of devices and applications over the network. You'll start by working your way through the installation and most prominent features of Zabbix and make the right design choices for building a scalable and easily manageable environment. This Zabbix book contains recipes for building items and triggers for different types of monitoring, building templates, and using Zabbix proxies. Next, you'll use the Zabbix API for customization and manage your Zabbix server and database efficiently. Finally, you'll find quick solutions to the common and not-so-common problems that you may encounter in your Zabbix monitoring work. By the end of this book, you'll be able to use Zabbix for all your monitoring needs and build a solid Zabbix setup by leveraging its key functionalities.
Table of Contents (15 chapters)

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…

  1. First...