query_logs and get_log_labels tools read it during an investigation. Ankra queries the store through the cluster’s agent, so an in-cluster address such as loki-gateway.monitoring.svc works, and so does an external endpoint the agent can reach.
Supported providers
VictoriaLogs answers on the
-server Service of the victoria-logs-single chart, port 9428; victoria-logs-cluster answers on its vlselect Service, port 9471. Ankra sends LogsQL to /select/logsql/query.
Before you start
- A role that holds
clusters.write,stacks.writeandstacks.deleteon the cluster. Without them the Log store panel offers no Connect a log store button. See Roles & Access. - The store’s query address, reachable from inside the cluster.
- A read-only credential for the store, if it needs one.
Connect a log store
The portal connects Grafana Loki, Elasticsearch and OpenSearch. VictoriaLogs is connected from Git, in the GitOps tab.- Portal
- GitOps
1
Open the Log store panel
Open Infrastructure → Clusters → <your cluster> → Settings → Integrations (
/next/clusters/<cluster-id>/settings/integrations). The Log store panel reads Not connected and lists Grafana Loki · Elasticsearch · OpenSearch.2
Pick the kind and the address
Click Connect a log store. In Kind, choose Grafana Loki, Elasticsearch or OpenSearch, then fill in Loki address, Elasticsearch address or OpenSearch address: the address the store answers queries on, reachable from inside the cluster. For Grafana Cloud, use the tenant’s query address and an access token. For Elastic Cloud, use the deployment’s address and an API key.
3
Set the provider options
- Tenant (Loki) - the Loki tenant (
X-Scope-OrgID), when your Loki serves several. - Index pattern (Elasticsearch and OpenSearch) - which indices hold the cluster’s logs, for example
logs-*. Leave it empty to search them all. - Check the store’s certificate - turn it off for a store with a self-signed certificate.
- Field names - open it only when your shipper uses other field names than the defaults in Field mappings.
4
Add the credential
In How Ankra signs in, choose No sign-in, API token (sent as a bearer token), API key (Elasticsearch, sent as an API key as Elastic Cloud expects) or User name and password (basic sign-in). Give it a Credential name: Ankra stores the secret under that name, shows the name on the panel, and never shows the secret again.
5
Test and save
Click Test connection and read the result, then click Save. Ankra tests the connection again before it saves.The panel now shows the Provider, Address and Certificate check, and a status badge: Answering when the health check passes.
Field mappings
If you ship logs with Fluent Bit’s kubernetes filter, the Elasticsearch and OpenSearch defaults usually work:
Override them under Field names when your index template uses different names. A field left empty takes the default.
For VictoriaLogs, the defaults are the store’s reserved fields plus the names Vector’s
kubernetes_logs source writes, which is what the victoria-logs charts’ bundled collector ships:
Override them with
field_mappings in spec.log_source.
For Loki, structured filters use label names; the defaults are namespace, pod and container, as Promtail and Alloy write them.
Sharing one log store between clusters
When several clusters ship into one store, each line must say which cluster wrote it, or a search on one cluster returns the others’ lines. Have the shipper stamp every line with acluster field (Elasticsearch, OpenSearch, VictoriaLogs) or a cluster stream label (Loki) holding the cluster’s name, for example a Fluent Bit record_modifier adding cluster <cluster-name>, or a Promtail or Alloy cluster label.
Ankra checks each search window for that field:
- When lines carry it, the search returns only the lines marked with this cluster’s name. Lines marked for other clusters, and lines with no mark, are left out.
- When some lines carry it but none for this cluster, the search returns nothing rather than unmarked lines.
- When no line in the window carries it, the search is not scoped to the cluster.
- When the check cannot answer, the search is refused: History shows
The log store could not confirm these lines are this cluster's.
Managing the log source in Git
If the cluster is connected to a GitOps repository, the log source is part of the cluster document atclusters/<cluster-name>-<cluster-id>/<cluster-name>.yaml. Adding or editing the spec.log_source block connects and updates the source on the next sync, exactly as the settings page does:
provider, endpoint, credential_name, tenant_id, index_pattern, field_mappings and verify_ssl - see the ImportCluster schema for what each one means. Any other top-level field is refused with an error naming it, rather than ignored, and provider must be loki, elasticsearch, opensearch or victorialogs.
Search the logs
Searching happens on Cluster logs → History: text search, a time window, filters for namespace, pod, container and severity, a Patterns view and Load older lines. Logs covers each control. The portal has no raw query box; Ankra AI’squery_logs takes a raw LogQL, LogsQL or query-DSL query when the structured filters are not enough.
Ankra AI and MCP
With a log source connected, Ankra AI and MCP clients can use:query_logs- search the cluster’s log store over a time window.get_log_labels- list the labels or fields the store can be filtered on, to use before or after aquery_logsthat returns nothing.connect_log_source- connect the log source Ankra derived from the cluster’s installed add-ons, exactly as aquery_logsrefusal named it.