Alerters
When the value does not verify the check in the checker configuration, an alert is created and sent to the alerters.
Apache Karaf Decanter provides ready to use alerters.
Log
The Decanter Log alerter log a message for each alert.
The decanter-alerting-log feature installs the log alerter:
karaf@root()> feature:install decanter-alerting-logThis alerter does not need any configuration.
The Decanter e-mail alerter sends an e-mail for each alert.
karaf@root()> feature:install decanter-alerting-email#
# Decanter e-mail alerter configuration
#
# From e-mail address
from=
# To e-mail address
to=
# Hostname of the SMTP server
host=smtp.gmail.com
# Port of the SMTP server
port=587
# enable SMTP auth
auth=true
# enable starttls and ssl
starttls=true
ssl=false
# Optionally, username for the SMTP server
#username=
# Optionally, password for the SMTP server
#password=- the from property specifies the from e-mail address (for instance dev@karaf.apache.org)
- the to property specifies the to e-mail address (for instance dev@karaf.apache.org)
- the host property specifies the SMTP server hostname or IP address
- the port property specifies the SMTP server port number
- the auth property (true or false) specifies if the SMTP server requires authentication (true) or not (false)
- the starttls property (true or false) specifies if the SMTP server requires STARTTLS (true) or not (false)
- the ssl property (true or false) specifies if the SMTP server requires SSL (true) or not (false)
- the username property is optional and specifies the username to connect to the SMTP server
- the password property is optional and specifies the password to connect to the SMTP server
Camel
The Decanter Camel alerter sends each alert to a Camel endpoint.
It allows you to create a route which reacts to each alert. It is a very flexible alerter as you can apply transformation, use EIPs, Camel endpoints, and so on.
This alerter creates a Camel exchange. The body of the in message contains a Map with all alert details (including alertLevel, alertAttribute, alertPattern and all other details).
karaf@root()> feature:install decanter-alerting-camelThis feature also installs the etc/org.apache.karaf.decanter.alerting.camel.cfg configuration file:
#
# Decanter Camel alerter
#
# alert.destination.uri defines the Camel endpoint URI where
# Decanter send the alerts
alert.destination.uri=direct-vm:decanter-alertThis configuration file allows you to specify the Camel endpoint URI where to send the alert (using the alert.destination.uri property).
alert.destination.uri=direct-vm:decanter-alert<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
<camelContext xmlns="http://camel.apache.org/schema/blueprint">
<route id="decanter-alert">
<from uri="direct-vm:decanter-alert"/>
...
ANYTHING
...
</route>
</camelContext>
</blueprint>