snmp协议监控Linux
时间:2020-02-09 16:25:47
收藏:0
阅读:65
ip地址 | 服务 | |
zabbix | 10.0.0.71 | snmp客户端 |
web01 | 10.0.0.7 |
ip地址 | 服务 | |
web01 | 10.0.0.7 |
安装服务端
$ yum install net-snmp -y $ vim /etc/snmp/snmpd.conf 41 com2sec notConfigUser default linux ---修改口令 42 43 #### 44 # Second, map the security name into a group name: 45 46 # groupName securityModel securityName 47 group notConfigGroup v1 notConfigUser 48 group notConfigGroup v2c notConfigUser 49 50 #### 51 # Third, create a view for us to let the group have rights to: 52 53 # Make at least snmpwalk -v 1 localhost -c public system fast again. 54 # name incl/excl subtree mask(optional) 55 view systemview included .1 --.1下面的信息都可以看到 56 view systemview included .1.3.6.1.2.1.25.1.1 #开启snmp服务 $ systemctl start snmpd $ systemctl enable snmpd #查看端口 $ netstat -lntup | grep 161 udp 0 0 0.0.0.0:161 0.0.0.0:* 7857/snmpd
ip地址 | 服务 | |
zabbix | 10.0.0.71 |
$ yum install net-snmp-utils.x86_64 -y #取值 -c 口令 -v 使用什么版本 $ snmpwalk -c linux -v 2c 10.0.0.7 .1.3.6.1.2.1.25.2.2.0 $ HOST-RESOURCES-MIB::hrMemorySize.0 = INTEGER: 995896 KBytes
3. 修改宏里面的命令
4. 结果
原文:https://www.cnblogs.com/Mercury-linux/p/12287047.html
评论(0)