Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bgpv1: BGP Control Plane metrics #31469

Merged
merged 1 commit into from Mar 22, 2024

Conversation

YutaroHayakawa
Copy link
Member

Implement following initial metrics for BGP Control Plane.

  1. cilium_bgp_control_plane_session_state

Gauge that shows session state per vrouter/neighbor. Established (1) or Not Established (0).

  1. cilium_bgp_control_plane_advertised_routes

Gauge that shows the number of advertised routes per vrouter/neighbor/afi/safi.

  1. cilium_bgp_control_plane_received_routes

Gauge that shows the number of received routes per vrouter/neighbor/afi/safi.

Example:

ks exec -it cilium-whfmh -- cilium-dbg metrics list --match-pattern cilium_bgp
Metric                                       Labels                                                                      Value
cilium_bgp_control_plane_advertised_routes   afi="ipv4" neighbor="[fd00:10:0:1::1]:179" safi="unicast" vrouter="65001"   1.000000
cilium_bgp_control_plane_advertised_routes   afi="ipv6" neighbor="[fd00:10:0:1::1]:179" safi="unicast" vrouter="65001"   1.000000
cilium_bgp_control_plane_received_routes     afi="ipv4" neighbor="[fd00:10:0:1::1]:179" safi="unicast" vrouter="65001"   2.000000
cilium_bgp_control_plane_received_routes     afi="ipv6" neighbor="[fd00:10:0:1::1]:179" safi="unicast" vrouter="65001"   2.000000
cilium_bgp_control_plane_session_state       neighbor="[fd00:10:0:1::1]:179" vrouter="65001"                             1.000000

Fixes: #22010

bgpv1: BGP Control Plane metrics

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Mar 19, 2024
@YutaroHayakawa YutaroHayakawa added the release-note/minor This PR changes functionality that users may find relevant to operating Cilium. label Mar 19, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Mar 19, 2024
@YutaroHayakawa YutaroHayakawa force-pushed the bgp-cplane-metrics branch 2 times, most recently from b1798c4 to 5768670 Compare March 19, 2024 04:56
@YutaroHayakawa YutaroHayakawa marked this pull request as ready for review March 19, 2024 05:13
@YutaroHayakawa YutaroHayakawa requested a review from a team as a code owner March 19, 2024 05:13
@YutaroHayakawa
Copy link
Member Author

/test

@YutaroHayakawa YutaroHayakawa added needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch needs-backport/1.15 This PR / issue needs backporting to the v1.15 branch labels Mar 19, 2024
Copy link
Contributor

@rastislavs rastislavs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! I have just few minor comments.

pkg/bgpv1/metrics/metrics.go Outdated Show resolved Hide resolved
pkg/bgpv1/metrics/metrics.go Outdated Show resolved Hide resolved
pkg/bgpv1/metrics/metrics.go Show resolved Hide resolved
@YutaroHayakawa
Copy link
Member Author

/test

Implement following initial metrics for BGP Control Plane.

1. cilium_bgp_control_plane_session_state

Gauge that shows session state per vrouter/neighbor. Established (1) or
Not Established (0).

2. cilium_bgp_control_plane_advertised_routes

Gauge that shows the number of advertised routes per
vrouter/neighbor/afi/safi.

3. cilium_bgp_control_plane_received_routes

Gauge that shows the number of received routes per
vrouter/neighbor/afi/safi.

Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>
@YutaroHayakawa
Copy link
Member Author

The BGP component test was failing because we didn't provide metrics.Registry in the test fixture. Fixed it.

@YutaroHayakawa
Copy link
Member Author

/test

@YutaroHayakawa
Copy link
Member Author

Cilium Cluster Mesh upgrade: #30964
Conformance AWS-CNI: Hit the NAT Gateway quota
Conformance Ingress: #30281

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Mar 22, 2024
@YutaroHayakawa YutaroHayakawa added this pull request to the merge queue Mar 22, 2024
Merged via the queue into cilium:main with commit 59a01a8 Mar 22, 2024
62 checks passed
@YutaroHayakawa YutaroHayakawa deleted the bgp-cplane-metrics branch March 22, 2024 01:04
@sayboras sayboras mentioned this pull request Mar 24, 2024
6 tasks
@sayboras sayboras added backport-pending/1.15 The backport for Cilium 1.15.x for this PR is in progress. and removed needs-backport/1.15 This PR / issue needs backporting to the v1.15 branch labels Mar 24, 2024
@sayboras sayboras mentioned this pull request Mar 24, 2024
4 tasks
@sayboras sayboras added the backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. label Mar 24, 2024
@sayboras sayboras removed the needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch label Mar 24, 2024
@github-actions github-actions bot added backport-done/1.15 The backport for Cilium 1.15.x for this PR is done. backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. and removed backport-pending/1.15 The backport for Cilium 1.15.x for this PR is in progress. backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. labels Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. backport-done/1.15 The backport for Cilium 1.15.x for this PR is done. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/minor This PR changes functionality that users may find relevant to operating Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bgp: BGP Control Plane metrics
3 participants