# Plotting a graph for Elasticsearch Slow Logs

**URL:** <https://discuss.elastic.co/t/plotting-a-graph-for-elasticsearch-slow-logs/233411>\
**Category:** Beats\
**Tags:** beats-module, filebeat\
**Created:** [May 19, 2020, 8:54pm UTC](https://discuss.elastic.co/t/plotting-a-graph-for-elasticsearch-slow-logs/233411 "2020-05-19T20:54:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sachindesai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sachindesai/32/68671_2.png) [@sachindesai](https://discuss.elastic.co/u/sachindesai)\
**Post date:** [May 19, 2020, 8:54pm UTC](https://discuss.elastic.co/t/plotting-a-graph-for-elasticsearch-slow-logs/233411/1 "2020-05-19T20:54:00Z")

</div>

Hi , I am working on to plot my slow logs of elasticsearch on graphs in kibana/grafana. I want to get a graph for "elasticsearch.slowlog.took" (which gives me total time taken for a query to exec) to be on Y axis and Timestamp on X axis. But "elasticsearch.slowlog.took" is being recorded as a string , Because of which i am not able to plot a graph for the same. Is there any way to get this done? Or is there any better way to visualise these slowlogs? I also want to get description along with graph when i hover over the Y axis.

Thank You !

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 19, 2020, 10:49pm UTC](https://discuss.elastic.co/t/plotting-a-graph-for-elasticsearch-slow-logs/233411/2 "2020-05-19T22:49:07Z")

</div>

How are you ingesting the slowlogs into Elasticsearch?

---

<div class="post-metadata">

**Author:** ![sachindesai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sachindesai/32/68671_2.png) [@sachindesai](https://discuss.elastic.co/u/sachindesai)\
**Post date:** [May 20, 2020, 5:17am UTC](https://discuss.elastic.co/t/plotting-a-graph-for-elasticsearch-slow-logs/233411/3 "2020-05-20T05:17:43Z")

</div>

I have referred this docs to add slow logging : [https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-slowlog.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-slowlog.html)  
and to scarpe the logs i have used filebeat.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 20, 2020, 8:10am UTC](https://discuss.elastic.co/t/plotting-a-graph-for-elasticsearch-slow-logs/233411/4 "2020-05-20T08:10:03Z")

</div>

Looking at [https://www.elastic.co/guide/en/beats/filebeat/current/exported-fields-elasticsearch.html#\_slowlog](https://www.elastic.co/guide/en/beats/filebeat/current/exported-fields-elasticsearch.html#_slowlog), it's a keyword, which is odd. I'll move this to the Filebeat area and maybe one of the devs can provide more info.

---

<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:** [June 17, 2020, 8:10am UTC](https://discuss.elastic.co/t/plotting-a-graph-for-elasticsearch-slow-logs/233411/5 "2020-06-17T08:10:16Z")

</div>

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