Comments (3)
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.
from snmp_exporter.
We just recently added a scale
configuration option to the code. In theory, we could have an override that looks up the scale factor from another OID.
from snmp_exporter.
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 valueScaled = value * 10 ^ (3 * (scale - 9) - precision)
. You do a static scale, but I would need to be able to compose add, subtract, multiply, and pow. Which is a lot of new functionality. That, or add a special case for entPhySensorTable.
I'm content with a "no, that's out of scope." But I thought I'd ask just in case.
from snmp_exporter.
Related Issues (20)
- Packets crawled using snmp_exporter are in {}; how to solve the problem
- Lookups returning empty strings on Checkpoint MIB HOT 13
- Inconsistent support of IPv6 literals
- Setting a non-default retries value for any module affects all modules
- servertech_sentry3 scraping broke between 0.20.0 and 0.21.0 HOT 13
- canβt find gcc-g++ pkg in rhel HOT 3
- curl: option --no-progress-meter: is unknown
- Exec format error
- how to update snmp.yaml and do not restart snmp_expoter
- Override help string
- collected metric was collected before with the same name and label values HOT 6
- No specific metrics are generated
- error collecting metric Desc{fqName: "snmp_error", help: "Error scraping target", constLabels: {module="okiprinter"}, variableLabels: {}}: error walking target ipv4: not in time window
- snmp_exporter does not parse InetAddressIPv4z correctly
- yaml/yq parser round-trip behavior: unmarshaling of integer keys in dicts HOT 2
- Go build error when trying to generate "generator" file HOT 6
- Handle connection failures on resolution failure HOT 2
- Sonicwall Firewall / snmp exporter / prometheus
- Generator - get without .0 + unwanted walk
- Make generator error 22 when downloading PICO-IPSEC-FLOW-MONITOR-MIB.txt HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snmp_exporter.