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,, 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
"" : "10s",
"": "500ms",
"": "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

(Jeremy Loss) #4

Thanks! Totally missed that page.

(system) #5