The backup service Ottomatik implemented webhooks last year (at my request, ha!) to send success or failure payloads to a URL of your choice. As Ottomatik doesn’t yet provide a Slack integration. Most teams around the world use Slack to pipe notifications into their channels and it’s a pretty good way of doing things.
You’re going to need to set up a webhook for Slack which you can do on their site. To make things easier, you can use serverless project to make dealing with serverless providers easier. Follow the install steps listed on serverless website to get started.
We’ll use Guzzle to send our API call to Slack. We’ll put all of the code that executes our function in a file named
You can clone this repository ssx/openwhisk-ottomatik-to-slack as a quick start.
Update the URL for the Slack webhook and we’ll then push our function up.
Here’s everything in one go:
which will return a webhook for you to use in Ottomatik:
If everything went to plan, you’ll now get near real time updates on how your backups are performing.
Comments, idea and thoughts welcome over on Github.