Core Architecture
- Central Server: The primary hub that processes metrics, triggers, and alerts received from monitoring nodes.
- Data Storage: A backend database (e.g., MySQL/PostgreSQL) retaining all configuration metrics and historical data.
- Web Interface: The dashboard for visualization and administration, typically co-located with the central server.
- Proxy Node: An optional intermediary for distributed setups, aggregating data from remote agents before forwarding it to the central server.
- Client Agent: A daemon deployed on target machines to gather local metrics and report back to the server or proxy.
- Java Gateway: A specialized proxy facilitating the monitoring of JMX applications.
System Preparation
Verify OS version via cat /etc/os-release, ensure sufficient memory with free -h, check kernel using uname -r, and disable firewalld/iptables.
Central Server Installation
Create a custom repository file for package management:
[zabbix-monitor]
name=Zabbix Monitoring Base
baseurl=https://mirrors.example.com/zabbix/5.0/rhel/7/x86_64/
gpgcheck=0
enabled=1
[zabbix-monitor-frontend]
name=Zabbix Frontend Components
baseurl=https://mirrors.example.com/zabbix/5.0/rhel/7/x86_64/frontend/
gpgcheck=0
enabled=1Install the core components and Software Collections:
yum install -y zabbix-server-mysql zabbix-agent centos-release-sclUpdate SCL repository URLs to point to CentOS Vault to resolve deprecated mirror lists, then install the frontend packages:
yum install -y zabbix-web-mysql-scl zabbix-apache-conf-sclDatabase Initialization
Access the MySQL/MariaDB shell and execute the following SQL commands:
CREATE DATABASE zabbix_monitor CHARACTER SET utf8 COLLATE utf8_bin;
CREATE USER 'zbx_admin'@'localhost' IDENTIFIED BY 'SecureP@ssw0rd';
GRANT ALL PRIVILEGES ON zabbix_monitor.* TO 'zbx_admin'@'localhost';
SET GLOBAL log_bin_trust_function_creators = 1;
FLUSH PRIVILEGES;
EXIT;Import the initial schema:
zcat /usr/share/doc/zabbix-server-mysql-*/create.sql.gz | mysql -uzbx_admin -pSecureP@ssw0rd zabbix_monitorApplication Configuration
Edit /etc/zabbix/zabbix_server.conf to specify database connection parameters:
DBHost=localhost
DBName=zabbix_monitor
DBUser=zbx_admin
DBPassword=SecureP@ssw0rdAdjust the PHP timezone in /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf:
php_value[date.timezone] = UTCEnable and start all required daemons:
systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpmNavigate to http://<server_ip>/zabbix to finalize the web setup wizard.
Client Node Configuration
Transfer the repository configuration to the target client node:
scp /etc/yum.repos.d/zabbix.repo root@10.0.0.50:/etc/yum.repos.d/Install the agent daemon:
yum install -y zabbix-agentModify /etc/zabbix/zabbix_agentd.conf to point to the central server:
Server=10.0.0.100
ServerActive=10.0.0.100
Hostname=app_node_01
EnableRemoteCommands=1
UnsafeUserParameters=1
Include=/etc/zabbix/zabbix_agentd.d/*.confActivate the service:
systemctl start zabbix-agent
systemctl enable zabbix-agentConfirm the agent is listening on port 10050:
ss -antp | grep 10050On the central server, install the query utility and validate connectivity:
yum install -y zabbix-get
zabbix_get -s 10.0.0.50 -k agent.pingWeb Application Monitoring Setup
- Navigate to Configuration -> Host groups and define a new group (e.g., "Web Servers").
- Proceed to Configuration -> Hosts to add the target machine, assigning it to the newly created group and linking appropriate templates.
- Under the host settings, access the Graphs tab to construct visual representations of the collected metrics.