Community discussions

MikroTik App
 
jaapjolman
just joined
Topic Author
Posts: 8
Joined: Mon Jul 04, 2016 9:46 pm

feature: show ospf and bgp on snmp

Fri Dec 16, 2016 3:18 pm

dear mikrotik,

would it be possible to list ospf and bgp when.i do an snmp request using observium or librenms, as right now it does not list anything, vyatta, edgeos, quagga, cisco all show up but mikrotik does not show. i remember that it worked fine till version 6 was released then it stopped working for some reason.

greetings,
jaap
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7042
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: feature: show ospf and bgp on snmp

Fri Dec 16, 2016 3:26 pm

You mean OSPF, BGP routes or OSPF,BGP neighbor/peer status?

SNMP support for OSPF and BGP peer status will be added in ROSv7.

Currently BGP routes cannot be monitored over SNMP because it can cause slowdowns and route crash.
 
jaapjolman
just joined
Topic Author
Posts: 8
Joined: Mon Jul 04, 2016 9:46 pm

Re: feature: show ospf and bgp on snmp

Fri Dec 16, 2016 6:19 pm

aah is that the same as for OSFP? a friend of mine mentioned to me that version 7 is made of unoptanium, any hints as when to expect this magical version, would it be i like a few months or a few years? would be nice to know when it would show up
 
User avatar
Murmaider
Member Candidate
Member Candidate
Posts: 126
Joined: Fri Oct 30, 2015 10:10 am

Re: feature: show ospf and bgp on snmp

Fri Dec 16, 2016 8:09 pm

You might be able to script it for Observium to monitor your mikrotik through the API.

We use Zabbix for monitoring, so for BGP monitoring we have a script with connects to the mikrotik API and returns information which zabbix can monitor.
For example:
# ./bgpcheck.php exabgp uptime
3w4d12h54m53s
# ./bgpcheck.php peer1 uptimeseconds
2206497
# ./bgpcheck.php peer1 status
established
We then create an alert on say the status of a peer connection to notify us if the status is not "established"

It shouldn't be to difficult to do the same for observium.
 
jaapjolman
just joined
Topic Author
Posts: 8
Joined: Mon Jul 04, 2016 9:46 pm

Re: feature: show ospf and bgp on snmp

Fri Dec 16, 2016 10:50 pm

That could work maybe, thanks for the tip
 
tricksol
newbie
Posts: 29
Joined: Thu Sep 03, 2015 3:55 pm

Re: feature: show ospf and bgp on snmp

Mon Jul 31, 2017 3:03 am

[quote="Murmaider"]You might be able to script it for Observium to monitor your mikrotik through the API.

We use Zabbix for monitoring, so for BGP monitoring we have a script with connects to the mikrotik API and returns information which zabbix can monitor.
For example:
# ./bgpcheck.php exabgp uptime
3w4d12h54m53s
# ./bgpcheck.php peer1 uptimeseconds
2206497
# ./bgpcheck.php peer1 status
established
Could you post an example of the php file?
 
derrickh
just joined
Posts: 3
Joined: Wed Jun 06, 2007 6:46 pm

Re: feature: show ospf and bgp on snmp

Mon Feb 26, 2018 6:18 pm

I devised a "roundabout" way to monitor bgp peer state. I created a script that checks for all bgp peers and creates a "dummy" bridge interface for each. Then it will enable or disable the bridge state depending on the bgp peer state. You can then setup monitoring of the "bridge" interface which in essence reflects the state of the BGP peer.
You can decide how frequently you would want to run the script. You can also remove the ":log" lines - I added it while creating for debugging purposes as I don't create scripts very often.
Perhaps someone could streamline or suggest edits.
You can add this to a schedule to run as often as you want.

Code: Select all

:global peername;
:global state;
/routing bgp peer
:foreach peer in=[find] do={
:set $peername [get $peer name];
:set $state [get $peer state];
:set $bridge "bgp_status-$peername";
:log info "bridge name = $bridge";
:if ([/interface find name=$bridge] = "") do={/interface bridge add name=$bridge disabled=no};
:if ($state!="established") do={/interface bridge set [find name=$bridge] disabled=yes} else={/interface bridge set [find name=$bridge] disabled=no};
}
:log info "Peer Name = $peername Status: $state bridge name=bgp_status-$peername"
 
