there are 3 MIBs for BGP:But i am unable to find any SNMP OID to get BGP state. Could anybody help in this.
there are 3 MIBs for BGP:But i am unable to find any SNMP OID to get BGP state. Could anybody help in this.
- - BGPv3 -> RFC1269
- - BGP-4 -> RFC1657
Some useful OIDs (there are a whole lot more objects and details in the RFCs):
- - BGPv3 & BGP-4 -> RFC4273
- - peer state: .1.3.6.1.2.1.15.3.1.2.<peer-ip>. Possible values are: idle(1), connect(2), active(3), opensent(4), openconfirm(5), established(6).
- - peer admin state: .1.3.6.1.2.1.15.3.1.3.<peer-ip>
- - peer remote AS: .1.3.6.1.2.1.15.3.1.9.<peer-ip>
If you're using Nagios (or whatever NMS) and want a "fully automated" monitoring, you can retrieve the entire BGP neighbor table (in your case 2-3 row entries) which will contain all these parameters for all the neighbors listed in the table or you can hardcode the IP addreses for the neighbors you're interested in and check only for those. The OID for the table is .1.3.6.1.2.1.15.3.
- - peer last error: .1.3.6.1.2.1.15.3.1.14.<peer-ip>
Hope this helps,
Cheers!
Maybe a MikroTik official can shed some light regarding their plans to support the RFC4273 in the future, if any.MIBs used in RouterOS v5.x:
MIKROTIK-MIB
MIB-2
HOST-RESOURCES-MIB
IF-MIB
IP-MIB
IP-FORWARD-MIB
IPV6-MIB
BRIDGE-MIB
DHCP-SERVER-MIB
CISCO-AAA-SESSION-MIB
ENTITY-MIB
UPS-MIB
SQUID-MIB
Hi mandrade,
monitoring BGP sessions on MikroTik RouterOS was also on my list but unfortunately the BGP-related MIBs are not supported, at least not on RouterOS v5.x. Only some generic and MikroTik specific MIBs are implemented as of yet. The supported MIBs are:
Maybe a MikroTik official can shed some light regarding their plans to support the RFC4273 in the future, if any.MIBs used in RouterOS v5.x:
MIKROTIK-MIB
MIB-2
HOST-RESOURCES-MIB
IF-MIB
IP-MIB
IP-FORWARD-MIB
IPV6-MIB
BRIDGE-MIB
DHCP-SERVER-MIB
CISCO-AAA-SESSION-MIB
ENTITY-MIB
UPS-MIB
SQUID-MIB
A lot of interesting features and improvements are expected in v7... I wonder when it will be released...I have been told by support that this will be improved in RouterOS v7
Hey pincio,
my @cmd = ("/ip/route/print","=count-only=","?routing-mark=". $ng->get('vrf'));
/routing bgp peer print
/routing bgp peer print status
my @cmd = ("/routing/bgp/peer/print","=status=","?remote-address=". $ng->get('peer'),"=.proplist=prefix-count");
Yes, of course. Now i use your command and clean the code from useless cicleDear Pincio,
thank you for updating your code, maybe you'd like to put this together in one command request like this:
my @cmd = ("/routing/bgp/peer/print","=status=","?remote-address=". $ng->get('peer'),"=.proplist=prefix-count,state");
this way you can simply check the results like this:
result: =prefix-count=XYZ
result: =state=STATUS
result: !done
I have add -T argument in the format min:MAXFinally I'd vote for some optional values like expected prefixes and/or an upper and lower limit, this way one could get notified if either a fixed value is wrong or if a lower or upper limit is reached (lower might mean something is wrong with this peer and higher usually means you have to raise your max-prefix-limit or maybe change your filters).
I've done something similar but instead of counting the prefixes on routeros, I established a bgp session with a quagga instance and count the prefixes from there which is way faster.Hi pe1chl,
I bet you, you don't want this hovering-feature on bgp peers transmitting a full v4 (or even v6) table as this would simply take quite long
Regards,
hk
This is for an isolated network using BGP and it has only slightly above 100 prefixes. And I also mentioned I would like to see the top-nHi pe1chl,
I bet you, you don't want this hovering-feature on bgp peers transmitting a full v4 (or even v6) table as this would simply take quite long
But that means you need to establish a peer relation from your monitoring system to all the routers, right?I've done something similar but instead of counting the prefixes on routeros, I established a bgp session with a quagga instance and count the prefixes from there which is way faster.
Since your network only has ~100 prefixes then the quagga approach is a bit overkill.But that means you need to establish a peer relation from your monitoring system to all the routers, right?I've done something similar but instead of counting the prefixes on routeros, I established a bgp session with a quagga instance and count the prefixes from there which is way faster.
And then you use some config trick so there will be no routes via that system?
Is it possible, using a peer connection, to query all links of the remote router?
(It would need to collect a table of all prefix counts and actual prefixes of all links on all routers of the system)
The Live BGP Map requires the WiND Project to work.Features:
-Show each detected AS' BGP Peers in an easy to read list
-Full BGP Prefixes List with filters by AS Number and Prefix
-BGP Prepends detection with filters by AS Number
-Full BGP Peers list with filters by AS Number
-BGP Event Log with all events (New/Updated/Deleted Peers/Prefixes/Prepends, plus other events) with filters by AS Number and Prefix
-Invalid Prefix Advertisments list with all the ASes that advertised unssigned or invalid prefixes to the network. This relies heavily on WiND's database to work
-Live BGP Map with all the ASes and their peers
Ah has that been implemented? That was a feature I once requested...well, snmp by the standard would of course be fine, but the current RC promises to have a snmp to script interface which should allow for some interesting private OIDs
releasenote for 6.37rc10 says: snmp - added script table which executes script and returns it's output on get request;Ah has that been implemented? That was a feature I once requested...
Will certainly have a look into that! However, currently I am not able to check for new RC version, maybe it has been taken down due to discovering a serious error?
Unfortunately I still have not been able to locate that script table... where is it?releasenote for 6.37rc10 says: snmp - added script table which executes script and returns it's output on get request;
Me too, where is it?Unfortunately I still have not been able to locate that script table... where is it?releasenote for 6.37rc10 says: snmp - added script table which executes script and returns it's output on get request;
four years later and BGP4 MIBs are still missing in ROSI hope that bgp monitoring with snmp will be implemented soon.
bumpThread created at Wed May 22, 2013 7:14 am
They are aware but they don't care
Still, SNMP monitoring of BGP parameters (peer up, number of prefixes received, number of active routes to that peer) would be welcome, e.g. for graphing.
/routing bgp peer print count-only where established
/routing ospf neighbor print count-only
Show me where observium shows peer state with snmp data from mikrotik ?Agreed as well. Also, http://www.observium.org/wiki/Main_Page is a fantastic tool for usage/port/session status etc. monitoring.
Observium Donnot suppport mikrotik For bgpShow me where observium shows peer state with snmp data from mikrotik ?Agreed as well. Also, http://www.observium.org/wiki/Main_Page is a fantastic tool for usage/port/session status etc. monitoring.