Skip to main content

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
Ana must be able to reach your server over the network. Metrics endpoints on private networks are blocked by default — see Reaching a private server below before you start.

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 needs histogram_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.
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:
Only metrics matching at least one selector are discovered. Leave it empty only on small servers.
Discovery Window works alongside this. It defaults to 24 hours, and metrics with no samples in that window are hidden — which quietly removes metrics from decommissioned services.

Step 3: Create the connector

  1. In TextQL, go to Connectors and click New Connector.
  2. Choose Prometheus.
  3. Fill in the name, server URL, and authentication.
  4. Add your metric selectors.
  5. 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 as prometheus-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:

6. Troubleshooting