Newansage v0.4.0 is out
Reference / Metrics

Metrics

Every Prometheus metric ansage exports at /metrics, with its labels.

Served at http://METRICS_LISTEN/metrics in the Prometheus text format. Per-neighbor metrics carry neighbor (address:port) and mostly asn.

ansage

MetricTypeLabelsMeaning
ansage_infogaugeversion, asn, router_idalways 1
ansage_start_time_secondsgaugewhen ansage started, unix time
ansage_own_prefixesgaugeown prefixes announced to neighbors
ansage_drainedgauge1 while drained (ansage drain, drain_time)
ansage_rib_upgauge1 if the RIB answered this scrape
ansage_rib_prefixesgaugefamilyprefixes in the RIB
ansage_rib_attribute_setsgaugedistinct path attribute sets in the RIB

Neighbors

MetricTypeLabelsMeaning
ansage_peer_infogaugeneighbor, asn, descriptionalways 1, one per configured neighbor
ansage_peer_stategaugeneighbor, state1 for the current FSM state (Idle, Active, Connect, OpenSent, OpenConfirm, Established)
ansage_peer_upgaugeneighbor, asn1 while Established
ansage_peer_disabledgaugeneighbor, asn1 while disabled by ansage peer N disable
ansage_peer_state_since_secondsgaugeneighbor, asnwhen the current state was entered, unix time
ansage_peer_graceful_restart_enabledgaugeneighbor, asn1 if we offer Graceful Restart (config)
ansage_peer_graceful_restart_offeredgaugeneighbor, asn1 if the neighbor offers it in its OPEN
ansage_peer_graceful_restartgaugeneighbor, asn1 if this session negotiated it (both offered)
ansage_peer_graceful_restart_notificationgaugeneighbor, asn1 if this session also negotiated the N bit (RFC 8538)
ansage_peer_prefixes_receivedgaugeneighbor, familyroutes stored from the neighbor (import = "all")
ansage_peer_prefixes_advertisedgaugeneighbor, familyprefixes advertised to the neighbor
ansage_peer_prefixes_stalegaugeneighbor, asnroutes kept through the neighbor's Graceful Restart, not sent again yet

Neighbor counters

All counter, labels neighbor, asn, since ansage started.

MetricCounts
ansage_peer_established_totalsessions that reached Established
ansage_peer_connect_attempts_totaloutgoing connection attempts
ansage_peer_connect_failures_totaloutgoing connection attempts that failed
ansage_peer_incoming_accepted_totalconnections from the neighbor used for the session
ansage_peer_incoming_rejected_totalconnections from the neighbor turned away
ansage_peer_prefixes_announced_totalprefixes in UPDATEs sent
ansage_peer_prefixes_withdrawn_totalprefixes withdrawn in UPDATEs sent
ansage_peer_malformed_updates_totalUPDATEs treated as withdraw (RFC 7606)
ansage_peer_discarded_attributes_totalUPDATEs with attributes discarded (RFC 7606)
ansage_peer_decode_errors_totalmessages that could not be decoded
ansage_peer_control_drops_totalcontrol messages dropped on a full queue
ansage_peer_data_drops_totalroute batches dropped on a full queue

ansage_peer_messages_received_total and ansage_peer_messages_sent_total count BGP messages with labels neighbor and type (open, update, notification, keepalive, route_refresh).

Kernel routes

Only with [kernel].

MetricTypeLabelsMeaning
ansage_fib_upgauge1 if the FIB answered this scrape
ansage_fib_routesgaugefamily, stateprefixes ansage wants in the kernel: installed (per family), unresolved, failed, shadowed (family all)
ansage_fib_adopted_routesgaugekernel routes of an earlier run not taken over yet
ansage_fib_next_hopsgaugestateBGP next hops, reachable or unreachable through the kernel
ansage_fib_errors_totalcounterreasonchanges the kernel refused, by errno

Process

MetricTypeMeaning
process_resident_memory_bytesgaugeresident memory
process_open_fdsgaugeopen file descriptors

Alert rules built on these are in Metrics and API.

Esc to close