Zabbix监控Linux主机CPU温度
一、客户端
1、客户Linux主机安装Im_sensors
[root@localhost ~]# yum -y install lm_sensors[root@localhost ~]# sensors-detect
一直yes,然后重启zabbix-agent服务或者主机。
2、Im_sensors查看显示结果(由于这里是使用虚机,所以温度显示有问题)
[root@localhost ~]# sensors
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0: N/A (high = +100.0°C, crit = +100.0°C)
Core 0: N/A (high = +100.0°C, crit = +100.0°C)
正常情况是:
3、提取sensors显示数字:34.0(取Physical这行ID为0的第35-39的数值,多核就改变$0的值。-c后面的数字也根据主机显示结果改动)
4、修改客户端配置文件zabbix-agent.conf
#UnsafeUserParameters=0 改为:UnsafeUserParameters=1
下面一行添加:
保存退出,重启zabbix-agent服务

二、zabbix服务器端
1、点击对应主机监控项

2、创建监控项

3、填写监控项信息

4、点击对应主机触发器

5、创建触发器

6、设置表达式,自定义温度值大于70就触发告警(告警发送和接收信息在另外一篇文章提到)

7、监控事件就会提示温度告警信息

