Aliaksandr Valialkin
09b309a82e
lib/logstorage: allow using -
instead of !
as a shorthand for NOT
operator in LogsQL
2024-09-27 13:14:47 +02:00
Aliaksandr Valialkin
76c1b0b8ea
lib/logstorage: support skipping _stream: prefix for stream filters
...
'_stream:{...}' can be written as '{...}'
This simplifies writing queries with stream filters, and makes them more familier to Loki users.
2024-09-27 13:14:46 +02:00
Aliaksandr Valialkin
255d1d4e13
app/vlselect/logsql: clone the query with the current timestamp when performing live tailing requests in the loop
...
Previously the original timestamp was used in the copied query, so _time:duration filters
were applied to the original time range: (timestamp-duration ... timestamp]. This resulted
in stopped live tailing, since new logs have timestamps bigger than the original time range.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7028
2024-09-26 08:57:23 +02:00
Aliaksandr Valialkin
e9950f6307
lib/logstorage: add blocks_count
pipe
...
This pipe is useful for debugging purposes when the number of processed blocks must be calculated for the given query:
<query> | blocks_count
This helps detecting the root cause of query performance slowdown in cases like https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7070
2024-09-25 19:17:48 +02:00
Aliaksandr Valialkin
657988ac3a
app/vlselect: consistently reuse the original query timestamp when executing /select/logsql/query with positive limit=N query arg
...
Previously the query could return incorrect results, since the query timestamp was updated with every Query.Clone() call
during iterative search for the time range with up to limit=N rows.
While at it, optimize queries, which find low number of matching logs, while spend a lot of CPU time for searching
across big number of logs. The optimization reduces the upper bound of the time range to search if the current time range
contains zero matching rows.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6785
2024-09-08 14:32:23 +02:00
Aliaksandr Valialkin
eaee2d7db4
lib/logstorage: improve error logging for incorrect queries passed to /select/logsql/stats_query and /select/logsql/stats_query_range functions
2024-09-08 11:24:44 +02:00
Aliaksandr Valialkin
0a40064a6f
app/vlselect: add /select/logsql/stats_query_range endpoint for building time series panels in VictoriaLogs plugin for Grafana
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6943
Updates https://github.com/VictoriaMetrics/victorialogs-datasource/issues/61
2024-09-07 00:41:47 +02:00
Aliaksandr Valialkin
c9bb4ddeed
app/vlselect: add /select/logsql/stats_query endpoint, which is going to be used by vmalert
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6942
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6706
2024-09-06 23:06:43 +02:00
Aliaksandr Valialkin
0205170409
lib/logstorage: consistently use nsecsPerDay constant and remove nsecPerDay constant
2024-09-06 16:17:04 +02:00
Aliaksandr Valialkin
aa9bb99527
lib/logstorage: drop all the pipes from the query when calculating the number of matching logs at /select/logsql/hits API
2024-07-10 00:39:28 +02:00
Aliaksandr Valialkin
d4ca651547
lib/logstorage: add stream_context
pipe, which allows selecting surrounding logs for the matching logs
2024-06-28 19:14:29 +02:00
Aliaksandr Valialkin
87f1c8bd6c
lib/logstorage: work-in-progress
2024-06-27 14:20:43 +02:00
Aliaksandr Valialkin
de7450b7e0
lib/logstorage: work-in-progress
2024-06-24 23:27:12 +02:00
Aliaksandr Valialkin
7229dd8c33
lib/logstorage: work-in-progress
2024-06-20 03:10:08 +02:00
Aliaksandr Valialkin
2b6a634ec0
lib/logstorage: work-in-progress
2024-06-17 12:13:18 +02:00
Aliaksandr Valialkin
8f5dc966f6
lib/logstorage: work-in-progress
2024-06-11 17:50:32 +02:00
Aliaksandr Valialkin
0521e58a09
lib/logstorage: work-in-progress
2024-06-10 18:42:19 +02:00
Aliaksandr Valialkin
55d8379ae6
lib/logstorage: work-in-progress
2024-06-06 12:27:05 +02:00
Aliaksandr Valialkin
43cf221681
lib/logstorage: work-in-progress
2024-06-05 03:18:12 +02:00
Aliaksandr Valialkin
539fce9227
lib/logstorage: work-in-progress
2024-06-04 01:49:02 +02:00
Aliaksandr Valialkin
0aafca29be
lib/logstorage: work-in-progress
2024-05-28 19:29:41 +02:00
Aliaksandr Valialkin
1e203f35f7
lib/logstorage: work-in-progress
2024-05-26 01:55:21 +02:00
Aliaksandr Valialkin
dc55146752
lib/logstorage: work-in-progress
2024-05-25 21:36:16 +02:00
Aliaksandr Valialkin
e2590f0485
lib/logstorage: work-in-progress
2024-05-25 00:30:58 +02:00
Aliaksandr Valialkin
4b458370c1
lib/logstorage: work-in-progress
2024-05-24 03:06:55 +02:00
Alexander Marshalov
7da541360e
[vmlogs] fixed time parsing with millisecond precision time ( #6293 ) ( #6295 )
...
fix for #6293
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2024-05-22 21:46:50 +02:00
Aliaksandr Valialkin
22107421eb
lib/logstorage: work-in-progress
2024-05-22 21:01:20 +02:00
Aliaksandr Valialkin
ad505a7a9a
lib/logstorage: work-in-progress
2024-05-20 04:08:30 +02:00
Aliaksandr Valialkin
0aa19a2837
lib/logstorage: work-in-progress
2024-05-15 04:55:44 +02:00
Aliaksandr Valialkin
da3af090c6
lib/logstorage: work-in-progress
2024-05-14 03:05:03 +02:00
Aliaksandr Valialkin
9dbd0f9085
lib/logstorage: initial implementation of pipes in LogsQL
...
See https://docs.victoriametrics.com/victorialogs/logsql/#pipes
2024-05-12 16:33:31 +02:00
XLONG96
a5795f533d
lib/logstorage: avoid panic when parsing regex with stream filter ( #5897 )
2024-02-29 15:31:54 +02:00
Aliaksandr Valialkin
a8000b74c5
lib/logstorage: properly encode "offset"
search word just after _time filter
2023-07-18 16:00:06 -07:00
Aliaksandr Valialkin
ed00b03ecb
lib/logstorage: add abilty to speficy offset for the selected _time filter
...
The following syntax is supported: _time:filter offset off
For example:
- _time:5m offset 1h - 5-minute duration one hour before the current time
- _time:2023 offset 2w - 2023 year with the 2 weeks offset in the past
2023-07-17 19:07:42 -07:00
Aliaksandr Valialkin
bdfb80668d
lib/logstorage: support for short form of _time:(now-duration, now] filter: _time:duration
2023-07-17 19:07:40 -07:00
Aliaksandr Valialkin
3bf58326e7
lib/logstorage: LogsQL: replace exact_prefix("...") with exact("..."*)
...
This makes LogsQL queries more consistent with i("...") and i("..."*) syntax
2023-07-17 19:07:40 -07:00
Aliaksandr Valialkin
87b66db47d
app/victoria-logs: initial code release
2023-06-19 22:55:12 -07:00