From b543c8728ca0c72def0a5d7b2bc57ec9472aba78 Mon Sep 17 00:00:00 2001 From: hagen1778 Date: Thu, 31 Oct 2024 15:09:04 +0100 Subject: [PATCH] docs: mention `stats` object in Prometheus API enhancements The doc explains fields meaning in `stats` object. It also clarifies their purpose. See related ticket https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7170 Signed-off-by: hagen1778 --- docs/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/README.md b/docs/README.md index b76438096..d3fd70a17 100644 --- a/docs/README.md +++ b/docs/README.md @@ -960,6 +960,13 @@ VictoriaMetrics accepts `limit` query arg at [/api/v1/series](https://docs.victo for limiting the number of returned entries. For example, the query to `/api/v1/series?limit=5` returns a sample of up to 5 series, while ignoring the rest of series. If the provided `limit` value exceeds the corresponding `-search.maxSeries` command-line flag values, then limits specified in the command-line flags are used. +VictoriaMetrics returns an extra object `stats` in JSON response for [`/api/v1/query`](https://docs.victoriametrics.com/keyconcepts/#instant-query) +and [`/api/v1/query_range`](https://docs.victoriametrics.com/keyconcepts/#range-query) APIs. This object contains two +fields: `executionTimeMsec` with number of milliseconds the request took and `seriesFetched` with number of series that +were fetched from database before filtering. The `seriesFetched` field is effectively used by vmalert for detecting +[misconfigured rule expressions](https://docs.victoriametrics.com/vmalert/#never-firing-alerts). Please note, `seriesFetched` +provides approximate number of series, it is not recommended to rely on it in tests. + Additionally, VictoriaMetrics provides the following handlers: * `/vmui` - Basic Web UI. See [these docs](#vmui).