watch_list

Uptime Robot

Define Uptime Robot monitors as code in a Robotfile

Manages
Uptime Robot monitors
Language
Ruby
Package
watch_list
CLI
watch_list
Config file
Robotfile
The watch_list repository is archived on GitHub and has been dormant since 2016; verify compatibility with today's Uptime Robot API before use.
Robotfile
monitor "http monitor" do
  target "http://example.com"
  interval 5
  paused false
  alert_contact :email, "[email protected]"
  type :http
end

monitor "keyword monitor" do
  target "http://example.com"
  interval 5
  paused false
  alert_contact :email, "[email protected]"

  type :keyword do
    keywordtype :exists
    keywordvalue "Example Domain"
  end
end
In short

watch_list is a Ruby command-line tool that manages Uptime Robot monitors as code. You export existing HTTP, keyword, ping, and port checks into a Robotfile, review edits in Git, then apply them idempotently. A dry-run previews every monitor it would create, update, or delete.

What is watch_list?

watch_list is a command-line tool that manages Uptime Robot monitors as code. Instead of clicking through the Uptime Robot dashboard to build checks, you declare them in a Ruby file. This file is called a Robotfile. watch_list then creates, updates, or removes monitors to match. Auth is a single WATCH_LIST_API_KEY variable.

Uptime checks are easy to forget. You set them once and rarely look again. When a service is renamed or retired, its monitor often lives on. It pages nobody, or pages the wrong people. Monitors as code fixes that:

  • The Robotfile sits with your other codenized configuration.
  • A new service adds its checks in the same pull request that ships it.
  • A dry-run shows drift between the file and the account.

watch_list suits small teams standardized on Uptime Robot who want reviewable monitoring. If your alerts live in Datadog instead, Barkdog applies the same idea there.

Key facts
  • Manages Uptime Robot monitors (HTTP, keyword, ping, and port) as code.
  • Config lives in a file named the Robotfile, kept in Git.
  • Can encrypt secrets like basic-auth passwords so they commit safely.
  • A dry-run shows drift, and applies are idempotent.
  • For Datadog alerts, its sibling Barkdog uses the same pattern.
  • The repository is archived and dormant since 2016; verify API compatibility.
Illustration: Uptime Robot monitors managed as code with watch_list
Getting started

Install and run watch_list

1

Install

Install the watch_list gem (Ruby required).

$ gem install watch_list
2

Export current state

Pull the live Uptime Robot configuration into a Robotfile.

$ watch_list -e -o Robotfile
3

Dry-run, then apply

Preview the diff, then apply the change for real.

$ watch_list -a --dry-run

watch_list uses the classic export, review, apply loop. With WATCH_LIST_API_KEY set, run watch_list -e to export every monitor in the account into the DSL, then commit the file. That first export is worth a careful read. Stale monitors from long-dead services tend to surface right away.

To add or change a check, edit the Robotfile and run watch_list -a --dry-run. The dry-run compares the file to the live account. It lists the monitors it would create, update, or delete, with no state-changing API calls. When the plan matches the pull request, run watch_list -a. Applies are idempotent, so the same command is safe in CI. A periodic dry-run doubles as drift detection for monitors edited by hand in the UI.

Pro tip

Run your first export and read it top to bottom before changing anything. Old accounts almost always hide monitors for services that no longer exist.

Capabilities

What watch_list can do

Four monitor types

The DSL covers Uptime Robot's core checks: <code>:http</code>, <code>:keyword</code> (with <code>keywordtype</code> and <code>keywordvalue</code>), <code>:ping</code>, and <code>:port</code>.

Alert contacts in the DSL

<code>alert_contact</code> attaches notification targets like email addresses to a monitor. Standalone <code>alert_contact</code> blocks define the contacts themselves.

Idempotent apply with dry-run

<code>watch_list -a</code> makes the account match the Robotfile. The dry-run prints the plan without calling the API, and re-applying an unchanged file does nothing.

Built-in secret encryption

<code>watch_list --encrypt</code> turns values like basic-auth passwords into ciphertext you can commit. It is keyed by <code>watch-list.pass</code> and <code>watch-list.salt</code>, and decrypts on apply.

Export and split

<code>watch_list -e</code> dumps every monitor into the DSL. Add <code>--split</code> to write them across several files for larger accounts.

Status from the terminal

<code>watch_list -s</code> reports current monitor status. It is handy for a quick check without opening the dashboard.

Monitor types you can declare
TypeWhat it checks
:httpA URL returns a healthy response
:keywordA page contains (or lacks) a given word
:pingA host answers a network ping
:portA specific TCP port is open
In practice

When teams reach for watch_list

Monitors shipped with the service

Add the HTTP and keyword checks for a new endpoint in the same pull request that adds it. The monitor gets reviewed with the code it watches. Nothing waits on someone clicking through the dashboard.

Cleaning up a crowded account

Export the full account to a Robotfile and read it like an inventory. Deleting a stale monitor is a one-line diff, checked by dry-run, not a risky bulk edit in the UI.

Committing checks that need credentials

Monitors on basic-auth endpoints need a username and password. The <code>--encrypt</code> workflow keeps those secrets as ciphertext in Git, and watch_list decrypts them at apply time.

FAQ

watch_list questions, answered

Is watch_list still maintained?
No. The repository is archived on GitHub and has been dormant since 2016. Uptime Robot's API has changed since then, so test carefully before you rely on it. Treat this page partly as a reference for the monitors-as-code pattern.
What happens to monitors not in the Robotfile?
Like the other codenize tools, it is declarative. Monitors in the account but not in the file are deleted on apply. Always run watch_list -a --dry-run and read the plan first.
How do I authenticate against Uptime Robot?
Set the WATCH_LIST_API_KEY environment variable to your Uptime Robot API key, or pass --api-key. The key needs write access if you plan to apply changes, not just export.
Can I keep HTTP passwords in Git safely?
Yes. Set watch-list.pass and watch-list.salt, run watch_list --encrypt, and put the ciphertext in the DSL as httppassword secure: "...". The plaintext never lands in the repo.
What are the modern alternatives?
Uptime Robot now has an official Terraform provider. Tools like Grafana synthetic monitoring or Checkly offer monitoring-as-code natively. Starting fresh in 2026, those are safer bets. watch_list is still a clean, minimal example of the pattern.