Synthetic monitoring for Cloudflare Workers — health checks, state machine alerts, and an embedded dashboard.
ClawdWatch is responsible for detecting problems. Your agent (e.g. OpenClaw) is responsible for deciding what to do about them. When a check transitions to unhealthy or recovers, clawdwatch fires an onAlert callback with the details. What happens next — which channels to notify, how to format the message, who to wake up — is entirely up to the agent.
npm install clawdwatchimport { createMonitor } from "clawdwatch";
const monitor = createMonitor<Env>({
storage: {
getD1: (env) => env.MONITORING_DB,
getR2: (env) => env.MY_BUCKET,
getAnalyticsEngine: (env) => env.MONITORING_AE,
},
resolveUrl: (url, env) =>
url.replace("{{WORKER_URL}}", env.WORKER_URL ?? "http://localhost:8787"),
onAlert: async (alert, env) => {
console.log(`Alert: ${alert.type} for ${alert.check.name}`);
},
});
app.route("/monitoring", monitor.app);
export default {
async scheduled(event, env, ctx) {
await monitor.runChecks(env);
},
fetch: app.fetch,
};Full documentation is available at triptechtravel.github.io/clawdwatch.
- Getting Started — install, quick start, storage
- Configuration — createMonitor options, check config, assertions
- API Reference — all routes, state machine, alert payload
- Agent Setup — agent skill template
- Wrangler Bindings — required bindings
Apache-2.0