Example dependent SNMP interface filter

You can create dependent filters that use the results of previous filters to filter additional tables.

In the following example, the ipNetToMediaTable is indexed on ipNetToMediaIfIndex, which is equivalent to ifIndex. The ifTable table is also indexed on ifIndex. This relationship is written into the MIB definition, but cannot be programmatically determined. Entering the relationship as a dependent filter ensures that matching entries in the ipNetToMediaTable are also included.

insert into snmpHelper.dependentInstanceFilter
(
    m_InstanceFilter
)
values
(
    "ipNetToMediaIfIndex in ( eval(list type int, '&ifTable.ifEntry') )"
)
;

In the following example, the ipAddrTable is indexed on IP address, but each row contains ipAdEntIfIndex, whose value is equivalent to ifIndex. The ifTable table is also indexed on ifIndex. This relationship is written into the MIB definition, but cannot be programmatically determined. Entering the relationship as a dependent filter ensures that matching entries in the ipAddrTable are also included.

insert into snmpHelper.dependentInstanceFilter
(
    m_InstanceFilter
)
values
(
    "ipAdEntIfIndex in ( eval(list type int, '&ifTable.ifEntry') )"
)
;

Both these example filters return rows that match the filter. If a row in the MIB table does not have a valid value, it is not retrieved. For example, if a row in the ipAddrTable table does not contain a valid value for ipAdEntIfIndex, it is not retrieved by the SNMP helper.

Both these example filters rely on an interface filter already being defined on ifIndex. The matching results from the ipAddrTable and ipNetToMediaTable tables are cached, so that the MIB is not queried again.

Both of the above filters are configured by default.