Skip to content

Open-source status page, incident response and uptime monitoring

Feature: Support ChecklyHQ Importer (#2377)

Moulik Aggarwal1fbdab8793ea
diff --git a/apps/dashboard/src/components/forms/components/form-import.tsx b/apps/dashboard/src/components/forms/components/form-import.tsx
index b772627d7..2ab39ac0c 100644
--- a/apps/dashboard/src/components/forms/components/form-import.tsx
+++ b/apps/dashboard/src/components/forms/components/form-import.tsx
@@ -4,6 +4,7 @@ import { zodResolver } from "@hookform/resolvers/zod";
import { Warning } from "@openstatus/icons";
import {
BetterstackIcon,
+ ChecklyIcon,
InstatusIcon,
StatuspageIcon,
} from "@openstatus/icons/brand";
@@ -46,11 +47,13 @@ import {
import { useTRPC } from "@/lib/trpc/client";
const schema = z.object({
- provider: z.enum(["statuspage", "betterstack", "instatus"]),
+ provider: z.enum(["statuspage", "betterstack", "instatus", "checkly"]),
apiKey: z.string().min(1, "API key is required"),
statuspagePageId: z.string().optional(),
betterstackStatusPageId: z.string().optional(),
instatusPageId: z.string().optional(),
+ checklyAccountId: z.string().optional(),
+ checklyStatusPageId: z.string().optional(),
includeMonitors: z.boolean(),
includeStatusReports: z.boolean(),
includeSubscribers: z.boolean(),
@@ -89,6 +92,8 @@ export function FormImport({
statuspagePageId: "",
betterstackStatusPageId: "",
instatusPageId: "",
+ checklyAccountId: "",
+ checklyStatusPageId: "",
includeMonitors: true,
includeStatusReports: true,
includeSubscribers: false,
@@ -102,6 +107,8 @@ export function FormImport({
const watchStatuspagePageId = form.watch("statuspagePageId");
const watchBetterstackStatusPageId = form.watch("betterstackStatusPageId");
const watchInstatusPageId = form.watch("instatusPageId");
+ const watchChecklyAccountId = form.watch("checklyAccountId");
+ const watchChecklyStatusPageId = form.watch("checklyStatusPageId");
const previewMutation = useMutation(
trpc.import.preview.mutationOptions({
@@ -121,6 +128,10 @@ export function FormImport({
form.setError("apiKey", { message: "API key is required" });
return;
}
+ if (watchProvider === "checkly" && !form.getValues("checklyAccountId")) {
+ form.setError("checklyAccountId", { message: "Account ID is required" });
+ return;
+ }
previewMutation.mutate({
provider: watchProvider,
apiKey: watchApiKey,
@@ -136,6 +147,14 @@ export function FormImport({
watchProvider === "instatus"
? watchInstatusPageId || undefined
: undefined,
+ checklyAccountId:
+ watchProvider === "checkly"
+ ? watchChecklyAccountId || undefined
+ : undefined,
+ checklyStatusPageId:
+ watchProvider === "checkly"
+ ? watchChecklyStatusPageId || undefined
+ : undefined,
pageId,
});
}
@@ -236,6 +255,18 @@ export function FormImport({
Instatus
</FormLabel>
</FormItem>
+ <FormItem className="border-input has-data-[state=checked]:border-primary/50 has-focus-visible:border-ring has-focus-visible:ring-ring/50 relative flex cursor-pointer flex-row items-center gap-3 rounded-md border px-2 py-3 text-center shadow-xs transition-[color,box-shadow] outline-none has-focus-visible:ring-[3px]">
+ <FormControl>
+ <RadioGroupItem value="checkly" className="sr-only" />
+ </FormControl>
+ <ChecklyIcon
+ className="text-foreground size-4 shrink-0"
+ aria-hidden="true"
+ />
+ <FormLabel className="text-foreground cursor-pointer text-xs leading-none font-medium after:absolute after:inset-0">
+ Checkly
+ </FormLabel>
+ </FormItem>
<div className="text-muted-foreground col-span-1 self-end text-xs sm:place-self-end">
Missing a provider?{" "}
<a href="mailto:[email protected]">Contact us</a>
@@ -265,7 +296,9 @@ export function FormImport({
? "Bearer token"
: watchProvider === "instatus"
? "Bearer API key"
- : "OAuth API key"
+ : watchProvider === "checkly"
+ ? "cu_xxxxxxxxxxxx"
+ : "OAuth API key"
}
{...field}
/>
@@ -276,14 +309,18 @@ export function FormImport({
? "Your Better Stack API token. Found in Better Stack > API tokens."
: watchProvider === "instatus"
? "Your Instatus API key. Found in your Instatus account under Settings > API."
- : "Your Statuspage API key. Found in your Statuspage account under Manage Account > API."}{" "}
+ : watchProvider === "checkly"
+ ? "Your Checkly API key. Found in Checkly > User Settings > API keys."
+ : "Your Statuspage API key. Found in your Statuspage account under Manage Account > API."}{" "}
<Link
href={
watchProvider === "betterstack"
? "https://openstatus.dev/guides/migrate-from-betterstack"
: watchProvider === "instatus"
? "https://openstatus.dev/guides/migrate-from-instatus"
- : "https://openstatus.dev/guides/migrate-from-atlassian-statuspage"
+ : watchProvider === "checkly"
+ ? "https://openstatus.dev/guides/migrate-from-checkly"
+ : "https://openstatus.dev/guides/migrate-from-atlassian-statuspage"
}
>
Full migration guide.
@@ -346,6 +383,43 @@ export function FormImport({
)}
/>
) : null}
+ {watchProvider === "checkly" ? (
+ <>
+ <FormField
+ control={form.control}
+ name="checklyAccountId"
+ render={({ field }) => (
+ <FormItem>
+ <FormLabel>Account ID</FormLabel>
+ <FormControl>
+ <Input placeholder="e.g. 1a2b3c4d-..." {...field} />
+ </FormControl>
+ <FormMessage />
+ <FormDescription>
+ Your Checkly account ID. Found in Checkly under
+ Account Settings → General.
+ </FormDescription>
+ </FormItem>
+ )}
+ />
+ <FormField
+ control={form.control}
+ name="checklyStatusPageId"
+ render={({ field }) => (
+ <FormItem>
+ <FormLabel>Status Page ID (optional)</FormLabel>
+ <FormControl>
+ <Input placeholder="e.g. 1a2b3c4d-..." {...field} />
+ </FormControl>
+ <FormDescription>
+ Import a specific status page. Leave empty to use
+ the first available.
+ </FormDescription>
+ </FormItem>
+ )}
+ />
+ </>
+ ) : null}
<Button
type="button"
variant="secondary"
@@ -385,7 +459,8 @@ export function FormImport({
</p>
</Note>
) : null}
- {watchProvider === "betterstack" ? (
+ {watchProvider === "betterstack" ||
+ watchProvider === "checkly" ? (
<FormField
control={form.control}
name="includeMonitors"
@@ -449,7 +524,8 @@ export function FormImport({
</FormItem>
)}
/>
- {watchProvider !== "betterstack" ? (
+ {watchProvider !== "betterstack" &&
+ watchProvider !== "checkly" ? (
<FormField
control={form.control}
name="includeSubscribers"
diff --git a/apps/dashboard/src/components/forms/components/update.tsx b/apps/dashboard/src/components/forms/components/update.tsx
index b5dc196fe..340eae0a1 100644
--- a/apps/dashboard/src/components/forms/components/update.tsx
+++ b/apps/dashboard/src/components/forms/components/update.tsx
@@ -169,6 +169,8 @@ export function FormComponentsUpdate() {
betterstackStatusPageId:
values.betterstackStatusPageId ?? undefined,
instatusPageId: values.instatusPageId ?? undefined,
+ checklyAccountId: values.checklyAccountId ?? undefined,
+ checklyStatusPageId: values.checklyStatusPageId ?? undefined,
options: {
includeStatusReports: values.includeStatusReports,
includeSubscribers: values.includeSubscribers,
diff --git a/apps/web/src/content/pages/docs/guides/how-to-import-status-page.mdx b/apps/web/src/content/pages/docs/guides/how-to-import-status-page.mdx
index 077b5e1d9..4a87cf807 100644
--- a/apps/web/src/content/pages/docs/guides/how-to-import-status-page.mdx
+++ b/apps/web/src/content/pages/docs/guides/how-to-import-status-page.mdx
@@ -15,11 +15,12 @@ Migrating away from your current status page provider does not have to mean star
## Supported providers
-openstatus currently supports importing from three providers:
+openstatus currently supports importing from four providers:
- **[Atlassian Statuspage](/guides/migrate-from-atlassian-statuspage)** — the most widely used hosted status page solution.
- **[Better Stack](/guides/migrate-from-betterstack)** — monitoring and status page platform (formerly Better Uptime).
- **[Instatus](/guides/migrate-from-instatus)** — a modern status page service with component-level tracking.
+- **[Checkly](/guides/migrate-from-checkly)** — synthetic monitoring platform; imports checks as monitors alongside status pages, components, incidents, and maintenances.
Each link above points to a provider-specific migration guide with detailed instructions on API key generation and data mapping.
@@ -34,6 +35,7 @@ Where to find your API key varies by provider. See the provider-specific guides
- **Statuspage** — organisation-level API key in your Atlassian account settings.
- **Better Stack** — API token from the Better Stack dashboard under Integrations.
- **Instatus** — API key from your Instatus workspace settings.
+- **Checkly** — API key from User Settings → API keys, plus your account ID from Account Settings → General (both required).
</Aside>
### 2. Open the import page
@@ -76,7 +78,7 @@ Click **Import** to start the process. The import runs in phases:
2. **Incidents** — historical and active incidents, including updates and component impact.
3. **Maintenances** — scheduled and completed maintenance windows.
4. **Subscribers** — email subscribers (where supported by the source provider).
-5. **Monitors** — existing monitoring checks (Better Stack only).
+5. **Monitors** — existing monitoring checks (Better Stack and Checkly).
A progress indicator shows the current phase and any errors encountered. When the import finishes, you are redirected to your status page configuration with all imported data in place.
@@ -85,20 +87,21 @@ A progress indicator shows the current phase and any errors encountered. When th
Not every provider exposes the same data. The table below summarizes what openstatus imports from each source:
-| Resource | Statuspage | Better Stack | Instatus |
-|---|---|---|---|
-| Status page | Yes | Yes | Yes |
-| Components and groups | Yes | Yes | Yes |
-| Incidents | Yes | Yes | Yes |
-| Maintenances | Yes | Yes | Yes |
-| Subscribers | Yes (email only) | No | Yes (email only) |
-| Monitors | No | Yes | No |
+| Resource | Statuspage | Better Stack | Instatus | Checkly |
+|---|---|---|---|---|
+| Status page | Yes | Yes | Yes | Yes |
+| Components and groups | Yes | Yes | Yes | Yes |
+| Incidents | Yes | Yes | Yes | Yes |
+| Maintenances | Yes | Yes | Yes | Yes |
+| Subscribers | Yes (email only) | No | Yes (email only) | No |
+| Monitors | No | Yes | No | Yes |
<Aside type="tip">
For a detailed breakdown of how each resource type is mapped, see the provider-specific migration guides:
[Atlassian Statuspage](/guides/migrate-from-atlassian-statuspage),
[Better Stack](/guides/migrate-from-betterstack),
-[Instatus](/guides/migrate-from-instatus).
+[Instatus](/guides/migrate-from-instatus),
+[Checkly](/guides/migrate-from-checkly).
</Aside>
## After import
@@ -144,3 +147,4 @@ Running the import a second time does not deduplicate incidents or maintenances.
- [Migrate from Atlassian Statuspage](/guides/migrate-from-atlassian-statuspage)
- [Migrate from Better Stack](/guides/migrate-from-betterstack)
- [Migrate from Instatus](/guides/migrate-from-instatus)
+- [Migrate from Checkly](/guides/migrate-from-checkly)
diff --git a/apps/web/src/content/pages/docs/tutorial/create-your-first-status-page.mdx b/apps/web/src/content/pages/docs/tutorial/create-your-first-status-page.mdx
index 634a689bf..8f07b9095 100644
--- a/apps/web/src/content/pages/docs/tutorial/create-your-first-status-page.mdx
+++ b/apps/web/src/content/pages/docs/tutorial/create-your-first-status-page.mdx
@@ -18,7 +18,7 @@ In this tutorial, you'll create a public status page to communicate your service
By the end you'll have a public status page showing your service health, monitors displayed on the page, and a working understanding of the privacy and security options.
<Aside type="tip">
-Coming from another provider? openstatus can import components, incidents, maintenances, and subscribers from your existing setup. See the migration guides for [Atlassian Statuspage](/guides/migrate-from-atlassian-statuspage), [Better Stack](/guides/migrate-from-betterstack), or [Instatus](/guides/migrate-from-instatus) instead of building from scratch.
+Coming from another provider? openstatus can import components, incidents, maintenances, and subscribers from your existing setup. See the migration guides for [Atlassian Statuspage](/guides/migrate-from-atlassian-statuspage), [Better Stack](/guides/migrate-from-betterstack), [Instatus](/guides/migrate-from-instatus), or [Checkly](/guides/migrate-from-checkly) instead of building from scratch.
</Aside>
## Get started
diff --git a/apps/web/src/content/pages/guides/migrate-from-checkly.mdx b/apps/web/src/content/pages/guides/migrate-from-checkly.mdx
new file mode 100644
index 000000000..c22c95efd
--- /dev/null
+++ b/apps/web/src/content/pages/guides/migrate-from-checkly.mdx
@@ -0,0 +1,183 @@
+---
+title: "How to Migrate from Checkly to openstatus"
+description: "Step-by-step guide to import your Checkly checks as monitors, plus status pages, components, incidents, and maintenance windows into openstatus."
+author: "openstatus"
+publishedAt: "2026-07-11"
+category: "alternative"
+faq:
+ - question: "Can I import my Checkly checks into openstatus?"
+ answer: "Yes. openstatus imports your Checkly API and URL checks as HTTP monitors — including the request URL, method, headers, body, check frequency, and run locations. TCP, ICMP, DNS, and SSL checks are imported when a target can be derived."
+ - question: "Which Checkly check types are supported?"
+ answer: "API and URL checks import as HTTP monitors. TCP, ICMP, DNS, and SSL map to their openstatus job types. Browser, Playwright, multi-step, heartbeat, gRPC, traceroute, and AI checks have no HTTP-family equivalent and are skipped with a reason in the preview."
+ - question: "What credentials do I need?"
+ answer: "Two values: a Checkly API key (User Settings → API keys) and your Checkly account ID (Account Settings → General). Checkly requires the account ID on every API request, so both are mandatory."
+ - question: "How are Checkly locations mapped to openstatus?"
+ answer: "Checkly's AWS-region locations are mapped to the nearest openstatus probe: us-east-1 → iad, us-west-2 → sea, eu-west-1 → lhr, eu-central-1 → fra, ap-southeast-1 → sin, ap-southeast-2 → syd, and so on. Unmapped locations fall back to iad."
+ - question: "Do Checkly status-page services become monitored components?"
+ answer: "They import as static components. Checkly's status-page services are abstract entities that don't reference a specific check via the API, so openstatus can't auto-link them to imported monitors. You can link a monitor to any component after import."
+ - question: "Can I run the import multiple times?"
+ answer: "Monitors, components, and component groups are deduplicated — the importer checks for existing resources before creating new ones. Incidents and maintenances are always created as new entries, so re-running will produce duplicates for those."
+howto:
+ totalTime: "PT2M"
+ steps:
+ - name: "Get your Checkly API key and account ID"
+ text: "In Checkly, go to User Settings → API keys and create a key. Then open Account Settings → General and copy your account ID. You need both."
+ - name: "Preview the import"
+ text: "In your openstatus dashboard, go to Status Pages, select a status page, open the Components tab, and scroll to the Import section. Select Checkly, paste your API key and account ID, then click Preview."
+ - name: "Run the import"
+ text: "Review the preview summary showing monitors, components, incidents, and maintenances. Toggle what to include and click Import."
+---
+
+Openstatus provides a built-in importer that migrates your Checkly checks, status page, components, incidents, and maintenance windows in a single operation. The entire process takes under two minutes.
+
+This guide covers what gets imported, how Checkly fields map to openstatus, and the steps to run the import from the openstatus dashboard.
+
+For the announcement and background on why openstatus built cross-provider import, see the [blog post](/blog/import-from-statuspage-betterstack-instatus).
+
+## What gets imported
+
+The Checkly importer reads from the Checkly public API (`api.checklyhq.com`) and maps resources to their openstatus equivalents. Below is a breakdown of every resource type, the fields that carry over, and known caveats.
+
+### Monitors
+
+Openstatus imports your Checkly **checks** as monitors. Each check type is mapped to an openstatus job type; check types with no HTTP-family equivalent are skipped and listed in the preview with a reason.
+
+| Checkly check type | openstatus job type | Notes |
+| --- | --- | --- |
+| `API`, `URL` | `http` | Full request is carried over (URL, method, headers, body) |
+| `TCP` | `tcp` | Imported when a target host is available |
+| `ICMP` | `icmp` | Imported when a target host is available |
+| `DNS` | `dns` | Imported when a target host is available |
+| `SSL` | `ssl` | Imported when a target host is available |
+| `BROWSER`, `PLAYWRIGHT`, `MULTI_STEP`, `HEARTBEAT`, `GRPC`, `TRACEROUTE`, `AGENTIC` | — | Skipped — no openstatus monitor equivalent |
+
+For each imported check, the following fields carry over:
+
+| Checkly field | openstatus field | Notes |
+| --- | --- | --- |
+| `request.url` | `url` | The target endpoint |
+| `name` | `name` | Display name for the monitor |
+| `request.method` | `method` | Uppercased (e.g., `get` becomes `GET`) |
+| `request.headers` | `headers` | Array of `{key, value}` stored as JSON |
+| `request.body` | `body` | Copied as-is |
+| `maxResponseTime` | `timeout` | The hard timeout in milliseconds (defaults to 45s) |
+| `frequency` | `periodicity` | Snapped to nearest supported value (see below) |
+| `locations` | `regions` | Mapped to openstatus probe locations (see below) |
+| `activated` / `muted` | `active` | A check is active when it is activated and not muted |
+
+#### Region mapping
+
+Checkly runs checks from AWS regions. Openstatus maps each to the nearest probe location:
+
+| Checkly location | openstatus region | Location |
+| --- | --- | --- |
+| `us-east-1`, `us-east-2` | `iad` | Virginia, US |
+| `us-west-1` | `sjc` | San Jose, US |
+| `us-west-2` | `sea` | Seattle, US |
+| `ca-central-1` | `yul` | Montreal, CA |
+| `eu-west-1`, `eu-west-2` | `lhr` | London, UK |
+| `eu-west-3` | `cdg` | Paris, FR |
+| `eu-central-1` | `fra` | Frankfurt, DE |
+| `eu-north-1` | `arn` | Stockholm, SE |
+| `ap-south-1` | `bom` | Mumbai, IN |
+| `ap-southeast-1` | `sin` | Singapore |
+| `ap-southeast-2` | `syd` | Sydney, AU |
+| `ap-northeast-1`, `ap-northeast-2` | `nrt` | Tokyo, JP |
+| `sa-east-1` | `gru` | São Paulo, BR |
+| `af-south-1` | `jnb` | Johannesburg, ZA |
+
+If no locations match, the importer defaults to `iad`.
+
+#### Frequency mapping
+
+Checkly frequencies are expressed in minutes. Openstatus supports a fixed set of intervals, and each Checkly frequency is snapped to the nearest one:
+
+| Checkly frequency | openstatus periodicity |
+| --- | --- |
+| sub-minute (`0`) | `30s` |
+| 1–2 min | `1m` |
+| 5 min | `5m` |
+| 10–15 min | `10m` |
+| 30 min | `30m` |
+| 60 min or longer | `1h` |
+
+Openstatus schedules at most once per hour, so longer Checkly frequencies (120 min and up) snap down to `1h`.
+
+### Status page
+
+The importer reads your Checkly status pages and imports the first one it finds. If you have multiple status pages, pass a specific status page ID to target the one you want.
+
+| Checkly field | openstatus field |
+| --- | --- |
+| `name` | `title` |
+| `url` | `slug` |
+| `customDomain` | `customDomain` |
+| `description` | `description` |
+| `logo` | `icon` |
+| `isPrivate` | `published` (inverted) |
+
+### Component groups
+
+Each **card** on your Checkly status page becomes a component group in openstatus, preserving its name. Component groups are deduplicated on subsequent imports.
+
+### Components
+
+The **services** inside each card become openstatus components. Checkly services are abstract status-page entities that do not reference a specific check through the API, so they import as **static** components (manual status management, no linked monitor). Their name and ordering are preserved, and each component is placed under the group for its card.
+
+After import, you can open any component and link it to one of your imported monitors to drive its status automatically.
+
+### Incidents
+
+Incidents are read from the Checkly status-page incidents API and converted into openstatus status reports. Each incident's `incidentUpdates` become individual update entries on the report, and the incident's affected services are linked to the corresponding components.
+
+| Checkly status | openstatus status |
+| --- | --- |
+| `INVESTIGATING` | `investigating` |
+| `IDENTIFIED` | `identified` |
+| `MONITORING` | `monitoring` |
+| `RESOLVED` | `resolved` |
+
+Incidents and their updates are always created as new entries. Re-running the import will produce duplicates.
+
+### Maintenances
+
+Checkly maintenance windows are imported as openstatus maintenances. The `startsAt` and `endsAt` fields define the maintenance window, and the description carries over as the message. Checkly ties maintenance windows to checks by tag rather than to status-page services, so imported maintenances are not linked to specific components.
+
+Maintenances are always created as new entries. Re-running the import will produce duplicates.
+
+### Subscribers
+
+Checkly does not expose status-page subscribers through its API. Subscriber import is **not available**. After completing the import, re-invite subscribers from the openstatus dashboard.
+
+## Step-by-step walkthrough
+
+### Step 1: Get your Checkly API key and account ID
+
+Log into Checkly and open **User Settings > API keys**. Create a key and copy it. Then open **Account Settings > General** and copy your **account ID**. Checkly sends the account ID on every API request, so both values are required.
+
+### Step 2: Open the importer and preview
+
+In the openstatus dashboard, go to **Status Pages** and select a status page (or create one first). Open the **Components** tab and scroll down to the **Import** section. Select **Checkly** as the provider.
+
+Paste your Checkly API key and account ID. If you have multiple Checkly status pages, enter the status page ID to target a specific one. Otherwise, the importer will use the first status page it finds.
+
+Click **Preview**. The importer validates your credentials and fetches a summary of all resources that will be imported. The preview displays counts for monitors, components, component groups, incidents, and maintenances — and lists any checks that were skipped because their type has no openstatus equivalent. Toggle individual resource types on or off as needed.
+
+Click **Import** to start the migration. The import typically completes in under a minute.
+
+## After the import
+
+Once the import finishes, there are a few things to verify:
+
+- **Skipped checks.** Review the preview's skipped list — Browser, Playwright, and multi-step checks are not imported. Recreate any critical ones as HTTP monitors or synthetic checks.
+- **Monitor regions and frequency.** Confirm the mapped regions and periodicities match your expectations, and adjust any that were snapped to a different value than intended.
+- **Component links.** Imported status-page components are static. Link each one to the corresponding imported monitor so its status updates automatically.
+- **Incidents and maintenances.** Review a sample of imported incidents to ensure the update timelines look correct.
+- **DNS and custom domain.** If your Checkly status page used a custom domain, update your DNS records to point to openstatus. See the [docs guide](https://www.openstatus.dev/docs/guides/how-to-import-status-page) for instructions on configuring custom domains.
+- **Subscribers.** Re-invite your subscribers from the openstatus dashboard. Checkly does not expose subscriber data via its API, so this step must be done manually.
+
+## Further reading
+
+- [Import from Statuspage, Better Stack, and Instatus](/blog/import-from-statuspage-betterstack-instatus) — blog announcement covering cross-provider import.
+- [How to Import a Status Page](https://www.openstatus.dev/docs/guides/how-to-import-status-page) — docs guide with detailed instructions and screenshots.
+- [What is Synthetic Monitoring](/guides/what-is-synthetic-monitoring) — background on the monitoring model openstatus and Checkly share.
diff --git a/packages/icons/src/brand/checkly.tsx b/packages/icons/src/brand/checkly.tsx
new file mode 100644
index 000000000..842e7e31a
--- /dev/null
+++ b/packages/icons/src/brand/checkly.tsx
@@ -0,0 +1,27 @@
+export function ChecklyIcon(props: React.ComponentProps<"svg">) {
+ return (
+ <svg
+ role="img"
+ viewBox="0 0 64 66.3"
+ xmlns="http://www.w3.org/2000/svg"
+ style={{ filter: "grayscale(1)" }}
+ {...props}
+ >
+ <title>Checkly</title>
+ <path
+ fill="#0075FF"
+ d="M35.6,0C49,0,55.7,0,59.8,4.2h0C64,8.3,64,15,64,28.4v4.7c0,13.4,0,20.1-4.2,24.2c-0.7,0.7-1.5,1.3-2.4,1.8 c-1,0.5-2,0.9-3.1,1.2c-0.5,0.2-1.1,0.3-1.7,0.4c-0.1,0-1,0.2-1.4,0.2l-0.2,0H12.9l-0.2,0l-1.4-0.2c-0.6-0.1-1.1-0.2-1.7-0.4 c-1.1-0.3-2.1-0.7-3.1-1.2c-0.9-0.5-1.7-1.1-2.4-1.8C0,53.2,0,46.5,0,33.1v-4.7C0,15,0,8.3,4.2,4.2C8.3,0,15,0,28.4,0H35.6z"
+ />
+ <path
+ fill="#FFFFFF"
+ d="M51.4,45.9c0.2,1.3,1.6,2.1,2.7,2.5l0,0c0,0,2,0.9,3.8,1c0,0-2.2,6.7-6.9,10.5l0,0l-10.7,2.7l-4.2,1.2h-8.2 l-4.2-1.2l-10.7-2.7l0,0C8.3,56,6.2,49.4,6.2,49.4c1.8-0.1,3.8-1,3.8-1c1.1-0.4,2.4-1.2,2.7-2.5c0.1-0.7-0.2-1.3-0.5-1.9 c-1-1.9-1.8-3.9-2.3-5.9c-0.6-2.1-1-4.2-1.2-6.3c-0.1-1.1-0.3-2.7,0.7-3.4c0.3-0.2,0.7-0.3,1.1-0.4c4.5-1,8.7,1.9,12.2,4.4l0.1,0 c0.2-0.1,0.5-0.2,0.7-0.3c0.4-0.1,0.8-0.3,1.3-0.4c2-0.5,4.5-0.8,7.1-0.8l0,0H32c0,0,0.1,0,0.1,0h0c2.7,0,5.1,0.3,7.1,0.8 c0.4,0.1,0.8,0.2,1.3,0.4c0.3,0.1,0.5,0.2,0.7,0.3l0.1,0c3.5-2.5,7.7-5.4,12.2-4.4c0.4,0.1,0.8,0.2,1.1,0.4 c1.1,0.7,0.8,2.3,0.7,3.4c-0.2,2.1-0.6,4.2-1.2,6.3c-0.5,2-1.3,4.1-2.3,5.9C51.6,44.6,51.3,45.2,51.4,45.9L51.4,45.9z"
+ />
+ <path
+ fillRule="evenodd"
+ clipRule="evenodd"
+ fill="#002652"
+ d="M12.2,30.7c-0.2,0.1-0.5,0.1-0.7,0.3c-0.6,0.4-0.5,1.3-0.5,1.9l0,0.2c0.1,1.3,0.4,2.6,0.7,3.9 c0.2,0.9,0.5,1.8,0.9,2.6c0.4-0.6,0.9-1.2,1.4-1.8c0.4-0.5,0.8-0.9,1.2-1.2c2.2-2.1,4.5-3.1,4.5-3.1C17.6,31.8,15,30.1,12.2,30.7 L12.2,30.7L12.2,30.7z M23.8,62.3L23.8,62.3L23.8,62.3L23.8,62.3l0-0.2l0.2-0.9c0.1-0.4,0.2-0.7,0.3-1.1c0.3-0.9,0.6-1.8,1.2-2.5 c0.7-0.7,1.5-1.1,2.4-1.4l0.3-0.1c1-0.4,2-1,2.5-1.9c0.5-0.9,0.5-2,0-3c-0.3-0.6-0.7-1.1-1.2-1.6c-0.3-0.2-0.6-0.5-0.9-0.7 c-2.5-1.7-5.8-1.9-8.5-0.7c-2.3,1-4.1,3.1-5.3,5.3c-0.4,0.8-0.7,1.6-1,2.4c-0.3,0.8-0.5,1.7-0.7,2.5l0,0l0,0.1l0,0.1 c0,0,0,0.1,0,0.1l0,0.1l0,0c0,0.1,0,0.2-0.1,0.3l-0.1,0.3l0,0c0,0,0,0,0,0l0,0l0,0v0c0,0,0,0,0,0.1c0,0,0,0.1,0,0.1 c-0.1,0.3-0.1,0.6-0.1,0.9l0,0c0,0,0,0,0,0v0l0,0l0,0.1v0c0.1,0,0.1,0,0.2,0l0.1,0l0,0c0.1,0,0.3,0,0.4,0l0.2,0l0.4,0l0.2,0 l0.3,0l0.5,0.1c0.2,0,0.4,0,0.6,0.1l0.3,0l0.3,0l0.7,0.1c0.2,0,0.5,0.1,0.7,0.1c0.2,0,0.4,0.1,0.7,0.1l0.1,0l0.4,0.1 c0.1,0,0.3,0,0.4,0.1l0.1,0c0.2,0,0.5,0.1,0.7,0.1l0.4,0.1l0.4,0.1l0.6,0.1l0.1,0l0,0l0.7,0.1l0.6,0.1l0.1,0l0.5,0.1l0.2,0 L23.8,62.3C23.8,62.3,23.8,62.3,23.8,62.3z M23.5,53c0-0.8,0.7-1.5,1.5-1.5s1.5,0.7,1.5,1.5c0,0,0,0,0,0c0,0.8-0.7,1.5-1.5,1.5 C24.2,54.5,23.5,53.9,23.5,53z M32.1,61.5L32.1,61.5l-0.1,0c0,0-0.1,0-0.1,0h0c-0.1,0-2.8-0.2-4,2.3v0c0,0,1.4,2.5,4,2.5h0 c0,0,0,0,0.1,0l0,0l0,0c0,0,0,0,0.1,0h0c2.6,0,4-2.5,4-2.5v0C34.9,61.3,32.2,61.5,32.1,61.5L32.1,61.5L32.1,61.5z M51.1,60.9 L51.1,60.9L51.1,60.9L51.1,60.9c0,0.1,0,0.1,0,0.1v0c-0.1,0-0.1,0-0.2,0c0,0-0.1,0-0.1,0c-0.1,0-0.2,0-0.3,0l-0.2,0l-0.2,0 c-0.1,0-0.3,0-0.4,0h0c-0.2,0-0.3,0-0.5,0.1l-0.5,0.1c-0.2,0-0.4,0.1-0.6,0.1c-0.2,0-0.4,0.1-0.6,0.1l-0.3,0 c-0.2,0-0.5,0.1-0.7,0.1l-0.4,0l-0.4,0.1h0l-0.4,0.1c-0.3,0-0.5,0.1-0.8,0.1l-0.1,0c-0.2,0-0.5,0.1-0.7,0.1L43.5,62l-0.4,0.1 c-0.3,0-0.5,0.1-0.8,0.1c-0.2,0-0.5,0.1-0.7,0.1c-0.2,0-0.5,0.1-0.7,0.1c-0.2,0-0.3,0.1-0.5,0.1l-0.2,0l-0.1-0.3v0 c0,0,0-0.1,0-0.1l0,0L40,61.2c-0.1-0.4-0.2-0.7-0.3-1.1c-0.3-0.9-0.6-1.8-1.2-2.5c-0.7-0.7-1.5-1.1-2.4-1.4l-0.3-0.1 c-1-0.4-2-1-2.5-1.9c-0.5-0.9-0.5-2,0-3c0.3-0.6,0.7-1.1,1.2-1.6c0.3-0.2,0.6-0.5,0.9-0.7c2.5-1.7,5.8-1.9,8.5-0.7 c2.3,1,4.1,3.1,5.3,5.3c0.4,0.8,0.7,1.6,1,2.4c0.3,0.8,0.5,1.7,0.7,2.5l0,0c0,0,0,0,0,0l0,0.1l0,0.1c0,0,0,0,0,0.1l0,0.1l0,0.1 c0,0,0,0,0,0c0,0.1,0,0.2,0.1,0.3l0.1,0.3l0,0l0,0c0,0,0,0,0,0l0,0v0l0,0l0,0l0,0c0,0,0,0.1,0,0.1l0,0.1c0,0,0,0,0,0.1l0.1,0.4 L51.1,60.9L51.1,60.9L51.1,60.9C51.1,60.9,51.1,60.9,51.1,60.9z M37.4,53c0,0.8,0.7,1.5,1.5,1.5c0.8,0,1.5-0.7,1.5-1.5 s-0.7-1.5-1.5-1.5C38.1,51.5,37.4,52.2,37.4,53L37.4,53z M52.4,30.9c-0.2-0.1-0.5-0.2-0.7-0.3l0,0c-2.8-0.6-5.4,1.2-7.5,2.7 c0,0,2.2,1,4.5,3.1c0.4,0.4,0.8,0.8,1.2,1.2c0.5,0.5,1,1.2,1.4,1.8c0.4-0.8,0.7-1.7,0.9-2.6c0.3-1.3,0.6-2.6,0.7-3.9l0-0.2 C53,32.2,53.1,31.3,52.4,30.9L52.4,30.9z"
+ />
+ </svg>
+ );
+}
diff --git a/packages/icons/src/brand/index.tsx b/packages/icons/src/brand/index.tsx
index 8138a4204..f831a897f 100644
--- a/packages/icons/src/brand/index.tsx
+++ b/packages/icons/src/brand/index.tsx
@@ -15,6 +15,7 @@ export * from "./ms-teams";
export * from "./statuspage";
export * from "./betterstack";
export * from "./instatus";
+export * from "./checkly";
export * from "./modelcontextprotocol";
export * from "./x";
export * from "./linkedin";
diff --git a/packages/importers/README.md b/packages/importers/README.md
index f21e1d465..c134725f9 100644
--- a/packages/importers/README.md
+++ b/packages/importers/README.md
@@ -9,6 +9,7 @@ Migrate monitors, status pages, components, incidents, and subscribers from thir
| **Atlassian Statuspage** | Status pages, components, component groups, incidents (as status reports), scheduled maintenances, email subscribers | OAuth API key |
| **Better Stack Uptime** | Monitors (HTTP checks), status pages, component groups (from sections + monitor groups), incidents (as status reports), maintenances | Bearer API token |
| **Instatus** | Status pages, component groups, components, incidents (as status reports), maintenances, email subscribers | API key |
+| **Checkly** | Monitors (from checks), status pages, cards (as component groups), services (as static components), incidents (as status reports), maintenance windows | API key + account ID |
## Architecture
diff --git a/packages/importers/package.json b/packages/importers/package.json
index 9d82d9955..6d960986b 100644
--- a/packages/importers/package.json
+++ b/packages/importers/package.json
@@ -11,7 +11,9 @@
"./betterstack": "./src/providers/betterstack/index.ts",
"./betterstack/fixtures": "./src/providers/betterstack/fixtures.ts",
"./instatus": "./src/providers/instatus/index.ts",
- "./instatus/fixtures": "./src/providers/instatus/fixtures.ts"
+ "./instatus/fixtures": "./src/providers/instatus/fixtures.ts",
+ "./checkly": "./src/providers/checkly/index.ts",
+ "./checkly/fixtures": "./src/providers/checkly/fixtures.ts"
},
"scripts": {
"check": "deno check --sloppy-imports .",
diff --git a/packages/importers/src/index.ts b/packages/importers/src/index.ts
index 0301c1e12..365bfd8aa 100644
--- a/packages/importers/src/index.ts
+++ b/packages/importers/src/index.ts
@@ -17,6 +17,9 @@ export type { BetterstackImportConfig } from "./providers/betterstack";
export { createInstatusProvider } from "./providers/instatus";
export type { InstatusImportConfig } from "./providers/instatus";
+export { createChecklyProvider } from "./providers/checkly";
+export type { ChecklyImportConfig } from "./providers/checkly";
+
/**
* Registry of all available import providers.
* Add new providers here as they are implemented.
@@ -25,5 +28,6 @@ export const IMPORT_PROVIDERS = [
"statuspage",
"betterstack",
"instatus",
+ "checkly",
] as const;
export type ImportProviderName = (typeof IMPORT_PROVIDERS)[number];
diff --git a/packages/importers/src/providers/checkly/api-types.ts b/packages/importers/src/providers/checkly/api-types.ts
new file mode 100644
index 000000000..0ce0d6581
--- /dev/null
+++ b/packages/importers/src/providers/checkly/api-types.ts
@@ -0,0 +1,202 @@
+import { z } from "zod";
+
+/**
+ * `checkType` is parsed as a free string (not an enum) so the import never
+ * hard-fails when Checkly adds a new check type — the mapper decides which
+ * types are runnable and skips the rest with a reason.
+ */
+export const ChecklyRequestHeaderSchema = z.object({
+ key: z.string(),
+ value: z
+ .string()
+ .nullish()
+ .transform((v) => v ?? ""),
+});
+
+export const ChecklyRequestSchema = z.object({
+ method: z
+ .string()
+ .nullish()
+ .transform((v) => v ?? "GET"),
+ url: z
+ .string()
+ .nullish()
+ .transform((v) => v ?? ""),
+ headers: z
+ .array(ChecklyRequestHeaderSchema)
+ .nullish()
+ .transform((v) => v ?? []),
+ body: z
+ .string()
+ .nullish()
+ .transform((v) => v ?? ""),
+ bodyType: z
+ .string()
+ .nullish()
+ .transform((v) => v ?? "NONE"),
+ followRedirects: z
+ .boolean()
+ .nullish()
+ .transform((v) => v ?? true),
+});
+
+export type ChecklyRequest = z.infer<typeof ChecklyRequestSchema>;
+
+export const ChecklyCheckSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ checkType: z.string(),
+ // Frequency in minutes; 0 means sub-minute (see frequencyOffset).
+ frequency: z
+ .number()
+ .nullish()
+ .transform((v) => v ?? 10),
+ frequencyOffset: z.number().nullish(),
+ activated: z
+ .boolean()
+ .nullish()
+ .transform((v) => v ?? true),
+ muted: z
+ .boolean()
+ .nullish()
+ .transform((v) => v ?? false),
+ shouldFail: z
+ .boolean()
+ .nullish()
+ .transform((v) => v ?? false),
+ // AWS-style region codes, e.g. "us-east-1".
+ locations: z
+ .array(z.string())
+ .nullish()
+ .transform((v) => v ?? []),
+ privateLocations: z
+ .array(z.string())
+ .nullish()
+ .transform((v) => v ?? []),
+ tags: z
+ .array(z.string())
+ .nullish()
+ .transform((v) => v ?? []),
+ groupId: z
+ .union([z.string(), z.number()])
+ .nullish()
+ .transform((v) => (v != null ? String(v) : null)),
+ degradedResponseTime: z.number().nullish(),
+ maxResponseTime: z.number().nullish(),
+ // Present on API/URL checks; other check types carry their target elsewhere.
+ request: ChecklyRequestSchema.nullish(),
+});
+
+export type ChecklyCheck = z.infer<typeof ChecklyCheckSchema>;
+
+/** A status-page service — an abstract entity; it does NOT reference a check. */
+export const ChecklyServiceSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ accountId: z.string().nullish(),
+});
+
+export type ChecklyService = z.infer<typeof ChecklyServiceSchema>;
+
+export const ChecklyCardSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ services: z
+ .array(ChecklyServiceSchema)
+ .nullish()
+ .transform((v) => v ?? []),
+});
+
+export type ChecklyCard = z.infer<typeof ChecklyCardSchema>;
+
+export const ChecklyStatusPageSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ url: z
+ .string()
+ .nullish()
+ .transform((v) => v ?? ""),
+ customDomain: z.string().nullish(),
+ description: z
+ .string()
+ .nullish()
+ .transform((v) => v ?? ""),
+ logo: z.string().nullish(),
+ favicon: z.string().nullish(),
+ isPrivate: z
+ .boolean()
+ .nullish()
+ .transform((v) => v ?? false),
+ cards: z
+ .array(ChecklyCardSchema)
+ .nullish()
+ .transform((v) => v ?? []),
+});
+
+export type ChecklyStatusPage = z.infer<typeof ChecklyStatusPageSchema>;
+
+export const ChecklyIncidentUpdateSchema = z.object({
+ id: z.string(),
+ // Not every update carries a status; the mapper falls back per-position.
+ incidentUpdateStatus: z.string().nullish(),
+ status: z.string().nullish(),
+ description: z.string().nullish(),
+ text: z.string().nullish(),
+ created_at: z.string(),
+});
+
+export type ChecklyIncidentUpdate = z.infer<typeof ChecklyIncidentUpdateSchema>;
+
+export const ChecklyIncidentSchema = z.object({
+ id: z.string(),
+ name: z.string(),
+ severity: z.string().nullish(),
+ // INVESTIGATING | IDENTIFIED | MONITORING | RESOLVED
+ lastUpdateStatus: z.string().nullish(),
+ services: z
+ .array(ChecklyServiceSchema)
+ .nullish()
+ .transform((v) => v ?? []),
+ incidentUpdates: z
+ .array(ChecklyIncidentUpdateSchema)
+ .nullish()
+ .transform((v) => v ?? []),
+ created_at: z.string().nullish(),
+ updated_at: z.string().nullish(),
+});
+
+export type ChecklyIncident = z.infer<typeof ChecklyIncidentSchema>;
+
+export const ChecklyMaintenanceWindowSchema = z.object({
+ // Checkly returns a numeric id for maintenance windows (unlike its
+ // string-id resources); coerce so downstream sourceId stays a string.
+ id: z.union([z.string(), z.number()]).transform((v) => String(v)),
+ name: z.string(),
+ description: z.string().nullish(),
+ tags: z
+ .array(z.string())
+ .nullish()
+ .transform((v) => v ?? []),
+ startsAt: z.string(),
+ endsAt: z.string(),
+ repeatUnit: z.string().nullish(),
+ repeatInterval: z.number().nullish(),
+ repeatEndsAt: z.string().nullish(),
+ created_at: z.string().nullish(),
+});
+
+export type ChecklyMaintenanceWindow = z.infer<
+ typeof ChecklyMaintenanceWindowSchema
+>;
+
+/**
+ * Cursor-paginated envelope (status-pages, incidents): `{ entries, nextId }`.
+ * Page-based endpoints (checks, maintenance-windows) return a bare array.
+ */
+export function cursorResponse<T extends z.ZodTypeAny>(itemSchema: T) {
+ return z.object({
+ entries: z.array(itemSchema),
+ nextId: z.string().nullish(),
+ length: z.number().nullish(),
+ });
+}
diff --git a/packages/importers/src/providers/checkly/client.test.ts b/packages/importers/src/providers/checkly/client.test.ts
new file mode 100644
index 000000000..0f4277d55
--- /dev/null
+++ b/packages/importers/src/providers/checkly/client.test.ts
@@ -0,0 +1,124 @@
+import { expect } from "@std/expect";
+import { afterEach, beforeEach, describe, test } from "@std/testing/bdd";
+import { assertSpyCalls, spy } from "@std/testing/mock";
+
+import { createChecklyClient } from "./client";
+import {
+ MOCK_CHECKS,
+ MOCK_INCIDENTS,
+ MOCK_MAINTENANCE_WINDOWS,
+ MOCK_STATUS_PAGES,
+} from "./fixtures";
+
+const originalFetch = globalThis.fetch;
+
+function jsonResponse(body: unknown, status = 200) {
+ return new Response(JSON.stringify(body), {
+ status,
+ statusText: status === 200 ? "OK" : "Unauthorized",
+ headers: { "Content-Type": "application/json" },
+ });
+}
+
+// Returns each body in order; repeats the last one once exhausted.
+function mockFetchSequence(bodies: unknown[], status = 200) {
+ let call = 0;
+ globalThis.fetch = spy(() => {
+ const body = bodies[Math.min(call, bodies.length - 1)];
+ call++;
+ return Promise.resolve(jsonResponse(body, status));
+ }) as typeof globalThis.fetch;
+}
+
+describe("ChecklyClient", () => {
+ let client: ReturnType<typeof createChecklyClient>;
+
+ beforeEach(() => {
+ client = createChecklyClient("test-api-key", "test-account");
+ });
+
+ afterEach(() => {
+ globalThis.fetch = originalFetch;
+ });
+
+ test("getChecks returns parsed checks (bare array)", async () => {
+ mockFetchSequence([MOCK_CHECKS]);
+ const checks = await client.getChecks();
+ expect(checks).toHaveLength(4);
+ expect(checks[0].name).toBe("API Health Check");
+ expect(checks[0].checkType).toBe("API");
+ });
+
+ test("getStatusPages returns parsed pages (cursor envelope)", async () => {
+ mockFetchSequence([{ entries: MOCK_STATUS_PAGES, nextId: null }]);
+ const pages = await client.getStatusPages();
+ expect(pages).toHaveLength(1);
+ expect(pages[0].cards).toHaveLength(2);
+ expect(pages[0].cards[0].services).toHaveLength(2);
+ });
+
+ test("getIncidents returns parsed incidents (cursor envelope)", async () => {
+ mockFetchSequence([{ entries: MOCK_INCIDENTS, nextId: null }]);
+ const incidents = await client.getIncidents();
+ expect(incidents).toHaveLength(2);
+ expect(incidents[0].lastUpdateStatus).toBe("RESOLVED");
+ });
+
+ test("getMaintenanceWindows returns parsed windows (bare array)", async () => {
+ mockFetchSequence([MOCK_MAINTENANCE_WINDOWS]);
+ const windows = await client.getMaintenanceWindows();
+ expect(windows).toHaveLength(1);
+ expect(windows[0].name).toBe("Database upgrade");
+ });
+
+ // Live Checkly returns a numeric maintenance-window id; it must coerce to a
+ // string so downstream sourceId matches the tRPC import contract.
+ test("getMaintenanceWindows coerces a numeric id to a string", async () => {
+ mockFetchSequence([[{ ...MOCK_MAINTENANCE_WINDOWS[0], id: 12345 }]]);
+ const windows = await client.getMaintenanceWindows();
+ expect(windows[0].id).toBe("12345");
+ });
+
+ test("sends both auth headers and correct path", async () => {
+ mockFetchSequence([MOCK_CHECKS]);
+ await client.getChecks();
+ const fetchMock = globalThis.fetch as unknown as ReturnType<typeof spy>;
+ assertSpyCalls(fetchMock, 1);
+ const [url, options] = fetchMock.calls[0].args as [string, RequestInit];
+ expect(url).toContain("https://api.checklyhq.com/v1/checks");
+ const headers = options.headers as Record<string, string>;
+ expect(headers.Authorization).toBe("Bearer test-api-key");
+ expect(headers["X-Checkly-Account"]).toBe("test-account");
+ });
+
+ test("throws on API error (401)", async () => {
+ mockFetchSequence([{ error: "unauthorized" }], 401);
+ await expect(client.getChecks()).rejects.toThrow("Checkly API error: 401");
+ });
+
+ test("cursor pagination follows nextId until null", async () => {
+ mockFetchSequence([
+ { entries: [MOCK_STATUS_PAGES[0]], nextId: "cursor-2" },
+ { entries: [MOCK_STATUS_PAGES[0]], nextId: null },
+ ]);
+ const pages = await client.getStatusPages();
+ expect(pages).toHaveLength(2);
+ const fetchMock = globalThis.fetch as unknown as ReturnType<typeof spy>;
+ assertSpyCalls(fetchMock, 2);
+ const secondUrl = fetchMock.calls[1].args[0] as string;
+ expect(secondUrl).toContain("nextId=cursor-2");
+ });
+
+ test("page pagination requests next page on a full page", async () => {
+ const fullPage = Array.from({ length: 100 }, (_, i) => ({
+ ...MOCK_CHECKS[0],
+ id: `chk_${i}`,
+ }));
+ mockFetchSequence([fullPage, []]);
+ const checks = await client.getChecks();
+ expect(checks).toHaveLength(100);
+ const fetchMock = globalThis.fetch as unknown as ReturnType<typeof spy>;
+ assertSpyCalls(fetchMock, 2);
+ expect(fetchMock.calls[1].args[0] as string).toContain("page=2");
+ });
+});
diff --git a/packages/importers/src/providers/checkly/client.ts b/packages/importers/src/providers/checkly/client.ts
new file mode 100644
index 000000000..1c84c7df9
--- /dev/null
+++ b/packages/importers/src/providers/checkly/client.ts
@@ -0,0 +1,111 @@
+import type { z } from "zod";
+
+import {
+ type ChecklyCheck,
+ ChecklyCheckSchema,
+ type ChecklyIncident,
+ ChecklyIncidentSchema,
+ type ChecklyMaintenanceWindow,
+ ChecklyMaintenanceWindowSchema,
+ type ChecklyStatusPage,
+ ChecklyStatusPageSchema,
+ cursorResponse,
+} from "./api-types";
+
+export type ChecklyClient = {
+ getChecks: () => Promise<ChecklyCheck[]>;
+ getStatusPages: () => Promise<ChecklyStatusPage[]>;
+ getIncidents: () => Promise<ChecklyIncident[]>;
+ getMaintenanceWindows: () => Promise<ChecklyMaintenanceWindow[]>;
+};
+
+const PAGE_SIZE = 100;
+
+/**
+ * Checkly needs two auth headers: a bearer key AND the account id
+ * (`X-Checkly-Account`). Missing/invalid either one returns 401.
+ */
+export function createChecklyClient(
+ apiKey: string,
+ accountId: string,
+ baseUrl = "https://api.checklyhq.com",
+): ChecklyClient {
+ async function request<T>(path: string, schema: z.ZodType<T>): Promise<T> {
+ const url = `${baseUrl}${path}`;
+ const response = await fetch(url, {
+ headers: {
+ Authorization: `Bearer ${apiKey}`,
+ "X-Checkly-Account": accountId,
+ "Content-Type": "application/json",
+ },
+ });
+
+ if (!response.ok) {
+ throw new Error(
+ `Checkly API error: ${response.status} ${response.statusText} for ${path}`,
+ );
+ }
+
+ const data = await response.json();
+ return schema.parse(data);
+ }
+
+ // Offset pagination (checks, maintenance-windows): bare array, `?limit&page`.
+ async function pageAll<T extends z.ZodTypeAny>(
+ path: string,
+ itemSchema: T,
+ ): Promise<z.infer<T>[]> {
+ const all: z.infer<T>[] = [];
+ const sep = path.includes("?") ? "&" : "?";
+ let page = 1;
+
+ while (true) {
+ const items = await request(
+ `${path}${sep}limit=${PAGE_SIZE}&page=${page}`,
+ itemSchema.array(),
+ );
+ all.push(...items);
+ // A short (or empty) page means we've reached the end.
+ if (items.length < PAGE_SIZE) break;
+ page++;
+ }
+
+ return all;
+ }
+
+ // Cursor pagination (status-pages, incidents): `{ entries, nextId }`.
+ async function cursorAll<T extends z.ZodTypeAny>(
+ path: string,
+ itemSchema: T,
+ ): Promise<z.infer<T>[]> {
+ const all: z.infer<T>[] = [];
+ const sep = path.includes("?") ? "&" : "?";
+ const pageSchema = cursorResponse(itemSchema);
+ let nextId: string | undefined;
+
+ while (true) {
+ const query = nextId
+ ? `${sep}limit=${PAGE_SIZE}&nextId=${encodeURIComponent(nextId)}`
+ : `${sep}limit=${PAGE_SIZE}`;
+ const result: z.infer<typeof pageSchema> = await request(
+ `${path}${query}`,
+ pageSchema,
+ );
+ all.push(...result.entries);
+ if (!result.nextId) break;
+ nextId = result.nextId;
+ }
+
+ return all;
+ }
+
+ return {
+ getChecks: () => pageAll("/v1/checks", ChecklyCheckSchema),
+ getStatusPages: () =>
+ cursorAll("/v1/status-pages", ChecklyStatusPageSchema),
+ getIncidents: () =>
+ cursorAll("/v1/status-pages/incidents", ChecklyIncidentSchema),
+ getMaintenanceWindows: () =>
+ pageAll("/v1/maintenance-windows", ChecklyMaintenanceWindowSchema),
+ };
+}
diff --git a/packages/importers/src/providers/checkly/fixtures.ts b/packages/importers/src/providers/checkly/fixtures.ts
new file mode 100644
index 000000000..ef23ee6bd
--- /dev/null
+++ b/packages/importers/src/providers/checkly/fixtures.ts
@@ -0,0 +1,167 @@
+import type {
+ ChecklyCheck,
+ ChecklyIncident,
+ ChecklyMaintenanceWindow,
+ ChecklyStatusPage,
+} from "./api-types";
+
+export const MOCK_CHECKS: ChecklyCheck[] = [
+ {
+ id: "chk_api_001",
+ name: "API Health Check",
+ checkType: "API",
+ frequency: 5,
+ activated: true,
+ muted: false,
+ shouldFail: false,
+ locations: ["us-east-1", "eu-west-1"],
+ privateLocations: [],
+ tags: ["production", "api"],
+ groupId: "grp_core",
+ degradedResponseTime: 3000,
+ maxResponseTime: 20000,
+ request: {
+ method: "GET",
+ url: "https://api.acmecorp.com/health",
+ headers: [{ key: "X-Env", value: "prod" }],
+ body: "",
+ bodyType: "NONE",
+ followRedirects: true,
+ },
+ },
+ {
+ id: "chk_url_002",
+ name: "Marketing Site",
+ checkType: "URL",
+ frequency: 1,
+ activated: true,
+ muted: false,
+ shouldFail: false,
+ locations: ["us-west-2"],
+ privateLocations: [],
+ tags: ["production"],
+ groupId: null,
+ maxResponseTime: 30000,
+ request: {
+ method: "GET",
+ url: "https://www.acmecorp.com",
+ headers: [],
+ body: "",
+ bodyType: "NONE",
+ followRedirects: true,
+ },
+ },
+ {
+ id: "chk_browser_003",
+ name: "Checkout Flow (Browser)",
+ checkType: "BROWSER",
+ frequency: 10,
+ activated: true,
+ muted: false,
+ shouldFail: false,
+ locations: ["us-east-1"],
+ privateLocations: [],
+ tags: ["e2e"],
+ groupId: null,
+ },
+ {
+ id: "chk_paused_004",
+ name: "Legacy Endpoint",
+ checkType: "API",
+ frequency: 60,
+ activated: false,
+ muted: true,
+ shouldFail: false,
+ locations: ["ap-southeast-1"],
+ privateLocations: [],
+ tags: [],
+ groupId: null,
+ maxResponseTime: 15000,
+ request: {
+ method: "POST",
+ url: "https://api.acmecorp.com/legacy",
+ headers: [],
+ body: '{"ping":true}',
+ bodyType: "JSON",
+ followRedirects: false,
+ },
+ },
+];
+
+export const MOCK_STATUS_PAGES: ChecklyStatusPage[] = [
+ {
+ id: "sp_001",
+ name: "Acme Status",
+ url: "acmecorp",
+ customDomain: "status.acmecorp.com",
+ description: "Live status of Acme services",
+ logo: "https://acmecorp.com/logo.png",
+ favicon: null,
+ isPrivate: false,
+ cards: [
+ {
+ id: "card_api",
+ name: "API Services",
+ services: [
+ { id: "svc_api", name: "Public API", accountId: "acc_1" },
+ { id: "svc_auth", name: "Authentication", accountId: "acc_1" },
+ ],
+ },
+ {
+ id: "card_web",
+ name: "Web",
+ services: [{ id: "svc_web", name: "Website", accountId: "acc_1" }],
+ },
+ ],
+ },
+];
+
+export const MOCK_INCIDENTS: ChecklyIncident[] = [
+ {
+ id: "inc_001",
+ name: "API elevated error rates",
+ severity: "MAJOR",
+ lastUpdateStatus: "RESOLVED",
+ services: [{ id: "svc_api", name: "Public API", accountId: "acc_1" }],
+ incidentUpdates: [
+ {
+ id: "iu_001",
+ status: "INVESTIGATING",
+ description: "We are investigating elevated error rates.",
+ created_at: "2024-06-10T14:05:00.000Z",
+ },
+ {
+ id: "iu_002",
+ status: "RESOLVED",
+ description: "The issue has been resolved.",
+ created_at: "2024-06-10T16:30:00.000Z",
+ },
+ ],
+ created_at: "2024-06-10T14:00:00.000Z",
+ updated_at: "2024-06-10T16:30:00.000Z",
+ },
+ {
+ id: "inc_002",
+ name: "Website degraded",
+ severity: "MINOR",
+ lastUpdateStatus: "MONITORING",
+ services: [{ id: "svc_web", name: "Website", accountId: "acc_1" }],
+ incidentUpdates: [],
+ created_at: "2024-06-11T09:00:00.000Z",
+ },
+];
+
+export const MOCK_MAINTENANCE_WINDOWS: ChecklyMaintenanceWindow[] = [
+ {
+ id: "mw_001",
+ name: "Database upgrade",
+ description: "Scheduled database maintenance",
+ tags: ["production"],
+ startsAt: "2024-06-15T02:00:00.000Z",
+ endsAt: "2024-06-15T06:00:00.000Z",
+ repeatUnit: null,
+ repeatInterval: null,
+ repeatEndsAt: null,
+ created_at: "2024-06-01T00:00:00.000Z",
+ },
+];
diff --git a/packages/importers/src/providers/checkly/index.ts b/packages/importers/src/providers/checkly/index.ts
new file mode 100644
index 000000000..d5a6f68ce
--- /dev/null
+++ b/packages/importers/src/providers/checkly/index.ts
@@ -0,0 +1,24 @@
+export type {
+ ChecklyCard,
+ ChecklyCheck,
+ ChecklyIncident,
+ ChecklyIncidentUpdate,
+ ChecklyMaintenanceWindow,
+ ChecklyRequest,
+ ChecklyService,
+ ChecklyStatusPage,
+} from "./api-types";
+export {
+ ChecklyCardSchema,
+ ChecklyCheckSchema,
+ ChecklyIncidentSchema,
+ ChecklyIncidentUpdateSchema,
+ ChecklyMaintenanceWindowSchema,
+ ChecklyRequestSchema,
+ ChecklyServiceSchema,
+ ChecklyStatusPageSchema,
+} from "./api-types";
+export type { ChecklyClient } from "./client";
+export { createChecklyClient } from "./client";
+export type { ChecklyImportConfig } from "./provider";
+export { createChecklyProvider } from "./provider";
diff --git a/packages/importers/src/providers/checkly/mapper.test.ts b/packages/importers/src/providers/checkly/mapper.test.ts
new file mode 100644
index 000000000..a73f4ce4c
--- /dev/null
+++ b/packages/importers/src/providers/checkly/mapper.test.ts
@@ -0,0 +1,159 @@
+import { expect } from "@std/expect";
+import { describe, test } from "@std/testing/bdd";
+
+import {
+ MOCK_CHECKS,
+ MOCK_INCIDENTS,
+ MOCK_MAINTENANCE_WINDOWS,
+ MOCK_STATUS_PAGES,
+} from "./fixtures";
+import {
+ deriveSlug,
+ mapCheck,
+ mapCheckType,
+ mapFrequency,
+ mapIncidentToStatusReport,
+ mapMaintenance,
+ mapMethod,
+ mapPage,
+ mapRegions,
+ mapService,
+} from "./mapper";
+
+describe("mapCheckType", () => {
+ test("maps supported HTTP-family types", () => {
+ expect(mapCheckType("API")).toBe("http");
+ expect(mapCheckType("URL")).toBe("http");
+ expect(mapCheckType("TCP")).toBe("tcp");
+ expect(mapCheckType("DNS")).toBe("dns");
+ expect(mapCheckType("ssl")).toBe("ssl");
+ });
+
+ test("returns null for unsupported types", () => {
+ expect(mapCheckType("BROWSER")).toBeNull();
+ expect(mapCheckType("MULTI_STEP")).toBeNull();
+ expect(mapCheckType("SOMETHING_NEW")).toBeNull();
+ });
+});
+
+describe("mapFrequency", () => {
+ test("maps known frequencies", () => {
+ expect(mapFrequency(0)).toBe("30s");
+ expect(mapFrequency(1)).toBe("1m");
+ expect(mapFrequency(5)).toBe("5m");
+ expect(mapFrequency(10)).toBe("10m");
+ expect(mapFrequency(30)).toBe("30m");
+ expect(mapFrequency(60)).toBe("1h");
+ });
+
+ test("snaps long frequencies down to 1h", () => {
+ expect(mapFrequency(120)).toBe("1h");
+ expect(mapFrequency(1440)).toBe("1h");
+ });
+});
+
+describe("mapRegions", () => {
+ test("maps AWS locations to fly regions", () => {
+ expect(mapRegions(["us-east-1", "eu-west-1"])).toBe("iad,lhr");
+ });
+
+ test("dedupes collapsed regions", () => {
+ expect(mapRegions(["us-east-1", "us-east-2"])).toBe("iad");
+ });
+
+ test("falls back to iad for unknown or empty", () => {
+ expect(mapRegions([])).toBe("iad");
+ expect(mapRegions(["mars-1"])).toBe("iad");
+ });
+});
+
+describe("mapMethod", () => {
+ test("uppercases and validates", () => {
+ expect(mapMethod("get")).toBe("GET");
+ expect(mapMethod("post")).toBe("POST");
+ expect(mapMethod("bogus")).toBe("GET");
+ });
+});
+
+describe("mapCheck", () => {
+ test("maps an API check to a monitor", () => {
+ const m = mapCheck(MOCK_CHECKS[0], 42);
+ expect(m.workspaceId).toBe(42);
+ expect(m.jobType).toBe("http");
+ expect(m.periodicity).toBe("5m");
+ expect(m.active).toBe(true);
+ expect(m.regions).toBe("iad,lhr");
+ expect(m.url).toBe("https://api.acmecorp.com/health");
+ expect(m.method).toBe("GET");
+ expect(m.timeout).toBe(20000);
+ expect(m.sourceMonitorGroupId).toBe("grp_core");
+ expect(JSON.parse(m.headers)).toEqual([{ key: "X-Env", value: "prod" }]);
+ });
+
+ test("a muted + deactivated check maps to active:false", () => {
+ const m = mapCheck(MOCK_CHECKS[3], 1);
+ expect(m.active).toBe(false);
+ expect(m.method).toBe("POST");
+ });
+});
+
+describe("deriveSlug", () => {
+ test("reduces url or name to a slug token", () => {
+ expect(deriveSlug("acmecorp")).toBe("acmecorp");
+ expect(deriveSlug("https://status.acme.com/foo")).toBe("status");
+ expect(deriveSlug("Acme Status")).toBe("acme-status");
+ });
+});
+
+describe("mapPage", () => {
+ test("maps a status page", () => {
+ const p = mapPage(MOCK_STATUS_PAGES[0], 7);
+ expect(p.title).toBe("Acme Status");
+ expect(p.slug).toBe("acmecorp");
+ expect(p.customDomain).toBe("status.acmecorp.com");
+ expect(p.published).toBe(true);
+ expect(p.icon).toBe("https://acmecorp.com/logo.png");
+ });
+});
+
+describe("mapService", () => {
+ test("maps a service to a static component with group link", () => {
+ const svc = MOCK_STATUS_PAGES[0].cards[0].services[0];
+ const c = mapService(svc, 7, 0, "card_api", 99);
+ expect(c.type).toBe("static");
+ expect(c.monitorId).toBeNull();
+ expect(c.name).toBe("Public API");
+ expect(c.order).toBe(0);
+ expect(c.sourceGroupId).toBe("card_api");
+ expect(c.pageId).toBe(99);
+ });
+});
+
+describe("mapIncidentToStatusReport", () => {
+ test("maps updates and resolves final status", () => {
+ const r = mapIncidentToStatusReport(MOCK_INCIDENTS[0], 7, 99);
+ expect(r.report.title).toBe("API elevated error rates");
+ expect(r.report.status).toBe("resolved");
+ expect(r.updates).toHaveLength(2);
+ expect(r.updates[0].status).toBe("investigating");
+ expect(r.sourceComponentIds).toEqual(["svc_api"]);
+ });
+
+ test("synthesizes an update when none exist", () => {
+ const r = mapIncidentToStatusReport(MOCK_INCIDENTS[1], 7, 99);
+ expect(r.updates).toHaveLength(1);
+ expect(r.report.status).toBe("monitoring");
+ expect(r.updates[0].message).toBe("Website degraded");
+ });
+});
+
+describe("mapMaintenance", () => {
+ test("maps a maintenance window", () => {
+ const m = mapMaintenance(MOCK_MAINTENANCE_WINDOWS[0], 7, 99);
+ expect(m.title).toBe("Database upgrade");
+ expect(m.message).toBe("Scheduled database maintenance");
+ expect(m.from.toISOString()).toBe("2024-06-15T02:00:00.000Z");
+ expect(m.to.toISOString()).toBe("2024-06-15T06:00:00.000Z");
+ expect(m.sourceComponentIds).toEqual([]);
+ });
+});
diff --git a/packages/importers/src/providers/checkly/mapper.ts b/packages/importers/src/providers/checkly/mapper.ts
new file mode 100644
index 000000000..58cfbfe1f
--- /dev/null
+++ b/packages/importers/src/providers/checkly/mapper.ts
@@ -0,0 +1,255 @@
+import type {
+ ChecklyCheck,
+ ChecklyIncident,
+ ChecklyMaintenanceWindow,
+ ChecklyService,
+ ChecklyStatusPage,
+} from "./api-types";
+
+export type StatusReportStatus =
+ | "investigating"
+ | "identified"
+ | "monitoring"
+ | "resolved";
+
+/**
+ * Checkly check types OpenStatus can run as monitors. Browser / Playwright /
+ * multi-step / heartbeat / gRPC / traceroute / agentic have no HTTP-family
+ * monitor equivalent and are skipped with a reason by the provider.
+ */
+const CHECK_TYPE_MAP: Record<string, string> = {
+ API: "http",
+ URL: "http",
+ TCP: "tcp",
+ ICMP: "icmp",
+ DNS: "dns",
+ SSL: "ssl",
+};
+
+export function mapCheckType(checkType: string): string | null {
+ return CHECK_TYPE_MAP[checkType.toUpperCase()] ?? null;
+}
+
+const FREQUENCY_MAP: Record<number, string> = {
+ 0: "30s",
+ 1: "1m",
+ 2: "1m",
+ 5: "5m",
+ 10: "10m",
+ 15: "10m",
+ 30: "30m",
+ 60: "1h",
+};
+
+// OpenStatus caps schedulable periodicity at 1h; longer Checkly frequencies
+// (120/180/720/1440 min) snap down to the nearest supported bucket.
+export function mapFrequency(minutes: number): string {
+ if (FREQUENCY_MAP[minutes]) return FREQUENCY_MAP[minutes];
+ const supported = Object.keys(FREQUENCY_MAP).map(Number);
+ let closest = supported[0];
+ for (const s of supported) {
+ if (Math.abs(s - minutes) < Math.abs(closest - minutes)) closest = s;
+ }
+ return FREQUENCY_MAP[closest] ?? "10m";
+}
+
+// AWS region codes (Checkly locations) → Fly regions (OpenStatus).
+const REGION_MAP: Record<string, string> = {
+ "us-east-1": "iad",
+ "us-east-2": "iad",
+ "us-west-1": "sjc",
+ "us-west-2": "sea",
+ "ca-central-1": "yul",
+ "eu-west-1": "lhr",
+ "eu-west-2": "lhr",
+ "eu-west-3": "cdg",
+ "eu-central-1": "fra",
+ "eu-north-1": "arn",
+ "ap-south-1": "bom",
+ "ap-southeast-1": "sin",
+ "ap-southeast-2": "syd",
+ "ap-northeast-1": "nrt",
+ "ap-northeast-2": "nrt",
+ "sa-east-1": "gru",
+ "af-south-1": "jnb",
+};
+
+export function mapRegions(locations: string[]): string {
+ const mapped = Array.from(
+ new Set(
+ locations
+ .map((l) => REGION_MAP[l.toLowerCase()])
+ .filter((r): r is string => r != null),
+ ),
+ );
+ return mapped.length > 0 ? mapped.join(",") : "iad";
+}
+
+const ALLOWED_METHODS = new Set([
+ "GET",
+ "POST",
+ "HEAD",
+ "PUT",
+ "PATCH",
+ "DELETE",
+ "TRACE",
+ "CONNECT",
+ "OPTIONS",
+]);
+
+export function mapMethod(method: string): string {
+ const upper = method.toUpperCase();
+ return ALLOWED_METHODS.has(upper) ? upper : "GET";
+}
+
+export function mapCheck(check: ChecklyCheck, workspaceId: number) {
+ const req = check.request;
+ const headers =
+ req && req.headers.length > 0
+ ? JSON.stringify(req.headers.map((h) => ({ key: h.key, value: h.value })))
+ : "";
+
+ return {
+ workspaceId,
+ jobType: mapCheckType(check.checkType) ?? "http",
+ periodicity: mapFrequency(check.frequency),
+ status: "active" as const,
+ // Checkly `muted` only silences alerts — the check keeps running — so it
+ // must not disable the monitor; only `activated` controls whether it runs.
+ active: check.activated,
+ regions: mapRegions(check.locations),
+ url: req?.url ?? "",
+ name: check.name,
+ description: "",
+ headers,
+ body: req?.body ?? "",
+ method: mapMethod(req?.method ?? "GET"),
+ // Checkly maxResponseTime is the hard timeout (ms); default to 45s.
+ timeout: check.maxResponseTime ?? 45000,
+ sourceMonitorGroupId: check.groupId,
+ };
+}
+
+// url may be a full URL or a bare subdomain; reduce it to a slug token.
+export function deriveSlug(input: string): string {
+ const withoutScheme = input.replace(/^https?:\/\//, "");
+ const host = withoutScheme.split("/")[0] ?? withoutScheme;
+ const firstLabel = host.split(".")[0] ?? host;
+ const slug = firstLabel
+ .toLowerCase()
+ .replace(/[^a-z0-9]+/g, "-")
+ .replace(/^-+|-+$/g, "");
+ return slug || "status";
+}
+
+export function mapPage(page: ChecklyStatusPage, workspaceId: number) {
+ return {
+ workspaceId,
+ title: page.name,
+ description: page.description,
+ slug: deriveSlug(page.url || page.name),
+ customDomain: page.customDomain ?? "",
+ published: !page.isPrivate,
+ icon: page.logo ?? "",
+ };
+}
+
+export function mapCard(
+ card: { id: string; name: string },
+ workspaceId: number,
+ pageId?: number,
+) {
+ return { workspaceId, pageId, name: card.name };
+}
+
+export function mapService(
+ service: ChecklyService,
+ workspaceId: number,
+ order: number,
+ cardId: string,
+ pageId?: number,
+) {
+ return {
+ workspaceId,
+ pageId,
+ type: "static" as const,
+ monitorId: null as number | null,
+ name: service.name,
+ description: null as string | null,
+ order,
+ sourceGroupId: cardId,
+ };
+}
+
+const INCIDENT_STATUS_MAP: Record<string, StatusReportStatus> = {
+ investigating: "investigating",
+ identified: "identified",
+ monitoring: "monitoring",
+ resolved: "resolved",
+};
+
+export function mapIncidentStatus(
+ status: string | null | undefined,
+): StatusReportStatus {
+ if (!status) return "investigating";
+ return INCIDENT_STATUS_MAP[status.toLowerCase()] ?? "investigating";
+}
+
+export function mapIncidentToStatusReport(
+ incident: ChecklyIncident,
+ workspaceId: number,
+ pageId?: number,
+) {
+ const sorted = [...incident.incidentUpdates].sort(
+ (a, b) =>
+ new Date(a.created_at).getTime() - new Date(b.created_at).getTime(),
+ );
+
+ const updates = sorted.map((u) => ({
+ status: mapIncidentStatus(u.status ?? u.incidentUpdateStatus),
+ message: u.description ?? u.text ?? "",
+ date: new Date(u.created_at),
+ }));
+
+ // No updates → synthesize one so the report still has a timeline entry.
+ if (updates.length === 0) {
+ updates.push({
+ status: mapIncidentStatus(incident.lastUpdateStatus),
+ message: incident.name,
+ date: new Date(incident.created_at ?? new Date().toISOString()),
+ });
+ }
+
+ const reportStatus = incident.lastUpdateStatus
+ ? mapIncidentStatus(incident.lastUpdateStatus)
+ : (updates[updates.length - 1]?.status ?? "investigating");
+
+ return {
+ report: {
+ title: incident.name,
+ status: reportStatus,
+ workspaceId,
+ pageId,
+ },
+ updates,
+ sourceComponentIds: incident.services.map((s) => s.id),
+ };
+}
+
+export function mapMaintenance(
+ mw: ChecklyMaintenanceWindow,
+ workspaceId: number,
+ pageId?: number,
+) {
+ return {
+ title: mw.name,
+ message: mw.description ?? mw.name,
+ from: new Date(mw.startsAt),
+ to: new Date(mw.endsAt),
+ workspaceId,
+ pageId,
+ // Checkly ties maintenance windows to checks by tag, not to status-page
+ // services — there's no clean component link to carry over.
+ sourceComponentIds: [] as string[],
+ };
+}
diff --git a/packages/importers/src/providers/checkly/provider.test.ts b/packages/importers/src/providers/checkly/provider.test.ts
new file mode 100644
index 000000000..52f9511ed
--- /dev/null
+++ b/packages/importers/src/providers/checkly/provider.test.ts
@@ -0,0 +1,132 @@
+import { expect } from "@std/expect";
+import { afterEach, describe, test } from "@std/testing/bdd";
+import { spy } from "@std/testing/mock";
+
+import type { PhaseResult } from "../../types";
+import {
+ MOCK_CHECKS,
+ MOCK_INCIDENTS,
+ MOCK_MAINTENANCE_WINDOWS,
+ MOCK_STATUS_PAGES,
+} from "./fixtures";
+import { createChecklyProvider } from "./provider";
+
+const originalFetch = globalThis.fetch;
+
+function jsonResponse(body: unknown, status = 200) {
+ return new Response(JSON.stringify(body), {
+ status,
+ statusText: status === 200 ? "OK" : "Unauthorized",
+ headers: { "Content-Type": "application/json" },
+ });
+}
+
+function mockFetchByPath(status = 200) {
+ globalThis.fetch = spy((input: string | URL | Request) => {
+ const url = String(input);
+ let body: unknown = [];
+ // incidents must be matched before the status-pages prefix
+ if (url.includes("/v1/checks")) body = MOCK_CHECKS;
+ else if (url.includes("/v1/status-pages/incidents"))
+ body = { entries: MOCK_INCIDENTS, nextId: null };
+ else if (url.includes("/v1/status-pages"))
+ body = { entries: MOCK_STATUS_PAGES, nextId: null };
+ else if (url.includes("/v1/maintenance-windows"))
+ body = MOCK_MAINTENANCE_WINDOWS;
+ return Promise.resolve(jsonResponse(body, status));
+ }) as typeof globalThis.fetch;
+}
+
+function phase(phases: PhaseResult[], name: string): PhaseResult | undefined {
+ return phases.find((p) => p.phase === name);
+}
+
+const baseConfig = {
+ apiKey: "test-key",
+ checklyAccountId: "test-account",
+ workspaceId: 1,
+};
+
+describe("ChecklyProvider.validate", () => {
+ afterEach(() => {
+ globalThis.fetch = originalFetch;
+ });
+
+ test("rejects a missing account id without calling the API", async () => {
+ const provider = createChecklyProvider();
+ const result = await provider.validate({
+ apiKey: "k",
+ checklyAccountId: "",
+ workspaceId: 1,
+ });
+ expect(result.valid).toBe(false);
+ expect(result.error).toContain("account ID");
+ });
+
+ test("accepts a working key", async () => {
+ mockFetchByPath();
+ const provider = createChecklyProvider();
+ const result = await provider.validate(baseConfig);
+ expect(result.valid).toBe(true);
+ });
+
+ test("maps 401 to a friendly error", async () => {
+ mockFetchByPath(401);
+ const provider = createChecklyProvider();
+ const result = await provider.validate(baseConfig);
+ expect(result.valid).toBe(false);
+ expect(result.error).toContain("Invalid Checkly API key");
+ });
+});
+
+describe("ChecklyProvider.run", () => {
+ afterEach(() => {
+ globalThis.fetch = originalFetch;
+ });
+
+ test("produces the six core phases", async () => {
+ mockFetchByPath();
+ const provider = createChecklyProvider();
+ const summary = await provider.run(baseConfig);
+
+ expect(summary.provider).toBe("checkly");
+ expect(summary.phases.map((p) => p.phase)).toEqual([
+ "monitors",
+ "page",
+ "componentGroups",
+ "components",
+ "incidents",
+ "maintenances",
+ ]);
+ });
+
+ test("skips unsupported check types, imports the rest", async () => {
+ mockFetchByPath();
+ const summary = await createChecklyProvider().run(baseConfig);
+ const monitors = phase(summary.phases, "monitors");
+ expect(monitors?.resources).toHaveLength(4);
+ const created = monitors?.resources.filter((r) => r.status === "created");
+ const skipped = monitors?.resources.filter((r) => r.status === "skipped");
+ expect(created).toHaveLength(3);
+ expect(skipped).toHaveLength(1);
+ expect(skipped?.[0].error).toContain("BROWSER");
+ });
+
+ test("maps cards to groups and services to components", async () => {
+ mockFetchByPath();
+ const summary = await createChecklyProvider().run(baseConfig);
+ expect(phase(summary.phases, "componentGroups")?.resources).toHaveLength(2);
+ expect(phase(summary.phases, "components")?.resources).toHaveLength(3);
+ expect(phase(summary.phases, "incidents")?.resources).toHaveLength(2);
+ expect(phase(summary.phases, "maintenances")?.resources).toHaveLength(1);
+ });
+
+ test("only imports monitors when the status page id has no match", async () => {
+ mockFetchByPath();
+ const summary = await createChecklyProvider().run({
+ ...baseConfig,
+ checklyStatusPageId: "does-not-exist",
+ });
+ expect(summary.phases.map((p) => p.phase)).toEqual(["monitors"]);
+ });
+});
diff --git a/packages/importers/src/providers/checkly/provider.ts b/packages/importers/src/providers/checkly/provider.ts
new file mode 100644
index 000000000..ea0695953
--- /dev/null
+++ b/packages/importers/src/providers/checkly/provider.ts
@@ -0,0 +1,214 @@
+import type {
+ ImportConfig,
+ ImportProvider,
+ PhaseResult,
+ ResourceResult,
+} from "../../types";
+import { createChecklyClient } from "./client";
+import {
+ mapCard,
+ mapCheck,
+ mapCheckType,
+ mapIncidentToStatusReport,
+ mapMaintenance,
+ mapPage,
+ mapService,
+} from "./mapper";
+
+export interface ChecklyImportConfig extends ImportConfig {
+ // Optional at the type level (keeps `ImportProvider<ChecklyImportConfig>`
+ // assignable to the base `ImportProvider`); `validate` rejects a missing id.
+ checklyAccountId?: string;
+ checklyStatusPageId?: string;
+}
+
+export function createChecklyProvider(): ImportProvider<ChecklyImportConfig> {
+ return {
+ name: "checkly",
+
+ validate: async (config) => {
+ if (!config.checklyAccountId) {
+ return {
+ valid: false,
+ error:
+ "Checkly account ID is required. Find it in Checkly → Account Settings → General.",
+ };
+ }
+ try {
+ const client = createChecklyClient(
+ config.apiKey,
+ config.checklyAccountId,
+ );
+ await client.getChecks();
+ return { valid: true };
+ } catch (err) {
+ const message = err instanceof Error ? err.message : String(err);
+ if (message.includes("401") || message.includes("403")) {
+ return {
+ valid: false,
+ error:
+ "Invalid Checkly API key or account ID. Create a key in Checkly → User Settings → API keys and copy your account ID from Account Settings.",
+ };
+ }
+ return { valid: false, error: message };
+ }
+ },
+
+ run: async (config) => {
+ const startedAt = new Date();
+ const client = createChecklyClient(
+ config.apiKey,
+ config.checklyAccountId ?? "",
+ );
+ const phases: PhaseResult[] = [];
+ const errors: string[] = [];
+ const pageId = config.pageId;
+
+ // Phase 1: Checks → Monitors
+ const checks = await client.getChecks();
+ const monitorResources: ResourceResult[] = checks.map((check) => {
+ const jobType = mapCheckType(check.checkType);
+ if (!jobType) {
+ return {
+ sourceId: check.id,
+ name: check.name,
+ status: "skipped",
+ error: `Checkly ${check.checkType} checks can't run as an OpenStatus HTTP-family monitor.`,
+ };
+ }
+ const data = mapCheck(check, config.workspaceId);
+ if (!data.url) {
+ return {
+ sourceId: check.id,
+ name: check.name,
+ status: "skipped",
+ error: `No target URL on this ${check.checkType} check; skipped.`,
+ };
+ }
+ return {
+ sourceId: check.id,
+ name: check.name,
+ status: "created",
+ data,
+ };
+ });
+ phases.push({
+ phase: "monitors",
+ status: "completed",
+ resources: monitorResources,
+ });
+
+ // Phase 2: Status Pages (first, or filtered by id)
+ let statusPages = await client.getStatusPages();
+ if (config.checklyStatusPageId) {
+ statusPages = statusPages.filter(
+ (p) => p.id === config.checklyStatusPageId,
+ );
+ }
+
+ if (statusPages.length > 0) {
+ const sp = statusPages[0];
+
+ phases.push({
+ phase: "page",
+ status: "completed",
+ resources: [
+ {
+ sourceId: sp.id,
+ name: sp.name,
+ status: "created",
+ data: mapPage(sp, config.workspaceId),
+ },
+ ],
+ });
+
+ // Phase 3: Cards → Component Groups
+ const groupResources: ResourceResult[] = sp.cards.map((card) => ({
+ sourceId: card.id,
+ name: card.name,
+ status: "created",
+ data: mapCard(card, config.workspaceId, pageId),
+ }));
+ phases.push({
+ phase: "componentGroups",
+ status: "completed",
+ resources: groupResources,
+ });
+
+ // Phase 4: Services (per card) → Components (static)
+ const componentResources: ResourceResult[] = [];
+ let order = 0;
+ for (const card of sp.cards) {
+ for (const service of card.services) {
+ componentResources.push({
+ sourceId: service.id,
+ name: service.name,
+ status: "created",
+ data: mapService(
+ service,
+ config.workspaceId,
+ order++,
+ card.id,
+ pageId,
+ ),
+ });
+ }
+ }
+ phases.push({
+ phase: "components",
+ status: "completed",
+ resources: componentResources,
+ });
+
+ // Phase 5: Incidents → Status Reports
+ // Incidents are account-wide; keep those touching this page's services
+ // (plus service-less incidents, which can't be attributed elsewhere).
+ const pageServiceIds = new Set(
+ sp.cards.flatMap((c) => c.services.map((s) => s.id)),
+ );
+ const incidents = await client.getIncidents();
+ const relevant = incidents.filter(
+ (inc) =>
+ inc.services.length === 0 ||
+ inc.services.some((s) => pageServiceIds.has(s.id)),
+ );
+ const incidentResources: ResourceResult[] = relevant.map((inc) => ({
+ sourceId: inc.id,
+ name: inc.name,
+ status: "created",
+ data: mapIncidentToStatusReport(inc, config.workspaceId, pageId),
+ }));
+ phases.push({
+ phase: "incidents",
+ status: "completed",
+ resources: incidentResources,
+ });
+
+ // Phase 6: Maintenance Windows → Maintenances
+ const maintenanceWindows = await client.getMaintenanceWindows();
+ const maintenanceResources: ResourceResult[] = maintenanceWindows.map(
+ (mw) => ({
+ sourceId: mw.id,
+ name: mw.name,
+ status: "created",
+ data: mapMaintenance(mw, config.workspaceId, pageId),
+ }),
+ );
+ phases.push({
+ phase: "maintenances",
+ status: "completed",
+ resources: maintenanceResources,
+ });
+ }
+
+ return {
+ provider: "checkly",
+ status: "completed",
+ startedAt,
+ completedAt: new Date(),
+ phases,
+ errors,
+ };
+ },
+ };
+}
diff --git a/packages/services/src/import/preview.ts b/packages/services/src/import/preview.ts
index 8ff26e251..abe56c627 100644
--- a/packages/services/src/import/preview.ts
+++ b/packages/services/src/import/preview.ts
@@ -28,6 +28,8 @@ export async function previewImport(args: {
statuspagePageId: input.statuspagePageId,
betterstackStatusPageId: input.betterstackStatusPageId,
instatusPageId: input.instatusPageId,
+ checklyAccountId: input.checklyAccountId,
+ checklyStatusPageId: input.checklyStatusPageId,
workspaceId: ctx.workspace.id,
pageId: input.pageId,
});
diff --git a/packages/services/src/import/provider.ts b/packages/services/src/import/provider.ts
index 1fdff59f0..cf0bb5a6e 100644
--- a/packages/services/src/import/provider.ts
+++ b/packages/services/src/import/provider.ts
@@ -1,5 +1,6 @@
import type { ImportProvider } from "@openstatus/importers";
import { createBetterstackProvider } from "@openstatus/importers/betterstack";
+import { createChecklyProvider } from "@openstatus/importers/checkly";
import { createInstatusProvider } from "@openstatus/importers/instatus";
import { createStatuspageProvider } from "@openstatus/importers/statuspage";
@@ -18,6 +19,8 @@ export function createProvider(name: ImportProviderName): ImportProvider {
return createInstatusProvider();
case "statuspage":
return createStatuspageProvider();
+ case "checkly":
+ return createChecklyProvider();
default: {
const exhaustive: never = name;
throw new Error(`Unknown import provider: ${String(exhaustive)}`);
@@ -33,6 +36,8 @@ export type ProviderConfig = {
statuspagePageId?: string;
betterstackStatusPageId?: string;
instatusPageId?: string;
+ checklyAccountId?: string;
+ checklyStatusPageId?: string;
};
/**
@@ -54,6 +59,12 @@ export function buildProviderConfig(config: ProviderConfig) {
return { ...rest, instatusPageId: config.instatusPageId };
case "statuspage":
return { ...rest, statuspagePageId: config.statuspagePageId };
+ case "checkly":
+ return {
+ ...rest,
+ checklyAccountId: config.checklyAccountId,
+ checklyStatusPageId: config.checklyStatusPageId,
+ };
default: {
const exhaustive: never = provider;
throw new Error(`Unknown import provider: ${String(exhaustive)}`);
diff --git a/packages/services/src/import/run.ts b/packages/services/src/import/run.ts
index 27c3e18ab..35c8aabb6 100644
--- a/packages/services/src/import/run.ts
+++ b/packages/services/src/import/run.ts
@@ -65,6 +65,8 @@ export async function runImport(args: {
statuspagePageId: input.statuspagePageId,
betterstackStatusPageId: input.betterstackStatusPageId,
instatusPageId: input.instatusPageId,
+ checklyAccountId: input.checklyAccountId,
+ checklyStatusPageId: input.checklyStatusPageId,
workspaceId: ctx.workspace.id,
pageId: input.pageId,
});
diff --git a/packages/services/src/import/schemas.ts b/packages/services/src/import/schemas.ts
index 0e53f6f4c..f9f3dd8db 100644
--- a/packages/services/src/import/schemas.ts
+++ b/packages/services/src/import/schemas.ts
@@ -4,6 +4,7 @@ export const importProviders = [
"statuspage",
"betterstack",
"instatus",
+ "checkly",
] as const;
export type ImportProviderName = (typeof importProviders)[number];
@@ -27,6 +28,8 @@ const providerFields = {
statuspagePageId: nullishString,
betterstackStatusPageId: nullishString,
instatusPageId: nullishString,
+ checklyAccountId: nullishString,
+ checklyStatusPageId: nullishString,
};
export const ImportOptions = z.object({