Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Apply dynamic filter to all sub-tables #943

Open
llamafilm opened this issue Aug 14, 2023 · 0 comments
Open

[Request] Apply dynamic filter to all sub-tables #943

llamafilm opened this issue Aug 14, 2023 · 0 comments

Comments

@llamafilm
Copy link

Host operating system: output of uname -a

Linux grafanatest-i-056a1b7f8d5405c62 5.19.0-1028-aws #29~22.04.1-Ubuntu SMP Tue Jun 20 19:12:11 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

snmp_exporter version: output of snmp_exporter -version

v0.22.0

What device/snmpwalk OID are you using?

Sony PROV1-LEDDISPLAY-MIB.txt

I'm monitoring an LED wall controller which can support up to 72 display units. Even if it's less than fully populated, SNMP tables always return 72 rows. I want to query several SNMP tables, only exporting metrics for those devices that exist. I can check the existence with a dynamic filter for the model number OID 1.3.6.1.4.1.122.8501.3.128.1.2.1.4. But I have to do this separately for every column of every table, which makes my generator config very complex. Below is a small example of just one table:

modules:
  cled:
    walk:
      - 1.3.6.1.4.1.122.8501.3.128.8.2.1.1
      - 1.3.6.1.4.1.122.8501.3.128.8.2.1.2
      - 1.3.6.1.4.1.122.8501.3.128.8.2.1.3
      - 1.3.6.1.4.1.122.8501.3.128.8.2.1.5
      - 1.3.6.1.4.1.122.8501.3.128.8.2.1.6
      - 1.3.6.1.4.1.122.8501.3.128.8.2.1.7
      - 1.3.6.1.4.1.122.8501.3.128.8.2.1.8
    version: 2
    filters:
      dynamic:
        - oid: 1.3.6.1.4.1.122.8501.3.128.1.2.1.4
          targets:
            - "1.3.6.1.4.1.122.8501.3.128.8.2.1.1"
            - "1.3.6.1.4.1.122.8501.3.128.8.2.1.2"
            - "1.3.6.1.4.1.122.8501.3.128.8.2.1.3"
            - "1.3.6.1.4.1.122.8501.3.128.8.2.1.5"
            - "1.3.6.1.4.1.122.8501.3.128.8.2.1.6"
            - "1.3.6.1.4.1.122.8501.3.128.8.2.1.7"
            - "1.3.6.1.4.1.122.8501.3.128.8.2.1.8"
          values: ["ZRD-2"]

Request

Could we have an option where dynamic filters apply to all sub-tables? Then I could replace the above config with:

modules:
  cled:
    walk:
      - 1.3.6.1.4.1.122.8501.3.128.8.2
    version: 2
    filters:
      dynamic:
        - oid: 1.3.6.1.4.1.122.8501.3.128.1.2.1.4
          targets:
            - "1.3.6.1.4.1.122.8501.3.128.8.2"
          values: ["ZRD-2"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant