This add-on is operated by Collective Idea
Dead simple monitoring for Heroku Scheduler, cron, or any periodic process
Table of Contents
Ever have a periodic process fail to run? Make a code change and your nightly backups fail? Weekly emails not send and you don’t notice until a customer complains? Dead Man’s Snitch has you covered.
We’ll notifify you when your processes don’t run, allowing you to react quickly to correct the problem.
Dead Man’s Snitch makes monitoring periodic processes dead simple.
Provisioning the add-on
Dead Man’s Snitch can be attached to a Heroku application via the CLI:
A list of all plans available can be found here.
$ heroku addons:add deadmanssnitch -----> Adding deadmanssnitch to collective-idea-4005... done, v18 (free)
Once Dead Man’s Snitch has been added a
DEADMANSSNITCH_API_KEY setting will be available in the app configuration and will contain your API key if you would like to access Dead Man’s Snitch programatically. Your installation can be confirmed with the
heroku config:get command.
$ heroku config:get DEADMANSSNITCH_API_KEY vq7hfm8uxPcWl-kqcu_ITQ
After installing Dead Man’s Snitch, sign in at https://deadmanssnitch.com to configure your Snitches to monitor your processes.
Using with Heroku Scheduler
Integrating into Heroku Scheduler is simple. For each Snitch you create,
curl the unique URL (replacing the URL in these examples with your own) after each task:
rake pgbackups:archive && curl https://nosnch.in/208cd43444
You can pass custom data to your Snitch
rake pgbackups:archive && curl -d "m=just checking in" https://nosnch.in/208cd43444
You can even time your jobs and pass the result to your snitch:
m=time ( rake pgbackups:archive &> /dev/null) 2>&1 && curl -d "m=$m" https://nosnch.in/208cd43444
Using inside your code
You can use Dead Man’s Snitch from any language that can fetch a URL.
In Ruby, a simple example is:
require 'open-uri' response = open("https://nosnch.in/208cd43444")
Put it after some complex code, and Dead Man’s Snitch will alert you if it fails to run.
URLs will return a 2xx HTTP status code.
For more information on the features available within the Dead Man’s Snitch dashboard please see the docs at deadmanssnitch.com/faq.
The Dead Man’s Snitch dashboard allows you to configure Snitches to monitor your processes. Each Snitch gives you a unique URL and notification settings.
The dashboard can be accessed via the CLI:
$ heroku addons:open deadmanssnitch Opening deadmanssnitch for collective-idea-4005…
or by visiting the Heroku apps web interface and selecting the application in question. Select Dead Man’s Snitch from the Add-ons menu.
The most common issues is grabbing the wrong URL for a Snitch. Double-check that you copy it correctly.
In most setups, Dead Man’s Snitch won’t get notified if the process it is monitoring fails. Make sure your process is actually working and exiting properly.
Migrating between plans
heroku addons:upgrade command to migrate to a new plan.
$ heroku addons:upgrade deadmanssnitch:newplan -----> Upgrading deadmanssnitch:newplan to collective-idea-4005... done, v18 ($19/mo) Your plan has been updated to: deadmanssnitch:newplan
Removing the add-on
Dead Man’s Snitch can be removed via the CLI.
This will destroy all associated data and cannot be undone!
$ heroku addons:remove deadmanssnitch -----> Removing deadmanssnitch from collective-idea-4005... done, v20 (free)
All Dead Man’s Snitch support and runtime issues should be submitted via one of the Heroku Support channels. Any non-support related issues or product feedback is welcome at via email to firstname.lastname@example.org.