# Installing Zabbix 7.4 on RHEL 8
Zabbix 7.4 Agent 2 - RHEL 8.10
Install Zabbix.
# a. Install Zabbix repository | |
rpm -Uvh https://repo.zabbix.com/zabbix/7.4/release/rhel/8/noarch/zabbix-release-latest-7.4.el8.noarch.rpm | |
dnf clean all | |
# b. Switch DNF module version for PHP | |
dnf module switch-to php:8.2 | |
# c. Install Zabbix server, frontend, agent2 | |
dnf install zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent2 | |
# d. Install Zabbix agent 2 plugins | |
dnf install zabbix-agent2-plugin-mongodb zabbix-agent2-plugin-mssql zabbix-agent2-plugin-postgresql |
Create initial database.
~]# dnf install mysql-server.x86_64 | |
~]# systemctl enable --now mysqld | |
~]# mysql -uroot -p | |
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; | |
# Import initial schema and data. | |
~]# 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> set global log_bin_trust_function_creators = 0; | |
mysql> quit; |
Configure the database for Zabbix server.
~]# cat >>/etc/zabbix/zabbix_server.conf <<EOF | |
# The following is added for Zabbix | |
DBPassword=password | |
EOF |
Start Zabbix server and agent processes.
systemctl restart zabbix-server zabbix-agent2 nginx php-fpm | |
systemctl enable zabbix-server zabbix-agent2 nginx php-fpm |
Modify the /etc/nginx/conf.d/zabbix.conf file, restart nginx.
~]# vi /etc/nginx/conf.d/zabbix.conf | |
listen 8080; | |
server_name example.com; | |
~]# systemctl restart nginx |
# Monitoring
# VMware
Enable monitoring vmware.
~]# ldd /usr/sbin/zabbix_server | egrep 'libxml2|libcurl' | |
libxml2.so.2 => /lib64/libxml2.so.2 (0x00007f1ebb534000) | |
libcurl.so.4 => /lib64/libcurl.so.4 (0x00007f1eb8e86000) | |
~]# grep '^StartVMwareCollectors' /etc/zabbix/zabbix_server.conf | |
StartVMwareCollectors=10 |
Add the following in Host Macros.
{$VMWARE.URL} = https://192.168.3.200/sdk | |
{$VMWARE.USERNAME} = root | |
{$VMWARE.PASSWORD} = Welcome@123 | |
{$VMWARE.HV.UUID} = 4c4c4544-004d-5810-8034-b9c04f435332 |
Use vim-cmd hostsvc/hostsummary | grep uuid command to get the uuid of EXSi host.
Reference:
・ Zabbix + VMware
# Troubleshooting
# Reference
・ Zabbix Documentation