SNMP monitoring skips OID with 'NoSuchInstance'

I’ve been using the SNMP collector against a couple of switches but haven’t been able to get the OID for system uptime to work.

snmpwalk works fine:

snmpwalk -t 20 -O fn -v 2c -c netdata 192.168.178.3 .1.3.6.1.2.1.1.3

returns:

.1.3.6.1.2.1.1.3.0 = Timeticks: (6365400) 17:40:54.00

but the graphs say ‘no data’ ands running the module in debug mode returns:

[ DEBUG ] snmp[GS110TPP_switch] collect.go:49 skipping OID ‘1.3.6.1.2.1.1.3’ (unsupported type ‘NoSuchInstance’)

and then:

BEGIN ‘snmp_GS110TPP_switch.snmp_switch.management.uptime’
SET ‘Switch Uptime’ =
END

My snmp.conf has two jobs, one for each switch. And the config for one looks like this:

  • name: GS110TPP switch
    update_every: 5
    hostname: “192.168.178.3”
    community: netdata
    options:
    version: 2
    charts:
    • id: “snmp_switch.bandwidth_port.GS110TPP”
      title: “GS110TPP Switch Bandwidth for port”
      units: “MiB/s”
      type: “area”
      family: “ports”
      multiply_range: [1, 10]
      dimensions:
      • name: “in”
        oid: “1.3.6.1.2.1.2.2.1.10.”
        algorithm: “incremental”
        multiplier: 8
        divisor: 1000000
      • name: “out”
        oid: “1.3.6.1.2.1.2.2.1.16.”
        algorithm: “incremental”
        multiplier: 8
        divisor: 1000000
    • id: “snmp_switch.management.uptime.GS110TPP”
      title: “GS110TPP Switch Uptime”
      units: “percent”
      type: “line”
      family: “switch_management”
      dimensions:
      • name: “Switch Uptime”
        oid: “1.3.6.1.2.1.1.3”
        algorithm: “absolute”

The port bandwidth counters work fine AFAIK, so I’m not sure what I’m doing wrong with the uptime one as I believe the collector should handle TIMETICKS.

I believe you need to put in 1.3.6.1.2.1.1.3.0, the result of SNMP walk. I don’t see a multiply_range for the switch Uptime, so it will simply do an SNMP GET of 1.3.6.1.2.1.1.3, which doesn’t exist (the .0 at the end is the issue I think).

Also, in the docs I see multiply_range together with oids that don’t have the trailing . that you have here. Do the port in/out stats work despite this?

@Christopher_Akritid1 Thanks for that. I knew it was something simple!

I guess the question now is how to get the chart to display/convert timeticks to a nice format like days/hours/minutes etc?? :slight_smile:

Yes, the trailing dot was required (I couldn’t get it to work any other way) when I first set this up a while back (even though the docs didn’t say so) but I just tested and it works fine either way.

supported, the value is converted to int.

I guess the question now is how to get the chart to display/convert timeticks to a nice format like days/hours/minutes

The chart units should be “seconds”. Use a multiplier/divisor to convert the value to seconds if needed.