How to dynamically turn off slowlog


(Jeremy Loss) #1

I might be a bit daft on this one, but how would i turn off slow logging through an HTTP call? I used the command in the logging docs, https://www.elastic.co/guide/en/elasticsearch/guide/current/logging.html, to turn on logging and it worked fine. But my SA asked how he can turn off slow logs if he needs to.

If I added it this way, how would I turn off the same settings? Put blank values in? DELETE? I'm probably missing something obvious.

PUT /my_index/_settings
{
"index.search.slowlog.threshold.query.warn" : "10s",
"index.search.slowlog.threshold.fetch.debug": "500ms",
"index.indexing.slowlog.threshold.index.info": "5s"
}


(Mark Walkom) #2

You could try -1, can't guarantee it'll work.


(Vincent Tran) #3

How about

GET /my_index/_settings

Modify the resource (i.e. remove the slowlog paramaters). Then POST it back. (or DELETE then PUT it back?)

As always, no guarantee. You should test it on dummy index first.

Edit: @warkolm is correct. -1 should work

https://www.elastic.co/guide/en/elasticsearch/reference/2.1/index-modules-slowlog.html


(Jeremy Loss) #4

Thanks! Totally missed that page.


(system) #5