The connector works with any backend that speaks the standard Prometheus HTTP API: self-hosted Prometheus, Thanos, VictoriaMetrics, and Grafana Cloud. Authentication supports None, Bearer Token, and Basic Auth.
Supported Platforms
| Platform | Support | Typical auth |
|---|---|---|
| Prometheus | Self-hosted, all recent releases | None or Bearer |
| Thanos | Querier behind an auth proxy | None, Bearer, or Basic |
| VictoriaMetrics | Single-node and cluster | None or Basic |
| Grafana Cloud | Prometheus / Mimir endpoint | Basic |
Against managed, Mimir-backed endpoints (Grafana Cloud), the
/api/v1/targets, /rules, and /alerts paths are not exposed and return 404. This is expected — the query API (instant queries, range queries, labels, and metadata) works normally.Choosing an Auth Mode
Pick the mode that matches how your endpoint is exposed:| Mode | When to use | Fields |
|---|---|---|
| None | Open or network-restricted endpoint (self-hosted Prometheus inside a private network) | URL only |
| Bearer Token | Endpoint behind a proxy or gateway that expects Authorization: Bearer <token> | URL + token |
| Basic Auth | Grafana Cloud, Thanos behind an auth proxy, or VictoriaMetrics with username/password | URL + username + password |
Setup
Find your Prometheus URL
Identify the base URL of your Prometheus HTTP API, e.g.
https://prometheus.your-domain.com or your Grafana Cloud Prometheus query endpoint. CloudThinker appends the standard /api/v1/... paths.Prepare credentials (if required)
- None — nothing to prepare; the endpoint is reachable without auth.
- Bearer Token — obtain the bearer token your proxy or gateway expects.
- Basic Auth — obtain the username and password (for Grafana Cloud, the numeric instance ID and an access-policy token).
Add Connection in CloudThinker
Navigate to Connections → Prometheus and enter:
- PROMETHEUS_URL: your endpoint, e.g.
https://prometheus.your-domain.com - PROMETHEUS_AUTH_TYPE: select None, Bearer Token, or Basic Auth
- Bearer Token → PROMETHEUS_TOKEN
- Basic Auth → PROMETHEUS_USERNAME and PROMETHEUS_PASSWORD
Connection Details
| Field | Description | Example |
|---|---|---|
| PROMETHEUS_URL | Base URL of the Prometheus HTTP API | https://prometheus.your-domain.com |
| PROMETHEUS_AUTH_TYPE | Authentication mode: none, bearer, or basic | basic |
| PROMETHEUS_TOKEN | Bearer token (Bearer Token mode only) | eyJhbGci... |
| PROMETHEUS_USERNAME | Username, or numeric instance ID for Grafana Cloud (Basic Auth only) | 1234567 |
| PROMETHEUS_PASSWORD | Password or access-policy token (Basic Auth only) | glc_xxxxx... |
Agent Capabilities
The Prometheus connector is read-only — agents query and inspect, but never modify your monitoring backend.| Capability | What the agent can do |
|---|---|
| Instant queries | Run a PromQL expression for a single point in time |
| Range queries | Run a PromQL expression over a time window with a step interval |
| Metric discovery | List available metric names, optionally filtered by prefix |
| Label enumeration | List label names and inspect the dimensions a metric is sliced by |
| Target health | Inspect scrape targets and spot ones that are down or unhealthy |
| Alert inspection | List active alerts and review configured alert rules |
| Health probe | Run the universal up query to confirm the backend and its targets are reachable |
Example Prompts
Prometheus exposes no tool for label values — label enumeration returns label names only. Name the metric and the labels you care about so the agent can build an accurate PromQL selector.
Troubleshooting
Connection or query fails with 401 Unauthorized
Connection or query fails with 401 Unauthorized
Targets, rules, or alerts return 404
Targets, rules, or alerts return 404
- Expected on managed, Mimir-backed endpoints (Grafana Cloud) — these paths are not exposed
- The query API (instant, range, labels, metadata) still works; use queries instead of target/rule inspection
Connection fails to reach the endpoint
Connection fails to reach the endpoint
- Verify PROMETHEUS_URL is reachable from CloudThinker over HTTPS
- For self-hosted or network-restricted endpoints, confirm there’s a network path from CloudThinker
- Drop any trailing
/api/v1from the URL — enter only the base URL
A query returns empty results
A query returns empty results
- Confirm the metric exists with a discovery query before slicing by labels
- Widen the time window — the series may not have samples in the requested range
Security Best Practices
- Read-only by design - The connector cannot modify your monitoring backend
- Least-privilege credentials - Use a token or access policy scoped to metrics read only
- Scoped access policies - On Grafana Cloud, grant the access-policy token only the metrics read scope it needs
- Token rotation - Rotate bearer tokens and access-policy tokens periodically
- HTTPS only - Always use an HTTPS endpoint URL
Related
Grafana Connection
Dashboards and unified observability
Datadog Connection
Log search, metrics, and infrastructure monitoring