Community discussions

MikroTik App
 
directlogic
newbie
Topic Author
Posts: 40
Joined: Wed Aug 19, 2009 12:29 pm

MIkrotik BGP Monitoring

Wed May 22, 2013 8:14 am

Dear All,

I am using BGP with 2-3 peer with RB1100AHx2. I want to monitor BGP session. Is it possible to monitor with nagios or grate graphs with cacti so the we can keep log of BGP up/down.


Thanks,
Direct_Logic
 
User avatar
omega-00
Forum Guru
Forum Guru
Posts: 1167
Joined: Sat Jun 06, 2009 4:54 am
Location: Australia
Contact:

Re: MIkrotik BGP Monitoring

Thu May 23, 2013 3:29 am

You could do this via SNMP if the BGP tables you're receiving aren't full tables (full tables and SNMP output don't work very nicely together due to the amount of data required to be sent).

Alternatively via the API or ssh if you're creating a custom probe.
 
directlogic
newbie
Topic Author
Posts: 40
Joined: Wed Aug 19, 2009 12:29 pm

Re: MIkrotik BGP Monitoring

Thu May 23, 2013 8:04 am

Thx for reply .

But i am unable to find any SNMP OID to get BGP state. Could anybody help in this.


Thanks
Direct_Logic
 
zakai
newbie
Posts: 26
Joined: Thu Apr 18, 2013 4:04 pm

Re: MIkrotik BGP Monitoring

Thu May 23, 2013 2:36 pm

But i am unable to find any SNMP OID to get BGP state. Could anybody help in this.
there are 3 MIBs for BGP: Some useful OIDs (there are a whole lot more objects and details in the RFCs):
  • - 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>
  • - peer last error: .1.3.6.1.2.1.15.3.1.14.<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.

Hope this helps,
Cheers!
 
User avatar
mandrade
Member Candidate
Member Candidate
Posts: 106
Joined: Fri Sep 08, 2006 12:35 pm
Location: Brazil
Contact:

Re: MIkrotik BGP Monitoring

Fri May 24, 2013 11:13 pm

But i am unable to find any SNMP OID to get BGP state. Could anybody help in this.
there are 3 MIBs for BGP: Some useful OIDs (there are a whole lot more objects and details in the RFCs):
  • - 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>
  • - peer last error: .1.3.6.1.2.1.15.3.1.14.<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.

Hope this helps,
Cheers!


On CCR-1026 running ROS 6.0 FIANL, returns nothing to it... ideas???

BR
 
zakai
newbie
Posts: 26
Joined: Thu Apr 18, 2013 4:04 pm

Re: MIkrotik BGP Monitoring

Mon May 27, 2013 9:39 am

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:
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
Maybe a MikroTik official can shed some light regarding their plans to support the RFC4273 in the future, if any.
 
User avatar
mandrade
Member Candidate
Member Candidate
Posts: 106
Joined: Fri Sep 08, 2006 12:35 pm
Location: Brazil
Contact:

Re: MIkrotik BGP Monitoring

Mon May 27, 2013 2:16 pm

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:
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
Maybe a MikroTik official can shed some light regarding their plans to support the RFC4273 in the future, if any.

Hey MikroTik Team any plan to support RFC4273 MIBs????

BR
 
Cris@usai.net
newbie
Posts: 42
Joined: Fri Jun 17, 2005 8:25 pm

Re: MIkrotik BGP Monitoring

Wed Oct 09, 2013 7:31 pm

Agreed on all accounts. I can monitor my bgp sessions on all the Cisco routers I have.. would like to do the same on the
Mikrotik routers.

BGP peer state would be very helpful .
 
mspeed
just joined
Posts: 23
Joined: Fri Feb 15, 2013 9:22 pm

Re: MIkrotik BGP Monitoring

Thu Oct 10, 2013 1:17 am

Agreed as well. Also, http://www.observium.org/wiki/Main_Page is a fantastic tool for usage/port/session status etc. monitoring.
 
Ascii
newbie
Posts: 32
Joined: Sat Apr 25, 2009 11:15 pm
Location: Quito, Ecuador

Re: MIkrotik BGP Monitoring

Thu Jan 23, 2014 8:53 am

any word from mikrotik?
 
gregsowell
Member Candidate
Member Candidate
Posts: 128
Joined: Tue Aug 28, 2007 1:24 am
Contact:

Re: MIkrotik BGP Monitoring

Sat Jan 25, 2014 7:00 pm

If you guys could have a wishlist for BGP monitoring, what would it be?
I'd like:
Peer State
Peer # of routes received
Peer # of routes advertised

3 very simple, but useful things.
 
robertpenz
Member Candidate
Member Candidate
Posts: 104
Joined: Mon Oct 10, 2011 8:41 am

Re: MIkrotik BGP Monitoring

Sun Jan 26, 2014 6:38 pm

These 3 would be also my favorites .
 
meetriks
just joined
Posts: 18
Joined: Sun Apr 27, 2014 9:41 pm

Re: MIkrotik BGP Monitoring

Sun Jul 06, 2014 7:21 pm

I hope that bgp monitoring with snmp will be implemented soon.
 
AlexS
Member Candidate
Member Candidate
Posts: 282
Joined: Thu Oct 10, 2013 7:21 am

Re: MIkrotik BGP Monitoring

Wed Sep 17, 2014 8:04 am

Bringing up an old thread.

Does any one know if this has been implemented ?
 
User avatar
nz_monkey
Forum Guru
Forum Guru
Posts: 2182
Joined: Mon Jan 14, 2008 1:53 pm
Location: Over the Rainbow
Contact:

Re: MIkrotik BGP Monitoring

Thu Sep 18, 2014 10:13 am

I have been told by support that this will be improved in RouterOS v7
 
lz1dsb
Member Candidate
Member Candidate
Posts: 226
Joined: Wed Aug 07, 2013 11:48 am

Re: MIkrotik BGP Monitoring

Thu Sep 18, 2014 2:18 pm

I have been told by support that this will be improved in RouterOS v7
A lot of interesting features and improvements are expected in v7... I wonder when it will be released...
 
pincio
just joined
Posts: 7
Joined: Thu Aug 04, 2016 9:17 pm

Re: MIkrotik BGP Monitoring

Fri Aug 05, 2016 10:09 am

Hi,

if you looking for a solution to bgp peer in nagios yet i have write a plugin.

https://github.com/pincioc/check_bgp_mikrotik_nagios
 
User avatar
hknet
Member Candidate
Member Candidate
Posts: 128
Joined: Sun Jul 17, 2016 6:05 pm
Location: Vienna, Austria
Contact:

Re: MIkrotik BGP Monitoring

Sun Aug 07, 2016 8:25 pm

Hey pincio,
thanks for the API idea, though if possible I'd ask you to go with https://github.com/efaden/MikroTikPerl as the api library.
(ssl support and so on)

based on your script I was able to check the route-count in a specific vrf:
my @cmd = ("/ip/route/print","=count-only=","?routing-mark=". $ng->get('vrf'));
the issue I'm now stuck at is: where does winbox get the prefix-count per peer from, I see no such value via
/routing bgp peer print
any hint is greatly appreciated.

regards
hk
 
User avatar
Cha0s
Forum Guru
Forum Guru
Posts: 1160
Joined: Tue Oct 11, 2005 4:53 pm

Re: MIkrotik BGP Monitoring

Sun Aug 07, 2016 9:10 pm

Try
/routing bgp peer print status
 
User avatar
hknet
Member Candidate
Member Candidate
Posts: 128
Joined: Sun Jul 17, 2016 6:05 pm
Location: Vienna, Austria
Contact:

Re: MIkrotik BGP Monitoring

Sun Aug 07, 2016 10:28 pm

Thanks Cha0s,
this definitely did the trick!

finally the prefix-count can be checked for a remote peer IP like this:
my @cmd = ("/routing/bgp/peer/print","=status=","?remote-address=". $ng->get('peer'),"=.proplist=prefix-count");
regards
hk
 
pincio
just joined
Posts: 7
Joined: Thu Aug 04, 2016 9:17 pm

Re: MIkrotik BGP Monitoring

Mon Aug 08, 2016 2:05 pm

Thx hk for your contribute,

i have update the code with SSL and prefix count value output.
 
User avatar
hknet
Member Candidate
Member Candidate
Posts: 128
Joined: Sun Jul 17, 2016 6:05 pm
Location: Vienna, Austria
Contact:

Re: MIkrotik BGP Monitoring

Mon Aug 08, 2016 3:07 pm

Dear 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

and you make only one api call.
Finally 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).

