-
Notifications
You must be signed in to change notification settings - Fork 34
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
ADX: Failed to parse KQL response with errors #508
Comments
Actually looking at it closer - the problem is probably more on the side of the return value parsing. Is there a way to get the raw return payload from grafana? |
I've got the raw return payloads from ADX by sending the queries through curl but I cannot see any substantial difference between the two queries (the one that works and the one that doesn't) |
hi @chriswue can you send the data you are getting back with curl? (removing any sensitive data if there is some). From the original error:
it seems that some error might be encoded rather than returning the actual list rows so that may be the cause. |
@andresmgot Figured it out - the problem was that the external table was mapped with AD auth - which means that ADX would pass the user token to log into SQL - (which is grafana in this case which doesn't have direct access to that database). When testing on the CLI I used my user account which has access and that works. In the end the problem was that the KQL query resulted in a "permission denied" response but grafana failed to recognize it as such and tried to parse it as a regular response and that failed with a unhelpful error. If grafana had an option "dump raw data source response" that would be great in helping to debug this. The response in this case from ADX was something like:
Not sure why grafana didn't recognize the error response. Kusto works via HTTP API, maybe the return code was misleading? |
Since we cannot reproduce the issue, it's difficult for us to know why this was not being handled as an error. From the behavior you describe, it seems that the API is returning a 200 OK but there is an error encoded in the body. According to the API docs, that's not something that should be happening, are you able to reproduce the issue with a |
@andresmgot Looks like any query that results in a cluster error should do. Here is a query that will run most clusters into a runaway query error:
Results in Grafana:
Firing off the query with
It's a bit questionable to return a Now that I've spent some time on this again I realize we have some work-around code in our API do deal with this exact problem (that a |
Actually according to the linked docs:
And also |
That's great, thanks for the details! I am able to reproduce this with the query you suggested. Let me re-open the issue so we can fix the error parsing in this case. |
I have an ADX database which has an external table mapped. Any query that include this external table refuses to execute with the following error:
I have another cluster with external tables and those work fine which means the problem lies with specific tables.
The only difference between the tables that are OK and the one that doesn't work is the non-functioning one is an external SQL table while the others are storage account tables.
Querying the table from Kusto Explorer or via Azure Portal is perfectly fine.
Unfortunately the error message is heavily redacted and not very useful to track down specifics. I don't know where or how to find the full error. Would be nice if Grafana could make this available for download with a "Debug" flag or something.
I guess the problem lies with the query parsing somehow. Is there an option for "non-intelligent query execution" and bypassing the parser?
Environment:
The text was updated successfully, but these errors were encountered: