我们在使用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. 查看监控数据
监控中--聚合图形
好啦,到这里就大功告成啦~