regards
hk
 
pincio
just joined
Posts: 7
Joined: Thu Aug 04, 2016 9:17 pm

Re: MIkrotik BGP Monitoring

Mon Aug 08, 2016 5:32 pm

Dear 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
Yes, of course. Now i use your command and clean the code from useless cicle
Finally 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 have add -T argument in the format min:MAX
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: MIkrotik BGP Monitoring

Mon Aug 08, 2016 6:35 pm

When I installed MiktoTik Dude I hoped that there would be a way to show the peer prefix-count in a map just
like it can show the current link bitrate. But although Dude can use the same API, it does not appear that it
can do this.
(I would like to see the prefix counts in each direction along a link, and maybe when hovering it show a top-n
list of largest prefixed routed along that link)
 
User avatar
hknet
Member Candidate
Member Candidate
Posts: 128
Joined: Sun Jul 17, 2016 6:05 pm
Location: Vienna, Austria
Contact:

Re: MIkrotik BGP Monitoring

Mon Aug 08, 2016 7:03 pm

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
 
User avatar
Cha0s
Forum Guru
Forum Guru
Posts: 1160
Joined: Tue Oct 11, 2005 4:53 pm

Re: MIkrotik BGP Monitoring

Mon Aug 08, 2016 7:14 pm

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
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.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: MIkrotik BGP Monitoring

