# How to change Y-axis metric from default ( count ) to timestamp?

**URL:** https://discuss.elastic.co/t/how-to-change-y-axis-metric-from-default-count-to-timestamp/151074
**Category:** Kibana
**Created:** [October 4, 2018, 3:57pm UTC](https://discuss.elastic.co/t/how-to-change-y-axis-metric-from-default-count-to-timestamp/151074 "2018-10-04T15:57:50Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![chidori](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@chidori](https://discuss.elastic.co/u/chidori)
#### Post date: [October 4, 2018, 3:57pm UTC](https://discuss.elastic.co/t/how-to-change-y-axis-metric-from-default-count-to-timestamp/151074/1 "2018-10-04T15:57:50Z")

</div>

Hi,  
I need to monitor the uptime of some hosts. I am using heartbeat ( ping ) for this purpose. I am trying to visualize the results using bar chart. I would like to know is, is there a way to change the Y-axis from showing the defaults ( count ) to timestamp?

 ![Capture](https://us1.discourse-cdn.com/elastic/original/3X/8/3/8398780f20b6117ce1c3f8ff55679db326e3140b.png)

---

<div class="post-metadata">

### Author: ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)
#### Post date: [October 5, 2018, 2:28pm UTC](https://discuss.elastic.co/t/how-to-change-y-axis-metric-from-default-count-to-timestamp/151074/2 "2018-10-05T14:28:10Z")

</div>

hi @chidori,

to change the Y-axis, change the configuration for "Metrics" (the top section in the `Data`-tab). You could configure other metrics for the Y-axis, like sums, averages, mins and maxes, ... there

---

<div class="post-metadata">

### Author: ![chidori](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@chidori](https://discuss.elastic.co/u/chidori)
#### Post date: [October 5, 2018, 3:30pm UTC](https://discuss.elastic.co/t/how-to-change-y-axis-metric-from-default-count-to-timestamp/151074/3 "2018-10-05T15:30:46Z")

</div>

Hi @thomasneirynck,  
yes but that does not have anything related to timestamp like the way I am interested in. All I want is simple time range. something like as shown in screenshot below but in Y-axis  
 ![Capture](https://us1.discourse-cdn.com/elastic/original/3X/3/e/3e509efbd9535961832449fdc0ead0d78c365d9e.png)

---

<div class="post-metadata">

### Author: ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)
#### Post date: [October 5, 2018, 5:20pm UTC](https://discuss.elastic.co/t/how-to-change-y-axis-metric-from-default-count-to-timestamp/151074/4 "2018-10-05T17:20:19Z")

</div>

ah ok, you can flip the orientation of the chart (so make the Y-axis show time) by selecting the position for an axis in the "Metrics and Axes" tab.

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

That will rotate your chart to show time on the left.

---

<div class="post-metadata">

### Author: ![chidori](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@chidori](https://discuss.elastic.co/u/chidori)
#### Post date: [October 5, 2018, 5:54pm UTC](https://discuss.elastic.co/t/how-to-change-y-axis-metric-from-default-count-to-timestamp/151074/5 "2018-10-05T17:54:34Z")

</div>

@thomasneirynck sorry but what i want is a chart which shows the UP and DOWN status of servers during a given time range. The "Count" is not something I would need. It should be a chart where one axis would talk about the time range ( can be hour/day/week/month ) while the other axis would have the details of the servers and probably i can add a sub-bucket that would talk about their UP and DOWN time.

---

<div class="post-metadata">

### Author: ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)
#### Post date: [October 6, 2018, 6:45pm UTC](https://discuss.elastic.co/t/how-to-change-y-axis-metric-from-default-count-to-timestamp/151074/6 "2018-10-06T18:45:33Z")

</div>

hi @chidori,

Not 100% if I understand. How to do this will depend very much on how you structured your documents.

maybe the top\_hit aggregation could be useful to you ([https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-top-hits-aggregation.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-top-hits-aggregation.html)). You can use it to show the last status of a given server within a given time-range. E.g. up/down status over time, for each minute.

---

<div class="post-metadata">

### Author: ![chidori](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@chidori](https://discuss.elastic.co/u/chidori)
#### Post date: [October 8, 2018, 9:38am UTC](https://discuss.elastic.co/t/how-to-change-y-axis-metric-from-default-count-to-timestamp/151074/7 "2018-10-08T09:38:43Z")

</div>

Hi @thomasneirynck,  
Thanks for the inputs on this query so far. Please refer to my intial post which has the screen shot. My only issue with that bar chart is I want change the Y-axis ( Count ) to timestamp ( may be day/minute/hours). I am thinking by bringing in timestamp in Y-axis I would be able to easily narrow down the time range at which my server(s) were down.

---

<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: [November 5, 2018, 9:44am UTC](https://discuss.elastic.co/t/how-to-change-y-axis-metric-from-default-count-to-timestamp/151074/8 "2018-11-05T09:44:39Z")

</div>

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