BetaIT-Hub is in early access — your feedback helps us improve. Use the chat or email [email protected]

Tutorials/MONITORING/How to Set Up Zabbix Monitoring from Scratch
BeginnerMONITORING5 min read31 views

How to Set Up Zabbix Monitoring from Scratch

Complete guide to installing and configuring Zabbix for network and server monitoring. Covers installation, adding hosts, creating triggers, and setting up alerting.

A
adminEliteStaff
Published 65d ago

How to Set Up Zabbix Monitoring from Scratch

Zabbix is one of the most popular open-source monitoring solutions used by IT teams worldwide. In this tutorial, you'll learn how to install Zabbix, add your first hosts, and set up alerts.

Prerequisites

  • A Linux server (Ubuntu 22.04 or later recommended)
  • Root or sudo access
  • Basic command line knowledge

Step 1: Install Zabbix Repository

First, download and install the Zabbix repository package:

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

Step 2: Install Zabbix Server and Frontend

sudo apt install zabbix-server-pgsql zabbix-frontend-php php8.1-pgsql zabbix-nginx-conf zabbix-sql-scripts zabbix-agent

Step 3: Configure the Database

Create a PostgreSQL database for Zabbix:

sudo -u postgres createuser --pwprompt zabbix
sudo -u postgres createdb -O zabbix zabbix

Import the initial schema:

zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix

Step 4: Configure Zabbix Server

Edit the Zabbix server configuration:

sudo nano /etc/zabbix/zabbix_server.conf

Set the database password:

DBPassword=your_password_here

Step 5: Start Zabbix

sudo systemctl restart zabbix-server zabbix-agent nginx php8.1-fpm
sudo systemctl enable zabbix-server zabbix-agent nginx php8.1-fpm

Step 6: Access the Web Interface

Open your browser and navigate to http://your-server-ip/zabbix. Follow the setup wizard:

  1. Check prerequisites — all should be green
  2. Enter your database credentials
  3. Set the server name
  4. Default login: Admin / zabbix

Step 7: Add Your First Host

  1. Go to Configuration > Hosts > Create Host
  2. Enter the hostname and IP address
  3. Link a template (e.g., "Linux by Zabbix agent")
  4. Click Add

Step 8: Set Up Email Alerts

  1. Go to Administration > Media Types
  2. Configure your email settings (SMTP server, port, credentials)
  3. Go to your user profile and add the email as a media
  4. Create an action under Configuration > Actions to trigger on problems

Conclusion

You now have a working Zabbix installation monitoring your first host. From here you can add more hosts, create custom dashboards, and fine-tune your alerting. Check out the Zabbix documentation for advanced features like auto-discovery and API integration.

Comments (0)

No comments yet. Be the first to share your thoughts.