Mon Aug 08, 2016 7:19 pm

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 :)
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-n
prefixes (sorted downward by size), maybe top-25 or so.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: MIkrotik BGP Monitoring

Mon Aug 08, 2016 7:22 pm

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.
But that means you need to establish a peer relation from your monitoring system to all the routers, right?
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)
 
User avatar
hknet
Member Candidate
Member Candidate
Posts: 128
Joined: Sun Jul 17, 2016 6:05 pm
Location: Vienna, Austria
Contact:

Re: MIkrotik BGP Monitoring

Mon Aug 08, 2016 7:35 pm

Sounds in the end you'd monitor your routereflectors :-)
*scnr*
 
User avatar
Cha0s
Forum Guru
Forum Guru
Posts: 1160
Joined: Tue Oct 11, 2005 4:53 pm

Re: MIkrotik BGP Monitoring

Mon Aug 08, 2016 9:20 pm

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.
But that means you need to establish a peer relation from your monitoring system to all the routers, right?
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)
Since your network only has ~100 prefixes then the quagga approach is a bit overkill.
Prior to quagga I used SSH to fetch all received (active and inactive) for each link.

Maybe this project might help you better to extract BGP stats from your network.

https://github.com/Cha0sgr/BGP-Looking-Glass-NG
This is a BGP looking glass that can connect to MikroTik via SSH and fetch all BGP routes and present them in quagga/cisco format (sh ip bgp).

https://github.com/Cha0sgr/Live-BGP-Statistics
Then using this system you can collect all BGP prefixes and AS Paths from all your routers (registered on the looking glass above) and show them in a friendly/searchable format.

From the github page:
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
The Live BGP Map requires the WiND Project to work.
https://github.com/wind-project/wind


An alternative to adding all your routers to the Looking glass above (by allowing ssh access to them from the looking glass server) would be to set up a Quagga instance and set up a BGP peer with all your routers.
All your routers will send all prefixes to quagga and quagga will not send anything to any router (so quagga will not route anything to anyone).
Then you add the quagga instance to the Looking glass and it will get all routes from all routers which Live BGP Statistics will then process.
One caveat is that quagga will only receive active prefixes from each router and not the alternative routes/paths each router might have to some destinations.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: MIkrotik BGP Monitoring

Mon Aug 08, 2016 9:52 pm

What I currently use is SNMP to query the route tables from the routers. This shows me the currently
active routes. It is sufficient to look at a single router at a time. However, it would be neat to have a "map"
in Dude or a similar tool to have some kind of overview of the link situation and browse some detail.
It is a pity that Dude does not offer this as standard, it only shows bitrate but no insight in what traffic
that may be. As I use some communities and local-pref values to direct the traffic, it could be useful to
have this capability.
 
User avatar
nz_monkey
Forum Guru
Forum Guru
Posts: 2182
Joined: Mon Jan 14, 2008 1:53 pm
Location: Over the Rainbow
Contact:

Re: MIkrotik BGP Monitoring

Tue Aug 09, 2016 1:14 am

BGP4-MIB is whawhat is needed!

Oh and fixing the routing crash that happens when you SNMP poll a router
 
