Discovery.php doesn't get BGP info on one of Cisco A9K


#1

When i run ./discovery.php -d -h xxx-xxxx02.xxx without modules (just general discovery) or auto-discovery running, i got the issue: “no BGP on host” and don’t get BGP info from router:
https://p.libren.ms/view/5c43b2c7

But when i run ./discovery.php -d -h xxx-xxxx02.xxx -m bgp-peers all BGP info successful discovered:
https://p.libren.ms/view/dae95fef

./validate.php:
https://p.libren.ms/view/e60aac29

Until the next re-discovery.

Please help fix it, i think it’s some issue on LibreNMS and not on a router


#2

Did you try enabling bgp-peers in the module settings of the device ? What you describe seems to be a disabled module (and when you run it manually, you force it).

You can also do this generally for the OS in the config.php file.


#3

I’m already enable bgp-peers module in device settings and run re-discovery, but no luck
.


#4

In the discovery extracts you posted, one device is not replying at all. So LibreNMS cannot discover much. Try to ensure that the device replies to the snmp requests (test it from CLI, doing exactly the same as LibreNMS does).

./discovery.php -h <device> -v -d

will display all the exact SNMP requests.


#5

This is weird:

Load disco module bgp-peers

SNMP['/usr/bin/snmpgetnext' '-v2c' '-c' 'fcc-public-community' '-Oqvn' '-m' 'BGP4-MIB' '-M' '/opt/librenms/mibs:/opt/librenms/mibs/cisco' 'udp:xxx-xxxxx.xxx:161' 'bgpLocalAs']

Timeout: No Response from udp:xxx-xxxxxx.xxx:161.
No BGP on hostPeers :
SQL[DELETE FROM `bgpPeers` WHERE device_id=? AND context_name=? [310,""] 0.75ms]

SQL[DELETE FROM `bgpPeers_cbgp` WHERE device_id=? AND context_name=? [310,""] 0.62ms]


SQL[SELECT DISTINCT context_name FROM bgpPeers WHERE device_id=? [310] 0.79ms]


>> Runtime for discovery module 'bgp-peers': 6.0260 seconds with 6424 bytes
>> SNMP: [1/6.02s] MySQL: [2/0.00s] RRD: [0/0.00s]
#### Unload disco module bgp-peers ####

But when i run command from cli it’s OK:
/usr/bin/snmpgetnext -v2c -c fcc-public-community -Oqvn -m BGP4-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/cisco udp:xxx-xxxxx.xxx:161 bgpLocalAs
ASXXXXX