Candid photograph of a Linux server terminal with a soft olive-green glow against a dark slate background, conveying a calm technical atmosphere.

Step-by-step guides for system administrators — covering command-line basics, web server setup, and preparation material for technical interviews.

Browse Tutorials

How to Install and Configure Zabbix for Monitoring

Zabbix is an open-source monitoring platform for servers, virtual machines, network devices, databases and applications. It combines data collection, alerting, visual dashboards and historical reporting in one system, making it suitable for a home lab, a small business or a distributed production environment.

This guide uses a RHEL-compatible Linux host with PostgreSQL and Nginx. The same general process applies to RHEL, Rocky Linux, AlmaLinux and CentOS Stream, although package names and repository versions may change. Use a fully qualified hostname and a static IP address before beginning.

A small Australian business might monitor a web server in Sydney, a database in Melbourne and a backup host in Perth. Time zones matter when reviewing incidents, so configure the server for Australia/Sydney or the relevant local region and account for daylight saving changes.

Component Recommended choice Purpose
Zabbix server Zabbix 7.0 LTS Collects data and evaluates triggers
Database PostgreSQL Stores monitoring history and configuration
Web server Nginx and PHP-FPM Provides the Zabbix dashboard
Monitoring agent Zabbix agent 2 Reports host metrics
Operating system RHEL 9-compatible Linux Stable server platform

Choosing The Monitoring Architecture

Keep the first deployment simple: install the Zabbix server, database and web interface on one management host, then install the agent on each monitored system. This arrangement is practical for a small environment and allows administrators to learn the interface before separating services.

For larger networks, use Zabbix proxies near remote systems. A proxy in Perth can collect metrics from local machines and forward them to a central server in Sydney. This reduces the effect of an interstate WAN outage and is useful when branch sites have variable NBN or business internet connectivity.

Set the server name and time zone before adding hosts:

sudo hostnamectl set-hostname monitor01.example.com
sudo timedatectl set-timezone Australia/Sydney
sudo dnf update -y
sudo dnf install -y firewalld chrony
sudo systemctl enable --now firewalld chronyd

Installing PostgreSQL And Zabbix Server

Add the official Zabbix repository that matches the operating system release. For RHEL 9-compatible systems, the following example installs the 7.0 LTS packages:

sudo rpm -Uvh https://repo.zabbix.com/zabbix/7.0/rhel/9/x86_64/zabbix-release-7.0-2.el9.noarch.rpm
sudo dnf clean all
sudo dnf install -y postgresql-server postgresql-contrib
sudo dnf install -y zabbix-server-pgsql zabbix-sql-scripts zabbix-selinux-policy

Initialise PostgreSQL, create a dedicated database and import the Zabbix schema. Use a strong password and store it in a password manager rather than leaving it in shell history.

sudo postgresql-setup --initdb
sudo systemctl enable --now postgresql

sudo -u postgres createuser --pwprompt zabbix
sudo -u postgres createdb -O zabbix zabbix
zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | \
  sudo -u zabbix psql zabbix

Edit /etc/zabbix/zabbix_server.conf and set the database password:

DBName=zabbix
DBUser=zabbix
DBPassword=use-a-long-random-password

Publishing The Web Interface

Install the frontend, Nginx and PHP-FPM packages:

sudo dnf install -y zabbix-web-pgsql zabbix-nginx-conf zabbix-selinux-policy \
  nginx php-fpm php-pgsql
sudo systemctl enable --now php-fpm nginx

Edit /etc/nginx/conf.d/zabbix.conf. Set the server name and listen address, then remove the comment from the required listen directive. A basic virtual host can use:

server {
    listen 80;
    server_name monitor01.example.com;

    root /usr/share/zabbix;
    index index.php;

    location / {
        try_files $uri $uri/ =404;
    }

    location ~ \.php$ {
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass unix:/run/php-fpm/www.sock;
    }
}

Allow web traffic and start the Zabbix service:

sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload
sudo systemctl enable --now zabbix-server
sudo systemctl restart nginx php-fpm

Open http://monitor01.example.com and complete the setup wizard. Enter the PostgreSQL credentials, name the installation, and change the default Admin password immediately. In production, place the interface behind HTTPS using a certificate from Let’s Encrypt or an internal certificate authority.

Registering Hosts And Agents

Install Zabbix agent 2 on a monitored RHEL-compatible host:

sudo dnf install -y zabbix-agent2
sudo systemctl enable --now zabbix-agent2

Edit /etc/zabbix/zabbix_agent2.conf and specify the server address:

Server=192.0.2.10
ServerActive=192.0.2.10
Hostname=web01.example.com

The Hostname value must exactly match the host name created in the Zabbix web interface. Add the host under Data collection, attach the Linux by Zabbix agent template, and assign a host group such as Production/Linux.

Open TCP port 10050 only to the Zabbix server or proxy:

sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" \
source address="192.0.2.10/32" port port="10050" protocol="tcp" accept'
sudo firewall-cmd --reload

Baseline Checks

Creating Useful Triggers And Dashboards

Templates provide standard checks for CPU load, memory, disk space, network traffic and service availability. Begin with sensible thresholds rather than alerting on every brief spike. A filesystem warning at 80 percent and a critical trigger at 90 percent are often more useful than a notification for every five-minute fluctuation.

Create action rules that send alerts through email, Microsoft Teams, Slack or an Australian SMS provider. Include the host, problem name, severity, timestamp and a direct event link. The same discipline used to audit a small reward workflow, as explained in this coin tracking guide, is useful when checking alert histories and avoiding unexplained changes.

Use dashboards for different audiences: an operations view for active incidents, a capacity view for disk and memory trends, and an executive view showing availability. Zabbix also supports web scenarios, which can test login pages, APIs and checkout paths from the monitoring server.

Alert Essentials

Testing And Maintaining The Deployment

Test monitoring deliberately. Stop a disposable agent, fill a test filesystem, or block a permitted port, then confirm that the trigger changes state and the notification arrives. For an online service such as a casino app check, a web scenario can verify that the page loads, authentication responds and the expected content appears.

Review the Zabbix server log when data is missing:

sudo journalctl -u zabbix-server -n 50 --no-pager
sudo tail -f /var/log/zabbix/zabbix_server.log

Back up both the PostgreSQL database and /etc/zabbix. Retain configuration backups separately from the monitoring host, and document who receives after-hours alerts. For teams operating across Sydney, Melbourne and Perth, record the agreed maintenance window in local time and check daylight saving dates before scheduling disruptive work.

Once the dashboard shows recent data and a test alert has been acknowledged, run sudo systemctl status zabbix-server nginx postgresql on the monitoring host and save the output with the deployment record.