# Confused. Canvas is making me pull my hair out

**URL:** <https://discuss.elastic.co/t/confused-canvas-is-making-me-pull-my-hair-out/175634>\
**Category:** Kibana\
**Created:** [April 5, 2019, 4:27pm UTC](https://discuss.elastic.co/t/confused-canvas-is-making-me-pull-my-hair-out/175634 "2019-04-05T16:27:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![JerryWintrode](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@JerryWintrode](https://discuss.elastic.co/u/JerryWintrode)\
**Post date:** [April 5, 2019, 4:27pm UTC](https://discuss.elastic.co/t/confused-canvas-is-making-me-pull-my-hair-out/175634/1 "2019-04-05T16:27:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [April 5, 2019, 4:55pm UTC](https://discuss.elastic.co/t/confused-canvas-is-making-me-pull-my-hair-out/175634/2 "2019-04-05T16:55:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JerryWintrode](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@JerryWintrode](https://discuss.elastic.co/u/JerryWintrode)\
**Post date:** [April 5, 2019, 4:58pm UTC](https://discuss.elastic.co/t/confused-canvas-is-making-me-pull-my-hair-out/175634/3 "2019-04-05T16:58:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JerryWintrode](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@JerryWintrode](https://discuss.elastic.co/u/JerryWintrode)\
**Post date:** [April 5, 2019, 5:06pm UTC](https://discuss.elastic.co/t/confused-canvas-is-making-me-pull-my-hair-out/175634/4 "2019-04-05T17:06:49Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [April 5, 2019, 6:46pm UTC](https://discuss.elastic.co/t/confused-canvas-is-making-me-pull-my-hair-out/175634/5 "2019-04-05T18:46:10Z")

</div>

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

 ![28%20PM](https://us1.discourse-cdn.com/elastic/original/3X/a/7/a7cb2a2f1123dac523a840287c2ee86751edfbc5.png)

---

<div class="post-metadata">

**Author:** ![JerryWintrode](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@JerryWintrode](https://discuss.elastic.co/u/JerryWintrode)\
**Post date:** [April 8, 2019, 6:28pm UTC](https://discuss.elastic.co/t/confused-canvas-is-making-me-pull-my-hair-out/175634/6 "2019-04-08T18:28:05Z")

</div>

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..

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 6, 2019, 6:28pm UTC](https://discuss.elastic.co/t/confused-canvas-is-making-me-pull-my-hair-out/175634/7 "2019-05-06T18:28:14Z")

</div>

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