-
Notifications
You must be signed in to change notification settings - Fork 642
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
Allow for extracting numeric time series from string values #150
Comments
Augments is the other one we've seen, where a MIB didn't specify it itself. |
Here's a first pass at a proposal config: modules:
example:
walk: [sysUpTime, interfaces, ifXTable, etc]
lookups:
- old_index: ifIndex
new_index: ifDescr
string_regexps:
- oid: stringPiOID
regex: Pi is (\d+\.\d+)
excludes:
- uselessOID
- otherUselessOID TODO: configurations for |
This is presuming that we'd only want to extract one number from a string, and won't have to do anything fancy like dates. I think this should be oid focused, as I forsee multiple interacting options. |
The value I see here is to extract signed floats out of SNMP result data, one of the examples I have is optical monitoring data provided by Brocade NetIron (CER/CES/MLX/XMR series) that are widely used in the internet industry where the temperature, Rx/Tx light levels and power of a SFP (or pluggable module in general) is being returned as a string, as brocade thinks its important to say what normal and whats not, an example:
|
It looks like we need to support matching with a replacement, so we can turn "NOT SUPPORTED" into a NaN. |
That should have used another object.
NaN doesn't make sense here mathematically, in this case the correct answer is to exclude that object from the output. |
I agree is that it should be excluded instead of rendering a NaN. |
Ok, so for this case, we would have no regexp match, which would result in a dropped metric. Does that sound like the right thing to do? Then we don't need to worry about the replacement. |
This sounds like we might end up with something similar to the jmx exporter, where you can have multiple rules and the first match wins. Do we have an idea of how complex these can get? |
For SNMP, they don't seem that complex. The 99% use case from talking to other network admins is that extracting a number from a string is all we need. |
The above example also has a string that we'd probably want to extract as a bool. |
Yes, the string has two relevant pieces of information that should be extracted.
Pluggables not having (supported) DDM is also useful information, but
should probably be dumped into an `_info` metric; that's what we do
with our self-baked ones.
|
Or it could be split out into a different bool.
|
Thinking a bit, I'm imagining a config structure like:
Where Temp/Status would be (possibly empty) suffixes on the object name. |
I like the idea of multiple regexps, but I think it would be better to match on explicit OIDs. |
That'd be within something like :
|
This issue got derailed, so opening a new issue for the original issue. |
Ok, here's a full concrete example:
This would result in the original OID metric being dropped, as we don't want to include it in the output. New metrics would be created based on the regexps:
So, no regexp match with results in no metric output. Regexps are first match. |
The only real change you're proposing there is a default on the value (which makes sense) and not excluding the object by default (which I don't think makes sense, you'll always want it excluded). As indicated elsewhere I want all of the overrides for an object in once place, so you don't have to look all over the file to find the interactions. |
Sure, defaulting excluding is I was thinking about, but hadn't decided on. I will change it. |
Ok, here's an override-OID oriented format:
The override |
Is there any way to drop original metric name, instead to concatenate overridden metric name with original metric name? |
Some MIBs aren't quite right, particularly around types. Figure out what's a sane config syntax to allow for per-module overrides of bits of MIBs.
The text was updated successfully, but these errors were encountered: