Skip to content

Instantly share code, notes, and snippets.

View georgegoh's full-sized avatar

George Goh georgegoh

  • VMware
  • Singapore
View GitHub Profile
@portante
portante / check_es_state.sh
Last active September 14, 2017 03:11
A simple script to check the state of Elasticsearch from within an ES pod in an OpenShift cluster
#!/bin/bash
ES_URL='https://localhost:9200'
curl_get='curl -s -X GET --cacert /etc/elasticsearch/secret/admin-ca --cert /etc/elasticsearch/secret/admin-cert --key /etc/elasticsearch/secret/admin-key'
date
$curl_get $ES_URL/_cat/health?v
$curl_get $ES_URL/_cat/nodes?v
$curl_get $ES_URL/_cat/indices?v 2>&1 | grep -vE "^green"
$curl_get $ES_URL/_cat/indices?v 2>&1 | grep "searchguard"