Photo by Vincentiu Solomon on Unsplash

Photo by Vincentiu Solomon on Unsplash

Open source monitoring with Zabbix

A Clear View

Article from ADMIN 75/2023
By
Zabbix provides comprehensive, highly configurable, but easy-to-use system monitoring.

Some particular strengths of the Zabbix monitoring solution are constant development according to user requirements, wide number of use cases, and wide range of integration options. Whether monitoring classic servers or arbitrary networks, operational technologies (OTs) and Internet of Things (IoT) devices, or modern containers and cloud-based infrastructures, Zabbix plays to its strengths. These strengths include multiple data collection methods and easy-to-define but extremely flexible problem detection and alerting. Additionally, Zabbix has attractive visualizations, a graphical configuration tool, and web and integrated business services monitoring with service level agreement (SLA) reports.

The manufacturer of Zabbix distributes its software fully under the GPLv2. Every user, from private to large corporations, is given access to the same product; no enterprise functions are hiding behind a paywall. The Zabbix business model is based on support and consultancy services and training and has a worldwide partner network.

Major release updates for the monitoring tool arrive every six months. Software packages are available from the in-house repositories of all well-known Linux distributions, such as Red Hat Enterprise Linux, CentOS Stream, Debian, and Oracle. Besides Linux, Zabbix also supports other Unix-style systems, such as HP-UX, Solaris, and even macOS. However, the manufacturer recommends Linux. Official Raspberry Pi and container image packages are also available.

Basic System

The core of a Zabbix monitoring system is the Zabbix server, the central control unit that collects, (pre)processes, evaluates, and stores the data in a relational database. The Zabbix web interface is a PHP application that accesses the Zabbix database to visualize the data collected by the server. It provides an interface for the administrator, but a Zabbix API also provides an interface with arbitrary integration and automation tools. Zabbix configuration takes place in the web interface.

When it comes to databases, Zabbix falls back on tried and trusted resources and supports MySQL, its descendants MariaDB and Percona, the popular open source PostgreSQL, and the commercial Oracle product. In addition to the core components, two variants of the Zabbix agent, a web services component, currently have the sole task of emailing regular reports. Finally, the Zabbix proxy enables distributed monitoring with decentralized data collectors.

Installation

A basic installation is a quick experience. After installing all the Zabbix software components and the database management system with the package manager of your choice, you initialize it with the database schema required for Zabbix. Doing so generates the tables needed for configuration, historical data, some basic settings, and an initial host. In the next step, you need to configure the Zabbix server with the database access credentials and install the required software components for operating a PHP-based web application.

The software packages from Zabbix make commissioning very easy. The Zabbix website provides clear step-by-step instructions for the most widely used Linux distributions. In principle, all Zabbix components can be run on a single (physical or virtual) Linux server. Nevertheless, Zabbix recommends running the individual components on separate servers in larger production environments.

In particular, the database required for Zabbix is best run on a separate server as soon as the number of hosts to be monitored exceeds a certain number, or if operating the monitoring solution is a strategic part of your IT operations. The database management system (DBMS) has to cope with high-volume write access, because Zabbix stores all collected data in various database tables. A mechanism ensures that the data does not expand uncontrollably. In a larger monitoring environment, the Zabbix database can easily grow to several terabytes, depending on the volume of, and the retention time configured for, the collected metrics, events, audit logs, and so on.

As an alternative, Zabbix can be rolled out in containers [1]. Besides official container images for all Zabbix software components, the vendor offers prefabricated Docker Compose manifests that let you quickly and easily launch the solution in Docker. Helm charts developed by the open source community and a lightweight OpenShift operator provided by Zabbix also are available for operation with Kubernetes and OpenShift. The approach I recommend is the Helm chart [2]. I am involved in this as a maintainer, and my employer uses it in many production environments, some of which are very large.

Container-based deployment is a very practical option: For example, you can quickly set up a small, fast Kubernetes cluster on a local machine in minikube, in K3d, or with Docker Desktop or Rancher Desktop. Additionally, you can quickly and easily set up a full Zabbix monitoring stack with:

$ helm repo add zabbix-community https://github.com/zabbix-community/helm-zabbix
$ helm install -n zabbix --create-namespace zabbix --set zabbix_image_tag: alpine-6.4-latest --set zabbixweb.service.type=NodePort zabbix-community/zabbix

