-
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
Add support for entPhySensorTable values #1066
Comments
We just recently added a |
My workaround is not too bad. The downsides are that it moves some logic into prometheus' recording rules and that it adds a little too much data to the database that I don't really want. generator.yml modules:
entity-physical-sensors:
walk:
- entPhysicalIndex
- entPhysicalDescr
- entPhySensorScale
- entPhySensorPrecision
- entPhySensorValue
lookups:
- source_indexes: [entPhysicalIndex]
lookup: entPhysicalDescr
overrides:
entPhysicalIndex: {ignore: true}
entPhysicalDescr: {ignore: true} prometheus/rules-recording.yml groups:
- name: snmp-exporter
rules:
- record: entPhySensorValueScaled
expr: entPhySensorValue * 10 ^ (3 * (entPhySensorScale - 9) - entPhySensorPrecision) @SuperQ yes, I noticed that new static field. But I would need something to handle the formula I'm content with a "no, that's out of scope." But I thought I'd ask just in case. |
I think it's something we could do in code, but it would need to be generic enough to work with other MIBs. I don't have time to implement this, but PRs would be welcome. |
Host operating system: output of
uname -a
snmp_exporter version: output of
snmp_exporter -version
What device/snmpwalk OID are you using?
An Infiniband switch, using ENTITY-SENSOR-MIB (RFC 3433).
If this is a new device, please link to the MIB(s).
This is a standard MIB. You can download it using the Dockerfile below.
What did you do that produced an error?
No errors, but here is my setup.
generator.yml
Dockerfile
$ docker build -t tmp . && docker run --rm -it -p 9116:9116 tmp
What did you expect to see?
The actual value for this sensor is 0.7. The user must combine scale, precision, and value to calculate this final value. In our custom exporter, we use the following snippet to do the conversion:
What did you see instead?
Currently, snmp-exporter can only report the individual values in separate series. Since this is a standard MIB, I was wondering if you might consider adding new functionality to
modules.NAME.overrides
(possibly a new "type"?) to handle this automatically.The text was updated successfully, but these errors were encountered: