Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support vlogs new features: pipes and stats (pipe confuses the parser) #22

Closed
grinapo opened this issue May 16, 2024 · 5 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@grinapo
Copy link

grinapo commented May 16, 2024

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.

@hagen1778
Copy link
Contributor

@Loori-R shall we remove support of _time filter in favour of Grafana's time picker?

@Loori-R Loori-R self-assigned this May 20, 2024
@Loori-R Loori-R added the bug Something isn't working label May 20, 2024
@Loori-R
Copy link
Contributor

Loori-R commented May 20, 2024

The _time value is inserted from Grafana's time picker. We need to replace _time with start and end query args, similar to what was done in PR #6296.

dmitryk-dk added a commit that referenced this issue Jun 25, 2024
* fix: change time range to start and end query args #22

* fix tests check and check zero time

---------

Co-authored-by: dmitryk-dk <[email protected]>
@dmitryk-dk
Copy link
Contributor

Hi @grinapo ! The latest release should fix your issue. Could you check it?

@grinapo
Copy link
Author

grinapo commented Jun 26, 2024

@dmitryk-dk as far as I am able to test it works flawlessly. Thank you!

@dmitryk-dk
Copy link
Contributor

Close as solved. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants