Problems with Router Uptime from SNMP

I have an Ubuntu 32bit server running the latest version of telegraf.

my SNMP Inputs look like this:

[[inputs.snmp]]
agents = [ “192.168.0.1:161” ]
version = 2
community = “public”
name = “snmp.router”

[[inputs.snmp.field]]
name = “hostname”
oid = “SNMPv2-MIB::sysName.0”
is_tag = true

[[inputs.snmp.field]]
name = “uptime”
oid = “DISMAN-EVENT-MIB::sysUpTimeInstance”
is_tag = true

[[inputs.snmp.table]]
name = “ifTable”
inherit_tags = [ “hostname” ]
oid = “IF-MIB::ifTable”

[[inputs.snmp.table.field]]
name = “ifDescr”
oid = “IF-MIB::ifDescr”
is_tag = true

[[inputs.snmp.table]]
name = “ifXTable”
inherit_tags = [ “hostname” ]
oid = “IF-MIB::ifXTable”

[[inputs.snmp.table.field]]
  name = "ifDescr"
  oid = "IF-MIB::ifDescr"
  is_tag = true

it all works fine except for the sysUpTimeInstance and it’s not outputting anything.

SNMP Walkthrough for my router shows:

DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (52316600) 6 days, 1:19:26.00

I have checked the MIB file is present.

Does anyone have any ideas what I am doing wrong!

Thanks

You must have at least one field per metric, and unlike hostname the uptime tag is not being inherited to a table. It is unlikely you would want uptime to be a tag, since it changes every reading, if you remove is_tag from it then it should be emitted like:

snmp.router,agent_host=localhost,hostname=xyzzy uptime=49153i