Parallel icon
Download icon
Size icon
Assert icon
Queries icon
Query icon
Schedule icon

Calculate recorded Statuspage incident exposure without counting overlaps twice

Fetch Statuspage incidents on a schedule, union overlapping intervals with native DuckDB and export exposure, audit and source-coverage reports.

Categories
Data

Measure recorded incident exposure from a real Statuspage feed without adding overlapping durations twice. Native HTTP tasks fetch the source; DuckDB performs the calculation and verifies the saved artifacts.

How it works

  1. A daily schedule fetches /api/v2/incidents.json and /api/v2/components.json in parallel, with retries and a 2 MiB processing limit after download. Manual runs use the same path.
  2. Validate the page IDs, selected components and incident schema. Use __page__ for page-wide exposure or supply component IDs. Ignore impact none; use created_at through resolved_at; retain zero-duration records in the audit.
  3. Clip intervals to [window_start, window_end). Unresolved incidents extend to the end. Empty window inputs select the trailing 24 hours; explicit windows allow up to 366 days.
  4. Merge nested, overlapping and touching intervals using the running maximum of preceding ends. Export reports in parallel, reopen them and assert boundaries, durations and incident-count conservation.

What you get

  • CSV with recorded availability, exact microsecond durations and merged-window counts.
  • Downtime Parquet, an incident/component audit and the original incident JSON.
  • Coverage CSV with returned count, oldest start, feed-limit flag and unmapped incident count. Failed verification withholds flow outputs.

Who it's for

SRE teams reviewing third-party dependency incidents and preparing evidence for incident reviews.

Why orchestrate this with Kestra

Scheduled HTTP ingestion, native SQL checkpoints, parallel reports and a final Assert share one execution. No scripts or Docker task runner are needed.

Prerequisites

Install the DuckDB JDBC plugin and allow HTTPS to the public Statuspage host. The public endpoint documents only 50 recent incidents; this is not a complete historical ledger or an SLO. Missing records cannot be recovered by widening the window. Component reports apply the full incident lifecycle to each listed component, not its individual degradation timeline. Incidents without components count only under __page__; maintenance and impact weighting are excluded.

Secrets

None for public pages. Private pages need authenticated HTTP tasks.

Quick start

  1. Import the flow and run the GitHub Statuspage defaults with services: ["__page__"].
  2. Inspect coverage before interpreting availability. Use IDs from the components endpoint for component reports.
  3. Enable the 06:00 UTC schedule. Explicit timestamps require seconds, an offset or Z, and at most six fractional digits.

How to extend

Persist snapshots to build your own ledger, or use a paginated authenticated incident API for complete backfills.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.