Hello, i'm using bird as BGP/BFD client and I'd like to exec some command when something happens in bird. Like up/down script or something like that. Is there something close to that or another notification mechanism that exists ? Thanks ++ jerome
Hello, there is no such mechanism in current BIRD, your best option is probably hooking on logs and parsing them. We're prototyping a machine-friendly interface which should include, in some later versions, also subscribing to various notifications. Maria On 2023-12-12 16:19, Jérôme Loyet wrote:
Hello,
i'm using bird as BGP/BFD client and I'd like to exec some command when something happens in bird. Like up/down script or something like that.
Is there something close to that or another notification mechanism that exists ?
Thanks ++ jerome
-- Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, z.s.p.o.
Hello, Depending on the type of events needed, besides logs or active monitoring with birdc, one can also do things like exporting routes to some kernel table and monitoring them using netlink. Or setup a "monitoring" bgp (or other protocol) sessions with something like exabgp. Regards, Alexander On Tue, Dec 12, 2023 at 5:25 PM Maria Matejka via Bird-users <bird-users@network.cz> wrote:
Hello,
there is no such mechanism in current BIRD, your best option is probably hooking on logs and parsing them.
We're prototyping a machine-friendly interface which should include, in some later versions, also subscribing to various notifications.
Maria
On 2023-12-12 16:19, Jérôme Loyet wrote:
Hello,
i'm using bird as BGP/BFD client and I'd like to exec some command when something happens in bird. Like up/down script or something like that.
Is there something close to that or another notification mechanism that exists ?
Thanks ++ jerome
-- Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, z.s.p.o.
"also subscribing to various notifications." Are we talking about gRPC? If no, maybe some external tool running in same host of bird could use this "machine-friendly interface" to get it from bird and supply those data as gRPC? gNMI is on the table in some way? -- Douglas Fernando Fischer Engº de Controle e Automação
the machine-friendly interface will be a YANG-defined API encoded in CBOR gRPC and gNMI are no-go because of HTTP/2; won't go that direction; if there is such a need, a separate (standalone) daemon may be created to handle translations between BIRD API and gRPC / gNMI but it isn't in our plans; it can be quite easy to do it though; regarding telemetry, it should work well but i would not expect much from such a connection for controlling though – we are keeping our model of daemon only reading config, not writing it Maria On 2023-12-14 13:19, Douglas Fischer wrote:
"also subscribing to various notifications." Are we talking about gRPC? If no, maybe some external tool running in same host of bird could use this "machine-friendly interface" to get it from bird and supply those data as gRPC?
gNMI is on the table in some way?
-- Douglas Fernando Fischer Engº de Controle e Automação
-- Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, z.s.p.o.
Well... If it will be really yang modeled, sounds "not that hard" for an external daemon doing that translation. Thinking of it as Kubernetes way, feels an excelente opportunity to a container-based neighbor doing that job. O even maybe some lib to the well stablished telemetry local colector like datadog, opentelemetry, etc. To me, this is good news! Thank you all the involved! And an extra curiosity: Is BMP related to this "machine-friendly interface"? Em qui., 14 de dez. de 2023 às 09:45, Maria Matejka <maria.matejka@nic.cz> escreveu:
the machine-friendly interface will be a YANG-defined API encoded in CBOR
gRPC and gNMI are no-go because of HTTP/2; won't go that direction; if there is such a need, a separate (standalone) daemon may be created to handle translations between BIRD API and gRPC / gNMI but it isn't in our plans; it can be quite easy to do it though; regarding telemetry, it should work well but i would not expect much from such a connection for controlling though – we are keeping our model of daemon only reading config, not writing it
Maria
On 2023-12-14 13:19, Douglas Fischer wrote:
"also subscribing to various notifications." Are we talking about gRPC? If no, maybe some external tool running in same host of bird could use this "machine-friendly interface" to get it from bird and supply those data as gRPC?
gNMI is on the table in some way?
-- Douglas Fernando Fischer Engº de Controle e Automação
-- Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, z.s.p.o.
-- Douglas Fernando Fischer Engº de Controle e Automação
On 2023-12-14 14:17, Douglas Fischer wrote:
Well... If it will be really yang modeled, sounds "not that hard" for an external daemon doing that translation. Not that hard on first sight, anyway with the current state of BGP YANG drafts, we may very easily get forced to divert from the IETF YANGs massively due to semantic (!) reasons. And then … good luck. To me, this is good news! Thank you all the involved!
Actually, this is a collab between BIRD and Alice-LG, so many thanks go also to Annika Hannig.
And an extra curiosity: Is BMP related to this "machine-friendly interface"?
No, it isn't. Some internal parts may be similar and we checked some rough edges when merging BMP, but this API is a completely different (and much more massive) story. Maria -- Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, z.s.p.o.
participants (4)
-
Alexander Zubkov -
Douglas Fischer -
Jérôme Loyet -
Maria Matejka