Skip to content

Instantly share code, notes, and snippets.

@portante
Last active March 22, 2018 15:29
Show Gist options
  • Save portante/e51c150b7415e3ad94a200afe2025f9e to your computer and use it in GitHub Desktop.
Save portante/e51c150b7415e3ad94a200afe2025f9e to your computer and use it in GitHub Desktop.
Check if an index exists in OpenShift ES aggregated logging.
#!/bin/bash
ES_URL='https://localhost:9200'
curl_head='curl -w %{http_code}\n -s -X HEAD --cacert /etc/elasticsearch/secret/admin-ca --cert /etc/elasticsearch/secret/admin-cert --key /etc/elasticsearch/secret/admin-key'
$curl_head $ES_URL/${1}?pretty=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment