-
Notifications
You must be signed in to change notification settings - Fork 600
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
Improve handling of duplicate ifDescr in provided config #37
Comments
The default configuration provided presumes that ifDescr is unique for a given switch. If you remove the |
Thanks, this works. I've cloned the "default" module as "procurve" and removed the |
I would prefer these to be separate labels for |
That's a bit user-unfriendly, as then every expression needs to deal with both those labels being present. |
I would prefer to have them in two distinct labels, as well. The problem is that I see @brian-brazil 's point; in the generic case, you will always expect every tuple of instance and ifDescr to be unique. If, admittedly shoddy, hardware makes Prometheus break this expectation, things might go awry elsewhere. On the other hand, having ifDescr's name behave differently than all other labels also breaks expectations. As a compromise of sort, I would lean towards only falling back to |
Basically, if we have
I'd presume there's hardware out there where the interface are dynamic, and thus that wouldn't work out. |
So you mean if the reply is
we get
and if we receive
we get
correct? As an alternative we might look at
|
No, as that'd change the labels for the 4800 timeseries. It'd have to be some value that always contained both the id and the ifDescr. |
I think what you're saying is my initial interpretation. So you mean:
which looks fine to me, provided that
stays the same and does not become
|
No, we'd always need to do |
That would break Cisco IOS unless you set a specific option. IOS counts physical and then virtual interfaces up during startup. Add interfaces during runtime and it counts up sequentially from there. Reboot the machine with different set up interface line cards, or virtual interfaces, and the OIDs are different.
@cron2 this is to CC you |
To make the above explicit, this is why network operators (of non-broken hardware) rely on |
It may be more "user unfriendly" but I feel I've been bitten too many times by denormalized labels and have to resort to regexps too often. This to me is more "user unfriendly". |
Yes, for "non-broken hardware", users can rely on the |
By the SNMP RFCs, is a device with duplicate ifDescr's broken? |
@RichiH Are there any disadvantages to setting |
@brian-brazil Consensus amongst a bunch of networking people in #networker is "it's most likely forbidden by RFCs to have the same name, but we are not sure"; as there's a bunch of applicable RFCs, no one was motivated to really drill down. That being said, strong consensus was that the HP hardware is behaving badly and in an unexpected way. There's not downside to setting Thus, consensus is that it's better to design for the common case "no |
And if conditional is not an option, I strongly prefer @SuperQ 's approach. |
It sounds then that what we're currently doing is the least-worst choice. |
A work-around for @knweiss is most likely appreciated by him, but with my networking hat on, the default should be to not modify |
I'm running into the same issue, and "putting stuff in strings" sounds exactly like what I hated most about Nagios: Stringly-typed everything. I'd also vote for keeping the fields separately, and not modifying the ifDescr. |
As indicated above, that doesn't work for Cisco devices out of the box. Our problem here is that there is no standard or structure we can work off, so we have no choice but to use strings. |
This is as good as it gets unfortunately. |
I'm testing
snmp_exporter
on a HP ProCurve 3500yl-48G switch with firmware K.16.01.0004 and ROM K.15.30 and noticed the following periodic warning in the Prometheus log:Turning on
-log.level=debug
shows the reason: There are duplicate interfaces with the name Switch loopback interface and this triggers 23 debug-level log entries:ifNumber
is 54:However,
ifDescr
shows 61 interface descriptions and the last eight are identical:Is there a nice workaround to prevent these Prometheus warnings?
The text was updated successfully, but these errors were encountered: