Retrospect Blog

How to Integrate Retrospect with Slack

Retrospect and slack 778

Slack is an online instant messaging and collaboration tool used by over one million users. One of its compelling innovations is the ability to integrate a wide variety of applications to all go to Slack. With Script Hooks in the latest version of Retrospect, you can monitor Retrospect from Slack as well.

Slack notifications in app

Installing the Retrospect event handler (retroEventHandler)

Download the example Retrospect script hooks from our website.

For Mac, copy the file "RetroEventHandler.sh" from the Slack folder to

/Library/Application Support/Retrospect

For Windows, copy the file "RetroEventHandler.vbs" from the Slack folder to

C:\ProgramData\Retrospect\

In either case, edit the file in your favorite text editor. Find the text:

slackURL="https://hooks.slack.com/services/Txxxxxxxx/Bxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxx"

You will need to set up a Slack web integration to get a URL to replace the placeholder above with.


Setting up a Slack web integration

This document assumes you already have a Slack account. If you do not, you can set one up for free at https://slack.com/.

Once you do, you will need to create a new incoming WebHook.

This will create a URL that Retrospect (or more correctly, the Slack retroEventHandler) can send its messages to. The only requirement here is to pick which Slack channel you wish Retrospect’s notifications to go to.

Add Incoming WebHooks integration for Retrospect
Figure 1. Add Incoming WebHooks integration for Retrospect

Once you choose Add Incoming WebHooks integration, you will get a screen like the one below with a WebHook URL.

Slack Integration URL
Figure 2. Slack Integration URL

Copy this URL into the Slack Retrospect eventhandler in place of the https://hooks.slack.com/services/Txxxxxxxx/Bxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxx text.

Save the file. You are now done. You do not need to restart the Retrospect engine or application for it to start using the script.


Example

Retrospect messages in slack


Testing

To test, run a short backup. This should result in a set of messages similar to the following:


Troubleshooting

If you do not get any messages, confirm the URL did not get cut off or have extra characters added. You can also test just the script by opening up a terminal or cmd window, and cd’ing to the eventhandler folder. Then type:

retroEventHandler "StartApp" "2/10/2017 12:01 AM" "true"

If there are any errors, they should display in the terminal or cmd window and point you toward a solution.

Bio

Bio jg

JG Heithcock

JG Heithcock is CEO of Retrospect, Inc. and has eighteen years experience in the storage and backup industry.