Examples / Persistent watches

Small watches.
Useful answers.

Each example uses a supported source and an explicit condition. Validate the manifest, try a fixture, and apply it to your daemon when you’re ready.

Choose a source and a condition

A few good starting points.

HTTP

API health

Check every five seconds. Fire after three server errors and recover after two nonmatching observations.

Build an HTTP watch →
Push

Missing heartbeat

Record an incident when ten minutes pass without fresh input. A new observation recovers it.

Watch for missing data →
Command

A local status check

Run an explicit, trusted command returning JSON. Select the fields the condition needs.

Run a local check →
Change

A new version or event

Keep a typed baseline or deduplicate provider IDs within a declared horizon.

Recognize a change →

Try it without source requests

Replay the failure.
Then the recovery.

The API-health fixture contains three 5xx responses followed by two 200 responses. Replay evaluates those recorded inputs without sending a notification.

Follow the fixture walkthrough →
From a built source checkout
./ding test examples/watches/api-health.yaml \
  --events testdata/watches/api-health.jsonl \
  --json
500502503200200

Bring your own data

Explicit inputs.
Inspectable behavior.

Sports, prices, flights, and traffic need a real feed and any upstream calculations. Ding does not bundle provider access or invent an integration.
Browse the documentation →