HipChat Notifier
Since Payara Server 4.1.1.171
HipChat is a team chat application created by Atlassian. It can be used for teams to discuss topics in separate "rooms", but also supports integrations from services to notify users of events.
Payara Server Community has now included functionality to send notifications from the Notification Service to a HipChat room
Requirements
To use HipChat as a notification target you must have a HipChat account and a room where notifications will be sent.
Configuration
At a high level, the steps to configure the HipChat notifier are the following:
-
In HipChat, create a new notification token for the required room.
-
Proceed to configure the notifier on Payara Server
HipChat Configuration
Assuming you already have a HipChat account, the steps to create a room and generate a notification token are as follows:
-
Create a new room in HipChat where your notifications will be sent, if one does not exist. The example below shows the creation of a room called "payara-notifications"
After you have created the target room, or if a room already exists, visit
https://${your-team-name}.hipchat.com/rooms
and search for the room name to filter out any others, as shown below: -
Select your room and select the "Tokens" link in the left-hand menu to add a new notification token:
-
Finally, give your token an informative label, since this will be displayed in your room when notifications are received:
Payara Server Configuration
Once you have a token, the configuration of the notifier within Payara Server Community involves just one step. In the Admin Console, simply add the room name and token to the appropriate fields, as shown below:
Make sure that the Enabled box is ticked so that the notifier will be used. If you would like the changes to take effect without needing a restart, tick the Dynamic box as well.
To make these changes using an asadmin
command use the following command sample,
which mirrors the above screenshot:
asadmin> notification-hipchat-configure --enabled=true --roomName="payara-notifications" --token="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" --dynamic=true
To check the current applied configuration from asadmin, run the following command:
asadmin get-hipchat-notifier-configuration
It will return the current configuration, with whether it is currently enabled, the room name, and the current token in use:
$ asadmin get-hipchat-notifier-configuration
Enabled Room Name Token
true payara-notifications xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Troubleshooting
When you have correctly configured the HipChat notifier, it can be used to push notifications to your configured room. If you do not see any notifications, check the following:
-
Is the HipChat notifier enabled?
-
Is the notification service itself enabled?
-
Is there a service configured to use the notifier? (e.g. the HealthCheck service)
-
Is the service configured to send notifications frequently enough to observe?
-
Have you enabled the service after configuring it?
-
Check that you have not hit the rate limit for the HipChat API
Once configuring is complete and both the notification service and the service you are using are enabled, you should see output like the example, which shows the Healthcheck service outputting CPU information every 3 seconds:
.