Skip to main content
Meilisearch can expose internal metrics through a GET /metrics endpoint in the Prometheus text exposition format. You can scrape this endpoint with Prometheus, visualize it in Grafana, or feed it into any compatible monitoring stack.
Meilisearch Cloud provides managed monitoring dashboards for search performance, operations, and indexing. The Prometheus endpoint is primarily useful for self-hosted instances that integrate with an existing Prometheus and Grafana setup.
The /metrics endpoint is an experimental feature. Metric names, labels, and behavior may change between Meilisearch versions without following semantic versioning. Track its status in the product discussion.

Enabling the endpoint

The endpoint is disabled by default. Enable it in one of three equivalent ways. At launch, with a CLI flag or environment variable:
At runtime, with the experimental features API (no restart required):
The runtime setting is persisted in the database. On startup, the effective value is the CLI flag or environment variable OR the persisted value. This means a flag at launch enables the endpoint even if the persisted setting is false, and a persisted true survives restarts without the flag.

Authentication

If your instance has a master key configured, requests to /metrics must be authenticated:
  • Send the master key, or an API key with one of the metrics.get, metrics.*, or * actions, in the Authorization header.
  • The API key must be authorized on all indexes ("indexes": ["*"]). A key scoped to specific indexes is rejected with an invalid_api_key error.
If no master key is configured, no authentication is required.

Response format

A successful request returns 200 OK with a plain-text body (text/plain; version=0.0.4). Each metric is preceded by # HELP and # TYPE comment lines:

Errors

Metrics reference

All metric names are prefixed with meilisearch_. Most gauges are computed at scrape time, so their resolution equals your scrape interval.

Database and index stats

Task queue

For meilisearch_nb_tasks, the value label depends on kind: task statuses (enqueued, processing, succeeded, failed, canceled), task types (such as documentAdditionOrUpdate or settingsUpdate), or index uids.

Batch and indexing progress

These gauges are recomputed on every scrape and can legitimately be absent from the output when nothing is being processed. The last_indexed_documents_* gauges are useful for computing indexing throughput. They only stay in the output while the batch is “fresh”: they disappear once more than the batch duration plus 5 minutes has elapsed. Use a scrape interval of 1 minute or less to reliably capture them.

HTTP traffic

meilisearch_http_requests_total is counted for every request regardless of whether the metrics feature is enabled. meilisearch_http_response_time_seconds is only observed while the feature is enabled, and only for registered routes.

Search concurrency

Feature-specific metrics

Scraping with Prometheus

Add Meilisearch as a scrape target in your prometheus.yml. When a master key is configured, provide an API key with the metrics.get action on all indexes:
You can then build dashboards in Grafana on top of these metrics, or configure alerting rules (for example, alerting when meilisearch_task_queue_size_until_stop_registering approaches zero).

Caveats

  • Experimental: the endpoint, metric names, and labels may change between versions without a deprecation period.
  • Snapshot resolution: most gauges are computed at scrape time, so their resolution equals your scrape interval.
  • Cardinality: per-index labels (such as meilisearch_index_docs_count) grow with your number of indexes. Instances with thousands of indexes will produce large responses.
  • Freshness window: the batch-progress and last_indexed_documents_* gauges are reset on every scrape and can be absent when nothing is processing or the last batch is too old.

Next steps

Monitoring overview

Managed monitoring dashboards on Meilisearch Cloud

Experimental features

Enable and manage experimental features

Configuration reference

All CLI options and environment variables