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

threshold filters not processed properly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.10.9
    • Fix Version/s: 1.10.13, 1.12.1
    • Component/s: Thresholding
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None

      Description

      Hello,

      I've detected that the resource-filter criterios used in thresholds.txt are not taken by expressions, they seems to take the one on the first expression and apply to all of them.

      this is my config:

      <group name="hrstorage-windows-restrict"
      rrdRepository = "/opt/opennms/share/rrd/snmp/">
      <!-- Physical Memory -->
      <expression type="high" ds-type="hrStorageIndex" value="10.0"
      rearm="9.0" trigger="2" ds-label="hrStorageDescr"
      filterOperator="and" expression="(hrStorageUsed / hrStorageSize) * 100.0">
      <resource-filter field="hrStorageType">^\.1\.3\.6\.1\.2\.1\.25\.2\.1\.2$</resource-filter>
      <resource-filter field="hrStorageDescr">^(?:Physical\sMemory)$</resource-filter>
      </expression>
      <expression type="high" ds-type="hrStorageIndex" value="75.0"
      rearm="75.0" trigger="2" ds-label="hrStorageDescr"
      filterOperator="and" expression="(hrStorageUsed / hrStorageSize) * 100.0">
      <resource-filter field="hrStorageType">^\.1\.3\.6\.1\.2\.1\.25\.2\.1\.2$</resource-filter>
      <resource-filter field="hrStorageDescr">^(?:Physical\sMemory)$</resource-filter>
      </expression>
      <!-Virtual Memory->
      <expression type="high" ds-type="hrStorageIndex" value="10.0"
      rearm="9.0" trigger="2" ds-label="hrStorageDescr"
      filterOperator="and" expression="(hrStorageUsed / hrStorageSize) * 100.0">
      <resource-filter field="hrStorageType">^\.1\.3\.6\.1\.2\.1\.25\.2\.1\.3$</resource-filter>
      <resource-filter field="hrStorageDescr">^(?:Virtual\sMemory)$</resource-filter>
      </expression>
      <expression type="high" ds-type="hrStorageIndex" value="50.0"
      rearm="50.0" trigger="2" ds-label="hrStorageDescr"
      filterOperator="and" expression="(hrStorageUsed / hrStorageSize) * 100.0">
      <resource-filter field="hrStorageType">^\.1\.3\.6\.1\.2\.1\.25\.2\.1\.3$</resource-filter>
      <resource-filter field="hrStorageDescr">^(?:Virtual\sMemory)$</resource-filter>
      </expression>
      </group>

      this is my debug log:

      2013-05-17 07:59:06,981 DEBUG [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: passedThresholdFilters: applying 2 filters to resource node[421].hrStorageIndex[6]
      2013-05-17 07:59:06,981 DEBUG [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: passedThresholdFilters: filter #1: field=hrStorageType, regex='^\.1\.3\.6\.1\.2\.1\.25\.2\.1\.2$'
      2013-05-17 07:59:06,981 DEBUG [CollectdScheduler-50 Pool-fiber3] CollectionResourceWrapper: getLabelValue: Getting Value for hrStorageIndex::hrStorageType
      2013-05-17 07:59:06,981 DEBUG [CollectdScheduler-50 Pool-fiber3] GenericIndexResource: getResourceDir: /opt/opennms/share/rrd/snmp/421/hrStorageIndex/PhysicalMemory
      2013-05-17 07:59:06,981 DEBUG [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: passedThresholdFilters: the value of hrStorageType is .1.3.6.1.2.1.25.2.1.2. Pass filter? true
      2013-05-17 07:59:06,981 DEBUG [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: passedThresholdFilters: filter #2: field=hrStorageDescr, regex='^(?:Virtual\sMemory)$'
      2013-05-17 07:59:06,981 DEBUG [CollectdScheduler-50 Pool-fiber3] CollectionResourceWrapper: getLabelValue: Getting Value for hrStorageIndex::hrStorageDescr
      2013-05-17 07:59:06,981 DEBUG [CollectdScheduler-50 Pool-fiber3] GenericIndexResource: getResourceDir: /opt/opennms/share/rrd/snmp/421/hrStorageIndex/PhysicalMemory
      2013-05-17 07:59:06,981 DEBUG [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: passedThresholdFilters: the value of hrStorageDescr is Physical Memory. Pass filter? false
      2013-05-17 07:59:06,981 INFO [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: applyThresholds: Not processing threshold (hrStorageUsed / hrStorageSize) * 100.0 : {evaluator=high, dsName=(hrStorageUsed / hrStorageSize) * 100.0, dsType=hrStorageIndex, evaluators=[

      {ds=(hrStorageUsed / hrStorageSize) * 100.0, value=10.0, rearm=9.0, trigger=1}]} because no filters matched
      2013-05-17 07:59:06,981 DEBUG [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: passedThresholdFilters: applying 2 filters to resource node[421].hrStorageIndex[6]
      2013-05-17 07:59:06,981 DEBUG [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: passedThresholdFilters: filter #1: field=hrStorageType, regex='^\.1\.3\.6\.1\.2\.1\.25\.2\.1\.2$'
      2013-05-17 07:59:06,981 DEBUG [CollectdScheduler-50 Pool-fiber3] CollectionResourceWrapper: getLabelValue: Getting Value for hrStorageIndex::hrStorageType
      2013-05-17 07:59:06,981 DEBUG [CollectdScheduler-50 Pool-fiber3] GenericIndexResource: getResourceDir: /opt/opennms/share/rrd/snmp/421/hrStorageIndex/PhysicalMemory
      2013-05-17 07:59:06,981 DEBUG [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: passedThresholdFilters: the value of hrStorageType is .1.3.6.1.2.1.25.2.1.2. Pass filter? true
      2013-05-17 07:59:06,981 DEBUG [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: passedThresholdFilters: filter #2: field=hrStorageDescr, regex='^(?:Virtual\sMemory)$'
      2013-05-17 07:59:06,981 DEBUG [CollectdScheduler-50 Pool-fiber3] CollectionResourceWrapper: getLabelValue: Getting Value for hrStorageIndex::hrStorageDescr
      2013-05-17 07:59:06,981 DEBUG [CollectdScheduler-50 Pool-fiber3] GenericIndexResource: getResourceDir: /opt/opennms/share/rrd/snmp/421/hrStorageIndex/PhysicalMemory
      2013-05-17 07:59:06,982 DEBUG [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: passedThresholdFilters: the value of hrStorageDescr is Physical Memory. Pass filter? false
      2013-05-17 07:59:06,982 INFO [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: applyThresholds: Not processing threshold (hrStorageUsed / hrStorageSize) * 100.0 : {evaluator=high, dsName=(hrStorageUsed / hrStorageSize) * 100.0, dsType=hrStorageIndex, evaluators=[{ds=(hrStorageUsed / hrStorageSize) * 100.0, value=10.0, rearm=9.0, trigger=1}

      ]} because no filters matched
      2013-05-17 07:59:06,982 DEBUG [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: passedThresholdFilters: applying 2 filters to resource node[421].hrStorageIndex[6]
      2013-05-17 07:59:06,982 DEBUG [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: passedThresholdFilters: filter #1: field=hrStorageType, regex='^\.1\.3\.6\.1\.2\.1\.25\.2\.1\.2$'
      2013-05-17 07:59:06,982 DEBUG [CollectdScheduler-50 Pool-fiber3] CollectionResourceWrapper: getLabelValue: Getting Value for hrStorageIndex::hrStorageType
      2013-05-17 07:59:06,982 DEBUG [CollectdScheduler-50 Pool-fiber3] GenericIndexResource: getResourceDir: /opt/opennms/share/rrd/snmp/421/hrStorageIndex/PhysicalMemory
      2013-05-17 07:59:06,982 DEBUG [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: passedThresholdFilters: the value of hrStorageType is .1.3.6.1.2.1.25.2.1.2. Pass filter? true
      2013-05-17 07:59:06,982 DEBUG [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: passedThresholdFilters: filter #2: field=hrStorageDescr, regex='^(?:Virtual\sMemory)$'
      2013-05-17 07:59:06,982 DEBUG [CollectdScheduler-50 Pool-fiber3] CollectionResourceWrapper: getLabelValue: Getting Value for hrStorageIndex::hrStorageDescr
      2013-05-17 07:59:06,982 DEBUG [CollectdScheduler-50 Pool-fiber3] GenericIndexResource: getResourceDir: /opt/opennms/share/rrd/snmp/421/hrStorageIndex/PhysicalMemory
      2013-05-17 07:59:06,982 DEBUG [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: passedThresholdFilters: the value of hrStorageDescr is Physical Memory. Pass filter? false
      2013-05-17 07:59:06,982 INFO [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: applyThresholds: Not processing threshold (hrStorageUsed / hrStorageSize) * 100.0 : {evaluator=high, dsName=(hrStorageUsed / hrStorageSize) * 100.0, dsType=hrStorageIndex, evaluators=[

      {ds=(hrStorageUsed / hrStorageSize) * 100.0, value=10.0, rearm=9.0, trigger=1}]} because no filters matched
      2013-05-17 07:59:06,982 DEBUG [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: passedThresholdFilters: applying 2 filters to resource node[421].hrStorageIndex[6]
      2013-05-17 07:59:06,982 DEBUG [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: passedThresholdFilters: filter #1: field=hrStorageType, regex='^\.1\.3\.6\.1\.2\.1\.25\.2\.1\.2$'
      2013-05-17 07:59:06,982 DEBUG [CollectdScheduler-50 Pool-fiber3] CollectionResourceWrapper: getLabelValue: Getting Value for hrStorageIndex::hrStorageType
      2013-05-17 07:59:06,982 DEBUG [CollectdScheduler-50 Pool-fiber3] GenericIndexResource: getResourceDir: /opt/opennms/share/rrd/snmp/421/hrStorageIndex/PhysicalMemory
      2013-05-17 07:59:06,982 DEBUG [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: passedThresholdFilters: the value of hrStorageType is .1.3.6.1.2.1.25.2.1.2. Pass filter? true
      2013-05-17 07:59:06,982 DEBUG [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: passedThresholdFilters: filter #2: field=hrStorageDescr, regex='^(?:Virtual\sMemory)$'
      2013-05-17 07:59:06,982 DEBUG [CollectdScheduler-50 Pool-fiber3] CollectionResourceWrapper: getLabelValue: Getting Value for hrStorageIndex::hrStorageDescr
      2013-05-17 07:59:06,982 DEBUG [CollectdScheduler-50 Pool-fiber3] GenericIndexResource: getResourceDir: /opt/opennms/share/rrd/snmp/421/hrStorageIndex/PhysicalMemory
      2013-05-17 07:59:06,982 DEBUG [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: passedThresholdFilters: the value of hrStorageDescr is Physical Memory. Pass filter? false
      2013-05-17 07:59:06,982 INFO [CollectdScheduler-50 Pool-fiber3] ThresholdingSet: applyThresholds: Not processing threshold (hrStorageUsed / hrStorageSize) * 100.0 : {evaluator=high, dsName=(hrStorageUsed / hrStorageSize) * 100.0, dsType=hrStorageIndex, evaluators=[{ds=(hrStorageUsed / hrStorageSize) * 100.0, value=10.0, rearm=9.0, trigger=1}

      ]} because no filters matched

      and I end up with 6-7 different events generated regarding Virtual Memory, none for Physical memory.

      Please advise

        Attachments

        1. collectd.log.1.fiber8
          11 kB
          Aaron Scamehorn
        2. threshd-configuration.xml
          5 kB
          Aaron Scamehorn
        3. thresholds.xml
          12 kB
          Aaron Scamehorn

          Activity

            People

            • Assignee:
              agalue Alejandro Galue
              Reporter:
              mvillarejo manuel villarejo
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: