-
Notifications
You must be signed in to change notification settings - Fork 635
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
ifDescr and ifAlias should be included as labels #215
Comments
This is a complex topic. ifDescr and ifAlias are sometimes suitable labels, sometimes not. The only completely safe thing to do is use ifIndex. |
There is no need to do this in the code, it can be accomplished via lookups. You can use this patch to modify the generator to add An example use of this is in my default.yml config. |
Note that this is not recommended, as it is considered an inappropriate use of labels. Labels should be for unique identification, not for annotations. The config produced by the modified generator is not supported, we only support configs generated by the standard generator. |
If used correctly, don't ifAlias and ifDescr provide unique identification? In our environment these labels allow us to create useful output in Grafana that tells us where the metric is coming from. |
It depends on the switch and your operational practices. For many switches one of them (or ifName) would be an appropriate label, and if so you can use e.g. the provided Having all of ifIndex, ifAlias and ifDescr is incorrect, as ifIndex already provides unique identification. |
Understandable. I would posit, however, that since someone else has come up with a similiar solution accomplished a different way, that this might be something to consider. Your data structure is technically correct but many of the tools that consume and use this data don't allow for easily(or at all) extraction of these meta datas from previous metrics. |
The primary tool here is Prometheus, and using group_left you can join in the labels at query time. This is the standard way we handle annotations, e.g. https://www.robustperception.io/exposing-the-software-version-to-prometheus/ |
@CbrandVendini #180 has some more context. |
ifDescr and ifAlias are provided as metrics/pdus. This data should be correlated and added as labels to all metrics.
I have a new collector.go that implements this functionality.
The text was updated successfully, but these errors were encountered: