1. Overview
The Ana x Prometheus integration connects your metrics backend to Ana, giving you natural language access to your time series. Prometheus is not a SQL database, so Ana queries it with native PromQL rather than SQL — metrics appear as tables, their labels appear as columns, and results come back as one row per timestamp and series. Because the query API is a shared standard, one connector covers Prometheus, Thanos, Grafana Mimir, Cortex, VictoriaMetrics, Grafana Cloud, and Amazon Managed Prometheus.Connect Prometheus to Ana to investigate incidents, track SLOs, and correlate infrastructure metrics with your business data using natural language.
2. Prerequisites
You’ll need:- A Prometheus-compatible server that Ana can reach over HTTP or HTTPS
- Credentials for it, if it sits behind authentication
- A TextQL account with permission to add connectors
Which authentication method should I use?
3. Capabilities
Once configured, Ana can:- Answer questions about any metric in plain language and return the results as a table.
- Run range queries over any window, picking a sensible resolution automatically.
- Read each metric’s type, so it knows a counter needs
rate()and a histogram needshistogram_quantile(). - Explore what exists — list metrics, labels, and label values — without you knowing the names up front.
- Load the results into Python, so metrics can be joined against warehouse data in the same thread.
4. Setup Instructions
Step 1: Find your server URL
The URL is the base of the query API, including any path prefix. Ana appends/api/v1/... to it.
- Self-hosted
- Grafana Cloud
- Amazon Managed Prometheus
- Mimir / Cortex
Use the address your Prometheus UI is served from, with no trailing path:If Prometheus runs behind a proxy at a sub-path, include it:
Step 2: Scope the connector with metric selectors
This is the single most important setting. A production Prometheus can expose tens of thousands of metric names, and discovering all of them is slow and floods Ana’s context with metrics nobody asks about. In Metric Selectors, add one PromQL selector per line:Step 3: Create the connector
- In TextQL, go to Connectors and click New Connector.
- Choose Prometheus.
- Fill in the name, server URL, and authentication.
- Add your metric selectors.
- Click Test Connection, then Save.
5. How Ana queries Prometheus
Ana writes PromQL, not SQL. It has a few extra verbs for things PromQL alone cannot express:
Results always come back with a
timestamp column, a metric column, one column per label, and a value column.
Reaching a private server
Most Prometheus deployments listen on a private address — a Kubernetes ClusterIP such asprometheus-operated.monitoring.svc, or an internal load balancer. TextQL refuses connections to private, loopback, and link-local addresses by default, because a connector that accepts an arbitrary URL is otherwise an easy way to reach cloud metadata endpoints.
You have two options:
- SSH tunnel (recommended)
- Allowlist the host
Enable Connect via SSH tunnel in the connector form and point it at a bastion host that can reach Prometheus. Ana connects to the bastion and forwards from there, so nothing needs to be exposed publicly.Paste the bastion’s host public key as well. Without it the host’s identity is not verified.