logging via udp

Alexander Zubkov green at qrator.net
Wed Dec 18 09:14:43 CET 2019


Hello,

Made some dirty patch for myself to allow bird to send logs via udp.
But it may be useful not only for me, so posting it here. It could be
useful when server experiencing high IO-load. As syslog and file
operations in bird are blocking, it can be blocked on writing to it
for indefinite time, which could lead to various problems like
protocol timeouts. So udp logging comes in handy here. The tradeoff is
that we can miss some logs if they are not processed in time.
You can specify udp log destination like that:
log udp [host IP|"hostname"] [port NUMBER|"portname"] ...
By default it uses destination ip 127.0.0.1 and port 514.
There are some constraints like not much error handling. And this
destination replaces file destination, i.e. you can not use those
simultaneously and it may leak descriptors and some memory probably if
both are specified. It also makes a new socket every time
configuration is reloaded even if there is no change in options, but
this is not a great deal.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bird-log-udp-1.patch
Type: text/x-patch
Size: 3494 bytes
Desc: not available
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20191218/8c8aa8ef/attachment.bin>


More information about the Bird-users mailing list