Using HipChat for PRTG Notifications

HipChat-Icon

As a Network Engineer for a large company I cannot recommend Paessler’s PRTG for systems monitoring enough. WIth over 100 different types of sensors built into PRTG it’s the definite goto tool for me to monitor devices and services within our organisation. Great Application.

If you do any type of system administration you cannot be without a monitoring tool – and I think personally this is one of the best ones out there and has infinite options to allow you to customise it for your business..

One new thing that I was introduced to lately, that our web design and development team use, is this great chat application called HipChat by Atlassian. While it’s also a great a video, whiteboard & chat tool in its own right with a web based, windows, linux and OSX/IOS native application. It also has some super-slick API’s which can be used to create notifications straight into HipChat from external sources. The guys were showing me how they use it for notifications from their GIT builds, Jenkins CI Tasks and other design-centric operations they do on a day-to-day.

 

So.. I started thinking to myself that perhaps rather than getting “service x is up or down” email notifications it would be great to be able to supplement this with a HipChat Group/Room which would allow all these PRTG notifications to be pushed into it for easy viewing each day.

With PRTG’s HTTP Action Notifications this is very simple as it allows you to post to an endpoint and HipChat will automatically insert this message into a room of your choice.

 

First get a secret auth key which PRTG can use to communicate with HipChat.

1. Go to Group Admin > API

2. Create a notification api token and give it a appropriate name e.g. PRTG Notifications

 

Then you need to find the ID of the room you want to post to by logging into HipChat and navigating to:

https://www.hipchat.com/rooms/ids

This will list all the HipChat Room and their associated ID’s.

 

Once you have these things set up you can basically post to HipChat using the following URL string if you want to do some tests:

 

https://api.hipchat.com/v1/rooms/message/?auth_token={api auth token}&room_id={roomid}&from=PRTG&color={color}

 

Very simple..

 

We can then take this one step further by then extending PRTG’s HTTP Notifications.

1. Open PRTG. Navigate to Setup > Account Settings > Notifications

2. Create a new Notification

3. Fill in the normal details but also tick the box for a Execute HTTP Action

4. Enter the URL as follows:

https://api.hipchat.com/v1/rooms/message/?auth_token={api auth token}&room_id={room id}&from=PRTG&color={color}

5. and the Postdata pertaining to your notification in the following format:

&message=%status – %device %name – %down (%message)

 

 

 

And you’re done – you can now attach this notification to any PRTG sensors and you will get status messages flowing into PRTG. In my setup I created an UP and DOWN PRTG notification with different colours (Red/Green) which works really well.

 

Happy HipChatting!

TheNinja.

 

Using HipChat for PRTG Notifications was last modified: January 28th, 2015 by admin
  • Saggi 26

    Hi Adam, Thank you for this very informative article. I am able to integrate PRTG with Hipchat but I am facing one problem. PRTG does not replace placeholders with actual values. It displays it as %status – %device %name – %down (%message)

    Can you let me know what needs to be done ?

    Regards,

    • adamcaz

      Hi Saggi, if you are using the ‘test’ button on the notification it will send the placeholders through as plain text e.g. ‘%message’.

      However if you attach the notification to a sensor and trigger the sensor you should get a real HipChat notification come through.