Integrate with HipChat

Before we dig into the details of elmah.io, you should sign up or log into HipChat. Create a new room for your team and go to the API page (replace youraccount with your account name). Create a new token with the Send Notification type and label it something meaningful:

HipChat API Page

We will need the generated token in a minute, so keep that tab open.

On elmah.io, go to the Rules tab beneath your log settings. In this example we want a message on HipChat every time a new error is logged in our elmah.io log. To do this, name your rule and input a query like illustrated on the following screenshot:

Add HTTP Request Rule

Hit the Then link and select HTTP request. Input the following values (remember to replace YOUR_TOKEN and YOUR_ROOM):

Field Value
Method POST
URL https://api.hipchat.com/v2/room/YOUR_ROOM/notification
Content Type application/json
Body {"from":"elmah.io","message":"$message"}
Authentication Bearer Token
Token YOUR_TOKEN

The final result should look like this:

HTTP Request Dialog

Click the OK button and add the new rule by clicking Add. This configuration tells elmah.io, to make a HTTP request against the HipChat API, every time a new error is logged. The message at elmah.io is shown as the chat message inside HipChat:

Errors on HipChat

HipChat doesn't allow more than 500 requests per 5 minutes. If you generate more messages to elmah.io, not all of them will show up in HipChat because of this


This article was brought to you by the elmah.io team. elmah.io is the best error management system for .NET web applications. We monitor your website, alert you when errors start happening and help you fix errors fast.

Monitor your website



Comments