• 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

  • 相关阅读:
    11月2日考试 题解(前缀和+哈希+树状数组+树链剖分)
    【Ynoi2016】谁的梦 题解(容斥+STL)
    ENABLE_DDL_LOGGING参数
    ORA-12012: error on auto execute of job 25;ORA-12005: may not schedule automatic refresh for times in the past
    Oracle增加数据文件
    使用Loop循环向测试表插入数据
    Oracle中开窗函数row_number()、rank()、dense_rank()
    安装Oracle 19c RAC创建ssh连接成功,测试报错INS-06006
    .Net5 WebApi Swagger 发布IIS遇到的坑
    .Net5 开启JWT认证授权
  • 原文地址:https://www.cnblogs.com/seasonsstory/p/3216878.html
Copyright © 2020-2023  润新知