Last active
March 20, 2018 04:02
-
-
Save ikurni/b947ce7bc81ad73a5266afa5c656a8c2 to your computer and use it in GitHub Desktop.
Troubleshoot Logging for OCP
This file contains hidden or 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/bash | |
oc project logging | |
anypod=$(oc get po --selector=component=es --no-headers -o jsonpath='{range .items[?(@.status.phase=="Running")]}{.metadata.name}{"\n"}{end}' | head -n1) | |
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 | |
# See https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cat-nodes.html for header meanings | |
oc exec $anypod -- $curl_get $ES_URL/_cat/nodes?v\&h=name,host,r,m,disk,hc,hp,hm,rc,rp,rm,fdc,fdp,fdm,load,uptime | |
oc exec $anypod -- $curl_get $ES_URL/_cat/nodes?v\&h=name,host,r,m,fm,fe,qcm,qce,rcm,rce,rchc,rcmc,ft,ftt,rto,rti,sc,sm,siwm,siwmx,svmm | |
oc exec $anypod -- $curl_get $ES_URL/_cat/nodes?v\&h=name,host,r,m,gc,gto,gti,iic,iito,iiti,mc,mt,mtt,sfc,sfto,sfti,sqc,sqto,sqti | |
oc exec $anypod -- $curl_get $ES_URL/_cat/thread_pool?v\&h=host,bulk.rejected,bulk.queue,bulk.queueSize,bulk.largest,bulk.completed | |
echo 'indices' | |
oc exec $anypod -- $curl_get $ES_URL/_cat/indices?v | |
echo 'hot threads' | |
oc exec $anypod -- $curl_get $ES_URL/_nodes/hot_threads |
This file contains hidden or 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
https://access.redhat.com/articles/3136551 | |
Complete guide for troubleshoot logging in OCP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment