Book Image

Zabbix Cookbook

By : Patrik Uytterhoeven, patrik uytterhoeven
Book Image

Zabbix Cookbook

By: Patrik Uytterhoeven, patrik uytterhoeven

Overview of this book

Table of Contents (18 chapters)
Zabbix Cookbook
About the Author
About the Reviewers


Since its first release in 2001, Zabbix has distinguished itself from other monitoring solutions by providing great flexibility and performance. Hence, it is being used more and more by large companies. This doesn't mean Zabbix can't be used in smaller setups. As mentioned before, Zabbix is a very flexible monitoring tool that can start small and grow big. Monitoring more than 100,000 devices with Zabbix is no issue at all.

This book will show you how to set up Zabbix and configure it to your needs, be it in a small or a large setup.

What this book covers

Chapter 1, Zabbix Configuration, covers the entire installation of Zabbix from scratch. This includes installation of the Zabbix server and agent. At the end of this chapter is the procedure to install Zabbix in a distributed way.

Chapter 2, Getting Around in Zabbix, helps you discover the frontend, explains the Zabbix definitions, and shows you how to acknowledge triggers. To give you a better understanding of what is possible with your Zabbix setup, this chapter goes a bit deeper into the Zabbix architecture.

Chapter 3, Groups, Users, and Permissions, explains how to create hosts in Zabbix and split them in groups. This chapter also covers how to create users and user groups. Then it explains the different ways to authenticate and administer Zabbix.

Chapter 4, Monitoring with Zabbix, takes you to the next logical step— explaining every item that can be created in Zabbix, by making use of easy-to-follow recipes.

Chapter 5, Testing with Triggers in Zabbix, shows you how to build triggers in an easy way with the trigger constructor. This chapter also covers how to build more advanced triggers and how to test them.

Chapter 6, Working with Templates, explains what templates are and how to create, link, and nest them in Zabbix. This chapter also teaches you how to make use of macros in your templates.

Chapter 7, Data Visualization and Reporting in Zabbix, explains the different ways to visualize data in Zabbix by making use of graphs, screens, slideshows, and maps. This chapter also covers how to create reports and SLA reports in Zabbix.

Chapter 8, Monitoring VMware and Proxies, shows you how to monitor your VMware infrastructure. Then this chapter explains the different kinds of proxies and how to use them for monitoring.

Chapter 9, Autodiscovery, demonstrates how to discover hosts on your network with Zabbix and perform automation after the discovery. This chapter also introduces automatic registration of active agents and low-level discovery of items.

Chapter 10, Zabbix Maintenance and API, explains how to place hosts in your Zabbix in maintenance mode. This chapter also covers internal items in Zabbix, what to back up, and some performance considerations. Last but not least, it covers the Zabbix API and shows you how to add hosts with the API using examples.

Appendix, Upgrading and Troubleshooting Zabbix, is an overview demonstrating how to upgrade your installation, how to troubleshoot Zabbix, and some best practices to follow. This chapter teaches you some guidelines and talks about the upcoming Zabbix version. It also shows you how to interact with the community, as this will probably be the first point of contact when there are Zabbix-related issues.

What you need for this book

It is important to know that in this book, we've made use of Red Hat Enterprise 6.x or one of the forks such as CentOS. Most recipes will work on other distributions as well but, in some cases, you'll probably have to look for files in other locations. Where possible the book has been updated for the latest Red Hat release v7 as Zabbix support was added during the progress of this book.

In this book, we will show you how to monitor an IPMI device with Zabbix. Obviously, you'll need an IPMI-capable device, and the same goes for SNMP monitoring. In Chapter 8, Monitoring VMware and Proxies, we will talk about VMware monitoring. For that, you need to have VMware vCenter 4.1 or a later version.

Who this book is for

This book focuses on system administrators who have some basic experience or no experience at all with Zabbix. This book will guide you from the setup until getting messages about problems that have been found by Zabbix. It will be useful if you have some programming skills because in Chapter 10, Zabbix Maintenance and API, we'll talk about the API; but for the rest of the book, no programming skills are needed. This book shows you how to create items to monitor IPMI- and SNMP-capable devices, databases, and so on. Hence, wide knowledge of IT is certainly useful if you would like to learn how to monitor with Zabbix. After all, you need to understand first what you want to monitor before learning how to monitor it.


In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and explanations of their meanings.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Save the file in the /usr/src folder."

A block of code is set as follows:

# vi /etc/zabbix/zabbix_server.conf

Any command-line input or output is written as follows:

# yum install mysql-server zabbix-server-mysql

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "The Media tab is the place where the user can add the media that he or she wants to use to get notifications."


Warnings or important notes appear in a box like this.


Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.


Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title.

To view the previously submitted errata, go to and enter the name of the book in the search field. The required information will appear under the Errata section.


Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.


You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.