Zabbix
RASPBERRY PI (Bookworm) INSTALLATION
Install Zabbix repository
# wget https://repo.zabbix.com/zabbix/7.0/raspbian/pool/main/z/zabbix-release/zabbix-release_7.0-1+debian12_all.deb
# dpkg -i zabbix-release_7.0-1+debian12_all.deb
# apt update
Install Zabbix server, frontend, agent
# apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent
Make sure you have database server up and running.
Run the following on your database host.
# mysql -uroot -p
password
mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
mysql> create user zabbix@localhost identified by 'password';
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> set global log_bin_trust_function_creators = 1;
mysql> quit;
On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.
# zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
Disable log_bin_trust_function_creators option after importing database schema.
# mysql -uroot -p
password
mysql> set global log_bin_trust_function_creators = 0;
mysql> quit;
Configure the database for Zabbix server
Edit file /etc/zabbix/zabbix_server.conf
DBPassword=password
Start Zabbix server and agent processes
Start Zabbix server and agent processes and make it start at system boot.
# systemctl restart zabbix-server zabbix-agent apache2
# systemctl enable zabbix-server zabbix-agent apache2
Open Zabbix UI web page
The default URL for Zabbix UI when using Apache web server is http://host/zabbix
https://www.youtube.com/watch?v=87CdcPyBTr4
https://www.youtube.com/watch?v=p5XeBOOc7p8
https://www.youtube.com/watch?v=RGv6CWYrXAU
*************************************************
Zabbix server - pomáhá nám trackovat status našeho serveru
HOST
Host je monitoring endpoint - jakýkoliv zařízení ale i aplikace
Host name dělá rozdíl mezi pasivními a aktivními checky - proto používáme visible name
Host musí být v groupě nebo ve více group
interface - passive checks (SNMP, Agent)
ITEMS - to co monitorujeme
name, type
key - to co chceme zjistit, v závorkách upravujeme co cheme
preprocessing - můžeme s hodnotami pracovat abychom věděli co znamenají