Open Saromany opened 7 months ago
Can you provide the output of a net-snmp snmpwalk
for the OID teraTaskStatus
/ 1.3.6.1.4.1.38034.1.3.1.1.3
? My first guess is that this is a device bug, the MIB says one thing, but the device is responding with invalid data.
One thing about your generator.yml
, what you actually want to use instead of teratab
(this is an index) is the OID for the table, teraTaskTable
. I don't think this is actually causing a problem, but it's more intuitive if you use the OID for the table, not the index.
Hi SuperQ, Thanks for your response, here is the snmpwalk for 1.3.6.1.4.1.38034.1.3.1.1.3
SNMPv2-SMI::enterprises.38034.1.3.1.1.3.0 = INTEGER: 4 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.1 = INTEGER: 4 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.2 = INTEGER: 4 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.3 = INTEGER: 4 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.4 = INTEGER: 4 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.5 = INTEGER: 4 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.6 = INTEGER: 5 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.7 = INTEGER: 4 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.8 = INTEGER: 2 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.9 = INTEGER: 1 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.10 = INTEGER: 5 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.11 = INTEGER: 4 SNMPv2-SMI::enterprises.38034.1.3.1.1.3.12 = INTEGER: 4
regarding the teratab, you probably right, though it didn't solve the errors...
What if you have this generator walk list that doesn't include the Task table?
modules:
teraCPU: # The module name. You can have as many modules as you want.
walk: # List of OIDs to walk. Can also be SNMP object names or specific instances.
- teraManufacturer
- teraFamily
- teraType
- teraName
- teraInfo
- teraDevice
- teraSlotTable
- teraPortTable
ok, so the snmp.yml looks like
walk:
- 1.3.6.1.4.1.38034.1.3.2
- 1.3.6.1.4.1.38034.1.3.3
get:
- 1.3.6.1.4.1.38034.1.1.1.0
- 1.3.6.1.4.1.38034.1.1.2.0
- 1.3.6.1.4.1.38034.1.1.3.0
- 1.3.6.1.4.1.38034.1.2.1.0
- 1.3.6.1.4.1.38034.1.2.2.0
- 1.3.6.1.4.1.38034.1.2.3.0
and snmp exporter is still not happy:
An error has occurred while serving metrics:
3 error(s) occurred:
- collected metric "teraSlotVersion" { label:{name:"teraSlotIndex" value:"0"} label:{name:"teraSlotVersion" value:"MATL048 CPU 1 F04.04 24.08.23"} gauge:{value:1}} was collected before with the same name and label values
- collected metric "teraSlotStatus" { label:{name:"teraSlotIndex" value:"0"} gauge:{value:15}} was collected before with the same name and label values
- collected metric "teraSlotIndex" { label:{name:"teraSlotIndex" value:"0"} gauge:{value:0}} was collected before with the same name and label values
That makes no sense, given the snmpwalk output. What is your Prometheus configuration? Do you get the same result if you curl
the exporter?
A tcpdump capture and comparison between snmpwalk and the exporter may be necessary.
prometheus.yml:
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: snmp_IHSE
metrics_path: /snmp
params:
auth: [auth_name]
module: [teraCPU]
static_configs:
- targets:
- 192.168.1.91
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 127.0.0.1:9116 # URL as shown on the UI
same results when i curl the exporter
curl 'localhost:9116/snmp?target=x.x.x.x&module=teraCPU&auth=auth_name'
An error has occurred while serving metrics:
3 error(s) occurred:
- collected metric "teraSlotIndex" { label:{name:"teraSlotIndex" value:"0"} gauge:{value:0}} was collected before with the same name and label values
- collected metric "teraSlotVersion" { label:{name:"teraSlotIndex" value:"0"} label:{name:"teraSlotVersion" value:"MATL048 CPU 1 F04.04 24.08.23"} gauge:{value:1}} was collected before with the same name and label values
- collected metric "teraSlotStatus" { label:{name:"teraSlotIndex" value:"0"} gauge:{value:15}} was collected before with the same name and label values
tcpdump:
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode listening on lo, link-type EN10MB (Ethernet), snapshot length 262144 bytes 13:18:07.724989 IP 127.0.0.1.9116 > 127.0.0.1.40292: Flags [P.], seq 622047696:622048457, ack 2587925740, win 9206, options [nop,nop,TS val 3601000456 ecr 3600995852], length 761 E..-w4@.@...........#..d%....@....#.."..... ........HTTP/1.1 500 Internal Server Error Content-Type: text/plain; charset=utf-8 X-Content-Type-Options: nosniff Date: Mon, 05 Feb 2024 11:18:07 GMT Content-Length: 591
An error has occurred while serving metrics:
3 error(s) occurred:
- collected metric "teraSlotVersion" { label:{name:"teraSlotIndex" value:"0"} label:{name:"teraSlotVersion" value:"MATL048 CPU 1 F04.04 24.08.23"} gauge:{value:1}} was collected before with the same name and label values
- collected metric "teraSlotStatus" { label:{name:"teraSlotIndex" value:"0"} gauge:{value:15}} was collected before with the same name and label values
- collected metric "teraSlotIndex" { label:{name:"teraSlotIndex" value:"0"} gauge:{value:0}} was collected before with the same name and label values
Hello guys,
sorry for the long post, I am quite a novice to prometheus, so any help would be appreciated,
Host operating system: output of
uname -a
Linux 5.15.0-91-generic #101-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux
snmp_exporter version: output of
snmp_exporter -version
snmp_exporter, version 0.25.0 (branch: HEAD, revision: 9c42d6c874d479314e612bca69558c81f8e26287) build user: root@880115266f70 build date: 20231210-10:05:18 go version: go1.21.5 platform: linux/amd64 tags: netgo
What device/snmpwalk OID are you using?
teraCPU
If this is a new device, please link to the MIB(s).
What did you do that produced an error?
I generated the snmp.yml config using the generator and specifying to walk teraoem, teraconf, teratab, tearavar
What did you expect to see?
metrics from the label
What did you see instead?
An error has occurred while serving metrics:
8 error(s) occurred:
if i remove teratab i get the metrics correct, so i guess the problem is there...
### generator.yml file:
### snmp.yml file: