Zabbix监控服务器硬盘状态

安装Iptables服务:

[root@localhost /]# yum install iptables-services
[root@localhost /]# vim /etc/sysconfig/iptables
[root@localhost /]# systemctl enable iptables
[root@localhost /]# systemctl start iptables

安装SmartMonTools程序:

[root@localhost /]# yum -y install smartmontools
[root@localhost /]# chmod u+s /usr/sbin/smartctl

安装Zabbix服务:

[root@localhost /]# yum -y install http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-agent-3.0.3-1.el7.x86_64.rpm
[root@localhost /]# vim /etc/zabbix/zabbix_agentd.conf
Server=172.16.1.186
ServerActive=172.16.1.186
Hostname=L-172.16.1.207

UserParameter=connection.tcp,ss -nat | grep ESTA | wc -l
UserParameter=smart.health.sda,smartctl -H /dev/sda | grep PASSED | wc -l
UserParameter=smart.health.sdb,smartctl -H /dev/sdb | grep PASSED | wc -l
[root@localhost /]# systemctl enable zabbix-agent
[root@localhost /]# systemctl start zabbix-agent

[THE END]






原文地址:https://www.cnblogs.com/configure/p/7199830.html