This sample code sets up a PostgreSQL database (without persistent storage, all data is deleted after shutdown), together with the Zabbix components, and provides the port for the Zabbix web interface as a NodePort service. This example does not include an Ingress object or a TLS certificate. Matching documentation can be found on the GitHub page of the Helm chart project.

To point to the service that provides the Zabbix web interface, use

$ kubectl -n zabbix get service -l app.kubernetes.io/instance=zabbix-zabbix-web

which states the port on which the interface can be accessed. After successfully navigating the installation, the Zabbix web interface welcomes you and invites you to log in. After logging in as Admin with password zabbix , you are taken to a central dashboard (Figure 1).

Figure 1: The default Zabbix dashboard with some basic information.

Web Interface

The Zabbix web interface is divided into six areas, with some external links to Zabbix documentation and Zabbix's own integration website, where monitoring templates and other useful things can be found.

The Monitoring , Services , and Inventory sections let you view the monitoring data (Figure 2), work on any issues that arise (acknowledgment, ticket generation, etc.), and analyze system and application states retrospectively with graphs and other historical views (Figure 3).

Figure 2: The Zabbix dashboard shows historical data and points to problems.
Figure 3: Graphs are used for retrospective problem analysis.

The services in Zabbix 6.0 are completely new, with powerful features designed for monitoring and alerting with more than 100,000 business services. It is used to derive the status of operational processes from acquired metrics data. Other new features include an SLA reporting function and the ability to trigger alerts according to the states of business services. Scheduled reports (Reports | Scheduled reports ) lets you define dashboard-based reports and mail them at regular intervals. Scheduled reports can also be used in conjunction with the SLA report dashboard widget to report SLAs to application owners on a regular basis (e.g., weekly).

The dashboards have also seen many changes in recent Zabbix versions (Figure 4). You can now build modern dashboards that look as attractive as those created with dedicated dashboard tools like Grafana. The foundation for this feature was laid in Zabbix 3.4: The current version of the new dashboard framework is based on freely placeable widgets. Over the past few years, these widgets have been continuously developed to include service views, vector-based and dynamic graph views, geographic maps, network maps, and far more.

Figure 4: An example of a modern Zabbix dashboard with the Dark theme.

Zabbix also has much to offer under the hood. Extensive permissions configurations and the role strategy integrated into Zabbix make it possible to display exactly the monitoring objects required for the role in question (Figure 5). Also, areas of the web interface can be specifically released for individual users or user groups, making it possible to allow selected users to view large parts of the infrastructure, but only on the basis of individual dashboards that you can configure fully.

Figure 5: Zabbix offers a whole range of user authentication options.© Zabbix

Also important for enterprise use is the ability to authenticate to the Zabbix system by one or multiple Lightweight Directory Access Protocol (LDAP) and Active Directory (AD) servers. Zabbix can be connected to a modern Security Assertion Markup Language (SAML)-based identity management system (e.g., to the open source Keycloak solution) or to one of the numerous cloud-based providers (e.g., Okta, OneLogin, Microsoft Azure AD).

At the time of writing, a super administrator still had to configure all the users and their assignments manually to roles and permission groups within Zabbix. Since then, Zabbix 6.4 has been released with just-in-time (JIT) user provisioning [3]. JIT makes it possible to use LDAP or SAML attributes to assign appropriate group and role memberships to users as soon as they log in and thus automatically enforce an authorization concept.

All system monitoring configuration is handled by the Zabbix web GUI, where you can look forward to a sophisticated template-based system. To automate workflows and integrate with third-party systems, a JSON remote procedure call (RPC) API provides all of Zabbix's functionality [4]. Python and the Ansible and Salt Stack automation frameworks (among others) have modules for this programming interface; integration with ticket tools is also supported.

Zabbix also benefits from the completely free availability of more than 300 monitoring templates for a variety of popular operating systems, network devices, applications, and cloud services (Figure 6). The community also provides a ready-made and easily customizable monitoring template for virtually every use case.

Figure 6: The Zabbix website illustrates the many possibilities of integration with third-party software.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Zabbix release 2.2
    Although Nagios gets lots of attention, the popular network monitoring tool Zabbix is free, can configure hosts for direct monitoring in the web interface, and now can also monitor VMware machines in version 2.2.
comments powered by Disqus
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs



Support Our Work

ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.

Learn More”>
	</a>

<hr>		    
			</div>
		    		</div>

		<div class=