How to dynamically turn off slowlog

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"

1 Like

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

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


Thanks! Totally missed that page.