Skip to content
This repository was archived by the owner on May 11, 2026. It is now read-only.

Push Notifications

Artur Dryomov edited this page Jun 16, 2015 · 1 revision

Configuration

The ability to receive push notifications will require configuring three endpoints (Google Cloud Messaging, AeroGear Unified Push Server and Hawkular) and hosting two of them (obviously not the Google one).

Google Cloud Messaging and AeroGear Unified Push Server

AeroGear has a great guide — read until the section “Your first Android Push App”. You will need AeroGear Unified Push Server installed. The easiest way is to use OpenShift — AeroGear has a great guide again.

You will need to remember two pairs of credentials. On the picture you can see three lines on the top and three lines on the bottom. The top ones are ones you will use to configure Hawkular, the bottom ones are for Hawkular Android Client. Google Cloud Messaging credentials will be useful as well.

Hawkular AeroGear Unified Push Server Plugin

  1. Build Alerts and deploy the AeroGear plugin.
$ cp hawkular-actions-plugins/hawkular-actions-aerogear/target/hawkular-actions-aerogear.war ${HAWKULAR}/modules/org/hawkular/nest/main/deployments
  1. Open the Hawkular configuration file.
$ vim standalone/configuration/standalone.xml
  1. Find the system-properties block and add following lines replacing placeholders with AeroGear credentials from the first section.
<property name="org.hawkular.actions.aerogear.root.server.url" value="AEROGEAR_SERVER_URL"/>
<property name="org.hawkular.actions.aerogear.application.id" value="AEROGEAR_VARIANT_ID"/>
<property name="org.hawkular.actions.aerogear.master.secret" value="AEROGEAR_SECRET"/>
  1. Run the Hawkular instance.
$ sh bin/standalone.sh
  1. Check if the plugin is registered, it should show up as some INFO messages.
  2. Create any trigger using web UI — for example for email sending.
  3. Check that the AeroGear plugin is in place.
$ http --auth USER:PASS GET :8080/hawkular/alerts/plugins
  1. Create the AeroGear action.
$ http --auth USER:PASS POST :8080/hawkular/alerts/actions "actionPlugin"="aerogear" "actionId"="ups" -v
  1. Attach the action to the created trigger.
$ http --auth USER:PASS GET :8080/hawkular/alerts/triggers
$ http --auth USER:PASS PUT :8080/hawkular/alerts/triggers/TRIGGER "actions":='{"aerogear":["ups"], "email":["mail@mail.com"]}'

Hawkular Android Client

Create a file named server.properties at the root of the project with following contents replacing placeholders with AeroGear credentials from the first section.

ups.url = AEROGEAR_URL
ups.variant = AEROGEAR_VARIANT
ups.secret = AEROGEAR_SECRET
gcm.sender = GOOGLE_SENDER

Clone this wiki locally