Hello, a) I'm trying to monitor bird via SNMP so I can put it into Nagios. I want alerts to go off when a routing protocol session goes down, or if I am receiving not an defined number of routes. Any ideas? b) With the aim of achieving a) I am trying to write something automatic using birdc: Basically I'm trying run birdc from a program. The program will type commands into birdc, then act on the information. Here is my problem. You can recreate it by doing "birdc > file" and then examining file afterwards. Here's what I got: " BIRD 1.1.4 ready. bird> show protocols bird> ^M^[[Kname proto table state since info bgp_export Static master up Oct18 direct1 Direct master up Oct18 kernel1 Kernel master up Oct18 device1 Device master up Oct18 ebgp BGP master up Nov13 Established bogons Static master down Nov12 rip1 RIP master up Nov12 ibgp BGP master up Nov16 Established bird> exit " What's with the bird> ^M^[[K bit? I'm guessing it brings it back to the beginning of the line. Why does it do this? David
On Tue, Nov 17, 2009 at 05:46:53PM +0000, David J Craigon wrote:
Hello,
a) I'm trying to monitor bird via SNMP so I can put it into Nagios. I want alerts to go off when a routing protocol session goes down, or if I am receiving not an defined number of routes. Any ideas?
There is no support for such triggers yet, therefore you have to periodically monitor BIRD status using control commands, as you suggested. Sessions up/down events can be logged and can be extracted by some log monitoring tools.
b) With the aim of achieving a) I am trying to write something automatic using birdc:
Basically I'm trying run birdc from a program. The program will type commands into birdc, then act on the information. ... What's with the bird> ^M^[[K bit? I'm guessing it brings it back to the beginning of the line. Why does it do this?
birdc uses ncurses and readline library, and there are some control sequences sent by these libraries. I would suggest to use bird control socket directly and not to use birdc. The protocol is almost the same as the text output. See http://bird.network.cz/?get_doc&f=prog-2.html#ss2.8 and birdc code. -- 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 (2)
-
David J Craigon -
Ondrej Zajicek