Keeping an eye on your server is important. You want to know if it’s healthy, fast, and running as expected. One tool I’ve used for this is called Zabbix. It helps you monitor things like CPU usage, memory, disk space, and network traffic. It can also alert you if something goes wrong.
Zabbix is a monitoring system. That means it watches your servers and devices, collects data, and shows it in a dashboard. It works well for websites, cloud servers, apps, and even your home server if you have one.
In this post, I’ll walk you through how to install Zabbix and use it. I’ll keep it simple. If you’ve never done this before, don’t worry. I’ll explain everything in plain language.
What is Zabbix?
Zabbix is an open-source program. That means it’s free to use and the code is public. You can install it on your own server and keep your data private.
It’s made up of a few parts:
- Zabbix server: This is the main part. It collects and stores data.
- Zabbix agent: This runs on the computers you want to monitor. It sends info to the server.
- Zabbix frontend: This is a web interface where you see graphs, numbers, and alerts.
Zabbix can monitor lots of things. For example, it can track:
- CPU load
- RAM usage
- Disk space
- Website status (is it up or down?)
- Network traffic
- Temperature (if your device supports it)
Why I Use Zabbix
Before using Zabbix, I tried just checking logs or using simple tools like top
or htop
. But that only shows what’s happening right now. It doesn’t give you a history or alerts when something goes wrong.
Zabbix lets me:
- See past data in graphs
- Get email alerts if something breaks
- Monitor multiple servers from one place
I also like that it runs in the background and doesn’t use much system resources.
What You’ll Need
To follow along, you’ll need:
- A Linux server (Ubuntu, Debian, or CentOS)
- Access to the terminal (SSH)
- A basic LAMP or LEMP setup (Linux, Apache or Nginx, MySQL or MariaDB, and PHP)
I’ll use Ubuntu 22.04 in this example, with Apache and MariaDB.
Step 1: Install the Zabbix Server
First, update your packages:
sudo apt update && sudo apt upgrade
Then install the required packages:
sudo apt install apache2 mariadb-server php php-mysql libapache2-mod-php php-xml php-bcmath php-mbstring php-gd php-ldap php-json php-cli php-mysql unzip wget
Now download the Zabbix repo:
wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-1+ubuntu22.04_all.deb
sudo dpkg -i zabbix-release_6.0-1+ubuntu22.04_all.deb
sudo apt update
Install Zabbix server, frontend, and agent:
sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent
Step 2: Set Up the Database
Log into MariaDB:
sudo mysql
Create the database and user:
CREATE DATABASE zabbix CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Import the database schema:
zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p zabbix
Enter the password you set above.
Step 3: Configure Zabbix
Open the Zabbix server config file:
sudo nano /etc/zabbix/zabbix_server.conf
Find the line:
DBPassword=
And change it to:
DBPassword=yourpassword
Save and close.
Start and enable the Zabbix services:
sudo systemctl restart zabbix-server zabbix-agent apache2
sudo systemctl enable zabbix-server zabbix-agent apache2
Step 4: Set Up the Web Interface
Open your browser and go to:
http://your-server-ip/zabbix
You’ll see the Zabbix setup page.
Follow these steps:
- Check the requirements
- Enter database details (
zabbix
,yourpassword
) - Set server name (any name you want)
- Finish the setup
Login with:
- Username:
Admin
- Password:
zabbix
You can change the password later in the dashboard.
Step 5: Add Your Server as a Host
In Zabbix, the term “host” means any machine you want to monitor.
Your server already has the Zabbix agent running. So let’s add it:
- Go to Configuration > Hosts
- Click Create host
- Name it something like “MyServer”
- Add the IP address
- Under “Templates,” add
Template OS Linux by Zabbix agent
- Click Add
That’s it. Zabbix will start collecting data in a few minutes.
What You Can Monitor
Once it’s running, Zabbix gives you lots of data. Some of my favorite things to track are:
- CPU load over time
- Free memory and swap space
- Disk usage per partition
- Network in and out traffic
- Server uptime
- Web server response time
Three Things I Use Zabbix For Every Day:
- Checking which server is using the most CPU
- Seeing when traffic spikes happen
- Making sure disk space isn’t getting low
Three Helpful Zabbix Features:
- Alerts: Sends email when something goes wrong
- Templates: Pre-made checks you can use quickly
- Graphs: Shows how things change over time
Three Troubleshooting Tips:
- If you don’t see data, check that the Zabbix agent is running
- Make sure your firewall isn’t blocking port
10050
(for the agent) - Try restarting the server if data still doesn’t show up
Comparing Zabbix to Other Tools
I’ve tried other tools too. Here’s how Zabbix compares:
Tool | Web Interface | Alerts | Graphs | Self-hosted |
---|---|---|---|---|
Zabbix | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Nagios | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes |
Netdata | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes |
UptimeRobot | ✅ Yes | ✅ Yes | ❌ No | ❌ No |
If you want full control and lots of options, Zabbix is a solid choice.
Conclusion
Zabbix is a useful tool for anyone who runs a server. It helps you stay ahead of problems by showing what’s happening in real time—and in the past.
At first, it may seem like a lot to set up. But once you try it, you’ll see how helpful it is.
I like that it works quietly in the background, gives clear graphs, and notifies me if something goes wrong.
You can start small by monitoring one server. Later, you can add more. You can also track things like databases, websites, and even hardware sensors.
Do you already monitor your server? If not, maybe now is the time to try.
Would you like me to show how to set up email alerts or custom checks?