### Install Node.js SDK Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/docs/sdk/nodejs/overview.mdx Install the Node.js SDK using npm. See Getting Started for JSR, Deno, and Bun instructions. ```bash npm install @openstatus/sdk-node ``` -------------------------------- ### Fly.io Machine Start Logs Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/blog/monitoring-latency-cf-workers-fly-koyeb-raylway-render.mdx Example logs from Fly.io detailing the machine startup process, including timings for different stages like proxy listening and machine reachability. This helps diagnose cold start performance. ```log 2024-02-14T11:24:16.107 proxy[286560ea703108] ams [info] Starting machine 2024-02-14T11:24:16.322 app[286560ea703108] ams [info] [ 0.035736] PCI: Fatal: No config space access function found 2024-02-14T11:24:16.533 app[286560ea703108] ams [info] INFO Starting init (commit: bfa79be)... 2024-02-14T11:24:16.546 app[286560ea703108] ams [info] INFO Preparing to run: `/usr/local/bin/docker-entrypoint.sh bun start` as root 2024-02-14T11:24:16.558 app[286560ea703108] ams [info] INFO [fly api proxy] listening at /.fly/api 2024-02-14T11:24:16.565 app[286560ea703108] ams [info] 2024/02/14 11:24:16 listening on [fdaa:3:2ef:a7b:10c:3c9a:5b4:2]:22 (DNS: [fdaa::3]:53) 2024-02-14T11:24:16.611 app[286560ea703108] ams [info] $ bun src/index.ts 2024-02-14T11:24:16.618 runner[286560ea703108] ams [info] Machine started in 460ms 2024-02-14T11:24:17.621 proxy[286560ea703108] ams [info] machine started in 1.513643778s 2024-02-14T11:24:17.628 proxy[286560ea703108] ams [info] machine became reachable in 7.03669ms ``` -------------------------------- ### Install Component via Shadcn CLI Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/blog/shadcn-component-registry.mdx Example command to install a component from a public registry using the shadcn CLI. This command assumes the registry is hosted at the provided URL. ```bash npx shadcn@latest add https://openstatus.dev/r/status-banner.json ``` -------------------------------- ### Copy Lightweight Docker Environment Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/docs/guides/self-host-status-page-only.mdx Copy the example environment file for a lightweight Docker setup. This file contains only the variables necessary for the status page and dashboard. ```bash cp .env.docker-lightweight.example .env.docker ``` -------------------------------- ### Install sqld-beta with Homebrew Source: https://github.com/openstatushq/openstatus/blob/main/packages/db/README.md Installs the sqld-beta package using Homebrew. Use this command to set up the SQL database for local development. ```bash brew tap libsql/sqld brew install sqld-beta sqld --help ``` -------------------------------- ### Monitors Apply Command Examples Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/docs/reference/cli-reference.mdx Provides examples for applying monitor configurations, including specifying a configuration file, using a dry run, and automatically accepting prompts. ```bash openstatus monitors apply ``` ```bash openstatus monitors apply --config custom.yaml -y ``` ```bash openstatus monitors apply --dry-run ``` -------------------------------- ### Install Component Directly Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/unrelated/registry.mdx Install a specific component directly from the OpenStatus registry using the shadcn CLI. ```bash npx shadcn@latest add https://openstatus.dev/r/status-complete ``` -------------------------------- ### Install Components from Registry Source: https://github.com/openstatushq/openstatus/blob/main/packages/ui/REGISTRY.md Install components from the OpenStatus UI registry using the shadcn-ui CLI. Provide the registry URL to add components. ```bash npx shadcn@latest add https://openstatus.dev/r/example ``` -------------------------------- ### Install and Log In to OpenStatus CLI Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/product/tooling/cli.mdx Install the OpenStatus CLI using Homebrew and log in to your workspace. Use `whoami` to verify authentication. ```bash brew install openstatusHQ/cli/openstatus --cask openstatus login openstatus whoami ``` -------------------------------- ### Quick Start: Build and Run OpenStatus with Docker Source: https://github.com/openstatushq/openstatus/blob/main/DOCKER.md Follow these steps to copy the environment file, configure variables, build, and start OpenStatus services. Migrations run automatically. Use `docker compose ps` to check service health. ```bash # 1. Copy environment file cp .env.docker.example .env.docker # 2. Configure required variables (see Configuration section) vim .env.docker # 3. Build and start services (migrations will run automatically) export DOCKER_BUILDKIT=1 docker compose up -d # 4. Check service health docker compose ps # 5. (Optional) Seed database with test data docker run --rm --network openstatus \ -e DATABASE_URL=http://libsql:8080 \ $(docker build -q -f apps/workflows/Dockerfile --target build .) \ sh -c "cd /app/packages/db && bun src/seed.mts" # 6. (Optional) Deploy Tinybird local - requires tb CLI cd packages/tinybird tb --local deploy # 7. Access the application open http://localhost:3002 # Dashboard open http://localhost:3003 # Status Page Theme Explorer # Note: Status pages are accessed via subdomain/slug (e.g., http://localhost:3003/status) ``` -------------------------------- ### Install @openstatus/react Package Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/docs/guides/how-to-use-react-widget.mdx Install the necessary package using npm. ```bash npm install @openstatus/react ``` -------------------------------- ### Install Component After Registry Add Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/unrelated/registry.mdx Install a component from the OpenStatus registry after adding the registry. ```bash pnpm dlx shadcn@latest add @openstatus/status-complete ``` -------------------------------- ### Full Workflow Example with Node.js SDK Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/docs/sdk/nodejs/getting-started.mdx This example demonstrates a complete workflow: creating an HTTP monitor, setting up a status page, adding the monitor as a component, configuring Slack notifications, and checking the overall status of the status page. Ensure your OPENSTATUS_API_KEY environment variable is set. ```typescript import { createOpenStatusClient, NotificationProvider, Periodicity, Region, } from "@openstatus/sdk-node"; const client = createOpenStatusClient({ apiKey: process.env.OPENSTATUS_API_KEY, }); // 1. Check API health const health = await client.health.v1.HealthService.check({}); console.log(`API status: ${health.status}`); // 2. Create an HTTP monitor const { monitor } = await client.monitor.v1.MonitorService.createHTTPMonitor({ monitor: { name: "Production API", url: "https://api.example.com/health", periodicity: Periodicity.PERIODICITY_1M, regions: [Region.FLY_AMS, Region.FLY_IAD, Region.FLY_SYD], active: true, }, }); // 3. Create a status page const { statusPage } = await client.statusPage.v1.StatusPageService .createStatusPage({ title: "Example Status", slug: "example-status", description: "Status page for Example services", }); // 4. Add the monitor as a component const { component } = await client.statusPage.v1.StatusPageService .addMonitorComponent({ pageId: statusPage!.id, monitorId: monitor!.id, name: "Production API", }); // 5. Set up Slack notifications const { notification } = await client.notification.v1.NotificationService .createNotification({ name: "Slack Alerts", provider: NotificationProvider.SLACK, data: { data: { case: "slack", value: { webhookUrl: "https://hooks.slack.com/services/" }, }, }, monitorIds: [monitor!.id], }); // 6. Check overall status const { overallStatus } = await client.statusPage.v1.StatusPageService .getOverallStatus({ identifier: { case: "id", value: statusPage!.id }, }); console.log(`Overall status: ${overallStatus}`); ``` -------------------------------- ### Install OpenStatus SDK Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/blog/migrating-from-zod-openapi-to-connectrpc.mdx Install the OpenStatus SDK using npm or jsr. This is the first step to integrate with the OpenStatus monitoring platform. ```bash npx jsr add @openstatus/sdk ``` -------------------------------- ### Install openstatus CLI on macOS Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/docs/tutorial/get-started-with-openstatus-cli.mdx Use Homebrew for recommended installation on macOS. Alternatively, use the provided install script. ```bash brew install openstatusHQ/cli/openstatus --cask ``` ```bash curl -fsSL https://raw.githubusercontent.com/openstatusHQ/cli/refs/heads/main/install.sh | bash ``` -------------------------------- ### Install Dependencies with Bun Source: https://github.com/openstatushq/openstatus/blob/main/apps/workflows/README.md Use this command to install project dependencies using Bun. ```sh bun install ``` -------------------------------- ### Install openstatus Python SDK Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/changelog/openstatus-sdk-python.mdx Install the openstatus Python SDK using pip. ```bash pip install openstatus ``` -------------------------------- ### Verify Slack Agent Installation Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/docs/guides/how-to-setup-slack-agent.mdx After installation, verify the agent is working by mentioning it in your Slack channel and asking for the status of your monitors. The bot should respond with a summary. ```text @openstatus what's the status of my monitors? ``` -------------------------------- ### List Monitors Example Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/product/tooling/api.mdx This example demonstrates how to list monitors using a direct API call with curl. It shows the required headers and the basic request structure. ```APIDOC ## List Monitors ### Description Retrieves a list of all monitors. ### Method POST ### Endpoint /rpc/openstatus.v1.MonitorService/ListMonitors ### Request Example ```bash curl https://api.openstatus.dev/rpc/openstatus.v1.MonitorService/ListMonitors \ -H "x-openstatus-key: os_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{}' ``` ### Response #### Success Response (200) - monitors (array) - A list of monitor objects. - next_page_token (string) - Token for paginating to the next page. ``` -------------------------------- ### Install OpenStatus Python SDK Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/docs/sdk/python/overview.mdx Install the OpenStatus Python SDK using pip or uv. Requires Python 3.10 or later. ```bash pip install openstatus # or uv add openstatus ``` -------------------------------- ### Install openstatus-theme Skill Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/blog/introducing-status-page-theme-explorer.mdx Install the openstatus-theme skill for AI-assisted help with palette design, accessibility checks, file scaffolding, and PR submission. ```bash npx skills add openstatushq/skills --skill openstatus-theme ``` -------------------------------- ### Initialize OpenPanel SDK and Setup Analytics Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/blog/event-analytics-implementation.mdx Initializes the OpenPanel client with necessary credentials and provides a setup function to identify users and return a track function. Ensure environment variables for client ID and secret are set. ```typescript // packages/analytics/src/index.ts import { OpenPanel, type PostEventPayload, type IdentifyPayload, } from "@openpanel/sdk"; import { type EventProps } from "@openstatus/analytics"; const op = new OpenPanel({ clientId: process.env.NEXT_PUBLIC_OPENPANEL_CLIENT_ID, clientSecret: process.env.OPENPANEL_CLIENT_SECRET, }); export async function setupAnalytics(props: Partial) { if (props.profileId) { await op.identify(props): } return { track: (opts: EventProps & PostEventPayload["properties"]) => { const { name, ...rest } = opts; return op.track(name, rest); }, }; } ``` -------------------------------- ### Quick Start: Create and List Monitors with PHP SDK Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/docs/sdk/php/overview.mdx Initialize the client, create an HTTP monitor, and list all monitors. Ensure your OPENSTATUS_API_KEY environment variable is set. ```php monitor->v1->monitorService->createHTTPMonitor( new CreateHTTPMonitorRequest([ 'monitor' => new HTTPMonitor([ 'name' => 'My API', 'url' => 'https://api.example.com/health', 'periodicity' => Periodicity::PERIODICITY_1M, 'method' => HTTPMethod::HTTP_METHOD_GET, 'regions' => [ Region::REGION_FLY_AMS, Region::REGION_FLY_IAD, Region::REGION_FLY_SYD, ], 'active' => true, 'status_code_assertions' => [ new StatusCodeAssertion([ 'comparator' => NumberComparator::NUMBER_COMPARATOR_EQUAL, 'target' => 200, ]), ], ]), ]), ); $monitor = $response->getMonitor(); printf("Monitor created: %s\n", $monitor?->getId() ?? 'unknown'); // List all monitors $list = $client->monitor->v1->monitorService->listMonitors(new ListMonitorsRequest()); printf("Found %d monitors\n", $list->getTotalSize()); ``` -------------------------------- ### Clone OpenStatus Repository Source: https://github.com/openstatushq/openstatus/blob/main/README.md Clone the OpenStatus project repository from GitHub to start the manual setup process. ```sh git clone https://github.com/openstatushq/openstatus.git ``` -------------------------------- ### Quick Start: Create and List HTTP Monitors Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/docs/sdk/nodejs/getting-started.mdx Initialize the client with your API key and demonstrate creating an HTTP monitor and listing all monitors. Ensure your API key is stored as an environment variable. ```typescript import { createOpenStatusClient, Periodicity, Region, } from "@openstatus/sdk-node"; const client = createOpenStatusClient({ apiKey: process.env.OPENSTATUS_API_KEY, }); // Create an HTTP monitor const { monitor } = await client.monitor.v1.MonitorService.createHTTPMonitor({ monitor: { name: "My API", url: "https://api.example.com/health", periodicity: Periodicity.PERIODICITY_1M, regions: [Region.FLY_AMS, Region.FLY_IAD, Region.FLY_SYD], active: true, }, }); console.log(`Monitor created: ${monitor?.id}`); // List all monitors const { httpMonitors, tcpMonitors, dnsMonitors, totalSize } = await client.monitor.v1.MonitorService.listMonitors({}); console.log(`Found ${totalSize} monitors`); ``` -------------------------------- ### Client-side Infinite Query Setup Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/blog/live-mode-infinite-query.mdx Configure `useInfiniteQuery` for client-side data fetching. Define query keys, fetch functions, initial parameters, and functions to get previous and next page parameters based on API response cursors. ```tsx "use client"; import React from "react"; import { useInfiniteQuery } from "@tanstack/react-query"; const dataOptions = { queryKey: [ "my-key", // any other keys, e.g. for search params filters ], queryFn: async ({ pageParam }) => { const { cursor, direction } = pageParam; const res = await fetch( `/api/get/data?cursor=${cursor}&direction=${direction}`, ); const json = await res.json(); // For direction "next": { data: [...], nextCursor: 1741526294, prevCursor: null } // For direction "prev": { data: [...], nextCursor: null, prevCursor: 1741526295 } return json as ReturnType; }, // Initialize with current timestamp and get the most recent data in the past initialPageParam: { cursor: new Date().getTime(), direction: "next" }, // Function to fetch newer data getPreviousPageParam: (firstPage, allPages) => { if (!firstPage.prevCursor) return null; return { cursor: firstPage.prevCursor, direction: "prev" }; }, // Function to fetch older data getNextPageParam: (lastPage, allPages) => { if (!lastPage.nextCursor) return null; return { cursor: lastPage.nextCursor, direction: "next" }; }, }; export function Component() { const { data, fetchNextPage, fetchPreviousPage } = useInfiniteQuery(dataOptions); const flatData = React.useMemo( () => data?.pages?.flatMap((page) => page.data ?? []) ?? [], [data?.pages], ); return
{flatData.map((item) => {/* render item */}) }
; } ``` -------------------------------- ### Basic HTTP Synthetic Check Example Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/guides/what-is-synthetic-monitoring.mdx This snippet shows a simple HTTP GET request to a health endpoint, expecting a 200 status code and a specific string in the response body within a time limit. Use for basic uptime and API health checks. ```http GET https://api.example.com/v1/health Expect: 200, "ok" in body, response time < 500ms ``` -------------------------------- ### Get Status Report Details Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/docs/reference/cli-reference.mdx Get status report details. ```bash openstatus status-report info 1 ``` ```bash openstatus status-report info 12345 ``` -------------------------------- ### Run Development Server with Bun Source: https://github.com/openstatushq/openstatus/blob/main/apps/workflows/README.md Execute this command to start the development server. ```sh bun run dev ``` -------------------------------- ### Run Database Migrations Locally Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/docs/guides/self-hosting-openstatus.mdx Navigate to the database package, install dependencies, and run migrations to set up the database schema. ```bash # Make sure you are in the root of the openstatus project cd packages/db pnpm install pnpm migrate cd ../.. # Return to the project root ``` -------------------------------- ### Install openstatus CLI on Windows Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/docs/tutorial/get-started-with-openstatus-cli.mdx Install the openstatus CLI on Windows using PowerShell. ```powershell iwr https://raw.githubusercontent.com/openstatusHQ/cli/refs/heads/main/install.ps1 | iex ``` -------------------------------- ### Create OpenStatus Client and List Monitors Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/blog/migrating-from-zod-openapi-to-connectrpc.mdx Initialize the OpenStatus client using your API key and then list monitors. Ensure the OPENSTATUS_API_KEY environment variable is set. ```typescript import { createOpenStatusClient } from "@openstatus/sdk-node"; const client = createOpenStatusClient({ apiKey: process.env.OPENSTATUS_API_KEY, }); const monitors = await client.monitor.v1.MonitorService.listMonitors({}); console.log(monitors); ``` -------------------------------- ### Install Dependencies with pnpm Source: https://github.com/openstatushq/openstatus/blob/main/README.md Install project dependencies using pnpm after cloning the repository. ```sh pnpm install ``` -------------------------------- ### Start OpenStatus with Docker Source: https://github.com/openstatushq/openstatus/blob/main/README.md Use these commands to quickly set up and run OpenStatus services using Docker Compose. This is the recommended method for development and self-hosting. ```sh cp .env.docker.example .env.docker docker compose up -d open http://localhost:3002 # Dashboard open http://localhost:3003 # Status Pages ``` -------------------------------- ### Verify openstatus CLI Installation Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/docs/tutorial/get-started-with-openstatus-cli.mdx Run this command to confirm the openstatus CLI has been successfully installed. ```bash openstatus --version ``` -------------------------------- ### Launch Drizzle Studio Source: https://github.com/openstatushq/openstatus/blob/main/packages/db/README.md Starts Drizzle Studio, a GUI tool for inspecting and managing your database. Use this to verify that your tables have been created after migration. ```bash pnpm studio ``` -------------------------------- ### Install Agent Skill for Data Table Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/blog/nobody-should-hand-code-a-data-table.mdx Install the agent skill to enable conversational AI to add a filterable data table to your project. This skill understands your project context and can install necessary blocks and configure integrations. ```bash npx skills add https://github.com/openstatushq/data-table-filters --skill data-table-filters ``` -------------------------------- ### Set Up Tinybird CLI Environment Source: https://github.com/openstatushq/openstatus/blob/main/packages/tinybird/README.md This snippet shows how to set up a Python virtual environment, activate it, install the Tinybird CLI, and authenticate with Tinybird. ```bash python3 -m venv .venv source .venv/bin/activate pip install tinybird-cli tb auth -i ``` -------------------------------- ### Start Docker Services Source: https://github.com/openstatushq/openstatus/blob/main/CLAUDE.md This command starts all defined services in the Docker Compose configuration in detached mode. ```sh docker compose up -d ``` -------------------------------- ### Full Terraform Example for OpenStatus Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/docs/reference/terraform.mdx This example demonstrates how to set up a complete monitoring stack using the OpenStatus Terraform provider. It includes HTTP, TCP, and DNS monitors, Slack notifications, and a public status page with grouped components. Ensure you have the OpenStatus provider configured with your API token and Slack webhook URL. ```terraform terraform { required_providers { openstatus = { source = "openstatusHQ/openstatus" version = ">= 0.1" } } } provider "openstatus" { api_token = var.openstatus_api_token } # --- Variables --- variable "openstatus_api_token" { type = string sensitive = true } variable "slack_webhook_url" { type = string sensitive = true } # --- Monitors --- resource "openstatus_http_monitor" "api" { name = "API Health" description = "Monitors the main API health endpoint." url = "https://api.example.com/health" periodicity = "5m" method = "GET" timeout = 30000 active = true public = true regions = ["fly-iad", "fly-ams", "fly-nrt"] status_code_assertions { target = 200 comparator = "eq" } body_assertions { target = "ok" comparator = "contains" } } resource "openstatus_http_monitor" "website" { name = "Website" url = "https://www.example.com" periodicity = "1m" active = true public = true regions = ["fly-iad", "fly-ams", "fly-syd"] status_code_assertions { target = 200 comparator = "eq" } } resource "openstatus_tcp_monitor" "database" { name = "PostgreSQL" uri = "db.example.com:5432" periodicity = "1m" timeout = 10000 active = true regions = ["fly-iad"] } resource "openstatus_dns_monitor" "domain" { name = "DNS Resolution" uri = "example.com" periodicity = "10m" active = true regions = ["fly-iad", "fly-ams"] record_assertions { record = "A" comparator = "eq" target = "93.184.216.34" } } # --- Notifications --- resource "openstatus_notification" "slack" { name = "Slack Alerts" provider_type = "slack" monitor_ids = [ openstatus_http_monitor.api.id, openstatus_http_monitor.website.id, openstatus_tcp_monitor.database.id, ] slack { webhook_url = var.slack_webhook_url } } # --- Status Page --- resource "openstatus_status_page" "main" { title = "Example Inc. Status" slug = "example-status" description = "Real-time status for all Example Inc. services." homepage_url = "https://example.com" contact_url = "https://example.com/support" } resource "openstatus_status_page_component_group" "web" { page_id = openstatus_status_page.main.id name = "Web Services" } resource "openstatus_status_page_component_group" "infra" { page_id = openstatus_status_page.main.id name = "Infrastructure" } resource "openstatus_status_page_component" "api_component" { page_id = openstatus_status_page.main.id type = "monitor" monitor_id = openstatus_http_monitor.api.id name = "API" group_id = openstatus_status_page_component_group.web.id order = 1 group_order = 1 } resource "openstatus_status_page_component" "website_component" { page_id = openstatus_status_page.main.id type = "monitor" monitor_id = openstatus_http_monitor.website.id name = "Website" group_id = openstatus_status_page_component_group.web.id order = 1 group_order = 2 } resource "openstatus_status_page_component" "db_component" { page_id = openstatus_status_page.main.id type = "monitor" monitor_id = openstatus_tcp_monitor.database.id name = "Database" group_id = openstatus_status_page_component_group.infra.id order = 2 group_order = 1 } ``` -------------------------------- ### Install openstatus CLI on Linux Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/docs/tutorial/get-started-with-openstatus-cli.mdx Install the openstatus CLI on Linux using the provided curl and bash script. ```bash curl -fsSL https://raw.githubusercontent.com/openstatusHQ/cli/refs/heads/main/install.sh | bash ``` -------------------------------- ### Vague Degradation Examples Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/guides/feature-degradation.mdx These are examples of vague statements that should be avoided. They lack specific details about the impact or affected features. ```text "Some features might not work" "Experiencing issues" "Partial service degradation" "Some users affected" ``` -------------------------------- ### Create HTTP Monitor with Default Client (Before Migration) Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/docs/sdk/nodejs/typescript-tips.mdx This example shows creating an HTTP monitor using the default client, requiring manual header configuration for authentication. ```typescript import { openstatus } from "@openstatus/sdk-node"; const headers = { "x-openstatus-key": process.env.OPENSTATUS_API_KEY }; const { monitor } = await openstatus.monitor.v1.MonitorService .createHTTPMonitor({ monitor: { name: "API", url: "https://example.com", periodicity: 2, active: true }, }, { headers }); ``` -------------------------------- ### Install openstatus Node.js SDK via JSR Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/changelog/openstatus-sdk.mdx Install the openstatus Node.js SDK using JSR for integration into your projects. ```bash deno add @openstatus/sdk-node ``` -------------------------------- ### Install openstatus Node.js SDK via npm Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/changelog/openstatus-sdk.mdx Install the openstatus Node.js SDK using npm for integration into your projects. ```bash npm i @openstatus/sdk-node ``` -------------------------------- ### Build and Start Services with Docker Compose Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/docs/guides/self-host-status-page-only.mdx Use Docker Compose to build and run all services in the background using the lightweight configuration. The initial build may take several minutes. ```bash docker compose -f docker-compose-lightweight.yaml up -d ``` -------------------------------- ### Example DNS Monitor URIs Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/docs/reference/dns-monitor.mdx Examples of valid URIs for DNS monitoring. These can be fully qualified domain names or subdomains. ```text openstat.us ``` ```text api.example.com ``` ```text mail.example.org ``` -------------------------------- ### Initialize and Apply Terraform Configuration Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/product/tooling/terraform.mdx Set your API token, initialize Terraform, and then plan and apply your monitoring infrastructure changes. ```bash export OPENSTATUS_API_TOKEN=os_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx terraform init terraform plan terraform apply ``` -------------------------------- ### Create HTTP Monitor with createOpenStatusClient (After Migration) Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/docs/sdk/nodejs/typescript-tips.mdx This example demonstrates creating an HTTP monitor after migrating to `createOpenStatusClient`, where the API key is handled internally. ```typescript import { createOpenStatusClient, Periodicity } from "@openstatus/sdk-node"; const client = createOpenStatusClient({ apiKey: process.env.OPENSTATUS_API_KEY, }); const { monitor } = await client.monitor.v1.MonitorService .createHTTPMonitor({ monitor: { name: "API", url: "https://example.com", periodicity: Periodicity.PERIODICITY_1M, active: true, }, }); ``` -------------------------------- ### Initialize Hono App with Middleware and Routes Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/blog/secure-api-with-unkey.mdx Set up a Hono application instance, define base path, and apply middleware to all routes under that path. This example routes requests to '/api/v1/monitor' to the monitorApi handler after passing through the middleware. ```typescript import { middleware } from "./middleware"; import { monitorApi } from "./monitor"; export type Variables = { workspaceId: string }; // Context const api = new Hono<{ Variables: Variables }>().basePath("/api/v1"); api.use("/*", middleware); api.route("/monitor", monitorApi); export default app; ``` -------------------------------- ### Synchronous Client Quick Start Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/docs/sdk/python/overview.mdx Use the synchronous OpenstatusClient to interact with the SDK. The client is designed to be used within a `with` statement for proper resource management. ```python from openstatus import OpenstatusClient from openstatus._gen.openstatus.health.v1.health_pb2 import CheckRequest with OpenstatusClient() as client: health = client.health.v1.HealthService.check(CheckRequest()) print(health.status) ``` -------------------------------- ### Create Cloudflare Project with Containers Template Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/docs/guides/how-to-deploy-probes-cloudflare-containers.mdx Use this command to initialize a new Cloudflare project using the containers template. ```bash pnpm create cloudflare@latest --template=cloudflare/templates/containers-template ``` -------------------------------- ### Install OpenStatus CLI Source: https://github.com/openstatushq/openstatus/blob/main/apps/web/src/content/pages/blog/building-cli-for-human-and-agents.mdx Instructions for installing the OpenStatus CLI using Homebrew. This command is used to interact with the OpenStatus service from the terminal. ```bash brew install openstatusHQ/cli/openstatus --cask openstatus status-report create ```