Hello,
I’m using Grafana with Prometheus and snmp_exporter to get values from OID on a network equipment MIB.
I can get the sysUptimeInstance value (corresponding to 1.3.6.1.2.1.1.3.0 from SNMPv2-MIB) in Grafana with a Prometheus query. But my problem is that snmp_exporter send to Prometheus a “gauge” type of data (it doesn’t know the “timeticks” type send by SNMP) and i’m not able to convert this value (ex : 48808392) to a readable format (ex 5d, 15:34:43.92) in Grafana.
I’ve tried many configuration in Grafana but the value still look like an integer.
Did I miss something ? What is the right way ?
Thanks for your help !
Here is my config :
GRAFANA
SNMP_Exporter
SNMPv2-MIB:
walk:
- 1.3.6.1.2.1.1.3.0
get:- 1.3.6.1.2.1.1.5.0
- 1.3.6.1.2.1.1.3.0
metrics:- name: sysUpTimeInstance
oid: 1.3.6.1.2.1.1.3.0
help: The Uptime of the PSA
version: 2
PROMETHEUS
[…]
Scrape_configs:
job_name: ‘Device_SNMPv2-MIB’
scrape_interval: 5s
scrape_timeout: 5s
metrics_path: /snmp
params:
module: [SNMPv2-MIB]static_configs:
- targets:
- Device.maquette.fr:161
relabel_configs:- source_labels: [address]
target_label: __param_target- target_label: address
replacement: 1.2.3.4:9116