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.
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: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 theAuthorizationheader. - The API key must be authorized on all indexes (
"indexes": ["*"]). A key scoped to specific indexes is rejected with aninvalid_api_keyerror.
Response format
A successful request returns200 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 withmeilisearch_. 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 yourprometheus.yml. When a master key is configured, provide an API key with the metrics.get action on all indexes:
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