Não encontrou 'zeroDotZero' no módulo SNMPv2-SMI

2

Eu tenho um script perl que pesquisa nossos switches para descobrir qual deles hospeda um determinado endereço IP; este script usa bibliotecas net-snmp para pesquisar através de uma cadeia de comutadores Ethernet (pense no núcleo / distribuição / acesso) até encontrar o comutador correto onde o host está conectado.

Este script funciona bem na maioria das nossas máquinas linux, mas eu tenho um que envia mensagens STDERR reclamando da falta de 'zeroDotZero' em SNMPv2-SMI

[mpenning@lnxlmf ietf]$ perl ~/findhost2.pl 192.0.2.30
192.0.2.30, 192.0.2.30, No log handling enabled - turning on stderr logging
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/cisco/IP-MIB.my)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/cisco/EVENT-MIB.my)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt)
No log handling enabled - turning on stderr logging
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/cisco/IP-MIB.my)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/cisco/EVENT-MIB.my)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt)
No log handling enabled - turning on stderr logging
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/cisco/IP-MIB.my)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/cisco/EVENT-MIB.my)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt)
No log handling enabled - turning on stderr logging
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/cisco/IP-MIB.my)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/cisco/EVENT-MIB.my)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt)
No log handling enabled - turning on stderr logging
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/cisco/IP-MIB.my)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/cisco/EVENT-MIB.my)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt)
0:1e:b:26:78:d9, No log handling enabled - turning on stderr logging
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/cisco/IP-MIB.my)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/cisco/EVENT-MIB.my)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt)
No log handling enabled - turning on stderr logging
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/cisco/IP-MIB.my)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/cisco/EVENT-MIB.my)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt)
No log handling enabled - turning on stderr logging
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/cisco/IP-MIB.my)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/cisco/EVENT-MIB.my)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt)
No log handling enabled - turning on stderr logging
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/cisco/IP-MIB.my)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/cisco/EVENT-MIB.my)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt)
No log handling enabled - turning on stderr logging
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/cisco/IP-MIB.my)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/cisco/EVENT-MIB.my)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt)
192.0.2.254, Gi5/44

[mpenning@lnxlmf ietf]$

Como posso parar as mensagens de erro?

    
por Mike Pennington 19.10.2012 / 19:48

1 resposta

2

A cópia net-snmp padrão de SNMPv2-SMI tem uma definição para zeroDotZero ...

[mpenning@lnxlmf ietf]$ cd /usr/share/snmp/mibs/
[mpenning@lnxlmf mibs]$ grep zeroDotZero SNMPv2-SMI.txt
zeroDotZero    OBJECT-IDENTITY
[mpenning@lnxlmf mibs]$

Acontece que eu tinha instalado uma cópia antiga do SNMPv2-SMI.my no meu diretório Cisco MIBs ... essa cópia do SNMPv2-SMI.my não tinha zeroDotZero e estava copiando a cópia do net-snmp , então eu deletei isso.

[mpenning@lnxlmf mibs]$ cd /usr/share/snmp/mibs/cisco/
[mpenning@lnxlmf cisco]$ grep zeroDotZero SNMPv2-SMI.my
[mpenning@lnxlmf cisco]$ sudo rm SNMPv2-SMI.my

Agora o script é executado sem problemas ...

[mpenning@lnxlmf ~]$ perl findhost2.pl 192.0.2.29
192.0.2.29, 192.0.2.29, 0:27:e:22:9a:d5, core-switch2, 7/37

[mpenning@lnxlmf ~]$
    
por 19.10.2012 / 19:48