New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bgp-peers update #7972

Merged
merged 8 commits into from Jan 18, 2018

Conversation

Projects
None yet
5 participants
@murrant
Member

murrant commented Dec 28, 2017

Use IP parsing library more effectively.
Fix issue with improperly formatted data from some OS.
Fix update issue where some data was not correctly updated in the database.
Include comware bgp-peers test data

May require: #7971

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926

@murrant

This comment has been minimized.

Member

murrant commented Jan 8, 2018

I would still like to have JunOS test data for this.

@zombah

This comment has been minimized.

Contributor

zombah commented Jan 8, 2018

Manually tested with discovery of 3 Junos devices of various bgp peers capacity from 5 to 100. bgpLocalAs detected fine, peer statuses and data looks correct.

@murrant

This comment has been minimized.

Member

murrant commented Jan 9, 2018

Depends on #8050

murrant added some commits Dec 28, 2017

bgp-peers update
Use IP parsing library more effectively.
Fix update issue
Include comware bgp-peers test data
deeper refactoring
Allow JunOS fallback to BGP4-MIB, some models only use that.
Add junos bgp4 data
Actually update all bpg data in the poller
@laf

This comment has been minimized.

Member

laf commented Jan 11, 2018

#8050 is now merged, does this need more code or anything before it's ready or it was just waiting on that PR?

@murrant

This comment has been minimized.

Member

murrant commented Jan 12, 2018

It's ready.

@zombah zombah referenced this pull request Jan 14, 2018

Merged

fix: Bgp-peers junos empty afi-safi names #8083

1 of 1 task complete
@zombah

This comment has been minimized.

Contributor

zombah commented Jan 15, 2018

Tested pr this night, for some reason there is now alot of wrong parsed session with first octet of peer ip-address lost, like i have 192.168.99.0 neighbor and it is parsed into 168.99.0 and all other peers same way. Noticed on cisco ios boxes, others seems fine.

SNMP[/usr/bin/snmpbulkwalk -v2c -c COMMUNITY -Oq -m BGP4-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/cisco udp:HOSTNAME:161 bgpPeerRemoteAs]
BGP4-MIB::bgpPeerRemoteAs.* 64513
BGP4-MIB::bgpPeerRemoteAs.* 64513

Peers : BGP4-MIB::bgpPeerRemoteAs.192.168.99.21 64513
BGP4-MIB::bgpPeerRemoteAs.192.168.99.25 64513
Found peer 168.99.21 (AS64513)
Found peer 168.99.25 (AS64513)
@murrant

This comment has been minimized.

Member

murrant commented Jan 15, 2018

@zombah Hmm, I don't have any ios test data yet...

I don't remember there being anything to account for a different index in the previous code.

@murrant

This comment has been minimized.

Member

murrant commented Jan 16, 2018

Found the issue, it thought it was using cbgp2.

Fixed that, thanks for the test data.

@zombah

This comment has been minimized.

Contributor

zombah commented Jan 16, 2018

Now cisco iosxe found peers have additional octet in peer ip address:

S64513 SNMP[/usr/bin/snmpbulkwalk -v2c -c COMMUNITY -Oq -m CISCO-BGP4-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/cisco udp:HOSTNAME:161 cbgpPeer2RemoteAs$
CISCO-BGP4-MIB::cbgpPeer2RemoteAs.ipv4."*" 64513
CISCO-BGP4-MIB::cbgpPeer2RemoteAs.ipv4."*" 64513
CISCO-BGP4-MIB::cbgpPeer2RemoteAs.ipv4."*" 64513
CISCO-BGP4-MIB::cbgpPeer2RemoteAs.ipv4."*" 64513
CISCO-BGP4-MIB::cbgpPeer2RemoteAs.ipv6."fd:00:00:28:00:01:00:01:00:00:00:00:00:01:00:01" 64513
CISCO-BGP4-MIB::cbgpPeer2RemoteAs.ipv6."fd:00:00:28:00:01:00:01:00:00:00:00:00:01:00:02" 64513
CISCO-BGP4-MIB::cbgpPeer2RemoteAs.ipv6."fd:00:00:28:00:01:00:01:00:00:00:00:00:01:00:03" 64513

Peers : CISCO-BGP4-MIB::cbgpPeer2RemoteAs.ipv4.192.168.99.20 64513
CISCO-BGP4-MIB::cbgpPeer2RemoteAs.ipv4.192.168.99.21 64513
CISCO-BGP4-MIB::cbgpPeer2RemoteAs.ipv4.192.168.99.23 64513
CISCO-BGP4-MIB::cbgpPeer2RemoteAs.ipv4.192.168.99.24 64513
CISCO-BGP4-MIB::cbgpPeer2RemoteAs.ipv6.fd:00:00:28:00:01:00:01:00:00:00:00:00:01:00:01 64513
CISCO-BGP4-MIB::cbgpPeer2RemoteAs.ipv6.fd:00:00:28:00:01:00:01:00:00:00:00:00:01:00:02 64513
CISCO-BGP4-MIB::cbgpPeer2RemoteAs.ipv6.fd:00:00:28:00:01:00:01:00:00:00:00:00:01:00:03 64513
Found peer ipv4.192.168.99.20 (AS64513)
Found peer ipv4.192.168.99.21 (AS64513)
Found peer ipv4.192.168.99.23 (AS64513)
Found peer ipv4.192.168.99.24 (AS64513)
Found peer ipv6.fd00:0028:0001:0001:0000:0000:0001:0001 (AS64513)
Found peer ipv6.fd00:0028:0001:0001:0000:0000:0001:0002 (AS64513)
Found peer ipv6.fd00:0028:0001:0001:0000:0000:0001:0003 (AS64513)
@laf

This comment has been minimized.

Member

laf commented Jan 16, 2018

@murrant I can get you iosxe test data if you need?

@scrutinizer-notifier

This comment has been minimized.

scrutinizer-notifier commented Jan 17, 2018

The inspection completed: 3 new issues, 5 updated code elements

@zombah

This comment has been minimized.

Contributor

zombah commented Jan 18, 2018

Now discovery and polling works fine, tested in enviroment with ios,iosxe and junos devices.

@laf laf merged commit 88b4e31 into librenms:master Jan 18, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details

@murrant murrant deleted the murrant:comware-bgp-data branch Jan 29, 2018

@lock

This comment has been minimized.

lock bot commented May 16, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

@lock lock bot locked as resolved and limited conversation to collaborators May 16, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.