Skip to main content
Connect VictoriaMetrics so CloudThinker agents can run MetricsQL queries, find what drives series count, check down scrape targets and vmalert alerts, and take or delete storage snapshots through your Approvals. The connection uses the Prometheus-compatible query API and an optional bearer token for VictoriaMetrics Cloud or the vmauth proxy in front of VictoriaMetrics.

Prerequisites

  • A VictoriaMetrics query address that CloudThinker can reach over HTTPS: single-node VictoriaMetrics, a cluster’s vmselect, or a VictoriaMetrics Cloud access endpoint. For a private address, follow Reaching private services.
  • A bearer token, unless the endpoint needs no authentication.
  • A CloudThinker workspace where you can add connections.

Setup

1

Create the credential

Pick the one that matches where VictoriaMetrics runs:
  • VictoriaMetrics Cloud: open your deployment, go to the Access tokens tab, and click Generate Token. Name it cloudthinker, choose the Read access level, and click Generate. Copy the secret from the Key column, and copy the access endpoint from the same tab. See VictoriaMetrics Cloud access tokens.
  • vmauth: ask your operator to add a user with a bearer_token whose routes allow the query API. See vmauth.
2

Find the query address

Use the address you would put in front of /api/v1:
  • Single-node: https://vm.example.com.
  • Cluster: the vmselect path for your tenant, such as https://vmselect.example.com/select/0/prometheus. See the cluster URL format.
  • VictoriaMetrics Cloud: the access endpoint from the previous step.
3

Connect in CloudThinker

Open Settings → Workspace → Connections, open the Discover tab, and select VictoriaMetrics. Click Connect, fill in the fields below, then click Connect in the dialog. CloudThinker runs one query to check the address and token.Success state: the connection shows a Connected status with VictoriaMetrics connected; the query API answered. CloudThinker then opens a chat that takes a read-only deep look at the connection (“Often takes about 15 min. You can leave the chat.”). To run it again later, open the card’s More menu and choose Try in chat.

Connection details

CloudThinker refuses redirects, so enter the exact address VictoriaMetrics answers at.

Required permissions

Use a Read token for queries. Snapshot endpoints must accept the same token, or have no separate snapshot auth key. Expose them through vmauth only if you want CloudThinker to manage snapshots.

Agent capabilities

Writes also need Allow writes on, which starts on. To lock writes in CloudThinker, open VictoriaMetrics in Settings → Workspace → Connections and turn off the Allow writes switch on its detail panel. Every change an agent makes goes through your workspace’s Approvals first. On the default Auto · Rules + AI · Ask me mode, AI judgment can let a safe change run without asking — and an Allow Rule can too. Choose Manual to approve every change yourself. Snapshots work only on single-node VictoriaMetrics. vmselect has no snapshot API, and on a cluster your operator takes snapshots on each vmstorage node. Agents cannot delete series, import data, or change retention or flags. Those changes need your VictoriaMetrics operator.

Verify the connection

Example prompts

Troubleshooting

The bearer token is wrong, expired, or revoked. Create a new token, then edit the connection and paste it.
The token works, but vmauth or VictoriaMetrics Cloud does not let it query. Give it read access to the query API.
A cluster answers queries only under the vmselect path for a tenant. Add /select/<accountID>/prometheus to Query URL.
Nothing answered at /api/v1/query under that address. Check the host and path. Enter the address without /api/v1.
Enter the final HTTPS address VictoriaMetrics serves directly, not one that redirects to it.
Install a certificate from a trusted authority, or paste the issuing CA certificate into CA certificate (optional). If CloudThinker says the CA certificate is not valid PEM, paste the full certificate, including its BEGIN and END lines.
CloudThinker could not open a connection to that address. Confirm the URL starts with https:// and that your firewall lets CloudThinker reach VictoriaMetrics. Browser access from your laptop alone is not enough.
VictoriaMetrics shows alerts only when it proxies vmalert. Ask your operator to set -vmalert.proxyURL, or read alerts in vmalert.
The address is not single-node VictoriaMetrics, for example vmselect, so it has no snapshot API. On a cluster, your operator takes snapshots on each vmstorage node.
Allow writes is off on this connection, so the change was refused and nothing changed. Turn it on in the connection’s detail panel, or make the change in VictoriaMetrics.

Security

  • Least privilege — grant only the permissions the agents need for your use case; start read-only and widen later.
  • Read-only by default — use read-only credentials unless you want agents to make changes through this connection.
  • Rotate credentials — rotate keys and tokens on your normal schedule; CloudThinker picks up the new value when you update the connection.
  • Revoke on offboarding — remove the credential at the provider when you delete a connection or a teammate leaves.
  • Read the snapshot name before you approve a delete. A deleted snapshot can’t be restored.

VictoriaLogs

Search log lines, counts over time, streams, and fields.

Prometheus

Query live and historical metrics, labels, and alerts.