Skip to main content

Checker

The checker is automatically installed as soon as you install an alerter feature.

It uses the etc/org.apache.karaf.decanter.alerting.checker.cfg configuration file.

This file contains the check to perform on the collected properties.

The format of this file is:
type.propertyName.alertLevel=checkType:value
where:
  • type is optional. It allows you to filter the check for a given type of collected data. It’s particularly interesting when Decanter collects multiple JMX object names or servers. You may want to perform different checks depending of the type or source of the collected data.
  • propertyName is the data property key. For instance, loggerName, message, HeapMemoryUsage.used, and so on.
  • alertLevel is the alerting level for this check. The only two possible values are error (critical alert), or warn (severe alert).
  • checkType is the check type. Possible values are range, equal, notequal, match, and notmatch.
  • value is the check value, where the data property value has to verify.

The Decanter Checker supports numeric or string check.

To verify a numeric value, you can use:

  • range to check if the metric is between two values
  • equal to check if the metric is equal to a value
  • notequal to check if the metric is not equal to a value
For instance, if you want to check that the number of threads is between 0 and 70, you can use:
ThreadCount.error=range:[0,70]
You can also filter and specify the type on which we check:
jmx-local.ThreadCount.error=range:[0,70]

If the thread count is out of this range, Decanter will create an error alert sent to the alerters.

Another example is if you want to check if the myValue is equal to 10:

myValue.warn=equal:10

If myValue is not equal to 10, Decanter will create a warn alert send to the alerters.

To verify a string value, you can use:

  • match to check if the metric matches a regex
  • notmatch to check if the matric doesn’t match a regex
For instance, if you want to create an alert when an ERROR log message happens, you can use:
loggerLevel.error=match:ERROR
You can also use complex regex:
loggerName.warn=match:(.*)my\.loggger\.name\.(.*)

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!