FB pixel

Monitoring a Server with Zabbix

5 05.09.2025

Server monitoring is essential to ensure the stable and secure operation of information systems. It enables the timely detection of failures, overloads, hardware and software issues, as well as monitoring the state of resources such as CPU, RAM, disks, network interfaces and services. Without a monitoring system, the administrator learns about a problem only after it has affected users, whereas with monitoring, a warning is received in advance and a prompt response is possible.

One of the most functional solutions in this field is Zabbix. It is an open-source monitoring system designed for round-the-clock control of servers, network devices, virtual machines, databases and other components of IT infrastructure. Zabbix collects performance metrics, detects deviations from predefined parameters, sends notifications and generates reports.

The system operates using both agent-based and agentless principles: Zabbix Agent can be installed on each server or data can be collected using SNMP, IPMI, SSH, and HTTP protocols without installing additional components. The tool’s control panel provides graphs, triggers, a network map and convenient templates for various device types.

The main advantage of Zabbix is its high flexibility and scalability. It can be used for both small projects and large enterprise systems. Thanks to a diverse alert system, administrators receive notifications in real time. This significantly reduces downtime risk and helps maintain infrastructure performance at a high level.

Overview of Zabbix Architecture

The architecture includes several key components, each of which performs a strictly defined role and interacts with other parts of the system through internal protocols and queues.

At the center is the Zabbix Server – the core component that manages data collection, trigger processing, information storage and sending notifications. It receives data from agents, external scripts, SNMP devices or API interfaces, checks their compliance with set conditions and saves them in the database.

The database (MySQL, PostgreSQL, Oracle and others) is used to store all information: metrics, events, history, configurations and logs. Its performance directly affects the speed of data display in the interface and the speed of event processing. For large data volumes, it is recommended to separate short- and long-term storage histories.

There is a control panel accessible via a browser. Through it, a specialist configures hosts, templates, triggers, graphs and reports. The interface displays the status of all nodes in real time, notifications, a network map and allows for quick incident response.

Zabbix Agent is installed on monitored hosts and transmits information about system parameters such as CPU load, RAM usage, service activity, disk and log states. The agent can operate in active and passive modes. In the first case, it sends data to the server itself; in the second, it waits for a request from the server.

For large networks, Zabbix Proxy is used. It is an intermediary component that collects data from remote nodes and transmits it to the main server. This reduces the load on the central system and allows monitoring of geographically distributed objects, even if their connection is unstable or limited.

Additionally, external scripts and integrations with cloud services can be used.

Installing and Configuring the Zabbix Server

Before starting the Zabbix installation, it is necessary to prepare a server with an installed operating system (for example, Ubuntu, Debian or CentOS), a stable network connection and administrator privileges. A LAMP or LEMP stack is also required: a web server, a database and a PHP interpreter. The example below shows the installation process of the Zabbix Server on Ubuntu using the Nginx web server and the MariaDB database.

1. Update the system:

sudo apt update && sudo apt upgrade -y

2. Install required dependencies:

sudo apt install nginx mariadb-server php php-fpm php-mysql php-xml php-bcmath php-mbstring php-gd php-ldap php-json php-cli php-zip -y

3. Configure MariaDB:

sudo mysql_secure_installation

Then run the following commands in the MySQL console:

CREATE DATABASE zabbix CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; CREATE USER zabbix@localhost IDENTIFIED BY 'secure_password'; GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost; FLUSH PRIVILEGES;

4. Add the official Zabbix repository:

wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-1+ubuntu20.04_all.deb sudo dpkg -i zabbix-release_6.0-1+ubuntu20.04_all.deb sudo apt update

5. Install Zabbix components:

sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-nginx-conf zabbix-sql-scripts zabbix-agent -y

6. Import the initial database structure:

zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p zabbix

7. Configure database connection parameters:

Edit the configuration file:

sudo nano /etc/zabbix/zabbix_server.conf

Add or modify the line:

DBPassword=secure_password

8. Configure Nginx for Zabbix:

Edit the Nginx configuration if needed:

sudo nano /etc/zabbix/nginx.conf

Enable and restart services:

sudo systemctl enable zabbix-server zabbix-agent nginx php7.4-fpm sudo systemctl restart zabbix-server zabbix-agent nginx php7.4-fpm

9. Open the web interface:

In your browser, go to:

http://your_IP:8080

Follow the setup wizard and complete the installation.

10. Check system operation:

sudo systemctl status zabbix-server sudo systemctl status zabbix-agent

Installing and configuring the Zabbix agent on the server

Installing and configuring the Zabbix agent is necessary to collect data from a specific server that will be monitored. The agent sends system status information to the main Zabbix server. The example below describes installation on Ubuntu, but other distributions can be configured similarly.

Add the official Zabbix repository:

wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-1+ubuntu20.04_all.deb sudo dpkg -i zabbix-release_6.0-1+ubuntu20.04_all.deb sudo apt update

Install the agent:

sudo apt install zabbix-agent -y

Configure the agent’s configuration file:

Open the file /etc/zabbix/zabbix_agentd.conf and edit the following parameters:

Server=192.0.2.10 ServerActive=192.0.2.10 Hostname=webserver01
  • Server: the IP address of the Zabbix server that is allowed to poll this agent;
  • ServerActive: the address to which the agent will actively send data;
  • Hostname: a unique name that must match the one specified on the Zabbix server when adding the host.

Allow the Zabbix port in the firewall (if used):

sudo ufw allow 10050/tcp

Start and enable the agent service:

sudo systemctl enable zabbix-agent sudo systemctl start zabbix-agent

Check the agent status:

sudo systemctl status zabbix-agent

Add the host on the Zabbix server:

Go to the Zabbix web interface, open the section «Configuration» → «Hosts» and create a new host by specifying:

  • the hostname (must match the Hostname in the agent’s configuration);
  • the IP address or DNS name;
  • the template to be used (for example, «Template OS Linux»).

Adding a server to Zabbix and applying monitoring templates

After installing and starting the agent, the next step is to add the server to the Zabbix monitoring system through the web interface and assign it the appropriate template. This will allow the collection of metrics and the display of data on the dashboard.

First, log in to the Zabbix web interface using administrator credentials and go to the «Configuration» → «Hosts» section. Click the «Create host» button. In the form that appears, fill in the main fields:

  • host name (Host name): must exactly match the Hostname parameter in the agent configuration on the target server;
  • groups (Groups): select an existing group (for example, «Linux servers») or create a new one;
  • interface (Agent interfaces): add the IP address of the server from which information will be collected. The default port is 10050.

After filling in the main parameters, click the «Templates» tab, then «Add» and select the required monitoring template. For most Linux servers, Template OS Linux is suitable. Its application will ensure the collection of key metrics: CPU load, memory, disk space, service operation and network activity.

Then save the changes. After a few minutes, if the agent is working correctly and the connection to the server is established, data will start arriving. In the «Monitoring» → «Latest data» section, you can track current metrics. If necessary, Zabbix will automatically create graphs, triggers and events based on the template.

This completes the basic process of adding a host and connecting to monitoring. Next, you can create your items, triggers and notifications depending on the tasks.

Setting up triggers and notifications

Setting up triggers and notifications in Zabbix allows you to automatically respond to deviations in the operation of servers and services. This is an important part of the monitoring system that ensures timely problem notification.

First, you need to define the conditions under which a notification should be triggered. This is done using triggers that analyze metric values collected from agents or other sources. For example, a trigger can monitor if the CPU load exceeds 90% for 5 minutes. To create your trigger, go to the «Configuration» → «Hosts» section, select the required server, open the «Triggers» tab and click «Create trigger». Specify the name, priority, condition expression and link to the data item. Expressions are set using the Zabbix language and allow various logical and time parameters to be used.

After setting up the triggers, the notification mechanism must be configured. This is done in the «Administration» → «Media types» section, where notification methods are added: email, Telegram, Slack, webhooks and others. Then in the «Users» section, each administrator is assigned preferred communication channels and schedules.

The final step is to create action rules. In the «Configuration» → «Actions» section, create a new rule, specify the trigger condition (for example, any trigger with medium and high severity), select the user, media type and notification text. You can also set escalations so that messages are repeated or redirected to other contacts if the problem is not resolved.

After saving the settings, Zabbix will start automatically monitoring the specified parameters and notifying responsible persons in case of failures.

Best practices and recommendations for effective monitoring

Effective monitoring of server and network infrastructure requires not only installing the Zabbix system but also thoughtful configuration and adherence to a number of practical recommendations. This helps reduce the risk of missing critical events, minimize false positives and simplify administration.

To start, it is recommended to use templates. They allow for rapid deployment of monitoring on new nodes, unify tracking parameters and avoid manual errors. If there are similar servers, it is worth creating your templates adapted to the specifics of the internal infrastructure.

With high load, intermediate data collection nodes should be used to offload the central server and ensure stable communication with remote objects. It is also important to regularly delete outdated metrics to avoid overloading the database and speed up access to current information.

Setting trigger conditions requires a balanced approach. You should not monitor parameters that do not affect system operation. It is better to focus on key indicators: service availability, CPU load, available memory, disk usage, and connection stability.

It is worth enabling multiple notification channels: email, messengers, in-app notifications. At the same time, it is recommended to configure the order of message delivery depending on the severity level and involve multiple responsible persons.

All configurations must be regularly reviewed. As servers, network nodes and applications change, templates, agent settings and notification rules must be updated. Otherwise, some events may not be tracked and some may cause false alarms.

Learn more about how to purchase a domain, hosting, VPS, or dedicated server.

FAQ

What are Items, Triggers and Graphs in Zabbix?

Items are specific metrics that Zabbix collects from monitored devices (for example, CPU load, disk usage). Triggers are logical conditions based on item data that determine when a situation is a problem (for example, if CPU load exceeds 90%). Graphs are visual representations of collected data, making it easy to track metric changes over time.

How to configure notifications in Zabbix to receive problem alerts?

To configure notifications in Zabbix, you need to define Media Types (notification types, such as email or SMS), create Users and link them to these notification types. Then create Actions that define what notifications to send, to whom and under what conditions (for example, when a specific trigger is triggered).

What are Templates in Zabbix and how do they simplify monitoring?

Templates in Zabbix are sets of pre-configured items, triggers, graphs and other entities that can be applied to multiple hosts. They greatly simplify monitoring by allowing fast and consistent configuration for similar devices without manually configuring each item for every host.