Hello,
I’m collecting some SNMP data from a Table which is awkwardly structured and which needs enrichment (with tags dependent on the exact table index) from an external non-SNMP source. It seems to me that a processor plugin is the easiest way to proceed.
So, using the CONTRIBUTING documentation and Jack’s useful video tutorial on writing a plugin I figured a good way to proceed was to replicate the processors.printer plugin which a new name, and then build on that base.
However, I can’t get much traction because I can’t even get the printer plugin to function. With a functioning SNMP collection configuration, I added the [[processors.printer]] block in various locations in the config file, all to no avail.
A gist of the overall config file looks like this:
[agent] ... [[outputs.influxdb]] urls = ["http://localhost:8086"] database = "test_db" ... [[inputs.snmp]] agents = [ "device.example.com:161" ] name = "devicetest" [[inputs.snmp.field]] name = "hostname" oid = "RFC1213-MIB::sysName.0" is_tag = true [[inputs.snmp.table]] name = "devicetest" inherit_tags = [ "hostname" ] index_as_tag = true oid = "DEVICE-MIB::MeasurementsTable" [[processors.printer]] namepass = "devicetest"
Telegraf is accepting my configuration (eg. if I put in a parameter unexpected by processors.printer, it issues an error message), but it would seem it is not sending any data for processing. I’ve also tried removing the namepass part of the configuration.
Is there anything I’ve missed?
I’ve tried this with both versions v1.4.4 and v1.6.0~5928219.
Thanks,
Daniel