Experimental feature: Prometheus Metrics #625
Replies: 17 comments 43 replies
|
Hello, everyone following this discussion 👋 We have just released the first RC (release candidate) of Meilisearch containing this experimental feature! You can test it by using docker run -it --rm -p 7700:7700 -v $(pwd)/meili_data:/meili_data getmeili/meilisearch:v1.1.0-rc.0You are welcome to communicate any feedback about this new implementation in this discussion. If you encounter any bugs, please report them here. 🎉 Official and stable release containing this change will be available on 3rd April 2023 |
|
Hey folks 👋 v1.1 has been released and features the Prometheus metrics as an experimental one 🧪 We are waiting for tests and feedback before considering any stabilization. Please, tell us if this feature is helpful or what is missing for your monitoring use-case! |
|
Should i need MEILI_EXPERIMENTAL_ENABLE_METRICS as true ? export MEILI_EXPERIMENTAL_ENABLE_METRICS=true |
|
How about having a metric, like |
|
Would it be possible to include a metric for indexing latency per index? It would be helpful to get insights on end-to-end indexing latency. |
|
Cross-posting feedback from @gabrieltz in #669 (comment) Hello, It would be nice to have some additional prometheus metrics that already exist in
and from the
thank you |
|
Hi! Thank you for such a great app! Currenlty experimental prometheus metrics are pretty poor. Is there a way to get more statictics? Like what queries were sent, and how much hits did they return. Or how much empty results and by which queries? Or should I do my own middlware for that metrics? |
|
I upgraded to version 1.3.0 yesterday and used some of the new metrics, however i noticed that the metric |
|
Greetings! |
|
folks, I've opened a PR to add the http status code label to the |
|
Can you also make a separate json to cover the whole index? |
|
Hi, the link for the yaml file is broken. Where can I download the file?
|
|
This has been experimental feature for quite a while already, is there a plan to officially support it? |






Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hey everyone 👋
For the v1.1 of Meilisearch (which was released on 3rd April), we will finally introduce the metrics feature as an experimental feature.
Feature Abstract
The
/metricsendpoint exposes metrics to be scraped by a Prometheus collector at regular intervals and stored for analysis. By monitoring these metrics over time, teams can gain valuable insights into the behavior and performance of Meilisearch and use that information to optimize their performance, troubleshoot issues, and improve the overall reliability of their systems.How to enable the feature in Meilisearch?
2 ways
--experimental-enable-metricsor theMEILI_EXPERIMENTAL_ENABLE_METRICSenv varYou can check the feature is well enabled by calling
GET /experimental-features=> So, be sure to consider the key that can access the API-key as a super private API-key that you must not share publicly.
How to use the feature?
GET /metricsmetrics.getaction and access to all indexes.Authorizationheader using the bearer method with the Meilisearch API Key authorized to poll the/metricsendpoint. You can find a basic config in the repository underassets/prometheus-basic-scraper.yml.Step-by-step basic tutorial
To read before starting the tutorial:
./meilisearch --experimental-enable-metrics.assets/prometheus-basic-scraper.yml../prometheus --config.file=path-to-your-config-file.ymlhttps://github.com/meilisearch/meilisearch/blob/main/assets/grafana-dashboard.json.http://localhost:3000). Create an account if needed.http://localhost:9090).What's currently exposed?
meilisearch_http_requests_totalmeilisearch_http_response_time_secondsmeilisearch_db_size_bytesdata.msdirectory (mainly the updates files that were not processed yet).meilisearch_used_db_size_bytesmeilisearch_db_size_bytesexcept that when it comes to an LMDB database, we only count the pages used by meilisearch. This means if you see a large gap between both metrics, adding documents will probably re-use freed pages instead of growingmeilisearch_db_size_bytes.meilisearch_index_docs_countmeilisearch_index_countmeilisearch_nb_tasksmeilisearch_last_updatemeilisearch_is_indexing1if Meilisearch is indexing or0if not.What is an experimental feature
Why is this feature not stable yet?
We have yet to determine which metrics we want to expose and how. Thus this may change a lot depending on our needs and your needs.
When will the feature potentially be stable?
We don't know yet when this feature could be stable since we need to iterate on it. As explained previously, we do not guarantee it will be stable one day yet.
Depending on the feedback we get, we plan to iterate on the feature every 1 or 2 releases (Currently, our release cycle is two months long).
X metrics are missing
We know the feature is not finished yet.
Please let us comment on which information you would like to see integrated into the metrics.
And do not hesitate to create a PR as well. Most of the code is available in
meilisearch/src/metrics.rs.🗣️ You are welcome to give feedback about the feature or ask any questions; we can guide you through this new feature usage!
cc @meilisearch/cloud-team
All reactions