-
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
Multi index #339
Multi index #339
Conversation
Wait, what, w00t! |
87e66b5
to
ed67082
Compare
ed67082
to
9152053
Compare
I have high interest in this, but no time for anything much. I opened an
internal ticket for a co-worker to test and play.
Sent by mobile; please excuse my brevity.
…On Tue, Sep 25, 2018, 17:47 Richard Hartmann ***@***.***> wrote:
Wait, what, w00t!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#339 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAuEI1sAAPSg26SktAuvaxkatDd0nucuks5uelAegaJpZM4W4tJu>
.
|
9152053
to
c474ed8
Compare
The default in this option should be safe as well.
Sent by mobile; please excuse my brevity.
…On Thu, Oct 4, 2018, 14:57 Brian Brazil ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In generator/README.md
<#339 (comment)>
:
>
# If the index of a table is bsnDot11EssIndex, usually that'd be the label
# on the resulting metrics from that table. Instead, use the index to
# lookup the bsnDot11EssSsid table entry and create a bsnDot11EssSsid label
# with that value.
- old_indexes: [bsnDot11EssIndex]
new_index: bsnDot11EssSsid
+ keep_old: false # If true, don't delete old index label for this lookup.
The default is not to have any lookups, which is perfectly safe.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#339 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAuEIy7vFiMeiO5TJtTOO7u2GSp-yrWCks5uhgXCgaJpZM4W4tJu>
.
|
The default discourages users from having surplus labels, and it was agreed previously that use of such a thing should only be on a case-by-case basis - which you are proposing is not in line with. |
Apologies for barging in 😄 But I came across this, while looking for a way to add both the This change looks interesting, but I don't think it's going to provide a solution for this particular use case, right? |
@dannyk81 Yes! This will do exactly that. We're currently arguing over the final detail about having add or remove be the default behavior. For the record, I've been using this patch to have this behavior in my configurations. Once this is merged, the patch will not be necessary. |
FYI, we are currently deadlocked on the last open question; before that's resolved, I don't think we can merge this PR.
|
Ohhh! @SuperQ great news! I guess I misunderstood how this works - apologies for the noise and hope to see this soon 🙏 But to be honest, I'm still not quite sure how the lookup should be defined with this to achieve it (wanted to take this branch for a spin): lookups:
- source_indexes: [ifIndex, ifAlias]
lookup: ifDescr
keep_source_indexes: true ? The result I'm looking for:
My 2 cents on your debate (though I don't presume it will have too much weight on your final decision 😅) is that the Having said that, I'm perfectly fine tuning this parameter to I agree with @brian-brazil that
We modify the generated snmp.yml as described above, since the results returned from the device are incorrect and not supported by the generator (the solution was provided by Brian and Ben --> https://groups.google.com/forum/#!msg/prometheus-users/NDyO8qRlXoM/mUculDc-BQAJ) I believe this is not a unique case, and SNMP is full of such examples, so the point is that we need to find a balance between keeping things clean and standardized on the one hand and on the other hand provide the users (us) with tools to handle the abnormal cases. /end of rant ☮️ |
For lookups:
- source_indexes: [ifIndex]
lookup: ifDescr
keep_source_indexes: true
- source_indexes: [ifIndex]
lookup: ifAlias
keep_source_indexes: true
- source_indexes: [ifIndex]
lookup: ifName
keep_source_indexes: true The explanation here is that the "source index" is the index on the MIB entry. You can see that in the MIB:
The big reason for this change is we wanted to be able to support objects that have multi-dimension indexes. For example, here's one from a wifi controller:
|
Ahhh, I see! @SuperQ, that's clear now. so the Thanks, this is clear now. |
Hope to see this soon 🙏 |
I'd love to see this merged, whats the holdup? :) |
@fjaeckel We're stuck on agreeing on the default of |
@SuperQ as long as we're documenting the default, whatever it may be, and its implications - we should be able to just roll with it. I think for myself |
That's the issue. If you use a lookup, for |
I don't see it as a blocker, it can be overridden and should just be explained why some think its a good default. |
Sorry for @ing like this, but is there any chance we can have closure on this? I desperately need this functionality and I've been avoiding using a private build of this PR until now... but seems like we're at an impasse 😞 I completely agree with @fjaeckel, as long as we have the option to change the default behavior, it should be a reasonable approach for everyone. Please 🙏 |
I called a vote to unblock this either way. I can't stress enough that while I disagree with Brian here, I sincerely thank him for doing this. https://groups.google.com/forum/#!topic/prometheus-developers/0eMRmiIHcsM |
Can you please rebase this against master? |
c474ed8
to
41dce1c
Compare
This is updated. Do we know which if any of the existing lookup examples are non-unique? |
5524ce8
to
130f6cf
Compare
130f6cf
to
0c9ea31
Compare
It's not the lookups that cause issues, it's the devices when you use them. I know HP devices will generate duplicate |
ifInterfaces I've already covered, it's the others I'm wondering about. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I think that should cover it for now. |
0c9ea31
to
563ad25
Compare
Also ensure index labels are sanitized. Signed-off-by: Brian Brazil <[email protected]>
This changes old_index to be old_indexes in generator.yml. Signed-off-by: Brian Brazil <[email protected]>
Signed-off-by: Brian Brazil <[email protected]>
old_indexes -> source_indexes new_index -> lookup keep_old -> keep_source_indexes Signed-off-by: Brian Brazil <[email protected]>
Signed-off-by: Brian Brazil <[email protected]>
Merge the if_mib example modules into one. Use only the mibs we download. Signed-off-by: Brian Brazil <[email protected]>
563ad25
to
94e3002
Compare
Looks like there's a minor difference to some metrics in the snmp.yml. |
Odd, yet another run fixed it. |
LGTM. Ideally, I would love to have a release right after merging this. |
Yes, this requires an immediate release due to the nature of the changes. |
Just to make sure: @brian-brazil is this ready to merge from your end? |
Yes, I'll do it when I'm ready to release. |
Fixes #227 #180