wsftech
newbie
Posts: 31
Joined: Wed Jun 10, 2015 12:19 am

Re: feature: show ospf and bgp on snmp

Thu Jun 21, 2018 3:24 am

Derrick, I was thinking about extending the idea of the virtual interfaces to OSPF. Doing something like monitoring adjacency count, and downing the bridge using a timer (for detecting flapping). Have you tried this?
 
zentavr
newbie
Posts: 49
Joined: Tue Nov 05, 2013 2:11 pm

Re: feature: show ospf and bgp on snmp

Tue Jul 03, 2018 2:59 am

I have implemented the code for BGP and RADIUS monitoring in Python.
You can find the details in this topic.
 
User avatar
j2sw
Member Candidate
Member Candidate
Posts: 131
Joined: Mon Sep 04, 2006 5:42 am
Location: Indiana
Contact:

Re: feature: show ospf and bgp on snmp

Mon Jun 03, 2019 11:41 pm

We still need this.
 
sarada
just joined
Posts: 9
Joined: Mon Mar 12, 2018 2:26 pm
Location: Hungary

Re: feature: show ospf and bgp on snmp

Sun Mar 22, 2020 11:33 am

You mean OSPF, BGP routes or OSPF,BGP neighbor/peer status?

SNMP support for OSPF and BGP peer status will be added in ROSv7.

Currently BGP routes cannot be monitored over SNMP because it can cause slowdowns and route crash.

Dear mrz,

Will this feature be included in the next beta release?
 
geebs
Frequent Visitor
Frequent Visitor
Posts: 89
Joined: Tue Jan 04, 2005 3:22 am
Location: Melbourne, Australia.

Re: feature: show ospf and bgp on snmp

Fri May 21, 2021 10:17 am

I think this is related, I run Observium to monitor some Mikrotiks (CCR1036's), and I do not get any routing information.

Am I running into this thread issue?

Observium documents state this, just wanted to check with Mikrotik before I log a fault with the software.

Mikrotik RouterOS
CPU and Memory statistics are available via HOST-RESOURCES-MIB.
MIKROTIK-MIB is not yet supported. Sadly BGP4-MIB is not currently supported by RouterOS.
https://imgur.com/b85uaql


EDIT:
You mean OSPF, BGP routes or OSPF,BGP neighbor/peer status?

SNMP support for OSPF and BGP peer status will be added in ROSv7.

Currently BGP routes cannot be monitored over SNMP because it can cause slowdowns and route crash.
Ok just read this. I think the answer is yes.

Can we get just peer status ?
 
wintech2003
just joined
Posts: 10
Joined: Fri Jun 09, 2006 6:56 pm

Re: feature: show ospf and bgp on snmp

Sat Sep 24, 2022 10:47 am

I see a white box for "BGP and OSPF SNMP monitoring" in v7.7 testing, maybe this means the future is starting to get implemented?

https://help.mikrotik.com/docs/display/ ... l+Overview
 
CyberDaeng
newbie
Posts: 31
Joined: Wed Dec 18, 2019 12:10 pm
Location: Jakarta, Indonesia
Contact:

Re: feature: show ospf and bgp on snmp

Sat Feb 24, 2024 10:16 am

You mean OSPF, BGP routes or OSPF,BGP neighbor/peer status?

SNMP support for OSPF and BGP peer status will be added in ROSv7.

Currently BGP routes cannot be monitored over SNMP because it can cause slowdowns and route crash.
Hi, is this works already in V7.13? Cause I still dont see any BGP Peer status or info in Obervium so far.
 
elipticnet
just joined
Posts: 1
Joined: Tue Mar 26, 2024 7:35 pm

Re: feature: show ospf and bgp on snmp

Tue Mar 26, 2024 7:38 pm

Hello everyone.
I had the same problem with two mikrotik:
  • hEX lite (mipsbe) and
    hAP lite (smips).
I was able to solve it by upgrading my mikrotik to version 7.15beta8

Who is online

Users browsing this forum: 4l4R1, Bing [Bot], Renfrew and 73 guests