Skip to content

Commit 6078955

Browse files
authored
Docs: add -frontend.enabled-ruler-query-stats to docs (#6530)
Signed-off-by: SungJin1212 <[email protected]>
1 parent 6198803 commit 6078955

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/guides/rule-evaluations-via-query-frontend.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@ In addition, you can configure gRPC client (Ruler -> Query Frontend) config, ple
2929
You can configure the query response format via `-ruler.query-response-format`. It is used to retrieve query results from the Query Frontend.
3030
The supported values are `protobuf` and `json`. We recommend using `protobuf`(default) because the retrieved query results containing native histograms are only supported on `protobuf`.
3131

32+
## How to track query stat log and metric
33+
When the `-ruler.frontend-address` is configured, the values of query stats for rule evaluation logs and metrics are all `0` in the Ruler.
34+
You can look at the logs at the Query Frontend via enabling `-frontend.enabled-ruler-query-stats` (disabled by default).
35+
36+
Also, there are alternative metrics; you can see right-side metrics instead:
37+
```
38+
`cortex_ruler_query_seconds_total` -> `cortex_query_seconds_total{source="ruler"}`
39+
`cortex_ruler_fetched_series_total` -> `cortex_query_fetched_series_total{source="ruler"}`
40+
`cortex_ruler_samples_total` -> `cortex_query_samples_total{source="ruler"}`
41+
`cortex_ruler_fetched_chunks_bytes_total` -> `cortex_query_fetched_chunks_bytes_total{source="ruler"}`
42+
`cortex_ruler_fetched_data_bytes_total` -> `cortex_query_fetched_data_bytes_total{source="ruler"}`
43+
```
3244

3345
## Pros and Cons
3446
If this feature is enabled, the query execute path is as follows:

0 commit comments

Comments
 (0)