Group Chat Tools, such as 37Signals Campfire have been adopted by many companies for communication management. It is straightforward to configure LogicMonitor to deliver alerts to group chat rooms via a Custom HTTP Alert Delivery Method.
A good use of this integration is to both avoid email alert overload, and to increase responsiveness to an alert. Having alerts sent to Campfire requires:
- Getting an Authentication Token from Campfire
- Configuring a Custom HTTP Alert Delivery Method within LogicMonitor
- Adding the Custom HTTP Alert Delivery Method to an escalation chain
1. Getting an Authentication Token from Campfire
NOTE: We recommend that you make a separate campfire user named LogicMonitor which you will use to log in when generating the authentication token. This user will be the one shown as speaking the alerts into the room, and that user will not receive the alert in the chatroom unless they refresh the page.
Obtain a Campfire “Auth Token”
Login to Campfire from your web browser. From your home page click the “My Info” link at the top right. The token will be on this page.
The only other information that you will need from Campfire is the URL for the room you want to be alerted in, which you can copy directly from your browser while in the relevant room. For example:
That’s all we need from Campfire. Now on to getting it into LogicMonitor!
2a. Adding your Campfire Auth Token to LogicMonitor
The Auth Token will be be used by a LogicMonitor Custom HTTP Alert Delivery Method to route the alerts into Campfire. While you could hardcode it directly into the Custom HTTP Alert Delivery Method, it is a better practice to define it as a Property within LogicMonitor, just as you would set other authentication credentials such as an SNMP community or a MySQL password.
The properties we will be setting are:
This property corresponds to the “Auth Token” gathered earlier from Campfire.
From the “Devices” tab in LogicMonitor, select Manage at the account level (click the company name in the navigation pane) and set the properties:
2b. Creating a Custom HTTP Alert Delivery Method
Add a custom HTTP alert delivery method from Settings | Integrations | Add | Custom HTTP Delivery Method:
For each request, you can select which alert statuses trigger the HTTP request. Requests are sent for new alerts (status: Active), and can also be sent for alert acknowledgements (status: Acknowledged), clears (status: Cleared) and escalations/de-escalations/adding note (status: Escalated).
Note: If the escalated status is selected and a note is added to the alert, an update request is sent whether the alert is active/cleared. If the escalated status is not selected and a note is added to the alert, a request is not sent.
The following fields are set:
- HTTP Method: HTTP Post
- URL: https://yourcompany.campfirenow.com/room/570279/speak.xml Remember: This is the url from YOUR specific chat room and you need to append /speak.xml to the end
- Username: ##campfire_api.pass##
- Password: (you don’t need a password the authentication token counts as the username and password)
- Alert Data: <message><body>##ALERTID## ##LEVEL## ##HOST## ##DATASOURCE## ##DATAPOINT##: ##VALUE## ##THRESHOLD## (##ALERTSTATUS##) https://<MY-SITE>.logicmonitor.com/santaba/uiv3/alert_mobile/index.jsp#detail~id=LME254587&type=eventAlert </body></message>
- Data Format: XML Data
3. Configure an Alert Rule and Escalation Chain
The Custom HTTP Alert Delivery Method you just created (“to_Campfire_TechOps” in our example) is now a new alert destination for any user. For the purpose of Campfire, you will simply want to add one user with this new alert destination to any escalation chain in which you want a message to a Campfire room to be part of the chain. In the example below, we chose the user Bill. The only difference in using different users is if a reference is made to the “##ADMIN##” token in the Alert Data. If that token is present, than the user for which the alert is being generated will be substituted. In this case we are not referencing ##ADMIN##, so any active user will work:
Any alert that hits the “CampfireErrors” escalation chain (following the routing of the defined rules) will now send an alert message to the specified Campfire room (“TechOps: in our example)