# Logstash slowlog for Elasticsearch output

**URL:** <https://discuss.elastic.co/t/logstash-slowlog-for-elasticsearch-output/119503>\
**Category:** Logstash\
**Created:** [February 12, 2018, 3:37pm UTC](https://discuss.elastic.co/t/logstash-slowlog-for-elasticsearch-output/119503 "2018-02-12T15:37:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jon\_D](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jon_d/32/25657_2.png) [@Jon\_D](https://discuss.elastic.co/u/Jon_D)\
**Post date:** [February 12, 2018, 3:37pm UTC](https://discuss.elastic.co/t/logstash-slowlog-for-elasticsearch-output/119503/1 "2018-02-12T15:37:45Z")

</div>

Hello,

I'm trying to get the slowlog to work in order to obtain more information about the bulk API requests from Logstash to Elasticsearch.

I added this to my `logstash.yml` file :

```
slowlog.threshold.warn: 2s
slowlog.threshold.info: 1s
slowlog.threshold.debug: 500ms
slowlog.threshold.trace: 1nanos

```

This seems ok as I found this in my logstash-plain.log:

```
[2018-02-12T16:06:05,849][DEBUG][logstash.runner] *slowlog.threshold.warn: 2000000000 (default: -1)
[2018-02-12T16:06:05,849][DEBUG][logstash.runner] *slowlog.threshold.info: 1000000000 (default: -1)
[2018-02-12T16:06:05,849][DEBUG][logstash.runner] *slowlog.threshold.debug: 500000000 (default: -1)
[2018-02-12T16:06:05,849][DEBUG][logstash.runner] *slowlog.threshold.trace: 1 (default: -1)

```

Now, I would expect that every single event (or at least bulk API request) to Elasticsearch gets logged when I set the `slowlog.logstash.outputs.elasticsearch` to 'TRACE' but instead it seems like nothing happens. I tried putting `slowlog.logstash.filters.xml` to 'TRACE' and that worked as expected: every single event passing through the filter gets logged.

I tried removing the conditional on the Elasticsearch output in my pipeline config but that didn't help.

Am I doing something wrong or did I miss something somehow?

Thanks a lot!  
KR,  
Jonas

---

<div class="post-metadata">

**Author:** ![Jon\_D](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jon_d/32/25657_2.png) [@Jon\_D](https://discuss.elastic.co/u/Jon_D)\
**Post date:** [March 5, 2018, 1:09pm UTC](https://discuss.elastic.co/t/logstash-slowlog-for-elasticsearch-output/119503/2 "2018-03-05T13:09:39Z")

</div>

Anyone here who's got experience using the slowlogs?

---

<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:** [April 2, 2018, 1:09pm UTC](https://discuss.elastic.co/t/logstash-slowlog-for-elasticsearch-output/119503/3 "2018-04-02T13:09:41Z")

</div>

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