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

Error when using fields pipe #23

Closed
zekker6 opened this issue May 20, 2024 · 5 comments
Closed

Error when using fields pipe #23

zekker6 opened this issue May 20, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@zekker6
Copy link
Contributor

zekker6 commented May 20, 2024

To reproduce try using the following query: _time:10h * | unpack_json from _msg | fields level

The following error is displayed in UI when using the fields selector:

Query error
An error occurred within the plugin

Grafana logs:

grafana logger=context userId=4 orgId=1 [email protected] t=2024-05-20T14:59:34.689886559Z level=error msg="Internal server error" error="[plugin.downstreamError] client: failed to query data: Failed to query data: rpc error: code = Unknown desc = frame has different field lengths, field 0 is len 0 b
ut field 2 is len 1000" remote_addr=95.217.16.43 traceID=
grafana logger=context userId=4 orgId=1 [email protected] t=2024-05-20T14:59:34.690327282Z level=error msg="Request Completed" method=POST path=/api/ds/query status=500 remote_addr=95.217.16.43 time_ms=56 duration=56.145455ms size=116 referer="https://grafana.sandbox.victoriametrics.com/explore?orgId
=1&panes=%7B%229y4%22%3A%7B%22datasource%22%3A%22fdmacvu8gcwlce%22%2C%22queries%22%3A%5B%7B%22refId%22%3A%22A%22%2C%22datasource%22%3A%7B%22type%22%3A%22victorialogs-datasource%22%2C%22uid%22%3A%22fdmacvu8gcwlce%22%7D%2C%22expr%22%3A%22_time%3A10h+%2A+%7C+unpack_json+from+_msg+%7C+fields+level%22%2C%22queryType%22%3A%2
2range%22%7D%5D%2C%22range%22%3A%7B%22from%22%3A%22now-1h%22%2C%22to%22%3A%22now%22%7D%7D%7D&schemaVersion=1" handler=/api/ds/query status_source=downstream
@valyala valyala added the bug Something isn't working label Jun 8, 2024
@Loori-R
Copy link
Contributor

Loori-R commented Jun 18, 2024

@dk, can you take a look?
I think the error occurs because the logs are missing _time, _msg, and _stream, and the entry looks something like {"level":""}.

@dk
Copy link

dk commented Jun 18, 2024

Sure thing. Looks like the problem is EWRONGDK 🤣

@Loori-R
Copy link
Contributor

Loori-R commented Jun 18, 2024

Oops, sorry 😅. I meant @dmitryk-dk

@dmitryk-dk
Copy link
Contributor

Yeah, i will check it. What to fix some bugs for the datasource

@dmitryk-dk
Copy link
Contributor

Hi @zekker6 ! Issue was fixed in the release. Close as resolved

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

6 participants