38,39 €
Realize the full potential of Zabbix 7 with this updated third edition of the Zabbix 7 IT Infrastructure Monitoring Cookbook. Packed with new recipes and updated with the latest Zabbix functionalities, this guide covers everything you need, whether you’re setting up Zabbix with built-in (proxy) high availability, using LDAP JIT user provisioning, implementing low-level host discovery, or creating advanced triggers.
This hands-on guide offers easy-to-follow recipes to use Zabbix 7 to monitor the performance of devices and applications across your network. You'll start by learning how to install Zabbix and examine its most prominent features, ensuring you make the right design choices to build a scalable and easily manageable environment. Each recipe is crafted to help you build items and triggers for different types of monitoring, create templates, and use Zabbix proxies. You'll also get to grips with using the Zabbix API for customization and managing your Zabbix server and database. 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 have expert insights into using Zabbix for all your monitoring needs and be able to build a solid Zabbix setup by leveraging its key functionalities.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 494
Veröffentlichungsjahr: 2024
Zabbix 7 IT Infrastructure Monitoring Cookbook
Explore the new features of Zabbix 7 for designing, building, and maintaining your Zabbix setup
Nathan Liefting
Brian van Baekel
Copyright © 2024 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Group Product Manager: Pavan Ramchandani
Publishing Product Manager: Khushboo Samkaria
Book Project Manager: Ashwin Dinesh Kharwa
Senior Editor: Romy Dias and Sujata Tripathi
Technical Editor: Rajat Sharma
Copy Editor: Safis Editing
Proofreader: Sujata Tripathi
Indexer: Pratik Shirodkar
Production Designer: Gokul Raj S.T
DevRel Marketing Coordinator: Rohan Dobhal
First published: February 2021
Second edition: March 2022
Third edition: July 2024
Production reference: 1280624
Published by Packt Publishing Ltd.
Grosvenor House
11 St Paul’s Square
Birmingham
B3 1RB, UK
ISBN: 978-1-80107-832-0
www.packtpub.com
To my grandparents, for supporting my education, my brother, for always being at the ready, and my mom and stepdad, for cheering me on. To my wife, for always supporting whatever new idea I get into my head. To my colleagues, throughout the years, my first mentor, Sander F., for inspiring me, and Brian, for making it all possible.
– Nathan Liefting
Dear readers,
Brian and Nathan, the authors of this book, are well-known figures in the Zabbix community.
I met them many years ago, and I have always been impressed by their deep knowledge of the product, which would be impossible without extensive practical experience. How could it be otherwise? Brian and Nathan have been professionally working with Zabbix for many years, helping their clients with the architecture, installation, configuration, and maintenance of Zabbix. The authors of this book have earned their reputation through their vast experience and ability to continuously share this knowledge with other Zabbix users. You can find Brian and Nathan speaking at conferences and participating in various community platforms, always ready to help and answer your questions!
Zabbix allows you to quickly immerse yourself in the wonderful world of monitoring. In Zabbix development, we follow this principle: “Make simple things easy, and complex things possible.” But don’t let this simplicity and speed deceive you. Soon enough, you will start to realize that simple monitoring tasks are indeed easy to implement. However, the further you move forward, the quicker you will understand that you need to study and carefully read the documentation. You will discover that there are more complex monitoring tasks that require a deeper understanding of Zabbix’s capabilities.
This book fills the gap between the official documentation, which describes the product’s functionality, and real-life situations that require specific solutions and it does it perfectly. Especially valuable is that this book covers the new functionality of Zabbix 7.0 LTS, the latest release of Zabbix to date!
This book is a must-read for anyone who wants to learn specific techniques for solving particular monitoring and observability tasks. How great it is to have solutions to many challenges you may encounter at your fingertips!
I am grateful to the authors of the book for their work and wish everyone an enjoyable reading. You will not be disappointed!
Alexei Vladishev
Creator of Zabbix
Nathan Liefting, also known as Larcorba, is an IT consultant and trainer. He has more than 9 years of professional experience in IT. His experience ranges from managing networks running EVPN/VXLAN to Linux environments and programming. Nathan started working with Zabbix in 2016, when it was still at Zabbix 2 and Zabbix 3 was just released.
He is now working for Opensource ICT Solutions BV in The Netherlands as a Zabbix trainer and consultant. Here, he designs and builds professional Zabbix environments and Zabbix components for some of the biggest and most interesting companies around the world.
Brian van Baekel quickly discovered how powerful Zabbix is during his career as a network engineer. Ever since, he has been working with Zabbix in various (large) environments, leading to him gaining his official Zabbix Certified Trainer certification in early 2017.
In 2018, Brian founded Opensource ICT Solutions BV in the Netherlands and Opensource ICT Solutions LLC in the USA. Both companies primarily focus on building Zabbix environments all over the world. In 2021, further expansion of the business was established by opening a subsidiary in the United Kingdom with a full focus on the product Zabbix. All companies provide support, training, and consultancy services, and basically, that means Brian is working with the Zabbix product 24/7.
Fun fact: even his cat is named “Zabbix” and you also should ask Brian what’s on his arm some time.
Sven Putteneers got to know Zabbix more than eight years ago as part of his duties at his then-new employer, after which he swore off all other monitoring systems. He has founded a company, 7 to 7, through which he provides Zabbix consultancy and develops custom integrations with external systems. He is also an active member of the Zabbix International Community Telegram group, where he is known as @OffByOne. In his free time, he likes to swim, read science fiction, and go to conferences and meet-ups. He dislikes social media but can be found on LinkedIn.
First of all, I’d like to thank the authors of the book for providing a valuable resource to the Zabbix community. Furthermore, I’d like to give a shout-out to the Zabbix community and people who try to help each other in their free time, be it through the forums, IRC, Telegram groups, and so on …. You are awesome!
Andreas Drbal boasts a decade in tech, evolving from a self-taught frontend developer to a key figure in DevOps and CloudOps. His academic journey led him to UCLA, majoring in English with a German minor, and later acquiring a master’s in information systems management and an MBA. Andreas’s passion for monitoring began with Zabbix 3.x in 2015, integrating it with IoT devices. Currently, as a senior manager at Cloud Software Group, he’s driven by automation, streamlining the DevOps life cycle, and ensuring team productivity.
I want to thank my wife, who encouraged me to contribute to the learning community by active participation, and also for her patience during the period of reviewing of this book.
Welcome to Zabbix 7 IT Infrastructure Monitoring Cookbook. IT infrastructure ranges from Windows and Linux to networking and development, and basically anything that runs on computer hardware. In this book, we will go over various subjects useful to anyone in IT who wants to use Zabbix to monitor their IT infrastructure.
Monitoring systems are often overlooked within IT organizations, but they can provide an overview that will save you time, money, and headaches. This book is for IT engineers who want to learn something about Zabbix 7 and how to use it to bring their IT environments to the next level.
Chapter 1, Installing Zabbix and Getting Started Using the Frontend, covers how to set up Zabbix optionally with HA and work your way through its menus.
Chapter 2, Getting Things Ready with Zabbix User Management, covers how to set up your first users, user groups, and user roles.
Chapter 3, Setting Up Zabbix Monitoring, covers how to set up almost any type of monitoring within Zabbix.
Chapter 4, Working with Triggers and Alerts, covers how to set up triggers and get alerts from them.
Chapter 5, Building Your Own Structured Templates, covers how to build templates that are structured and will work wonders for keeping your Zabbix setup organized.
Chapter 6, Visualizing Data, Inventory and Reporting, covers how to visualize data in graphs, maps, and dashboards. It also covers how to use the Zabbix inventory, reporting, and business service monitoring functionality.
Chapter 7, Using Discovery for Automatic Creation, covers how to use Zabbix discovery for automatic host creation as well as items, triggers, and more with agents, SNMP, WMI, and JMX.
Chapter 8, Setting Up Zabbix Proxies, teaches how to set up Zabbix proxies correctly for use in a production environment, with the addition of the new proxy high availability.
Chapter 9, Integrating Zabbix with External Services, teaches how to integrate Zabbix with external services for alerting.
Chapter 10, Extending Zabbix Functionality with Custom Scripts and Zabbix API, covers how to extend Zabbix functionality by using custom scripts and the Zabbix API.
Chapter 11, Maintaining Your Zabbix Setup, covers how to maintain a Zabbix setup and keep its performance up over time.
Chapter 12, Advanced Zabbix Database Management, teaches how to manage Zabbix databases for an advanced setup.
Chapter 13, Bringing Zabbix to the Cloud with Zabbix Cloud Integration, covers how to use Zabbix in the cloud with services such as AWS, Azure, Docker, and Kubernetes.
You should have a good basis in IT to understand the terminology used in this book. This book is best for people with at least basic knowledge of monitoring systems, Linux, and network engineering.
Software/hardware covered in the book
Operating system requirements
Zabbix 7
Linux (any)
Python 3
MariaDB (MySQL)
PostgreSQL
NGINX
VIM
Make sure you have a virtualization environment ready to create virtual machines for use with the recipes. VirtualBox, VMware, or any other type of client/hypervisor will do.
Throughout the book, we will make use of Vim to edit files, so make sure to install it. If you do not feel comfortable using Vim, you can substitute this for Nano or anything else you prefer.
If you are using the digital version of this book, we advise you to type the code yourself or access the code via the GitHub repository (link available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.
You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/Zabbix-7-IT-Infrastructure-Monitoring-Cookbook. If there’s an update to the code, it will be updated on the existing GitHub repository.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
There are a number of text conventions used throughout this book.
Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “The log_bin_trust_function_creators function is set to 1 here to allow the initial database data to be imported.
A block of code is set as follows:
# listen 8080; # server_name example.com;When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
# MariaDB Server# To use a different major version of the server, or to pin to a specific minor version, change URI below. deb [arch=amd64,arm64] https://dlm.mariadb.com/repo/mariadbserver/11.4/repo/ubuntu jammy mainAny command-line input or output is written as follows:
systemctl start mariadbBold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: “We will also need a virtual IP (VIP) address for our cluster nodes.”
Tips or important notes
Appear like this.
In this book, you will find several headings that appear frequently (Getting ready, How to do it..., How it works..., There’s more..., and See also).
To give clear instructions on how to complete a recipe, use these sections as follows:
This section tells you what to expect in the recipe and describes how to set up any software or any preliminary settings required for the recipe.
This section contains the steps required to follow the recipe.
This section usually consists of a detailed explanation of what happened in the previous section.
This section consists of additional information about the recipe in order to make you more knowledgeable about the recipe.
This section provides helpful links to other useful information for the recipe.
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at [email protected].
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata, select your book, click on the Errata Submission Form link, and enter the details.
Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Whether you are a real Zabbix guru or you’ve just started working with Zabbix, this book will include some recipes for everyone. We will go over most of the Zabbix basics and even do some cool stuff with the Zabbix API and databases in the book.
We decided to write this book because we think it’s important to be part of the community and want to supply you with the Zabbix information available online and in the official Zabbix training materials in a clear and straightforward way from a reliable source. We’ve all been through the process of bookmarking all those amazing community blog posts, community guides, and even official documentation. Sometimes it can be a bit much, which is where this book will help. See it as your guide with something for everyone without the need to Google until your fingers fall off.
Now even when you have gained experience, finished this and maybe other books, and you’ve bookmarked every useful page about Zabbix, you might still not know everything. This is where we come in. Zabbix is a free product built on an amazing open source community, but besides that, there are some real Zabbix gurus out there that decided to make a living out of it. Our company, Opensource ICT Solutions, comes from these humble beginnings, and we are there to provide our customers with everything they need when it comes to Zabbix. As a Premium Zabbix partner, we provide the following:
Official Zabbix trainingOfficial Zabbix supportZabbix consultancyTurnkey solutionsCustom integrations24/7-available service deskAs providing services on Zabbix is our core business, we see different environments, different customers, and different use cases of the product every day, while working out the best solutions we can for our worldwide customer base. As an official training partner, it’s not only about building environments but also about sharing knowledge and teaching others how to get the most out of the product.
So, if you’ve enjoyed this book, please do think about us and others in our amazing Zabbix community. Give us a follow on LinkedIn (and other social media) and whenever you need help, give us a call! We will definitely be ready to help you out with any questions you might run into.
United Kingdom
The Netherlands
United States
Opensource ICT Solutions LTD
Opensource ICT Solutions B.V.
Opensource ICT Solutions LLC
Phone: +44 20 4551 1827
Phone: +31 (0)72 743 65 83
Phone: +1-929-377-1232
https://oicts.com
Once you’ve read Zabbix 7 IT Infrastructure Monitoring Cookbook, we’d love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.
Your review is important to us and the tech community and will help us make sure we’re delivering excellent quality content.
Thanks for purchasing this book!
Do you like to read on the go but are unable to carry your print books everywhere?
Is your eBook purchase not compatible with the device of your choice?
Don’t worry, now with every Packt book you get a DRM-free PDF version of that book at no cost.
Read anywhere, any place, on any device. Search, copy, and paste code from your favorite technical books directly into your application.
The perks don’t stop there, you can get exclusive access to discounts, newsletters, and great free content in your inbox daily
Follow these simple steps to get the benefits:
Scan the QR code or visit the link belowhttps://packt.link/free-ebook/978-1-80107-832-0
Submit your proof of purchaseThat’s it! We’ll send your free PDF and other benefits to your email directly