I've spent over 2 hours reading the documentation and examples about how to use static and dynamic filters in the SNMP Exporter. I find this concept very confusing, and I think I think I finally understand it. It would have been more clear to include this statement in the readme: *Filters cannot be used when walking an entire table or subtree. In order to use filters, you must specify table columns in the walk section, and also specify those same columns as filter targets. *
Is that true? To make a very simple example, suppose I want to get all columns of the second row of the ifTable. The below generator config is extremely verbose but it's the only way I could get this to work. In this example, it would have been easier to drop using prometheus relabel configs. But I have more complex SNMP devices where certain tables return hundreds of bogus rows, which makes the scrape very slow, so that's where I would like to specify the indices. if_test: walk: - ifIndex - ifDescr - ifType - ifMtu - ifSpeed - ifPhysAddress - ifAdminStatus - ifOperStatus - ifLastChange - ifInOctets - ifInUcastPkts - ifInNUcastPkts - ifInDiscards - ifInErrors - ifInUnknownProtos - ifOutOctets - ifOutUcastPkts - ifOutNUcastPkts - ifOutDiscards - ifOutErrors - ifOutQLen - ifSpecific filters: static: - targets: - ifIndex - ifDescr - ifType - ifMtu - ifSpeed - ifPhysAddress - ifAdminStatus - ifOperStatus - ifLastChange - ifInOctets - ifInUcastPkts - ifInNUcastPkts - ifInDiscards - ifInErrors - ifInUnknownProtos - ifOutOctets - ifOutUcastPkts - ifOutNUcastPkts - ifOutDiscards - ifOutErrors - ifOutQLen - ifSpecific indices: ["2"] -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/prometheus-users/cae0b7d6-e7e0-470d-afff-d57ae8128316n%40googlegroups.com.