-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
snmp: possible fix for oid key collision when there is an oid key partially matches with current oid_key #1044
Conversation
@relip you appear to have made the unit tests begin failing, I'll try to take a closer look sometime this week unless you can figure it out |
@sparrc seems |
@relip I think you can ignore that message, that's just a log message not a test failure, the relevant failures are:
|
@relip I think you made an error. Could you tell me which OID is represented in your graph ? |
@titilambert Same as the debug output, |
Just pushed a follow up commit that would fix the testing issue. @sparrc @titilambert |
@relip you have to know that .1.3.6.1.2.1.31.1.1.1.10.5 OID is a counter64. This means that when the max value of the counter is reached, the counter is reset to 0. This implies negative derivative. |
@titilambert ah, yeah, I need to change that. That is SNMP's intended behavior, however, I guess this is still a bug, right? |
@relip I don't think there is a bug. But I think this stuff: |
@relip There is a NON_NEGATIVE_DERIVATIVE function that you should be using instead |
@titilambert Reading the value of The values of the graph above are measured when there is no ingoing/outgoing traffic on that interface. @sparrc Thanks |
@relip You're right ! Could you try just with |
@titilambert Apart from my case, I guess removing |
Okay changed it and compiled it and now it completely stopped sending snmp data to the database. |
I would think that you would need both cases, because if the OID exactly matches it won't have a trailing ".", correct? @titilambert what is your holdup on having both cases in the if statement? |
@sparrc Ho yeah you're right ! |
correct... |
I found this strange when I first set up Chronograf and Telegraf, it doesn't make sense that the graph falls to negative value. From the graph, I suspected there is some kind of input collision so
DERIVATIVE()
returns negative value, since I found several same values from both eth0 (instance id: 1) and the other network interface with instance id 11.To see if my assumption is right, I put the following line to this line:
and the log shows:
I'm not an expert on SNMP nor Telegraf plugins, not sure if this change won't make any side effects.