Last active
February 6, 2025 13:51
-
-
Save githubfoam/21fd006e6a5522b62fe81c4eeea2182f to your computer and use it in GitHub Desktop.
zabbix experience
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#===================================================================== | |
zabbix 7.2 on debian bookworm | |
#A non-root user with an administrator user | |
#Installing PostgreSQL Server | |
sudo apt update | |
sudo apt install postgresql postgresql-contrib -y | |
sudo systemctl is-enabled postgresql && sudo systemctl status postgresql | |
#Creating PostgreSQL Database and User | |
#enter the password for your database user and repeat when prompted | |
sudo -u postgres createuser --pwprompt zabbix | |
sudo -u postgres createdb -O zabbix zabbix | |
#Installing Zabbix | |
wget https://repo.zabbix.com/zabbix/7.2/release/debian/pool/main/z/zabbix-release/zabbix-release_latest_7.2+debian12_all.deb | |
sudo dpkg -i zabbix-release_latest_7.2+debian12_all.deb | |
sudo apt update | |
sudo apt install zabbix-server-pgsql zabbix-frontend-php php8.2-pgsql zabbix-nginx-conf zabbix-sql-scripts zabbix-agent -y | |
#Integrating Zabbix with PostgreSQL | |
#Import the database schema for Zabbix to the 'zabbix' database with the user 'zabbix'. Enter your 'zabbix' password when prompted. | |
zcat /usr/share/zabbix/sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix | |
sudo nano /etc/zabbix/zabbix_server.conf | |
#Uncomment the default 'DBHost', 'DBName', 'DBUser', and 'DBPassword' | |
DBHost = localhost | |
DBName = zabbix | |
DBUser = zabbix | |
DBPassword = password | |
13 sudo nano /etc/zabbix/nginx.conf | |
listen 8080; | |
server_name zabbix72; | |
14 sudo nginx -t | |
15 sudo systemctl enable zabbix-server zabbix-agent nginx php8.2-fpm | |
16 sudo systemctl restart zabbix-server zabbix-agent nginx php8.2-fpm | |
17 sudo systemctl status zabbix-server zabbix-agent nginx php8.2-fpm | |
#===================================================================== | |
18 locale -a | |
19 sudo nano /etc/locale.gen | |
enable (starting "EN_US") | |
en_US.UTF-8 | |
20 sudo locale-gen | |
23 locale | |
#===================================================================== | |
problem: | |
web interface, first time setup | |
'ICMP ping' checks failed: "At least one of '/usr/sbin/fping', '/usr/sbin/fping6' must exist. Both are missing in the system | |
fix: | |
40 sudo nano /etc/zabbix/zabbix_server.conf | |
41 sudo systemctl status zabbix-server | |
enable | |
FpingLocation=/usr/bin/fping | |
Fping6Location=/usr/bin/fping6 | |
Fping6Location | |
The location of fping6. Make sure that the fping6 binary has root ownership and the SUID flag set. Make empty ("Fping6Location=") if your fping utility is capable to process IPv6 addresses. | |
Default: /usr/sbin/fping6 | |
FpingLocation | |
The location of fping. Make sure that the fping binary has root ownership and the SUID flag set. | |
Default: /usr/sbin/fping | |
https://www.zabbix.com/documentation/current/en/manual/appendix/config/zabbix_server#fping6location | |
#===================================================================== | |
#zabbix server | |
https:// localhost:8080 | |
#===================================================================== | |
sudo tail -f /var/log/zabbix/zabbix_server.log | |
#===================================================================== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment