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

Commit a47b930

Browse files
committed
Show index queries by default
1 parent 881eba1 commit a47b930

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

es_diagnostic.sh

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,18 @@
11
#!/bin/bash -ue
22
set -eu
33

4-
## HOW TO USE THIS SCRIPT
5-
## download onto any Prod VPN connected machine
6-
## set the $cluster_url variable to a url like "http://your-elasticsearch-host:9200" (specifiy port and put http at the front)
7-
## run with `bash es_diagnostic.sh`
8-
## optionally: update the old_snapshot_name and new_snapshot_name variables from the output
9-
## run again, or ideally (on a large monitor) use `watch -n1 bash es_diagnostic.sh`
10-
114
cluster_url="${cluster_url:-http://localhost:9200}"
125

136
## CONFIGURE SCRIPT HERE
14-
old_snapshot_name="pelias-2016.11.04-000804"
15-
new_snapshot_name="pelias-2016.10.21-185509"
7+
index_name="pelias"
168

179
## show basic index information
1810
echo -e "INDICES"
1911
curl -s "$cluster_url/_cat/indices/?pretty=1&v" | (for i in $(seq 1); do read -r; printf "%s\n" "$REPLY"; done; sort -nk2)
2012

2113
# Shows counts of queries for each index
22-
#echo -e "\n$old_snapshot_name queries"
23-
#curl -s "$cluster_url/$old_snapshot_name/_stats?pretty=1&v" | grep query_total | head -1
24-
#echo -e "\n$new_snapshot_name queries"
25-
#curl -s "$cluster_url/$new_snapshot_name/_stats?pretty=1&v" | grep query_total | head -1
14+
echo -e "\n$index_name queries"
15+
curl -s "$cluster_url/$index_name/_stats?pretty=1&v" | grep query_total | head -1
2616

2717
## Show information about each node, including master and router nodes
2818
echo -e "\nNODES"

0 commit comments

Comments
 (0)