Skip to content

Add ip label to all gatewayz metrics #342

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wjordan
Copy link

@wjordan wjordan commented Mar 24, 2025

the ip field is in the outbound_gateways.[name].connection object in the /gatewayz response, helps identify the remote IP address used for the gateway connection and we've found that having this label in the metric is useful for monitoring and debugging gateway connections.

@mtmk mtmk self-assigned this Mar 25, 2025
Copy link
Member

@mtmk mtmk left a comment

Choose a reason for hiding this comment

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

thanks @wjordan looks good to me in general i have a couple of questions:

afaics one should be able to figure out which gateway from the remote_gateway_name label. do we really need the IP? since we need to also consider growth in the metric payload as well as prometheus database.

@@ -97,62 +97,62 @@ func newGateway(system, endpoint, gwType string) *gateway {
configured: prometheus.NewDesc(
prometheus.BuildFQName(system, endpoint, gwType+"_configured"),
"configured",
[]string{"gateway_name", "cid", "remote_gateway_name", "server_id"},
[]string{"gateway_name", "cid", "ip", "remote_gateway_name", "server_id"},
Copy link
Member

Choose a reason for hiding this comment

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

should we name it remote_ip since it seems to be the IP of the remote gateway?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants