victorialogs-datasource
victorialogs-datasource copied to clipboard
Support vlogs new features: pipes and stats (pipe confuses the parser)
Recent victorialogs supports marvelous features, namely pipes. However it breaks the logic in datasource:
cannot parse query [_time:[2024-05-16T11:56:06.733Z, 2024-05-16T17:56:06.733Z] AND (severity:warning | stats count() logs)]: unexpected token "|" instead of ')'; context: [ 2024-05-16T17:56:06.733Z] AND (severity:warning |]
The problem is that time gets inserted as
_time:XX AND ( <query_string> )
and pipe shall be at the end, outside of the parens. The easiest is probably simply put everything after and including the first pipe outside the parentheses.