Confused. Canvas is making me pull my hair out

I just started my journey with Canvas and I am confused. If I put together a SQL query in the developer tools section and everything appears to work correctly; then I attempt to use that same query in canvas I get nothing. When I say nothing I mean no error, no output, just nothing. I started by attempting a drop down box so I built a query that returns a list of applications. Again the SQL works in DEV tools, gets nothing in Canvas. I am willing to admit fault here but some guidance would be useful. My query is as follows:

{
"query": "SELECT kubernetes.labels.app FROM "k8s-prod-myapp-*" GROUP BY kubernetes.labels.app"
}

Simple right.

When editing an expression in canvas, only include the SQL statement. Wrapping the expression in a JSON object is causing your problems. So just enter SELECT kubernetes.labels.app FROM "k8s-prod-myapp-*" GROUP BY kubernetes.labels.app.

DEV tools is just editor that allows you to craft any Elasticsearch REST API request. In DEV tools, the entire request body is needed since you are writing raw requests. In Canvas, the UI is just for entering the SQL statement and the Canvas does the rest and converts the SQL statement into a REST request for you

I should have been clear, that JSON is the working SQL from DEVtools. When used in canvas I used just:

SELECT kubernetes.labels.app FROM "k8s-prod-myapp-*" GROUP BY kubernetes.labels.app

Sorry.

I am starting to think this is some sort of permissions issue. Just to check I added a 'metric' element to the canvas and left if at the default:

SELECT * FROM "logstash*"

Still nothing. Do you need any other permissions to be able to utilize canvas?

What does the canvas request look like in the Browser's dev tools? Can you open your browser's dev tools and monitor the network traffic when you try your canvas expression? What do you see for fns request?

It should look something like this

Unfortunately that is not what I an seeing. What I see is a ton of request that are getting a 400 error. I am working right now to see if this is related to a config issue on the server. One moment..

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.