Integrations
Grafana dashboards
Connect Grafana to the Uptime API with an API key and import a complete analytics dashboard. 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. - Cross-monitor analytics via
/api/v1/monitors/history. - Account quota and plan limits via
/api/v1/account/usageand/api/v1/account/limits. - Read-only external dashboards using API keys with normal API usage/rate limits.
Quick import
- Download the dashboard file:
grafana-uptime-api-example-dashboard.json. - In Grafana, go to Dashboards → New → Import.
- Upload the JSON file, then map the required datasource to your Infinity datasource.
- After import, adjust variables like
history_range,history_limit, andmonitor_list_limit.
The default dashboard includes monitor inventory, status mix, top/down monitors, account usage and limits, uptime/latency analytics, response-code breakdowns, outage events, and raw checks. Duplicate and edit panels freely.
It also ships with dedicated trend graphs for uptime, average/p95 latency, up vs down checks, HTTP code classes, and error-rate percentage over time.
If your Grafana/proxy path strips custom headers, append api_key=<YOUR_API_KEY> directly to the panel query URL as a fallback.
Step 1: create an API key
- Open Account → API keys in the Uptime dashboard.
- Create a key named something like Grafana dashboard.
- 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
- Install and enable the Infinity datasource plugin in Grafana.
- Create a new Infinity datasource called "XuptimemonitorAPI" with a base URL that is only the API origin (no extra path), for example:
https://xuptimemonitor.comor - Add a custom HTTP header:
Authorization: Bearer <API_KEY>. - 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=200Use JSON path points and map:
- Time field:
timeSec(Unix seconds, recommended) ortimestamp(ISO) - Latency series:
latencyMs - Series label:
monitorName - Uptime state series:
isUp(true/false) - Status code series:
responseCode
Troubleshooting
- Use relative panel URLs like
/api/v1/monitors/history, not fullhttps://...URLs. - If you see an error like
xuptimemonitor.comhttps//..., the panel URL and datasource base URL are being concatenated incorrectly. - For summary stat panels, use root selector
summaryRows(array) instead ofsummary(object).
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.