What other networks were told of rested on one thing: the Only to Customer mark that routes from providers, peers and route servers get as they come in. A route without it, from a session without a role or by a mistake anywhere along the way, went to every peer, from every router of ours, and nothing of ours stood in the way. export_limits are a second check, independent of the roles, the marks and the export policy. For peers above or beside us (PROVIDER, PEER, ROUTE_SERVER, and any in another AS without a role): - prefixes: only routes for these go out, learned or our own. With our and our customers' space listed, a leak of anyone else's routes goes nowhere above us. - max_prefixes: if more routes were to go out than this, none of them does. The session ends with a Cease / Administrative Shutdown whose Shutdown Communication says why (RFC 9003), and the peer is held down for its import.hold_down_seconds, so that it is told nothing rather than too much. The whole table is counted before any of it is sent. They are set at the top and hold for every such peer that has none of its own; unlike `export`, a peer's own export policy does not drop them. A peer's own export_limits take their place, and an empty one lifts them. Customers, route server clients and our own routers are not limited. A configuration in which learned routes are passed on and a peer in another AS has no role is now refused, as is accept_unconfigured_peers with learned routes: without a role, a peer's routes go to everyone and it is told of everything. This used to be a warning. At startup, a warning for each peer the limits apply to that has none, and for each originated route the limits leave out. A metric, bgp_export_limit_exceeded_total, counts the sessions ended for it. The interop lab has a phase in which a customer leaks: a route outside its space never reaches BIRD, and when more were to go than the limit, BIRD's session ends and its log has our reason. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4.1 KiB
4.1 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_export_limit_exceeded_total{peer} |
Counter | Number of sessions torn down because the routes to be advertised to the neighbor exceeded its export limit (export_limits.max_prefixes). |
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. |