User avatar
hknet
Member Candidate
Member Candidate
Posts: 128
Joined: Sun Jul 17, 2016 6:05 pm
Location: Vienna, Austria
Contact:

Re: MIkrotik BGP Monitoring

Tue Aug 09, 2016 1:16 am

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 :)
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: MIkrotik BGP Monitoring

Tue Aug 09, 2016 10:35 am

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 :)
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?
 
User avatar
hknet
Member Candidate
Member Candidate
Posts: 128
Joined: Sun Jul 17, 2016 6:05 pm
Location: Vienna, Austria
Contact:

Re: MIkrotik BGP Monitoring

Tue Aug 09, 2016 11:13 pm

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?
releasenote for 6.37rc10 says: snmp - added script table which executes script and returns it's output on get request;

cheers,
hk
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: MIkrotik BGP Monitoring

Wed Aug 10, 2016 10:50 am

Very interesting! But I wonder how to set that... I have 6.37rc11 on a test system and I don't see anything in WebFig under SNMP or Scripts.
It would be nice to poll the BGP Peer status via SNMP, and also for other purposes like receiving counts of routes, ARP entries, etc.
It is still not possible to check the uptodate status of release candidate... funny.
 
leviton
just joined
Posts: 2
Joined: Wed Aug 17, 2016 8:58 pm

Re: MIkrotik BGP Monitoring

Wed Aug 17, 2016 9:01 pm

Thanks all!
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: MIkrotik BGP Monitoring

Sat Aug 20, 2016 6:00 pm

releasenote for 6.37rc10 says: snmp - added script table which executes script and returns it's output on get request;
Unfortunately I still have not been able to locate that script table... where is it?
 
User avatar
bajodel
Long time Member
Long time Member
Posts: 552
Joined: Sun Nov 24, 2013 8:30 am
Location: Italy

Re: MIkrotik BGP Monitoring

Tue Aug 23, 2016 8:14 pm

releasenote for 6.37rc10 says: snmp - added script table which executes script and returns it's output on get request;
Unfortunately I still have not been able to locate that script table... where is it?
Me too, where is it?
 
zentavr
Frequent Visitor
Frequent Visitor
Posts: 50
Joined: Tue Nov 05, 2013 2:11 pm

Re: MIkrotik BGP Monitoring

Tue Jul 03, 2018 2:43 am

I have implemented the code in Python 2.7.13 which fetch the BGP Counters via API.

SSL and plain API connections are supported. The code is available on Github or Bitbucket

The next BGP counters are being monitored:
* Remote AS
* Prefix Count
* Administrative status of the peer: enabled/disabled
* Peer connection uptime
* Peer connection state
* Comment :)
* Updates Sent
* Updates Received
* Withdrawn Sent
* Withdrawn Received

The next triggers are defined:
* (Info) BGP Remote AS Number had been changed
* (High) Peer is down
* (Warning) Peer lost 10% of its prefixes
* (Average) Peer lost 20% of its prefixes
* (High) Peer lost 30% of its prefixes
* (Warning) BGP Session was restarted
* (Disaster) No prefixes had been received

The next charts had been added:
* Accepted Prefixes
* Established Time
* BGP Updates per sec
* BGP Withdraws per sec

You are welcome to fork and pull requests.
 
raminmalek
Member Candidate
Member Candidate
Posts: 157
Joined: Sun Nov 02, 2008 5:51 pm

Re: MIkrotik BGP Monitoring

Thu Jul 12, 2018 5:27 pm

Have any solution For monitor Bgp session by cacti ???
 
User avatar
maznu
Member Candidate
Member Candidate
Posts: 207
Joined: Tue May 05, 2015 11:12 am
Location: 74, FR / SA48, UK
Contact:

Re: MIkrotik BGP Monitoring

Thu Jul 12, 2018 5:36 pm

For those of you using https://prometheus.io for monitoring, there are two options:

* https://gitea.faelix.net/FAELIX/ros2prom (requires Python, pipenv)
* https://github.com/nshttpd/mikrotik-exporter (which does not calculate bits-per-second on ports, for example)
 
raminmalek
Member Candidate
Member Candidate
Posts: 157
Joined: Sun Nov 02, 2008 5:51 pm

Re: MIkrotik BGP Monitoring

Fri Jul 13, 2018 2:35 pm

Thx but i have Cacti and prtg and observium server
 
schadom
Member Candidate
Member Candidate
Posts: 156
Joined: Sun Jun 25, 2017 2:47 am

Re: MIkrotik BGP Monitoring

Sat Jul 14, 2018 12:45 am

I hope that bgp monitoring with snmp will be implemented soon.
four years later and BGP4 MIBs are still missing in ROS :-(
 
schadom
Member Candidate
Member Candidate
Posts: 156
Joined: Sun Jun 25, 2017 2:47 am

Re: MIkrotik BGP Monitoring

Mon Sep 17, 2018 1:55 pm

Thread created at Wed May 22, 2013 7:14 am
bump
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1742
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: MIkrotik BGP Monitoring

Fri Sep 28, 2018 11:47 pm

This would be really nice to have ;-)
 
schadom
Member Candidate
Member Candidate
Posts: 156
Joined: Sun Jun 25, 2017 2:47 am

Re: MIkrotik BGP Monitoring

Mon Oct 22, 2018 4:14 pm

Any update on BGP4 SNMP MIBs?
 
patrick7
Member
Member
Posts: 351
Joined: Sat Jul 20, 2013 2:40 pm

Re: MIkrotik BGP Monitoring

Mon Oct 22, 2018 4:32 pm

They are aware but they don't care :lol:
 
schadom
Member Candidate
Member Candidate
Posts: 156
Joined: Sun Jun 25, 2017 2:47 am

Re: MIkrotik BGP Monitoring

Mon Oct 22, 2018 4:55 pm

They are aware but they don't care :lol:

According to their job listings page they are still looking for C/C++ and embedded systems devlopers in Latvia for over six months now! Frankly, to me it seems their development team is fully occupied with other stuff (ARM/NV2-mess, w60g, etc.) and they urgently need more manpower to be able to focus on the relevant stuff again (such as ROS core, the routing engine, BGP, OSPF and everything related).
 
patrick7
Member
Member
Posts: 351
Joined: Sat Jul 20, 2013 2:40 pm

Re: MIkrotik BGP Monitoring

Mon Oct 22, 2018 10:18 pm

Yea, the job offer is in Latvian, no word of english. They also require applicants to speak Latvian.
They probably think all good programmers are fluent in Latvian...
 
xhomanx
just joined
Posts: 3
Joined: Mon Oct 01, 2018 4:59 pm
Location: Kabul, Afghanistan
Contact:

BGP Configuration between MikroTik & Cisco router

Mon Oct 22, 2018 10:26 pm

Hello,
I need to know how to configure BGP between my MikroTik cloud core Router and Cisco
before I did BGP configuration on my Cyberoam 2500ing but now it's not established with my ISP so I want to try MikroTik to do BGP with my ISP.
here are the details of my ISP BGP they did in their cisco and need same configuration on mikrotik

neighbor 10.23.36.25 remote-as 12345
neighbor 10.23.36.25 description stream
neighbor 10.23.36.25 ebgp-multihop 6
neighbor 10.23.36.25 update-source Loopback51
neighbor 10.23.36.25 activate
neighbor 10.23.36.25 soft-reconfiguration inbound
neighbor 10.23.36.25 route-map STOPUPDATES out

so please help me in this and I seek for your help.
And type the commands or send me the screenshots in xhomanx@gmail.com
 
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: MIkrotik BGP Monitoring

Tue Oct 23, 2018 10:57 am

Also, please do not invade in a topic which is disccussing a specific issue and post your generic need for help. Start a new topic for that!
 
Jacentyd
just joined
Posts: 1
Joined: Sun Nov 04, 2018 6:45 pm

Re: MIkrotik BGP Monitoring

Sun Nov 04, 2018 6:52 pm

Is it possible to implement monitoring BGP sessions via SNMP? according to RFC ????
 
mutinsa
just joined
Posts: 24
Joined: Tue Feb 06, 2018 4:55 am
Location: Plettenberg Bay, South Africa
Contact:

Re: MIkrotik BGP Monitoring

Wed May 15, 2019 3:25 pm

+1.
 
madman22
just joined
Posts: 18
Joined: Fri Mar 23, 2018 4:28 pm

Re: MIkrotik BGP Monitoring

Sat May 18, 2019 1:13 am

I've used

https://github.com/rhicks/bgp-dashboard

for monitoring bgp, it works great!
 
