message="{
\"username\": \"Retrospect\",
\"icon_url\": \"http://download.retrospect.com/site/cube_128.png\",
May 11, 2017
JG Heithcock is GM at Retrospect and has eighteen years experience in the storage and backup industry.
tags: partner news author: JG Heithcock blurb_photo: "blog/retrospect_and_slack_778.jpg" blurb: "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." ---
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.
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.
The eventhandler file named RetroEventHandler.sh
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.
message="{
\"username\": \"Retrospect\",
\"icon_url\": \"http://download.retrospect.com/site/cube_128.png\",
for Windows, you are looking for:
message="{
\"username\": \"Retrospect\",
\"icon_url\": \"http://download.retrospect.com/site/cube_128.png\",
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.
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).
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!