Skip to content

netlink: add node_network_altnames_info metric#3541

Merged
SuperQ merged 1 commit intoprometheus:masterfrom
ajaggapa:addaltnamesmetric
Feb 11, 2026
Merged

netlink: add node_network_altnames_info metric#3541
SuperQ merged 1 commit intoprometheus:masterfrom
ajaggapa:addaltnamesmetric

Conversation

@ajaggapa
Copy link
Contributor

@ajaggapa ajaggapa commented Feb 4, 2026

Creating a mapping for altnames and device names with new node_network_altnames_info

This will be used to fetch any other metrics that have only device name label but not altname.

@SuperQ
Copy link
Member

SuperQ commented Feb 4, 2026

Maybe #3540 is a better option.

@ajaggapa
Copy link
Contributor Author

ajaggapa commented Feb 5, 2026

Maybe #3540 is a better option.

@SuperQ
We have both approaches, the problem i find with #3540 is that we need to use regex to match altname instead of exact match. WDYT ?

@SuperQ
Copy link
Member

SuperQ commented Feb 7, 2026

I'm not sure how a regexp is required for matching, both are additional labels so they would function the same.

@ajaggapa
Copy link
Contributor Author

ajaggapa commented Feb 7, 2026

I'm not sure how a regexp is required for matching, both are additional labels so they would function the same.

altnames in #3540 is like below. If we need to fetch device of interface with altname2, then we would need to match altnames column with (altnames=*altname2*) regex/wildcard

device,altnames
eth0, "altname1,altname2,altname3"

Whereas in current PR, we have only 1 altname per row/label. So we can use altname="altname2"

altname, device
altname1, eth0
altname2, eth0
altname3, eth0

@SuperQ
Copy link
Member

SuperQ commented Feb 10, 2026

Ahh, yes, if there are multiple altnames this makes a lot of sense.

@SuperQ SuperQ self-requested a review February 10, 2026 21:35
Signed-off-by: Anvesh J <ajaggapa@redhat.com>
Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

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

Nice, thanks!

@SuperQ SuperQ merged commit e881255 into prometheus:master Feb 11, 2026
13 checks passed
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.

2 participants