KBI 310345 Getting The Row Count of An SNMP Branch Matching A Pattern

Version

Argent for SNMP — all versions

Date

8 Mar 2013

Summary

Customers may want to count matching entries within a branch. For example, customers may want to know how many entries within the branch ‘1.3.6.1.2.1.2.2.1.2‘ are Ethernet ports.

Technical Background

Take the following steps to implement such a Rule.

  1. Define the branch for enumeration. In this case, it is 1.3.6.1.2.1.2.2.1.2.
  2. Define the matching pattern. In this case, it is ‘*Ethernet*‘ for option ‘Include Pattern‘.

    For more complicated patterns, regular expressions can be used in the format of ‘REGEXPR(…)‘.

  3. Use ‘Sum Of Enumeration‘ for Check Rule option.
  4. Pick an arbitrary OID value as variable ‘NOT_USED‘. We need this to bypass the requirement that at least one OID is used in the Rule criteria.
  5. Define constant 1 as a formula. The reason is that 1 is assigned for each matching enumerated entry. When the engine finally calculates the sum, it is the count of matching rows.
  6. Users can use the formula for comparison or Argent Predictor data.

Resolution

N/A