# Need help creating a status panel using Heartbeat data

**URL:** https://discuss.elastic.co/t/need-help-creating-a-status-panel-using-heartbeat-data/306170
**Category:** Kibana
**Created:** [June 1, 2022, 10:38pm UTC](https://discuss.elastic.co/t/need-help-creating-a-status-panel-using-heartbeat-data/306170 "2022-06-01T22:38:42Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![paolovalladolid](https://avatars.discourse-cdn.com/v4/letter/p/edb3f5/32.png) [@paolovalladolid](https://discuss.elastic.co/u/paolovalladolid)
#### Post date: [June 1, 2022, 10:38pm UTC](https://discuss.elastic.co/t/need-help-creating-a-status-panel-using-heartbeat-data/306170/1 "2022-06-01T22:38:42Z")

</div>

I am trying to partially recreate the example dashboard shown here:

> **[Heartbeat: Monitor Services with Elasticsearch | Elastic](https://www.elastic.co/beats/heartbeat)**
>
> Monitor the uptime and availability of services by centralizing that information in Elasticsearch for analysis and visualizing in Kibana.

In particular, I want to create a panel that uses a table, and I want the first column to be an up/down status column. This is the desired look:

 ![desired-status](https://us1.discourse-cdn.com/elastic/original/3X/f/4/f4f25eaf75dcee4bdd46d9cd4c167e029ac2584e.png)

What I am getting instead is this

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/f/2f19304f4dfe0864c38c2af06f33c22c6009194b.png)

These are the table settings

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/7/974c7f16557936153dcf7d94125752e9ba61bb14.png)

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [June 1, 2022, 11:09pm UTC](https://discuss.elastic.co/t/need-help-creating-a-status-panel-using-heartbeat-data/306170/2 "2022-06-01T23:09:20Z")

</div>

Use Lens -\> Table -\> Last Value

 ![Screen Shot 2022-06-01 at 4.08.32 PM](https://us1.discourse-cdn.com/elastic/original/3X/3/7/37f28d48c56b69115f88d8db3d9b708c2cbb926d.png)

---

<div class="post-metadata">

### Author: ![paolovalladolid](https://avatars.discourse-cdn.com/v4/letter/p/edb3f5/32.png) [@paolovalladolid](https://discuss.elastic.co/u/paolovalladolid)
#### Post date: [June 1, 2022, 11:27pm UTC](https://discuss.elastic.co/t/need-help-creating-a-status-panel-using-heartbeat-data/306170/3 "2022-06-01T23:27:37Z")

</div>

Thanks! That hint helped a lot, as well as realizing I have to set Rows to url.domain.

How do I add the little red/green indicators next to the monitor status, as shown on the Heartbeat monitor example?

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [June 2, 2022, 12:23am UTC](https://discuss.elastic.co/t/need-help-creating-a-status-panel-using-heartbeat-data/306170/4 "2022-06-02T00:23:06Z")

</div>

I don't think we have markup yet in the Kibana Lens Table Yet...

But with 5 Minutes work you can have it 🙂

First Create a runtime field based on the `monitor.status`

Here is the code

```auto
if (doc['monitor.status'].value == 'up')
{
    emit(Integer.parseInt("1"));
}
else
{
    emit(Integer.parseInt("0"));
}

```

 ![Screen Shot 2022-06-01 at 5.11.58 PM](https://us1.discourse-cdn.com/elastic/original/3X/f/2/f20f985185225e884eb3b0abaaf328af0003123a.png)

 ![Screen Shot 2022-06-01 at 5.14.54 PM](https://us1.discourse-cdn.com/elastic/original/3X/6/2/62b5cc4ca6afe9f81bed49b058d05f8d31d0fbe3.png)

Then add it as a metric

 ![Screen Shot 2022-06-01 at 5.15.29 PM](https://us1.discourse-cdn.com/elastic/original/3X/1/6/1661261c7ae328f380d4ecbe8ad52e5a566435be.png)

 ![Screen Shot 2022-06-01 at 5.15.35 PM](https://us1.discourse-cdn.com/elastic/original/3X/b/7/b77bf6f8fda86d89de9ce19f637e0e881c14ce91.png)

And set the colors

 ![Screen Shot 2022-06-01 at 5.15.55 PM](https://us1.discourse-cdn.com/elastic/original/3X/e/3/e366c69a6519f6146a6524da94db8559cd604f2e.png)

And Whullah ... not perfect but pretty close

 ![Screen Shot 2022-06-01 at 5.20.36 PM](https://us1.discourse-cdn.com/elastic/original/3X/b/1/b1b28c35b1ae6464c03db846921763e93e1471a8.png)

Slightly Different Version (put space in label)

 ![Screen Shot 2022-06-01 at 5.26.04 PM](https://us1.discourse-cdn.com/elastic/original/3X/d/5/d5100c32763f41fea8fdd139d585df9d4738709c.png)

---

<div class="post-metadata">

### Author: ![paolovalladolid](https://avatars.discourse-cdn.com/v4/letter/p/edb3f5/32.png) [@paolovalladolid](https://discuss.elastic.co/u/paolovalladolid)
#### Post date: [June 2, 2022, 8:41pm UTC](https://discuss.elastic.co/t/need-help-creating-a-status-panel-using-heartbeat-data/306170/5 "2022-06-02T20:41:57Z")

</div>

> [@stephenb](#):
>
> ```auto
> if (doc['monitor.status'].value == 'up')
> {
> emit(Integer.parseInt("1"));
> }
> else
> {
> emit(Integer.parseInt("0"));
> }
> 
> ```

Thanks! I think this will do fine for now.

---

<div class="post-metadata">

### Author: ![paolovalladolid](https://avatars.discourse-cdn.com/v4/letter/p/edb3f5/32.png) [@paolovalladolid](https://discuss.elastic.co/u/paolovalladolid)
#### Post date: [June 28, 2022, 6:21pm UTC](https://discuss.elastic.co/t/need-help-creating-a-status-panel-using-heartbeat-data/306170/6 "2022-06-28T18:21:04Z")

</div>

Hi again @stephenb,

Is is possible to add more than one drilldown to a Lens Table?

We have the URLs organized by environment (the typical dev, UAT (test), and production environments). So ideally clicking on certain URLs will take the user to the dev dashboard, clicking other URLs will take the user to the UAT dashboard, and so on.

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [June 28, 2022, 6:51pm UTC](https://discuss.elastic.co/t/need-help-creating-a-status-panel-using-heartbeat-data/306170/7 "2022-06-28T18:51:32Z")

</div>

Yes! But I am not sure how you will filter / direct to the proper env from each row.

You could create 3 drill downs to different URLS but the would be available for every row... there is not if/then logic in the drill downs not sure exactly how to do it.

Maybe you could a different type like the context menu... and just set 3 dev, UAT, Prod etc.

You should play with it.. .let me know what you figure out!!

The drilldowns can use values from your table

 ![Screen Shot 2022-06-28 at 11.51.07 AM](https://us1.discourse-cdn.com/elastic/original/3X/e/a/ea85395bdd5af80f6443a9e5168b225e92f26213.png)

Or 3 Links to Dashboards

 ![Screen Shot 2022-06-28 at 11.53.36 AM](https://us1.discourse-cdn.com/elastic/original/3X/a/8/a8f24b1aa03a215274337c5e737ce96aad950cb8.png)

---

<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: [July 26, 2022, 6:51pm UTC](https://discuss.elastic.co/t/need-help-creating-a-status-panel-using-heartbeat-data/306170/8 "2022-07-26T18:51:58Z")

</div>

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