You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs/victorialogs/querying/README.md: document that row_any, row_min and row_max return labels instead of metrics from /select/logsql/stats_query and /select/logsql/stats_query_range endpoints
While at it, document that the `format` pipe can be used for generating additional labels from metrics,
while `math` pipe can be used for generating additional metrics from the existing metrics.
Also mention that running_stats and total_stats pipes can be used at /select/logsql/stats_query_range
for calculating running stats and total stats from the stats returned from `stats` pipe.
This is a follow-up for 68b9433
Updates #81
Copy file name to clipboardExpand all lines: docs/victorialogs/querying/README.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -455,6 +455,12 @@ in the format compatible with [Prometheus querying API](https://prometheus.io/do
455
455
The `<query>` must contain [`stats` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#stats-pipe). The calculated stats is converted into metrics
456
456
with labels from `by(...)` clause of the `| stats by(...)` pipe.
457
457
458
+
The [`row_any`](https://docs.victoriametrics.com/victorialogs/logsql/#row_any-stats), [`row_min`](https://docs.victoriametrics.com/victorialogs/logsql/#row_min-stats)
459
+
and [`row_max`](https://docs.victoriametrics.com/victorialogs/logsql/#row_max-stats) stats functions create labels instead of metrics.
460
+
461
+
Additional labels can be created from metrics via [`format` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#format-pipe).
462
+
Additional metrics can be created from the existing metrics via [`math` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#math-pipe).
463
+
458
464
The `<t>` arg can contain values in [any supported format](https://docs.victoriametrics.com/victoriametrics/single-server-victoriametrics/#timestamp-formats).
459
465
If `<t>` is missing, then it equals to the current time.
460
466
@@ -532,6 +538,16 @@ The stats is returned in the format compatible with [Prometheus querying API](ht
532
538
The `<query>` must contain [`stats` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#stats-pipe). The calculated stats is converted into metrics
533
539
with labels from `by(...)` clause of the `| stats by(...)` pipe.
534
540
541
+
The [`row_any`](https://docs.victoriametrics.com/victorialogs/logsql/#row_any-stats), [`row_min`](https://docs.victoriametrics.com/victorialogs/logsql/#row_min-stats)
542
+
and [`row_max`](https://docs.victoriametrics.com/victorialogs/logsql/#row_max-stats) stats functions create labels instead of metrics.
543
+
544
+
Additional labels can be created from metrics via [`format` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#format-pipe).
545
+
Additional metrics can be created from the existing metrics via [`math` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#math-pipe).
546
+
547
+
It may be useful to use [`running_stats`](https://docs.victoriametrics.com/victorialogs/logsql/#running_stats-pipe)
548
+
and [`total_stats`](https://docs.victoriametrics.com/victorialogs/logsql/#total_stats-pipe) pipes for calculating running and total stats over the stats
549
+
returned by the [`stats` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#stats-pipe).
550
+
535
551
The `<start>` and `<end>` args can contain values in [any supported format](https://docs.victoriametrics.com/victoriametrics/single-server-victoriametrics/#timestamp-formats).
536
552
If `<start>` is missing, then it equals to the minimum timestamp across logs stored in VictoriaLogs.
537
553
If `<end>` is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs.
0 commit comments