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."