Plotting a graph for Elasticsearch Slow Logs

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 !

How are you ingesting the slowlogs into Elasticsearch?

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

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

1 Like

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