Dynamic Filters in Prometheus SNMP Exporter

87 Views Asked by At

Can we use two dynamic filters on a single module of a generator.yml file?

dynamic: # dynamic filters are handed by the snmp exporter. The generator will simply pass on the configuration in the snmp.yml.
               # The exporter will do a snmp walk of the oid and will restrict snmp walk made on the targets
               # to the index matching the value in the values list.
               # This would be typically used to specify a filter for interfaces with a certain name in ifAlias, ifSpeed or admin status.
               # For example, only get interfaces that a gig and faster, or get interfaces that are named Up or interfaces that are admin Up
        - oid: 1.3.6.1.2.1.2.2.1.7
          targets:
            - "1.3.6.1.2.1.2.2.1.4"
          values: ["1", "2"]

As you can see from the documentation of snmp exporter, we have an option to dynamic filters on 1 metrics? Can we do it on 2 metrics?

I basically want to filter and scrape only those interfaces wherein ifAdminStatus is equal to 1 and ifAlias is not null.

0

There are 0 best solutions below