network: add new system.net.iface.up metric#19853
Merged
Merged
Conversation
antonipp
commented
Mar 17, 2025
Comment on lines
+341
to
+342
| if metric_name == 'up': | ||
| metric_file_name = 'carrier' |
Contributor
Author
There was a problem hiding this comment.
I didn't want to name the metric carrier because it's not user-friendly, so we have to have this translation.
antonipp
force-pushed
the
ai/network-iface-up-metric
branch
from
March 17, 2025 14:42
ec91f6b to
7f704e4
Compare
dkirov-dd
approved these changes
Mar 18, 2025
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
sarah-witt
approved these changes
Mar 18, 2025
Contributor
|
are there plans to add this metric to other platforms? |
Contributor
Author
|
To give some context, I made the PR just for Linux because it's a metric we've been missing at DD and we only run Linux infra. |
Contributor
|
I made a Jira card to track this 🙇 |
nubtron
pushed a commit
that referenced
this pull request
May 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This adds a new metric to the network system check which indicates whether a particular Linux network interface is up.
The metric data comes from the sysfs entry
/sys/class/net/<iface>/carrier. Description from the docs:Motivation
We are looking for a similar metric which the Prometheus Node Exporter already has:
https://github.com/prometheus/node_exporter/blob/0c10545e8dfb983f4c013281c4904be27f645de2/collector/netclass_linux.go#L91-L96
Review checklist (to be filled by reviewers)
qa/skip-qalabel if the PR doesn't need to be tested during QA.backport/<branch-name>label to the PR and it will automatically open a backport PR once this one is merged