Page 1 of 1

feature: show ospf and bgp on snmp

Posted: Fri Dec 16, 2016 3:18 pm
by jaapjolman
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

Re: feature: show ospf and bgp on snmp

Posted: Fri Dec 16, 2016 3:26 pm
by mrz
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.

Re: feature: show ospf and bgp on snmp

Posted: Fri Dec 16, 2016 6:19 pm
by jaapjolman
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

Re: feature: show ospf and bgp on snmp

Posted: Fri Dec 16, 2016 8:09 pm
by 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
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.

Re: feature: show ospf and bgp on snmp

Posted: Fri Dec 16, 2016 10:50 pm
by jaapjolman
That could work maybe, thanks for the tip

Re: feature: show ospf and bgp on snmp

Posted: Mon Jul 31, 2017 3:03 am
by tricksol
[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?

Re: feature: show ospf and bgp on snmp

Posted: Mon Feb 26, 2018 6:18 pm
by derrickh
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"

Re: feature: show ospf and bgp on snmp

Posted: Thu Jun 21, 2018 3:24 am
by wsftech
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?

Re: feature: show ospf and bgp on snmp

Posted: Tue Jul 03, 2018 2:59 am
by zentavr
I have implemented the code for BGP and RADIUS monitoring in Python.
You can find the details in this topic.

Re: feature: show ospf and bgp on snmp

Posted: Mon Jun 03, 2019 11:41 pm
by j2sw
We still need this.

Re: feature: show ospf and bgp on snmp

Posted: Sun Mar 22, 2020 11:33 am
by sarada
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?

Re: feature: show ospf and bgp on snmp

Posted: Fri May 21, 2021 10:17 am
by geebs
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 ?

Re: feature: show ospf and bgp on snmp

Posted: Sat Sep 24, 2022 10:47 am
by wintech2003
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

Re: feature: show ospf and bgp on snmp

Posted: Sat Feb 24, 2024 10:16 am
by CyberDaeng
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.

Re: feature: show ospf and bgp on snmp

Posted: Tue Mar 26, 2024 7:38 pm
by elipticnet
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