This guide will help you to install and configure a standalone Alerting component
alerts
Hawkular Alerting is hosted on GitHub so a git client is recommended.
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.
Hawkular source code is managed with Apache Maven. A minimal version 3.2.x is needed to build Hawkular Alerting project.
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
-Pstandalone
hawkular-alerts-rest-tests/target/wildfly-{wildfly-version}
Eventually start the server with $WILDFLY_HOME/bin/standalone.sh.
$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
Hawkular Alerting can be initializaded with triggers definitions at start up. Init files should be places under $WILDFLY_HOME/standalone/data/hawkular-alerts folder.
$WILDFLY_HOME/standalone/data/hawkular-alerts
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.
-Dhawkular.backend=external
You may download a distribution zip file from the Apache Cassandra download page.
You could also use the Datastax community packages for:
RHEL-based systems
Debian-based systems
Windows.
For OS/X you can install Cassandra via Homebrew
Hawkular Alerting can read configuration from different sources, listed below in order of precedence:
System property (i.e. -Dhawkular-alerts.cassandra-nodes=127.0.0.1)
-Dhawkular-alerts.cassandra-nodes=127.0.0.1
Environment variable (i.e CASSANDRA_NODES=127.0.0.1)
CASSANDRA_NODES=127.0.0.1
External file, in the form of a Java Properties file (i.e hawkular-alerts.cassandra-nodes=127.0.0.1)
hawkular-alerts.cassandra-nodes=127.0.0.1
Hawkular Alerting can read configuration file from <user.home>/.hawkular-alerts.properties.
<user.home>/.hawkular-alerts.properties
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.
Name
When the option can be set with an environment variable, the variable name is listed in the Env column.
Env
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
© 2016 | Hawkular is released under Apache License v2.0 Follow @hawkular_org