pwuk
Frequent Visitor
Frequent Visitor
Posts: 51
Joined: Wed Aug 01, 2012 8:51 pm

Re: MIkrotik BGP Monitoring

Tue Jan 28, 2020 1:34 pm

Normally you can monitor BGP via SNMP walking 1.3.6.1.2.1.15.3.1.2, which returns the state (other oids are available)

Mikrotik doesn't implement this, which seems crazy. I typically peer mikrotik-cisco or mikrotik-juniper and monitor on the cisco/juniper end, which does work.

If you're peering mikrotik-mikrotik, you can sort of hack round it by monitoring for a specific known route

For example on this router
I have 172.30.249.0/24 advertised from 172.29.253.2
I have 172.29.120.0/24 advertised from 172.26.184.185

SNMP shows up as
ipCidrRouteProto.172.29.120.0.255.255.255.0.0.172.26.184.185 = INTEGER: bgp(14)
ipCidrRouteProto.172.30.249.0.255.255.255.0.0.172.29.253.2 = INTEGER: bgp(14)

If the peer drops between 172.29.253.2 and my router, that second line won't show up

However there's clearly other issues - if the route stops being advertised for whatever reason, or is advertised an alternate way, it will also fail.

The other option would be to write an SSH check, which would run something like

"ssh 172.26.127.21 routing bgp peer print terse"

And parse the output. I'm unaware of any nagios-style plugins that do that out of the box.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: MIkrotik BGP Monitoring

Tue Jan 28, 2020 1:49 pm

You can run a scheduled script on the router (found elsewhere on this forum) that monitors the configured BGP peers and sends an e-mail on state changes.
I run it every 15 minutes which is often enough for me to be alerted about links being down without being alerted for every router reboot or similar.

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.
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1742
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: MIkrotik BGP Monitoring

Tue Jan 28, 2020 1:58 pm

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.

I agree, I've been dying to get SNMP monitoring of BGP peers for a long time.
 
mada3k
Forum Veteran
Forum Veteran
Posts: 741
Joined: Mon Jul 13, 2015 10:53 am
Location: Sweden

Re: MIkrotik BGP Monitoring

Tue Jan 28, 2020 9:31 pm

We monitor BGP and OSPF status with NetXMS built in and SSH commands. We know that we always should have at a number of peers so we set a threshold for it.
/routing bgp peer print count-only where established
/routing ospf neighbor print count-only
 
AlexS
Member Candidate
Member Candidate
Posts: 282
Joined: Thu Oct 10, 2013 7:21 am

Re: MIkrotik BGP Monitoring

Mon May 25, 2020 2:49 pm

Wow still waiting on this !
 
method
newbie
Posts: 39
Joined: Fri Mar 25, 2005 3:29 pm

Re: MIkrotik BGP Monitoring

Wed Mar 17, 2021 11:42 am

Agreed as well. Also, http://www.observium.org/wiki/Main_Page is a fantastic tool for usage/port/session status etc. monitoring.
Show me where observium shows peer state with snmp data from mikrotik ?
 
VincentL
newbie
Posts: 34
Joined: Fri Feb 03, 2017 3:27 pm

Re: MIkrotik BGP Monitoring

Wed May 19, 2021 3:52 pm

Hello,

In 2021, 2016' Pincio's script is still working (https://github.com/pincioc/check_bgp_mikrotik_nagios)
But, with recent version of firmware, you have to use this API (https://github.com/candlerb/MikroTikPer ... b/newlogin) instead of those described (https://github.com/efaden/MikroTikPerl)

Vincent
 
raminmalek
Member Candidate
Member Candidate
Posts: 157
Joined: Sun Nov 02, 2008 5:51 pm

Re: MIkrotik BGP Monitoring

Thu May 27, 2021 6:55 pm

For See ip Route Count and bgp update and bgp session status any idea for cacti??? or other program prtg ?? for monitor bgp session on mikrotik ?
 
raminmalek
Member Candidate
Member Candidate
Posts: 157
Joined: Sun Nov 02, 2008 5:51 pm

Re: MIkrotik BGP Monitoring

Thu May 27, 2021 6:56 pm

Agreed as well. Also, http://www.observium.org/wiki/Main_Page is a fantastic tool for usage/port/session status etc. monitoring.
Show me where observium shows peer state with snmp data from mikrotik ?
Observium Donnot suppport mikrotik For bgp

Who is online

Users browsing this forum: No registered users and 3 guests