Hi Ton, just checked your fix, it works, thank you for fixing it
Cheers, Cristi On Mon, Feb 14, 2011 at 1:32 PM, Ton Voon <[email protected]> wrote: > Hi Cristi, > > On 11 Feb 2011, at 15:10, Cristian Leonte wrote: > > Hi Guys, > > i started seeing this "UNKNOWN - The requested table is empty or does not > exist" as a result of check_snmp_statuslink, after the upgrade to opsvew > 3.9, we where not able to see why this was happening so we switched to old > check_snmp_statuslink, that old version is slower and genereates load on our > servers, finaly today we took the time to debug the > current check_snmp_statuslink, we found out that the script crashes on > checking ifAlias on linux boxes running CentOS 4, same script dose not crash > on cetons 5, here is a result of snmpwalk on centos 4 and on centos 5 > snmpwalk -v2c Centos5 -c COMMUNITY .1.3.6.1.2.1.31.1.1.1.18 > IF-MIB::ifAlias.1 = STRING: > IF-MIB::ifAlias.2 = STRING: > IF-MIB::ifAlias.3 = STRING: > IF-MIB::ifAlias.4 = STRING: > IF-MIB::ifAlias.5 = STRING: > IF-MIB::ifAlias.6 = STRING: > > same thing running on centos 4 > snmpwalk -v2c Centos4 -c TTS8888 .1.3.6.1.2.1.31.1.1.1.18 > IF-MIB::ifAlias = No Such Object available on this agent at this OID > > This means that net-snmp from centos 4 returns an error, and the difference > between old and new script is that he new script uses get_table method from > perl net::snmp , which returns an error and nagios exits with an error > (3-UNKNOWN), to fix the problem we did this: > > > $table = $s->get_table( -baseoid => $oid_ifAlias ); > foreach my $oid ( keys %$table ) { > my ($interface_number) = ( $oid =~ /(\d+)$/ ); > $ifAliases->{$interface_number} = $table->{$oid}; > } > $s->_error_clear(); (code added by us) we cleared the snmp error > > I'm sure its a hack, can you suggest a better approach? > > > I think it is valid to ignore the error if that ifAlias attribute is not > available on the device. > > I've made a patch to check_snmp_linkstatus and credited you: > https://secure.opsera.com/wsvn/wsvn/opsview?op=comp&compare[]=%2Ftrunk@5825&compare[]=%2Ftrunk@5826 > > Can you try this out and confirm? > > Ton > > Ton Voon > Product Architect > > > > > Global Headquarters: Unit 69 Suttons Business Park | Reading | Berkshire | > RG6 1AZ | UK > > UK: +44 (0) 845 057 7887 > USA: +1 866 879 9184 > Email: [email protected] > Skype: tonvoon > Web: www.opsview.com > > This e-mail is confidential, intended only for the named recipient(s) above > and may contain information that is privileged and confidential. If you > receive this message in error, or are not the named recipient(s), please > notify the sender at the phone number above, do not copy this message, do > not disclose its contents to anyone, and delete this e-mail message from > your computer. Although we routinely screens for viruses, addressees should > scan this e-mail and any attachments for viruses. Opsera makes no > representation or warranty as to the absence of viruses in this e-mail or > any attachments. > > > _______________________________________________ > Opsview-users mailing list > [email protected] > http://lists.opsview.org/lists/listinfo/opsview-users > > -- Cristian Leonte [email protected]
_______________________________________________ Opsview-users mailing list [email protected] http://lists.opsview.org/lists/listinfo/opsview-users
