Integrations

Grafana dashboards

Connect Grafana to the Uptime API with an API key and build custom uptime dashboards. Every request is scoped to the API key owner, so Grafana can only read that account’s resources.

What this supports

  • Per-account monitor list queries via /api/v1/monitors.
  • Time-series monitor checks via /api/v1/monitors/:monitor/history.
  • Read-only external dashboards using API keys with normal API usage/rate limits.

Quick import

  1. Download the starter file: grafana-uptime-api-example-dashboard.json.
  2. In Grafana, go to Dashboards → New → Import.
  3. Upload the JSON file, then map the required datasource to your Infinity datasource.
  4. After import, adjust dashboard variables like history_range and history_limit.

The starter dashboard includes all monitors visible to the API key owner plus uptime summary stats, latency trend chart, and raw history table. Duplicate and edit panels freely.

Step 1: create an API key

  1. Open Account → API keys in the Uptime dashboard.
  2. Create a key named something like Grafana dashboard.
  3. Copy the plaintext key immediately (it is shown only once).

Rotate the key periodically and revoke it if a dashboard or datasource is no longer needed.

Step 2: configure Grafana datasource

  1. Install and enable the Infinity datasource plugin in Grafana.
  2. Create a new Infinity datasource with base URL: https://xuptimemonitor.com.
  3. Add a custom HTTP header: Authorization: Bearer <API_KEY>.
  4. Save and run a test query to confirm HTTP 200 responses.

Step 3: build panels

Monitor list table

Query:

GET /api/v1/monitors?limit=200

Use JSON path data and map fields like name, status, uptimePercent, lastCheckedAt.

Latency or uptime time-series (all monitors)

Query:

GET /api/v1/monitors/history?range=24h&limit=5000&monitor_limit=200

Use JSON path points and map:

  • Time field: timestamp
  • Latency series: latencyMs
  • Series label: monitorName
  • Uptime state series: isUp (true/false)
  • Status code series: responseCode

Security model

  • Grafana authenticates with your API key on every request.
  • API routes return only resources for that key’s account owner.
  • Requests to monitors outside that account return 404.
  • Usage still counts against normal monthly API request limits.