Skipping values based on OIDs in another table with yaml discovery?

Tags: #<Tag:0x00007fdb87f6b188> #<Tag:0x00007fdb87f6b098>

thank you for LibreNMS, super useful!

I’m expanding Chatsworth PDU support and would like to make outlet monitoring optional. The model I’m testing doesn’t have outlet monitoring/control and the device page becomes quite cluttered with empty graphs.

The Chatsworth MIB (mibs/chatsworth/CPI-UNITY-MIB) exposes the PDU capability at cpiPduHasOutletMonitor within cpiPduTable, the table is indexed by cpiPduMac.

Therefore when discovering sensors for Chatsworth PDU yaml discovery I’d like for example to skip cpiPduOutletCurrent (this time in the cpiPduOutletTable table which is indexed by cpiPduOutletId and cpiPduOutletMac (the PDU’s MAC, same as cpiPduMac)). I tried via skip_values:

              oid: cpiPduOutletCurrent
              value: cpiPduOutletCurrent
              snmp_flags: ['-OeQUsb', '-Pu']
              num_oid: '.{{ $index }}'
              descr: '{{ $cpiPduOutletName }}'
              index: '{{ $index }}'
              divisor: 100
                      oid: cpiPduHasBranchMonitor.1
                      op: '='
                      value: 0

Although this doesn’t seem to work; my understanding is that oid for skip_values refers to the same table or pre-cached data. Putting cpiPduHasBranchMonitor in pre-cache also doesn’t seem to work however.

I’m wondering if skipping sensors and data based on other table’s OIDs (with a subindex) is possible with yaml discovery?

Are there examples of conditional discovery based on the device’s capability I could get inspiration from?

Thank you!