Files
ferrix/docs/content/docs/reference/metrics.md
T
Rayhaan JaufeerallyandClaude Opus 5.5 dc275f99d7
ci / check (push) Canceled after 0s
ci / docs (push) Canceled after 0s
ci / interop (push) Canceled after 0s
ci / fuzz (push) Canceled after 0s
Add a documentation website, built with Zola
The documentation moves from READMEs into a site in docs/: getting
started, a user guide, operations, a reference, and development pages,
written in the style of network vendors' documentation (docs/STYLE.md).
bin/bgp/README.md and docs/RFCs.md are folded into it.

- A theme of its own in the International Typographic Style, in blues,
  with self-hosted Inter and JetBrains Mono, search over Zola's index,
  dark mode, and no resources loaded from other hosts.
- Example configurations in docs/examples/, shown on the pages and
  checked with `bgp --check` in CI.
- A test that fails when a field of config.proto is missing from the
  configuration reference.
- A CI job that builds the site; Zola fails on broken links and anchors.
- A hardened systemd unit, tried under systemd with kernel routes on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 15:12:43 +02:00

3.9 KiB

+++ title = "Metrics Reference" description = "Describes the Prometheus metrics that Ferrix exports at /metricz, with their types and labels." weight = 4

[extra] nav = "Metrics" +++

Ferrix exports Prometheus metrics at /metricz on the HTTP interface. For alerting rules based on these metrics, see Alerting Rules.

Session Metrics

Metric Type Description
bgp_peer_up{peer} Gauge 1 if the session with the configured neighbor is established; 0 otherwise.
bgp_sessions_established Gauge Number of sessions in the Established state.
bgp_sessions_established_total Counter Number of sessions that reached the Established state.
bgp_messages_sent_total{type} Counter Number of BGP messages sent, by type: open, update, notification, keepalive, route_refresh.
bgp_messages_received_total{type} Counter Number of BGP messages received, by type.
bgp_update_errors_total{handling} Counter Number of errors in received UPDATE messages that did not reset the session (RFC 7606), by handling: treat-as-withdraw, attribute-discard.
bgp_connections_refused_total{reason} Counter Number of inbound connections closed without a session, by reason: not a configured peer, too many connections from the address, peer is held down.
bgp_connection_collisions_total{closed} Counter Number of connection collisions resolved, by the connection that was closed: new, existing.

Route Metrics

Metric Type Description
bgp_peer_routes{peer} Gauge Number of the neighbor's routes in the routing table.
bgp_peer_max_prefixes{peer} Gauge Prefix limit of the neighbor (import.max_prefixes), if configured.
bgp_prefix_limit_exceeded_total{peer} Counter Number of sessions torn down because the neighbor exceeded its prefix limit.
bgp_routes_rejected_total{peer,reason} Counter Number of routes rejected by the import policy, by neighbor and reason. For the reasons, see Import Policy.
bgp_routes_exported_total{change} Counter Number of learned routes advertised (announced) to or withdrawn (withdrawn) from neighbors.
bgp_local_routes Gauge Number of originated routes.

Routing Table Metrics

Metric Type Description
bgp_rib_routes Gauge Number of received routes, counted separately for each neighbor.
bgp_rib_prefixes Gauge Number of prefixes with at least one route.
bgp_rib_attribute_sets Gauge Number of distinct sets of path attributes stored.
bgp_rib_journal_entries Gauge Number of best path changes not yet processed by all consumers.

RPKI Metrics

Metric Type Description
bgp_rpki_vrps{family} Gauge Number of Validated ROA Payloads in use, by address family: ipv4, ipv6.
bgp_rpki_aspas Gauge Number of customer ASs with an ASPA in use.
bgp_rpki_updates_total Counter Number of times the VRPs or ASPAs changed.

Kernel Metrics

These metrics are exported if the kernel statement is configured.

Metric Type Description
bgp_kernel_routes Gauge Number of routes installed by Ferrix in the kernel.
bgp_kernel_routes_unresolved Gauge Number of prefixes whose active route is not installed because its next hop is unresolvable.
bgp_kernel_routes_refused Gauge Number of prefixes whose active route the kernel rejected.
bgp_kernel_route_changes_total{change} Counter Number of changes requested from the kernel, by kind: install, remove.
bgp_kernel_errors_total Counter Number of requests that the kernel rejected.

Build Metrics

Metric Type Description
bgp_build_info{version} Gauge Always 1. The version label contains the running version.