# Creating a simple "traffic light" indicator using timestamp for one of the revealed images

**URL:** <https://discuss.elastic.co/t/creating-a-simple-traffic-light-indicator-using-timestamp-for-one-of-the-revealed-images/294798>\
**Category:** Kibana\
**Tags:** canvas\
**Created:** [January 19, 2022, 11:10am UTC](https://discuss.elastic.co/t/creating-a-simple-traffic-light-indicator-using-timestamp-for-one-of-the-revealed-images/294798 "2022-01-19T11:10:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hbay1](https://avatars.discourse-cdn.com/v4/letter/h/c89c15/32.png) [@hbay1](https://discuss.elastic.co/u/hbay1)\
**Post date:** [January 19, 2022, 11:10am UTC](https://discuss.elastic.co/t/creating-a-simple-traffic-light-indicator-using-timestamp-for-one-of-the-revealed-images/294798/1 "2022-01-19T11:10:40Z")

</div>

Hi,

I'm trying to create a standard traffic light in kibana canvas based on uptime of some applications.  
I've been using the following query for showing a green and red square, but now I want to add a yellow square as well, which will be showing when the application is running, but have been down once (or more) the last three minutes.

Any ideas on where to start? I looked at this post: [How do you create a simple "traffic light" indicator on a Canvas dashboard?](https://discuss.elastic.co/t/how-do-you-create-a-simple-traffic-light-indicator-on-a-canvas-dashboard/205564) but were not able to get anything out of it.

```auto
  query="select case when monitor.status = 'up' then 1 else 0 end as status
from \"myindex"
where monitor.id='first-monitor-status'
order by \"@timestamp\" desc
limit 1"
| math "status"
| revealImage origin="bottom" image={asset "asset-37fe96d7-c944-4ed4"} emptyImage={asset "asset-ba1fa979-af54-4219-a572"}
| render

```

Thanks in advance!

---

<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:** [February 16, 2022, 11:10am UTC](https://discuss.elastic.co/t/creating-a-simple-traffic-light-indicator-using-timestamp-for-one-of-the-revealed-images/294798/2 "2022-02-16T11:10:55Z")

</div>

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