Alerting Documentation

This guide will help you to install and configure a standalone Alerting component

alerts

Prerequisites

Git

Hawkular Alerting is hosted on GitHub so a git client is recommended.

Java 8

You need a Java Virtual Machine compatible with Java 8. Hawkular Alerting runs on the OpenJDK or Oracle runtime environment.

Other Java 8 compatible runtime environments should work as well.

Maven

Hawkular source code is managed with Apache Maven. A minimal version 3.2.x is needed to build Hawkular Alerting project.

Installation

Build the standalone distribution

Checkout the Hawkular Alerting repo and build the standalone distribution

git clone https://github.com/hawkular/hawkular-alerts.git
cd hawkular-alerts
mvn clean install -Pstandalone
The -Pstandalone profile prepares a Wildfly server ready for testing under hawkular-alerts-rest-tests/target/wildfly-{wildfly-version}.

Test the installation

Eventually start the server with $WILDFLY_HOME/bin/standalone.sh.

cd hawkular-alerts-rest/test/target/wildfly-{wildfly-version}
bin/standalone.sh

Test your installation with a query of all demo trigger definitions

curl -X GET -H "Content-Type: application/json" -H "Hawkular-Tenant: 28026b36-8fe4-4332-84c8-524e173a68bf" \
http://localhost:8080/hawkular/alerts/triggers

Populate initial alerts definitions (Optional)

Hawkular Alerting can be initializaded with triggers definitions at start up. Init files should be places under $WILDFLY_HOME/standalone/data/hawkular-alerts folder.

Configuration

Cassandra backend

Hawkular Alerting relies on Apache Cassandra for data storage.

For demo purposes only the standalone distribution uses a pre-packaged and deployable distribution called embedded-cassandra from Embedded Cassandra.

A external Cassandra installation can be used overriding -Dhawkular.backend=external.

Cassandra 2.2.0 or later is required. It is recommended to use the latest 2.2.x release if possible.

You may download a distribution zip file from the Apache Cassandra download page.

You could also use the Datastax community packages for:

Configuration sources

Hawkular Alerting can read configuration from different sources, listed below in order of precedence:

  1. System property (i.e. -Dhawkular-alerts.cassandra-nodes=127.0.0.1)

  2. Environment variable (i.e CASSANDRA_NODES=127.0.0.1)

  3. External file, in the form of a Java Properties file (i.e hawkular-alerts.cassandra-nodes=127.0.0.1)

External configuration file

Hawkular Alerting can read configuration file from <user.home>/.hawkular-alerts.properties.

Parameters and flags

The table below lists the parameters and flags supported.

  • The Name column is the string form when the option is set in the configuration file or as a system property.

  • When the option can be set with an environment variable, the variable name is listed in the Env column.

Name Env Default Description

hawkular-alerts.cassandra-nodes

CASSANDRA_NODES

127.0.0.1

The list of cluster nodes provided to the Cassandra driver, comma-separated

hawkular-alerts.cassandra-cql-port

CASSANDRA_CQL_PORT

9042

The CQL port provided to the Cassandra driver

hawkular-alerts.cassandra-keyspace

-

hawkular_alerts

The keyspace where the data will be stored

hawkular-alerts.cassandra-retry-attempts

-

15

The number of attempts to connect to Cassandra cluster before it throws an I/O error

hawkular-alerts.cassandra-retry-timeout

-

3000

The timeout in milliseconds between connection attempt to Cassandra cluster

hawkular-alerts.engine-delay

-

1000

The delay in milliseconds before the Alerting engine timer starts

hawkular-alerts.engine-period

-

2000

The period in milliseconds between a new execution of the Alerting engine timer

redhatlogo-white

© 2016 | Hawkular is released under Apache License v2.0