Home Raspberry PI How to Monitor Any Servers, PCs & Smart Devices with Zabbix &...

How to Monitor Any Servers, PCs & Smart Devices with Zabbix & Raspberry Pi

0
6

Depending on your home lab or commercial IT setup, keeping your servers, PCs, and smart devices running smoothly requires monitoring them. Enter Zabbix, a powerful open-source monitoring platform that detects system health, detects issues, and even generates alerts automatically. However, you can also install Zabbix on your Raspberry Pi and create a lightweight and low-power monitoring solution.

Then (in this tutorial), we will show you how to set up Zabbix to monitoring servers and PCs as well as IoT devices and other network hardware, on a Raspberry Pi. If you’re an IT pro, home lab user, or just someone learning to use network monitoring, this guide will help you build a cheap and cost-efficient monitoring system. Let’s begin!

  • Update your Raspberry Pi Using Below CoPreparing the Raspberry Pi
  • Install Raspberry Pi OS or Ubuntu
  • Download and flash the Raspberry Pi OS Lite (best for servers) or Ubuntu Server using Raspberry Pi Imager.
  • Enable SSH access if necessary (sudo raspi-config → Enable SSH).

Update your Raspberry Pi using below command:

sudo apt update && sudo apt upgrade -y

Install Required Dependencies for Zabbix:

sudo apt install -y apache2 mariadb-server mariadb-client php php-mysql php-bcmath php-mbstring php-xml php-gd php-ldap php-zip libapache2-mod-php

Start and Enable MariaDB:

sudo systemctl enable mariadb
sudo systemctl start mariadb

Secure the database:(Set a root password, Remove anonymous users, Disallow remote root login, Remove test databases.)

sudo mysql_secure_installation

Install Zabbix Repository:

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

Install Zabbix Server, Frontend & Agent:

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

Configure MariaDB for Zabbix:

sudo mysql -u root -p

Create Zabbix database and user:

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

Import Zabbix database schema:

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

Configure Zabbix Server:

sudo nano /etc/zabbix/zabbix_server.conf

Set the database password:

DBPassword=zabbix_password

Start and Enable Zabbix Services:

sudo systemctl restart zabbix-server zabbix-agent apache2
sudo systemctl enable zabbix-server zabbix-agent apache2

Configure Zabbix Web Interface:

http://Your_RaspberryPi_IP/zabbix
Username: Admin
Password: zabbix

No Comments

Leave A Reply

Please enter your comment!
Please enter your name here