Skip to content

Add neighbor ASN label to BGP metric(s) #35502

@mikejoh

Description

@mikejoh

By expanding (at least) the BGP session_state metric with a label containing the neighbor ASN we can perform more granular monitoring and analysis of BGP topologies. The use case here is that if, let's say, you have a Kubernetes cluster peering with more than one AS it would allow you to distinguish between BGP sessions with different ASNs, even if the peers share the same IP address + port.

I would like to ask for feedback on introducing a label like this to an existing metric, would something like neighbor_asn make sense to add here: https://github.com/cilium/cilium/blob/main/pkg/bgpv1/metrics/metrics.go

There's also the other two metrics:

  • advertised_routes
  • received_routes

that the label could be added to.

I understand the implications for adding a new label to an exsting metric(s) when it comes to cardinality and resource usage but i think it would make sense and be benefitial for everyone using the BGP control plane in Cilium.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/agentCilium agent related.area/bgpImpacts the Border Gateway Protocol feature.area/metricsImpacts statistics / metrics gathering, eg via Prometheus.kind/enhancementThis would improve or streamline existing functionality.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions