Last active
October 3, 2018 07:20
-
-
Save georgegoh/bc6f309d3f8595390894256d311bf5e4 to your computer and use it in GitHub Desktop.
One-liner to get health of the Elasticsearch cluster from the first ES pod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
oc -n openshift-logging exec `oc -n openshift-logging get po -l component=es -o go-template='{{ (index .items 0).metadata.name }}'` \ | |
-c elasticsearch \ | |
-- curl -s \ | |
--cacert /etc/elasticsearch/secret/admin-ca \ | |
--cert /etc/elasticsearch/secret/admin-cert \ | |
--key /etc/elasticsearch/secret/admin-key \ | |
https://logging-es:9200/_cluster/health?pretty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment