Retrospect Blog

Customizing your Slack integration for Retrospect

Slack is an online instant messaging and collaboration tool used by over one million users. The recent release of Retrospect has eventhandlers for Slack as well as a number of other services. Today’s blog post is about customizing the default Slack eventhandler to include the Retrospect server name for each message - handy if you have more than one Retrospect server running.

Getting started

First, set up the default Retrospect slack event handler as described in our Knowledge Base article Integrating Retrospect with Slack. Once you have Slack and Retrospect running, it is time to change the event handler (also called a Script hook) to include the name of the Retrospect server. You can also make your own customizations following these steps as well.

Editing the eventhandler

The eventhandler file named on the Mac, located at /Library/Application Support/Retrospect or named RetroEventHandler.vbs and located at C:\ProgramData\Retrospect\ on Windows. In either case, they are both simple text files and so you can edit them with your favorite text editor or even just TextEdit or Notepad.

After opening them, scroll down until you are in the postToSlack function.
    \"username\": \"Retrospect\",
    \"icon_url\": \"\",

for Windows, you are looking for:

    \"username\": \"Retrospect\",
    \"icon_url\": \"\",

In both cases, username ("Retrospect"") is the text that is shown as the sender of the message:

For each server you have, change "Retrospect" to a more unique title, like "Retrospect Building One", or something snazzier. Save and you are done.

Going forward

You can make other changes here as well. By default, the Retrospect event handler logs every message to slack, but you may not want to see them or you might want to have more information for a given message. To delete the message that is sent for the beginning of a backup of a volume, you can either delete the StartSource method or just comment out the postToSlack line (using # for the .sh file and REM for the .vbs file).

Ideas, suggestions, requests?

Have you made some cool modifications or written an eventhandler you would like to share? Or do you just have a suggestion or request? Let us know!


JG Heithcock

JG Heithcock is GM at Retrospect and has eighteen years experience in the storage and backup industry.