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

ThresholdingSet isn't catching the exceptions thrown by the threshold evaluators

    Details

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

      Description

      In some occasions, the threshold states get corrupted for a reason that I'm still trying to understand, and that could cause exceptions like the following on collectd.log:

      2013-10-16 10:42:41,588 INFO [CollectdScheduler-1555550 Pool-fiber7] ThresholdingSet: applyThresholds: Processing threshold bufferFail : {evaluator=absoluteChange, dsName=bufferFail, dsType=node, evaluators=[

      {ds=bufferFail, value=1.0, rearm=0.9, trigger=1}]}
      2013-10-16 10:42:41,588 DEBUG [CollectdScheduler-1555550 Pool-fiber7] CollectionResourceWrapper: getCounterValue: id=node[57].resourceType[node].instance[null].metric[bufferFail], last=0.0@Wed Oct 16 10:27:24 EDT 2013, current=0.0
      2013-10-16 10:42:41,588 INFO [CollectdScheduler-1555550 Pool-fiber7] ThresholdingSet: applyThresholds: All values found, evaluating
      2013-10-16 10:42:41,588 DEBUG [CollectdScheduler-1555550 Pool-fiber7] ThresholdEntity: evaluate: value= 0.0 against threshold: {evaluator=absoluteChange, dsName=bufferFail, dsType=node, evaluators=[{ds=bufferFail, value=1.0, rearm=0.9, trigger=1}

      ]}
      2013-10-16 10:42:41,588 ERROR [CollectdScheduler-1555550 Pool-fiber7] CollectableService: An undeclared throwable was caught during data collection for interface 10.112.0.138/SNMP
      org.opennms.netmgt.collectd.CollectionException: An undeclared throwable was caught during data collection for interface 10.112.0.138/SNMP
      at org.opennms.netmgt.collectd.CollectableService.doCollection(CollectableService.java:398)
      at org.opennms.netmgt.collectd.CollectableService.run(CollectableService.java:300)
      at org.opennms.netmgt.scheduler.LegacyScheduler$1.run(LegacyScheduler.java:287)
      at org.opennms.core.concurrent.RunnableConsumerThreadPool$FiberThreadImpl.run(RunnableConsumerThreadPool.java:419)
      at java.lang.Thread.run(Thread.java:722)
      Caused by: java.lang.IllegalStateException: This thresholding strategy can only be used for thresholding types of 'high' and 'low'.
      at org.opennms.netmgt.threshd.ThresholdEvaluatorHighLow$ThresholdEvaluatorStateHighLow.isThresholdExceeded(ThresholdEvaluatorHighLow.java:173)
      at org.opennms.netmgt.threshd.ThresholdEvaluatorHighLow$ThresholdEvaluatorStateHighLow.evaluate(ThresholdEvaluatorHighLow.java:133)
      at org.opennms.netmgt.threshd.ThresholdEntity.evaluateAndCreateEvents(ThresholdEntity.java:243)
      at org.opennms.netmgt.threshd.ThresholdingSet.applyThresholds(ThresholdingSet.java:285)
      at org.opennms.netmgt.threshd.CollectorThresholdingSet.applyThresholds(CollectorThresholdingSet.java:100)
      at org.opennms.netmgt.threshd.ThresholdingVisitor.completeResource(ThresholdingVisitor.java:193)
      at org.opennms.netmgt.collectd.SnmpCollectionResource.visit(SnmpCollectionResource.java:162)
      at org.opennms.netmgt.collectd.SnmpCollectionSet.visit(SnmpCollectionSet.java:307)
      at org.opennms.netmgt.collectd.CollectableService.doCollection(CollectableService.java:385)
      ... 4 more

      I think that it would be better if we trap any exception thrown by the ThresholdEvaluator on the applyThresholds method from the ThresholdingSet class in order to avoid interrupt the operation of Collectd.

        Attachments

          Activity

            People

            • Assignee:
              agalue Alejandro Galue
              Reporter:
              agalue Alejandro Galue
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: