Skip to main content

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).

The decanter-alerting-camel feature installs the Camel alerter:
karaf@root()> feature:install decanter-alerting-camel

This 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-alert

This configuration file allows you to specify the Camel endpoint URI where to send the alert (using the alert.destination.uri property).

For instance, in this configuration, if you define:
alert.destination.uri=direct-vm:decanter-alert
You can create the following Camel route which will react to the 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>

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!