我們在使用zabbix server的時候會發現下面有一欄提示:zabbix server is not running
這時我們該怎麼配置,讓server把自身的監控信息也顯示出來呢?
1. 首先要排除防火牆的問題
systemctl status firewalld.service //查看firewalld狀態
getenforce //查看SELinux狀態
systemctl stop firewalld.service //關閉firewalld
關閉SELinux:
vim /etc/sysconfig/selinux
2. 配置zabbix agent
vim /etc/zabbix/zabbix_agentd.conf
修改並確認如下內容:
EnableRemoteCommands=1 允許遠程命令
LogRemoteCommands=1 記錄遠程命令
Server=127.0.0.1
ServerActive=127.0.0.1
Hostname=zabbix-server
3. 啓動zabbix agent
systemctl start zabbix-agent //啓動
systemctl enable zabbix-agent //開機自啓
4. 在主機中添加模板
配置--主機--Zabbix server--模板--點擊選擇
添加Templete DB MySQL
5. 查看監控數據
監控中--聚合圖形
好啦,到這裏就大功告成啦~