Dead Man's Snitch

Sign In

  1. Docs
  2. Overview

Field Agent

Field Agent is a command line utility whose job is to gather extra data on your critical tasks, package it up, and report it back to Dead Man's Snitch. This means new possibilities for alerting and debugging of issues while maintaining the simplicity we are so proud of at Dead Man's Snitch.

Available For



Field Agent is designed to wrap the execution of a script or command. This allows it to gather data about your job like timing information and exit codes. The first parameter is the unique token you can get from your Snitch's setup page. Anything after that will be executed as the command or script you want to run.

It's important that your scripts exit cleanly (e.g. exit 0) if they run without an error. If they do error they should exit with any other status code (exit 1 is pretty common).

Usage: dms [-sv] TOKEN [CMD...]

Dead Man's Snitch Field Agent -

Run a command and notify Dead Man's Snitch when it finishes:
  dms c2354d53d2 /usr/local/bin/run_my_backups --all-databases

Just ping your snitch, indicating success:
  dms c2354d53d2

-h, --help             Print this message
-s, --silent           Silence the command's output
    --update           Update to the latest Field Agent release
    --exclude-output   Don't send command's output during check-in
-v, --verbose          Enable verbose logging output
-V, --version          Print the version and exit

What Data Field Agent Collects and Sends

Field Agent sends back extra information about your system and the job being run. Not everything is currently exposed, but we do have plans to utilize all the information being sent. Instead of using curl, it's recommended you start using Field Agent today so that you'll be ready to take advantage of the new features once they're ready.

Data Sent by Field Agent

Adding to an Existing Script

If you have an existing script (like the one below), it's easy to check-in with Dead Man's Snitch by adding the Field Agent to the shebang line.


Prefix the shebang line with dms and the Snitch's token:

#!/path/to/dms -s c2354d53d2 /bin/bash -e