IF-MIB::ifTable = No Such Object available on this agent at this OID

在server端口执行如下命令

[root@localhost ~]# snmpwalk -v2c -c public 客户端ip if
IF-MIB::ifTable = No Such Object available on this agent at this OID

 

修改access  notConfigGroup ""      any       noauth    exact  systemviewnone none

access  notConfigGroup ""      any       noauth    exact  all        none none

 

 

故障二:在服务器端去取客户端指定oid对应的值

[root@localhost ~]# snmpwalk -v2c -c public 被监控端ip地址 .1.3.6.1.4.1.2021.1
UCD-SNMP-MIB::ucdavis.1 = No Such Object available on this agent at this OID

修改/etc/snmp/snmpd.conf中

exec .1.3.6.1.4.1.2021.1 test /root/test.sh为


extend .1.3.6.1.4.1.2021.1 test /root/test.sh


[root@localhost ~]# snmpwalk -v2c -c public 被监控端ip地址.1.3.6.1.4.1.2021.1
UCD-SNMP-MIB::ucdavis.1.1.0 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.1.2.1.2.4.116.101.115.116 = STRING: "/root/test.sh"
UCD-SNMP-MIB::ucdavis.1.2.1.3.4.116.101.115.116 = ""
UCD-SNMP-MIB::ucdavis.1.2.1.4.4.116.101.115.116 = ""
UCD-SNMP-MIB::ucdavis.1.2.1.5.4.116.101.115.116 = INTEGER: 5
UCD-SNMP-MIB::ucdavis.1.2.1.6.4.116.101.115.116 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.1.2.1.7.4.116.101.115.116 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.1.2.1.20.4.116.101.115.116 = INTEGER: 4
UCD-SNMP-MIB::ucdavis.1.2.1.21.4.116.101.115.116 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.1.3.1.1.4.116.101.115.116 = STRING: "/root/test.sh: Permission denied"
UCD-SNMP-MIB::ucdavis.1.3.1.2.4.116.101.115.116 = STRING: "/root/test.sh: Permission denied"
UCD-SNMP-MIB::ucdavis.1.3.1.3.4.116.101.115.116 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.1.3.1.4.4.116.101.115.116 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.1.4.1.2.4.116.101.115.116.1 = STRING: "/root/test.sh: Permission denied"
You have new mail in /var/spool/mail/root

给test.sh脚本赋予执行权限

chmod +x  /root/test.sh

再次在服务器端执行上述取值命令,ok

转载于:https://www.cnblogs.com/seasonsstory/p/3216878.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值