Comments (13)
Can you share the snmp.yml output as well?
from snmp_exporter.
That does appear to be either a device bug (an additional octet) or a MIB bug (missing 2-dimension index).
Right now, the listed single value index does not match what the snmpwalk returns. That's why the lookup result is empty.
from snmp_exporter.
As a workaround, you could try manually modifying the index in the snmp.yml.
checkpoint_lookups_test:
walk:
- 1.3.6.1.4.1.2620.1.6.7.8.2.1.2
- 1.3.6.1.4.1.2620.1.6.7.8.2.1.6
metrics:
- name: fanSpeedSensorName
oid: 1.3.6.1.4.1.2620.1.6.7.8.2.1.2
type: DisplayString
help: Sensor name - 1.3.6.1.4.1.2620.1.6.7.8.2.1.2
indexes:
- labelname: fanSpeedSensorIndex
type: gauge
- labelname: fanSpeedSensorCheckpointLol
type: gauge
lookups:
- labels:
- fanSpeedSensorIndex
labelname: fanSpeedSensorName
oid: 1.3.6.1.4.1.2620.1.6.7.8.2.1.2
type: DisplayString
- name: fanSpeedSensorStatus
oid: 1.3.6.1.4.1.2620.1.6.7.8.2.1.6
type: gauge
help: Sensor is out of range TRUE(1), FALSE(0), READING ERROR(2) - 1.3.6.1.4.1.2620.1.6.7.8.2.1.6
indexes:
- labelname: fanSpeedSensorIndex
type: gauge
- labelname: fanSpeedSensorCheckpointLol
type: gauge
lookups:
- labels:
- fanSpeedSensorIndex
- fanSpeedSensorCheckpointLol
labelname: fanSpeedSensorName
oid: 1.3.6.1.4.1.2620.1.6.7.8.2.1.2
type: DisplayString
max_repetitions: 25
retries: 3
timeout: 5s
from snmp_exporter.
Can you share the snmp.yml output as well?
Orriginal post updated with the snmp.yml
output.
from snmp_exporter.
That is extremely strange. Would you mind testing with v0.24.1? I wonder if this is related to #782.
from snmp_exporter.
I was developing with v0.24.1 and tested with v0.25 just to be sure. Same behavior.
It is indeed very strange, never saw this, I tested with multiples targets, same results.
Same with tempertureSensorName
/ tempertureSensorStatus
/ tempertureSensorIndex
Adding this MIB make sysDescr
resolve as 1.3.6.1.4.1.2620.1.6.23.1
and not the 1.3.6.1.2.1.1.1
but i dont think it's related
from snmp_exporter.
Yea, I have never seen lookup strings fail like that. Maybe try all the way back to 0.23.0 and 0.22.0? There have been a few misc changes to the lookups over the last few versions.
from snmp_exporter.
I just tested v0.23, Same behavior!
PS: Forget what I told previously about the format version
from snmp_exporter.
v0.22 with the old format, Same behavior! oO
Debug logs :
ts=2023-12-12T15:24:12.675Z caller=main.go:157 level=info msg="Starting snmp_exporter" version="(version=0.22.0, branch=HEAD, revision=7b0657fd99862a47f2f9f780f08a794ca7040ae7)"
ts=2023-12-12T15:24:12.677Z caller=main.go:158 level=info build_context="(go=go1.20.5, platform=windows/amd64, user=root@3f2e67d54ed1, date=20230615-13:35:05, tags=netgo)"
ts=2023-12-12T15:24:12.698Z caller=tls_config.go:274 level=info msg="Listening on" address=10.0.0.1:443
ts=2023-12-12T15:24:12.698Z caller=tls_config.go:277 level=info msg="TLS is disabled." http2=false address=10.0.0.1:443
ts=2023-12-12T15:24:22.699Z caller=main.go:106 level=debug module=checkpoint_lookups_test target=target01.domain msg="Starting scrape"
ts=2023-12-12T15:24:22.706Z caller=collector.go:254 level=debug module=checkpoint_lookups_test target=target01.domain msg="Walking subtree" oid=1.3.6.1.4.1.2620.1.6.7.8.2.1.2
ts=2023-12-12T15:24:22.717Z caller=collector.go:268 level=debug module=checkpoint_lookups_test target=target01.domain msg="Walk of subtree completed" oid=1.3.6.1.4.1.2620.1.6.7.8.2.1.2 duration_seconds=11.0427ms
ts=2023-12-12T15:24:22.718Z caller=collector.go:254 level=debug module=checkpoint_lookups_test target=target01.domain msg="Walking subtree" oid=1.3.6.1.4.1.2620.1.6.7.8.2.1.6
ts=2023-12-12T15:24:22.719Z caller=collector.go:268 level=debug module=checkpoint_lookups_test target=target01.domain msg="Walk of subtree completed" oid=1.3.6.1.4.1.2620.1.6.7.8.2.1.6 duration_seconds=1.053ms
ts=2023-12-12T15:24:22.720Z caller=main.go:117 level=debug module=checkpoint_lookups_test target=target01.domain msg="Finished scrape" duration_seconds=0.0199731
from snmp_exporter.
Ok, sorry if I’m saying something completely stupid but browsing the SNMP on this device with “FrameFlow SNMP Browser” I noticed this:
VS
for the fanSpeedSensorName
it looks like the OID for the first value is 1.3.6.1.4.1.2620.1.6.7.8.2.1.2.1.0
and not 1.3.6.1.4.1.2620.1.6.7.8.2.1.2.1
with an additional zero after the index. I don't if it's expected?
This
checkpoint_nolookups_test:
walk:
- 1.3.6.1.4.1.2620.1.6.7.8.2.1.2.1.0
- 1.3.6.1.4.1.2620.1.6.7.8.2.1.2.2
return:
# HELP fanSpeedSensorName Sensor name - 1.3.6.1.4.1.2620.1.6.7.8.2.1.2.1.0
# TYPE fanSpeedSensorName gauge
fanSpeedSensorName{fanSpeedSensorIndex="1",fanSpeedSensorName="System Fan 1"} 1
fanSpeedSensorName{fanSpeedSensorIndex="2",fanSpeedSensorName="System Fan 2"} 1
So both works, but maybe it mess up the lookups?
from snmp_exporter.
This MIB is indeed a mess, the tempertureSensorValue
is stored as a string and need regex_extracts to be converted as a value...
Your workaround works, I get this:
# HELP fanSpeedSensorName Sensor name - 1.3.6.1.4.1.2620.1.6.7.8.2.1.2
# TYPE fanSpeedSensorName gauge
fanSpeedSensorName{fanSpeedSensorCheckpointLol="0",fanSpeedSensorIndex="1",fanSpeedSensorName=""} 1
fanSpeedSensorName{fanSpeedSensorCheckpointLol="0",fanSpeedSensorIndex="2",fanSpeedSensorName=""} 1
fanSpeedSensorName{fanSpeedSensorCheckpointLol="0",fanSpeedSensorIndex="3",fanSpeedSensorName=""} 1
fanSpeedSensorName{fanSpeedSensorCheckpointLol="0",fanSpeedSensorIndex="4",fanSpeedSensorName=""} 1
# HELP fanSpeedSensorStatus Sensor is out of range TRUE(1), FALSE(0), READING ERROR(2) - 1.3.6.1.4.1.2620.1.6.7.8.2.1.6
# TYPE fanSpeedSensorStatus gauge
fanSpeedSensorStatus{fanSpeedSensorCheckpointLol="0",fanSpeedSensorIndex="1",fanSpeedSensorName="System Fan 1"} 0
fanSpeedSensorStatus{fanSpeedSensorCheckpointLol="0",fanSpeedSensorIndex="2",fanSpeedSensorName="System Fan 2"} 0
fanSpeedSensorStatus{fanSpeedSensorCheckpointLol="0",fanSpeedSensorIndex="3",fanSpeedSensorName="System Fan 3"} 0
fanSpeedSensorStatus{fanSpeedSensorCheckpointLol="0",fanSpeedSensorIndex="4",fanSpeedSensorName="System Fan 4"} 0
Any way to implement this in the generator.yml
?
from snmp_exporter.
You would need to modify the MIB to add an additional index field. That would allow the generator to handle it correctly.
I would contact the vendor if you have a support contract to see if they know about this problem.
from snmp_exporter.
I never edted a MIB, I'll probably stick to recording rules or editing the snmp.yml
for the moment.
Thank you very much for your help
from snmp_exporter.
Related Issues (20)
- Module mikrotik:error in unmarshalResponse: expected a sequence when unmarshalling a VB, got 2
- use_unconnected_udp_socket problem?
- Can't manually pull tags from OID
- Lookups returning empty strings when use the index lookup cdpCacheDeviceId
- get snmpv2 data using by tcp failed
- Error generating a MIB
- snmpwalk get large amount of information but snmp_exporter does not
- Connecting snmp-exporter prometheus to cisco switches
- Juniper MX204 Router SNMP walk fails for jnxBfdSessIntfName
- gosnmp sets SnmpPDU.Value to nil when type is Bitstring HOT 4
- Problem generating SNMP config for cIpM... metrics HOT 5
- make mibs fails on readydataos
- [Doc] SNMP example minor nit HOT 1
- InetAddressType Indexes/Indices being omitted HOT 5
- [ASK] Add module for HP Switch v1910
- Errors while generating config for cisco switch
- Parse date and time from DisplayString HOT 3
- Snmpbulk works, but snmp_exporter does not HOT 1
- Default value for `config.file` not honored with explicit `web.listen-address` HOT 2
- snmp-exporter times out and gives up after 10 seconds during scrape, snmpbulkwalk of the same tree works fine HOT 6
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.