I've been trying for a couple of days now to capture a small subset of the 
SNMP data published by a Cisco router. I'm trying to work out a way to 
capture the data by interface name (e.g. Et0) rather than SNMP OIDs - that 
way if something causes the interfaces to be renumbered, the data 
collection doesn't break.

I've tried everything I can find, all without luck. Here's what I'm 
conceptually asking Telegraf to go get:

[[inputs.snmp]]
  interval = "30s"

  [[inputs.snmp.host]]
  address = "W.X.Y.Z:161"
  version = 2
  community = "MyCommunity"
  collect = [ "interface", "bytesIn", "bytesOut" ]

  [[inputs.snmp.field]]
    name = "hostname"
    oid = "RFC1213-MIB::sysName.0"
    is_tag = true

  [[inputs.snmp.table]]
    name = "snmp"
    inherit_tags = [ "hostname" ]
    oid = "IF-MIB::ifXTable"
    include_instances = [ 'Et0', 'Tu0' ]

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

    [[inputs.snmp.table.field]]
      name = "bytesIn"
      oid = "IF-MIB::ifHCInOctets"

    [[inputs.snmp.table.field]]
      name = "bytesOut"
      oid = "IF-MIB::ifHCOutOctets"

This one tells me:
Error parsing /etc/telegraf/telegraf.d/bridge.telegraf.conf, line 4: field 
corresponding to `host' is not defined in `*snmp.Snmp'

I've tried using include_instances attached to the interface field or to 
the table:
Error parsing /etc/telegraf/telegraf.d/bridge.telegraf.conf, line 21: field 
corresponding to `include_instances' is not defined in `*snmp.Field'
Error parsing /etc/telegraf/telegraf.d/bridge.telegraf.conf, line 16: field 
corresponding to `include_instances' is not defined in `*snmp.Table'

I've been following these articles among others:

   - https://www.dev-eth0.de/blog/2016/12/06/grafana_snmp.html
   - 
   http://installfights.blogspot.com.au/2016/10/snmp-telegraf-influxdb.html
   - 
   
https://github.com/influxdata/telegraf/blob/master/plugins/inputs/snmp/README.md
   - 
   
https://github.com/influxdata/telegraf/blob/master/plugins/inputs/snmp/CONFIG-EXAMPLES.md

It seems silly to only support configurations where every counter is stored 
for every port (a 48 port switch where you only want to monitor 2 counters 
on 2 ports might be producing 240x the data, 99.9% of which is rubbish). 
Would I be right in guessing this is what subtables are for? What's the 
syntax for them (I can't find any documentation suitable for a muppet like 
me).

In case it's important, I'm on Telegraf v1.2.0 (git: release-1.2 
b2c1d98cff5a58d5ded3e74741c6bc32d6e789ee)

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/543e794d-23eb-45f0-b677-48626f46fea1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to