SNMP "Timeticks" (UpTimeInstance) decoding

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:
    • source_labels: [address]
      target_label: __param_target
    • target_label: address
      replacement: 1.2.3.4:9116

Nobody in a similar way ?

Still no one ? :sob:

Usually a timetick in SNMP is a hundredth of a second and there is no way to translate it into human readable date in Grafana afaik.

I would divided it by 8640000 to obtain the uptime days or 360000 to obtain uptime hours.