centreon / centreon-plugins

Collection of standard plugins to discover and gather cloud-to-edge metrics and status across your whole IT infrastructure.
https://www.centreon.com
Apache License 2.0
311 stars 274 forks source link

Cisco SNMP plugin genError #5211

Closed guillaumechardin closed 1 month ago

guillaumechardin commented 1 month ago

Hello,

We have many cisco router managed by our ISP. ISP authorise SNMP access to those routers.

On some router, when using network::cisco::standard::snmp::plugin it fails with this error UNKNOWN: SNMP Table Request: (genError) A general failure occured

Using debug and or verbose flag do not give any debug data --plugin=network::cisco::standard::snmp::plugin --mode=list-interfaces --hostname=192.168.3.254 --snmp-version=2c --snmp-community='xxxxx' --oid-display=ifAlias --debug UNKNOWN: SNMP Table Request: (genError) A general failure occured

Using snmpwalk works fine :

snmpwalk -c xxxxx-v 2c 192.168.3.254

DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (759601760) 87 days, 22:00:17.60 IF-MIB::ifIndex.3 = INTEGER: 3 IF-MIB::ifIndex.4 = INTEGER: 4 IF-MIB::ifIndex.11 = INTEGER: 11 IF-MIB::ifIndex.12 = INTEGER: 12 IF-MIB::ifIndex.13 = INTEGER: 13 IF-MIB::ifIndex.14 = INTEGER: 14 IF-MIB::ifIndex.15 = INTEGER: 15 IF-MIB::ifIndex.16 = INTEGER: 16 [...And so on....]

Centreon plugins are in the last available version : centreon-plugin-Network-Cisco-Standard-Snmp-20240909-132610.el9.noarch

How to track source of issue ? Any idea to fix this ?

Thanks Guillaume

guillaumechardin commented 1 month ago

After some more test, i am able to get some data with centreon plugin. But when i add some options, it fails too :

centreon_cisco_standard_snmp.pl --plugin=network::cisco::standard::snmp::plugin --mode=list-interfaces --hostname=192.168.3.254 --snmp-version=2c --snmp-community='****' --oid-display=ifAlias UNKNOWN: SNMP Table Request: (genError) A general failure occured

Above, just adding --oid-display=ifAlias crashes script exec.

Without : it runs smoothly : #centreon_cisco_standard_snmp.pl --plugin=network::cisco::standard::snmp::plugin --mode=list-interfaces --hostname=192.168.3.254 --snmp-version=2c --snmp-community='***' List interfaces: 'vni-0/1' [speed = 1000][status = up][id = 11][type = ethernetCsmacd] 'vni-0/1.0' [speed = 1000][status = up][id = 12][type = ethernetCsmacd] 'vni-0/2' [speed = 1000][status = up][id = 13][type = ethernetCsmacd]

I read somewhere that bulk mode can cause this kind of issues, so i try with the --snmp-force-getnext with no success.

garnier-quentin commented 1 month ago

The snmp cisco agent must have a problem. Try with option --snmp-force-getnext

guillaumechardin commented 1 month ago

@garnier-quentin , i already tried --snmp-force-getnext as stated here https://github.com/centreon/centreon-plugins/issues/5211#issuecomment-2396457374

garnier-quentin commented 1 month ago

Sorry i didn't see. Try also: --subsettable=1 --subsetleef=10

guillaumechardin commented 1 month ago

centreon_cisco_standard_snmp.pl --plugin=network::cisco::standard::snmp::plugin --mode=list-interfaces --hostname=192.168.3.254 --snmp-version=2c --snmp-community='****' --oid-display=ifAlias --subsettable=1 --subsetleef=10 UNKNOWN: SNMP Table Request: (genError) A general failure occured

Same error.

garnier-quentin commented 1 month ago

Add also --snmp-force-getnext option. If you still have the issue, there is a bug with the snmp agent.

guillaumechardin commented 1 month ago

Thanks for the update, issue still there, i'll contact cisco team. Thank you.