snmpwalk列出磁盘信息

1.snmpwalk安装

命令:

yum -y install net-snmp net-snmp-utils

[root@logstash ~]# yum -y install net-snmp net-snmp-utils
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Package matching 1:net-snmp-5.7.2-49.el7.x86_64 already installed. Checking for update.
Package matching 1:net-snmp-utils-5.7.2-49.el7.x86_64 already installed. Checking for update.
Nothing to do
[root@logstash ~]# 

修改/etc/snmp/snmpd.conf文件,添加如下内容,并保存,获取所有的数据

com2sec notConfigUser  default       public         #启用

view    all    included   .1    80                              #新增

access  notConfigGroup ""      any       noauth    exact  all none none    #新增

找到:disk checks

加入:

disk / 10000

disk /boot 10000

2.重启snmpd

命令:

systemctl restart snmpd

[root@logstash ~]# systemctl restart snmpd
[root@logsta

猜你喜欢

转载自blog.csdn.net/z19861216/article/details/141808413