What it does
Fire a Grafana OnCall alert group per peepshow run by POSTing a formatted-webhook payload. Works with both cloud and self-hosted OnCall deployments: drop the sink on a formatted-webhook integration URL, optionally authenticate with `GRAFANA_ONCALL_TOKEN`, and every run lands on the on-call timeline as a deduplicated alert with full frame manifest, container metadata tags, and a transcript snippet.
When to reach for it
- Page on-call when a critical video-processing job finishes
- Teams that already route incidents via Grafana OnCall instead of PagerDuty / Opsgenie
- Self-hosted OnCall: point `GRAFANA_ONCALL_URL` at your own integration endpoint
- Resolve matching alerts: flip `GRAFANA_ONCALL_STATE=ok` on healthy runs
Install
npm i -g peepshowUse it
GRAFANA_ONCALL_URL=https://oncall-prod-us-central-0.grafana.net/integrations/v1/formatted_webhook/<key>/ \
peepshow ./trigger.mp4 --sink grafana-oncallMake it automatic
Register the sink once — every run fires it afterward. Scope by --when so it only runs for matching videos.
peepshow sinks add grafana-oncall
peepshow sinks add grafana-oncall --when extension=mp4,mov
peepshow sinks add grafana-oncall --when path=/Volumes/Work/Configuration
GRAFANA_ONCALL_URLWebhook/integration URL. Typically a formatted-webhook URL; API endpoints also work. requiredGRAFANA_ONCALL_TOKENSent as `Authorization: <token>` (no Bearer prefix). Optional when using direct webhook URLs.GRAFANA_ONCALL_TITLEOverride for the alert title.GRAFANA_ONCALL_STATE`alerting` | `ok`. Default `alerting`. Unknown values clamp to `alerting`.
Use with an LLM agent
Every peepshow sink reads its config from env vars and receives a single JSON payload on stdin. An LLM agent (Claude Code, Cursor, Windsurf, Gemini, Codex) can drive the Grafana OnCall sink automatically when three things are true:
- the env vars below are exported in the agent's shell (or a project
.envit can load), - the
peepshowCLI is onPATH— install withnpm i -g peepshow, - a peepshow auto-sink is registered for the run (optional but recommended — makes invocation zero-argument).
1. Set the environment
# Add to ~/.zshrc, ~/.bashrc, or a project .env the agent can load
export GRAFANA_ONCALL_URL="..."2. Register as an auto-sink
peepshow sinks add grafana-oncall
peepshow sinks add grafana-oncall --when extension=mp4,mov3. Example LLM session
You → drop a
.movinto Claude Code.Claude → auto-invokes
/peepshow:slides ./clip.mov. peepshow extracts frames + audio, theGrafana OnCallsink forwards the run to the alert / incident stream. Claude replies with a summary and a link to the created record.
Transcript metadata (language, duration, silence ratio) tags each event.
Write your own
A sink is any executable that reads the --emit json payload on stdin. Shell, Node, Python, Go — the spec's in docs/PLUGINS.md. Register persistent ones with peepshow sinks add-cmd 'your-command'.