您的位置:首页 > 运维架构

Zabbix监控服务器硬盘状态

2017-07-18 12:12 1061 查看
安装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]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: