Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-6274

thresholding ignores persistselectorstrategy resulting in threshold events on items that should be ignored

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.12.1
    • 1.12.6
    • Thresholding
    • Security Level: Default (Default Security Scheme)
    • None

    Description

      I'm collecting snmp information roughly like this:

        <resourceType name="oeDbInst" label="OpenEdge Database">
          <persistenceSelectorStrategy class="org.opennms.netmgt.collectd.PersistRegexSelectorStrategy">
            <parameter key="match-expression" value="not(#oeDbKey matches '^\d+$')" />
          </persistenceSelectorStrategy>
          <storageStrategy class="org.opennms.netmgt.dao.support.SiblingColumnStorageStrategy">
            <parameter key="sibling-column-name" value="oeDbKey" />
            <parameter key="replace-all" value="s/\s/_/" />
          </storageStrategy>
        </resourceType>
      
        <group name="openedge-database" ifType="ignore">
          <mibObj oid=".1.3.6.1.4.1.42674.2.2" instance="oeDbInst" alias="oeDbKey" type="string" />
          <mibObj oid=".1.3.6.1.4.1.42674.2.16" instance="oeDbInst" alias="oeDbCheckpoints" type="gauge"/>
        </group>
      

      As a result no information is stored if the field oeDbKey is a timestamp (.1.3.6.1.4.1.42674.2.16.1 = .1.3.6.1.4.1.42674.2.2.1 = the time the data was collected by the snmp server, something like 1385455854.)

      This works fine for collection.

      However I've now added a threshold on the oeDbCheckpoints field like this:

      <threshold description="Too many checkpoints"
                  type="absoluteChange" ds-type="oeDbInst" value="10.0"
                  rearm="0.0" trigger="1" ds-label="oeDbKey"
                  triggeredUEI="uei.opennms.org/tvh/oeTooManyCheckpoints"
                  rearmedUEI="uei.opennms.org/tvh/oeNoLongerTooManyCheckpoints"
                  filterOperator="and" ds-name="oeDbCheckpoints">
      </threshold>
      

      This works fine for the real data, but to my surprise the threshold also fires for the timestamp (which obviously fires after every collection since the timestamp is always more than 10 more than the previous value.)

      This results in an event like this:

      Threshold exceeded for SNMP datasource oeDbCheckpoints on interface someip, parms: label="Unknown" ds="oeDbCheckpoints" value="1385455854" instance="1" trigger="1" changeThreshold="10.0" previousValue="1385455553"
      

      Attachments

        Activity

          People

            agalue Alejandro Galue
            jankeir Jan Keirse (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: