BIRD_EXPORTER(1)

✨ BIRD_EXPORTER(1) β€” the bird_exporter glow-up ✨

okay bestie, sit down, we're learning bird_exporter β€” it's the little exporter from bird_exporter's Manual that spills all of BIRD's routing-tea to Prometheus πŸ’…


πŸ¦‹ NAME πŸ¦‹

bird_exporter β€” a protocol state exporter for the BIRD routing daemon, made to be used with Prometheus. yes, that's literally the whole job. it watches protocols and tells Prometheus about their state. iconic behaviour fr fr.


🌸 SYNOPSIS 🌸

bird_exporter [OPTIONS]

πŸ’– DESCRIPTION πŸ’–

so bird_exporter is a metric exporter for the BIRD routing daemon, and its whole purpose in life is to feed Prometheus. periodt.

and here's the thing β€” because bird_exporter talks over the BIRD Unix socket(s), BIRD has to be installed on the same machine as bird_exporter. no remote friendships allowed, it's a same-host situationship. 🫢

also, the user who's actually executing bird_exporter needs read/write permission to access those BIRD Unix sockets. no perms, no metrics, and honestly? that's the vibe check failing. πŸ’€


✨ OPTIONS ✨

  • -bird.ipv4 β€” get protocols from bird (and heads up, this is not compatible with -bird.v2)
  • -bird.ipv6 β€” get protocols from bird6 (again, not compatible with -bird.v2)
  • -bird.socket /path/to/socket β€” the socket you use to communicate with the bird routing daemon
  • -bird.socket6 /path/to/socket β€” the socket you use to communicate with the bird6 routing daemon (and yep, not compatible with -bird.v2)
  • -bird.v2 β€” BIRD major version >= 2.0 (multi channel protocols, she's evolved πŸ’…)
  • -format.new β€” the new metric format (more convenient / more generic, we love her)
  • -proto.bgp β€” enables metrics for protocol BGP
  • -proto.direct β€” enables metrics for protocol Direct
  • -proto.kernel β€” enables metrics for protocol Kernel
  • -proto.ospf β€” enables metrics for protocol OSPF
  • -proto.static β€” enables metrics for protocol Static
  • -proto.babel β€” enables metrics for protocol Babel
  • -version β€” print version information
  • -web.listen-address [address]:port β€” the address on which to expose metrics and the web interface
  • -web.telemetry-path path β€” the path under which to expose metrics (default "/metrics", the classic πŸŽ€)

and now some lore 🧚: Version 2.0 of BIRD supports both IPv4 and IPv6 in a single daemon. since version 1.1 of bird_exporter, it can be used with BIRD 2.0+ by passing the -bird.v2 option. when you use that option, bird_exporter queries the same socket for both IPv4 and IPv6. in this mode the IP protocol is determined by the channel information, and the options -bird.ipv4, -bird.ipv6 and -bird.socket6 are ignored (sorry babes, they don't get a say 😭).


🌈 BIRD CONFIGURATION 🌈

to get meaningful uptime information, BIRD needs to be configured to use ISO-format timestamps. just drop this in:

timeformat protocol iso long;

that's it. that's the whole ritual. ✨


πŸ’œ METRIC FORMATS πŸ’œ

in version 1.0, a new metric format was introduced. and because backwards incompatibility is not the vibe, the new format is optional β€” you turn it on with the -format.new option.

the new format handles protocols more generically and allows for a better query structure. it also adheres more to the Prometheus metric naming best practices (she read the docs, she's a scholar πŸ‘‘).

in both formats, protocol specific metrics are prefixed with the protocol name (e.g. the OSPF running metric). iykyk.

πŸ“ OLD METRIC FORMAT EXAMPLE

bgp4_session_prefix_count_import{name="bgp1"} 600000
bgp6_session_prefix_count_import{name="bgp1"} 50000
ospfv3_running{name="ospf1"} 1

⭐ NEW METRIC FORMAT EXAMPLE

bird_protocol_prefix_import_count{name="bgp1",proto="BGP",ip_version="4"} 600000
bird_protocol_prefix_import_count{name="bgp1",proto="BGP",ip_version="6"} 50000
bird_ospfv3_running{name="ospf1"} 1

πŸ‘‘ AUTHOR πŸ‘‘

Daniel Czerwonk β€” daniel@dan-nrw.de


okay that's the whole page bestie, you ate that 🫢 this was bird_exporter, version 2018-06-20, from the bird_exporter manual. go forth and export your metrics, main character energy only πŸŒΈπŸ’…βœ¨

πŸ“¦ where this page comes from