Skip to content
This repository was archived by the owner on Feb 11, 2020. It is now read-only.

Commit 50c7ffa

Browse files
committed
Add script to enable slowlog
It is enabled for both query and fetch phases of searching, as well as for bulk index requests
1 parent d16fc0e commit 50c7ffa

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

enable_slowlog.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
echo "enabling slowlog for searching and indexing on $cluster_url"
5+
6+
curl -XPUT "$cluster_url/_cluster/settings" -d '{
7+
"persistent": {
8+
"index.search.slowlog.threshold.query.warn": "10s",
9+
"index.search.slowlog.threshold.query.info": "5s",
10+
"index.search.slowlog.threshold.query.info": "2s",
11+
"index.search.slowlog.threshold.query.info": "500ms",
12+
"index.search.slowlog.source": true,
13+
14+
"index.search.slowlog.threshold.fetch.warn": "10s",
15+
"index.search.slowlog.threshold.fetch.info": "5s",
16+
"index.search.slowlog.threshold.fetch.info": "2s",
17+
"index.search.slowlog.threshold.fetch.info": "500ms",
18+
19+
"index.index.slowlog.threshold.index.warn": "10s",
20+
"index.index.slowlog.threshold.index.info": "5s",
21+
"index.index.slowlog.threshold.index.info": "2s",
22+
"index.index.slowlog.threshold.index.info": "500ms"
23+
}
24+
}'

0 commit comments

Comments
 (0)