Hi list, I was wondering if there's a sane method to keep a realtime eye on OSPF. More specifically, getting notifications for link/state/topology/etc changes. So far all I could think of is using birdc(6) every x seconds/minutes and comparing the output with the previous run to detect changes. Possibly the (debug) log could be of service here as well, but have not yet looked into that in detail. Any pointers would be welcome. Regards, Ruben Laban
On Thu, Sep 08, 2011 at 09:52:02AM +0200, Ruben Laban wrote:
Hi list,
I was wondering if there's a sane method to keep a realtime eye on OSPF. More specifically, getting notifications for link/state/topology/etc changes. So far all I could think of is using birdc(6) every x seconds/minutes and comparing the output with the previous run to detect changes.
There is no dedicated notification channel. The simplest thing is to get output of 'show ospf state' every x seconds. Or if you want, you could enable debug events logging and use routing the table recalculation message as a trigger for 'show ospf state' (but that seems unnecessary for me). For monitoring, i have a script that logs the state, sorts that appropriately to hide irrelevant changes, compares with the previous one and possibly sent the diff (attached, just a quick hack). I have also some scripts that took 'show ospf state' output and expected network description and converts that to the SVG image with reachable, broken and unreachable links differentiated by color, but it is not really finished. -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
On Friday 09 September 2011 at 12:52 (CET), Ondrej Zajicek wrote:
On Thu, Sep 08, 2011 at 09:52:02AM +0200, Ruben Laban wrote:
Hi list,
I was wondering if there's a sane method to keep a realtime eye on OSPF. More specifically, getting notifications for link/state/topology/etc changes. So far all I could think of is using birdc(6) every x seconds/minutes and comparing the output with the previous run to detect changes.
There is no dedicated notification channel. The simplest thing is to get output of 'show ospf state' every x seconds. Or if you want, you could enable debug events logging and use routing the table recalculation message as a trigger for 'show ospf state' (but that seems unnecessary for me).
That's basically what I had thought of myself as well. Glad I didn't overlook any other obvious methods ;-)
For monitoring, i have a script that logs the state, sorts that appropriately to hide irrelevant changes, compares with the previous one and possibly sent the diff (attached, just a quick hack).
This script could use some polishing indeed. But it's a nice start.
I have also some scripts that took 'show ospf state' output and expected network description and converts that to the SVG image with reachable, broken and unreachable links differentiated by color, but it is not really finished.
I'm currently working on something similar: a perl script that also parses 'show ospf state' and uses graphviz/neato to turn it into a nice diagram. Annotating different kinds of links (vlan, tunnel, healty, broken, etc) is still on my todo list as well. What do you use to generate the SVG? As of all layout engines I've tried, none really manages to create clean graphs for our OSPF topology (currently about 15-20 nodes). Regards, Ruben Laban
how do you solve the issue of graphviz neato generating a new graph everytime, i have above 100 routers in my network and i cant seem to get a stable graph i.e nodes in the same position. I too would be interested in the SVG solution if the mentioned problem is solved with it. by the way im not using bird. but would like to use bird to generate such graphs. [ realtime link up/down updates ]. On Fri, Sep 9, 2011 at 5:18 PM, Ruben Laban <r.laban+lists@ism.nl> wrote:
On Friday 09 September 2011 at 12:52 (CET), Ondrej Zajicek wrote:
On Thu, Sep 08, 2011 at 09:52:02AM +0200, Ruben Laban wrote:
Hi list,
I was wondering if there's a sane method to keep a realtime eye on OSPF. More specifically, getting notifications for link/state/topology/etc changes. So far all I could think of is using birdc(6) every x seconds/minutes and comparing the output with the previous run to detect changes.
There is no dedicated notification channel. The simplest thing is to get output of 'show ospf state' every x seconds. Or if you want, you could enable debug events logging and use routing the table recalculation message as a trigger for 'show ospf state' (but that seems unnecessary for me).
That's basically what I had thought of myself as well. Glad I didn't overlook any other obvious methods ;-)
For monitoring, i have a script that logs the state, sorts that appropriately to hide irrelevant changes, compares with the previous one and possibly sent the diff (attached, just a quick hack).
This script could use some polishing indeed. But it's a nice start.
I have also some scripts that took 'show ospf state' output and expected network description and converts that to the SVG image with reachable, broken and unreachable links differentiated by color, but it is not really finished.
I'm currently working on something similar: a perl script that also parses 'show ospf state' and uses graphviz/neato to turn it into a nice diagram. Annotating different kinds of links (vlan, tunnel, healty, broken, etc) is still on my todo list as well. What do you use to generate the SVG? As of all layout engines I've tried, none really manages to create clean graphs for our OSPF topology (currently about 15-20 nodes).
Regards, Ruben Laban
-- Thanx and regd's. Allan. http://www.in2dwok.com
On Friday 09 September 2011 at 14:19 (CET), Allan Pinto wrote:
how do you solve the issue of graphviz neato generating a new graph everytime, i have above 100 routers in my network and i cant seem to get a stable graph i.e nodes in the same position. I too would be interested in the SVG solution if the mentioned problem is solved with it. by the way im not using bird. but would like to use bird to generate such graphs. [ realtime link up/down updates ].
Whenever the topology changes, the graph changes (drastically). When topology doesn't change, neither does the graph. I've been meaning to look into clusters to have at least a bit grouping based on location. Regards, Ruben Laban
On Fri, Sep 09, 2011 at 01:48:59PM +0200, Ruben Laban wrote:
I have also some scripts that took 'show ospf state' output and expected network description and converts that to the SVG image with reachable, broken and unreachable links differentiated by color, but it is not really finished.
I'm currently working on something similar: a perl script that also parses 'show ospf state' and uses graphviz/neato to turn it into a nice diagram. Annotating different kinds of links (vlan, tunnel, healty, broken, etc) is still on my todo list as well. What do you use to generate the SVG? As of all layout engines I've tried, none really manages to create clean graphs for our OSPF topology (currently about 15-20 nodes).
I experimented with graphviz and cannot get any non-ugly results from that (and there is mentioned problem with stability of the result). Perhaps if the source graph will be strongly annotated (like position hints and edge length hints), it would produce better results, i don't know. I finally settled with positioning nodes by hand and keeping their coordinates as annotations, then SVG is generated by a simple awk script. It would be nice to be able to position nodes interactively by some Javascript/svg webapp, but web development is not my piece of cake. Usually just the grid-fitting is enough to draw nicely looking graphs. The script (and some example) data is attached. You could try it. -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
participants (3)
-
Allan Pinto -
Ondrej Zajicek -
Ruben Laban