Atlassian Hipchat and Opsview

Overview

I’ve recently been on a bit of an integration push with Opsview, wanting to have my software integrate with other software tools to make not only my customers lives easier, my also my own!

At Opsview, I run a range of tools from JIRA and Jenkins, through to Opsview – and also look at Twitter, Salesforce and more. This is a lot of stuff, therefore as mentioned in my late 2014 piece “Collaboration and innovation in 2014” I wanted to find a way to unify all of this disparate information into a single source of truth, or as marketers like to say  “Single pane of glass”, yikes.

Introducing Atlassian Hipchat

Atlassian Hipchat is a ‘team chat, file sharing and integrations’ software. Its main benefit is that like the uber-popular Slack (valued at $2.8BN, yes BN, after its most recent VC round), it allows you to create users (i.e. your entire company), and numerous individual rooms. Users then talk to each other either via the rooms or via IM – thus negating the amount of bullshit emails sent internally and theoretically getting shit done quicker. Thats my saying of the year.

The real beauty of Hipchat over a software like Slack, in my humble opinion, is that is has VoIP, and to a lesser extent video chat. This means that you dont need to run skype alongside, you can just use the inbuilt voice calling functionality. This is a game changer compared to Slack, which is a prettier, ‘cooler’ (ProductHunt.com anyone?) tool.

In this blog, I’ll quickly show you how to setup a new Hipchat room (thus assuming you know what Hipchat is by now and have already signed up!), and how to get alerts from your Opsview monitoring system (must be running 4.6.2 and above) into the aforementioned room. So, lets begin!

Creating your Hipchat room

To create the new Hipchat room you will need to use either the web client or the desktop client.

Firstly, click on ‘New Chat’ and then click ‘Create a new room’. You will be presented with a new modal window asking you for the room name, Topic and some access control radio buttons. Once configured, click ‘Create room’, as below.

Getting the Room ID/Token

This step is fairly easy but let me walk you through it. First, log-in your www.hipchat.com with your account and navigate to ‘Group admin’ in the top right.

Next, click on ‘Rooms’ and then the room you’ve just created. In my example it is ‘DevOps’, as below. Make a note of the ‘API ID’, this will be your ‘Room ID’ from hereon.

Next we need to get our Token. To do this, click on ‘Tokens’ on the left hand side (just under Integrations).

Enter a label, i.e. ‘Opsview’ and then click create. And voila. The big ugly thing is your token. Make a note of that too.

Configure Opsview to talk to Hipchat

Next, we need to login to Opsview and tell it the Room ID and Token which we just created – in order to allow it to talk to Hipchat and send alerts into the room.

To do this, login to Opsview and go to ‘Settings > Notification Methods’ and click on ‘Hipchat’. In here you will see 2 fields as mentioned earlier. Copy and paste your token and room ID into these respective fields, and also SET THE ACTIVE TICK BOX TO YES (if we dont do this then nothing will work!).

See below for a working example:

Next we need to tell Opsview what to send to Hipchat, i.e. EVERYTHING (including load averages and stuff) or just the key things, i.e. website down, disk full, processes not running, etc. To do this, you need to configure notification profiles. You can do this on a per user basis via ‘Settings > Contacts > $CONTACTNAME > Submit and edit notification profiles’ or on a group basis via ‘Settings > Shared notification profiles’.

In my example I just want to quickly send ALL problems to Hipchat, so i’ve clicked:

1. Settings > Contacts

2. Clicked on my username ‘admin’

3. Clicked on ‘submit and edit notification profiles’.

4. Clicked on the green ‘plus’/’add’ symbol in the top right.

Now this screen is the ‘create new notification profile’ screen. This is basically where you create your rule, i.e. between X and Y, tell me about Z problems on these hosts: {…} using hipchat/email/etc’.

For my simple profile, tick everything in ‘Host and Service Groups’,’Keywords’ and ‘BSM’. In the ‘Settings’ tab, ensure that Hipchat is ticked as below.

.. and thats pretty much it! Click ‘Submit changes’, then click ‘Settings > Apply Changes’ and finally click the ‘Reload configuration’ button and voila, its all setup. Next time anything goes critical/warning within your Opsview system you will receive an alert in Hipchat, as below:

Leave a Reply