This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.9.2. Viewing the status of the log store
You can view the status of the Elasticsearch Operator and for a number of Elasticsearch components.
9.2.1. Viewing the status of the log store 复制链接链接已复制到粘贴板!
You can view the status of your log store.
Prerequisites
- Cluster logging and Elasticsearch must be installed.
Procedure
Change to the
openshift-logging
project.oc project openshift-logging
$ oc project openshift-logging
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To view the status:
Get the name of the log store instance:
oc get Elasticsearch
$ oc get Elasticsearch
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
NAME AGE elasticsearch 5h9m
NAME AGE elasticsearch 5h9m
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Get the log store status:
oc get Elasticsearch <Elasticsearch-instance> -o yaml
$ oc get Elasticsearch <Elasticsearch-instance> -o yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example:
oc get Elasticsearch elasticsearch -n openshift-logging -o yaml
$ oc get Elasticsearch elasticsearch -n openshift-logging -o yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The output includes information similar to the following:
Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- In the output, the cluster status fields appear in the
status
stanza. - 2
- The status of the log store:
- The number of active primary shards.
- The number of active shards.
- The number of shards that are initializing.
- The number of log store data nodes.
- The total number of log store nodes.
- The number of pending tasks.
-
The log store status:
green
,red
,yellow
. - The number of unassigned shards.
- 3
- Any status conditions, if present. The log store status indicates the reasons from the scheduler if a pod could not be placed. Any events related to the following conditions are shown:
- Container Waiting for both the log store and proxy containers.
- Container Terminated for both the log store and proxy containers.
- Pod unschedulable. Also, a condition is shown for a number of issues, see Example condition messages.
- 4
- The log store nodes in the cluster, with
upgradeStatus
. - 5
- The log store client, data, and master pods in the cluster, listed under 'failed`,
notReady
orready
state.
9.2.1.1. Example condition messages 复制链接链接已复制到粘贴板!
The following are examples of some condition messages from the Status
section of the Elasticsearch instance.
This status message indicates a node has exceeded the configured low watermark and no shard will be allocated to this node.
This status message indicates a node has exceeded the configured high watermark and shards will be relocated to other nodes.
This status message indicates the log store node selector in the CR does not match any nodes in the cluster:
This status message indicates that the log store CR uses a non-existent PVC.
This status message indicates that your log store cluster does not have enough nodes to support your log store redundancy policy.
This status message indicates your cluster has too many master nodes:
9.2.2. Viewing the status of the log store components 复制链接链接已复制到粘贴板!
You can view the status for a number of the log store components.
- Elasticsearch indices
You can view the status of the Elasticsearch indices.
Get the name of an Elasticsearch pod:
oc get pods --selector component=elasticsearch -o name
$ oc get pods --selector component=elasticsearch -o name
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
pod/elasticsearch-cdm-1godmszn-1-6f8495-vp4lw pod/elasticsearch-cdm-1godmszn-2-5769cf-9ms2n pod/elasticsearch-cdm-1godmszn-3-f66f7d-zqkz7
pod/elasticsearch-cdm-1godmszn-1-6f8495-vp4lw pod/elasticsearch-cdm-1godmszn-2-5769cf-9ms2n pod/elasticsearch-cdm-1godmszn-3-f66f7d-zqkz7
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Get the status of the indices:
oc exec elasticsearch-cdm-4vjor49p-2-6d4d7db474-q2w7z -- indices
$ oc exec elasticsearch-cdm-4vjor49p-2-6d4d7db474-q2w7z -- indices
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- Log store pods
You can view the status of the pods that host the log store.
Get the name of a pod:
oc get pods --selector component=elasticsearch -o name
$ oc get pods --selector component=elasticsearch -o name
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
pod/elasticsearch-cdm-1godmszn-1-6f8495-vp4lw pod/elasticsearch-cdm-1godmszn-2-5769cf-9ms2n pod/elasticsearch-cdm-1godmszn-3-f66f7d-zqkz7
pod/elasticsearch-cdm-1godmszn-1-6f8495-vp4lw pod/elasticsearch-cdm-1godmszn-2-5769cf-9ms2n pod/elasticsearch-cdm-1godmszn-3-f66f7d-zqkz7
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Get the status of a pod:
oc describe pod elasticsearch-cdm-1godmszn-1-6f8495-vp4lw
$ oc describe pod elasticsearch-cdm-1godmszn-1-6f8495-vp4lw
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The output includes the following status information:
Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- Log storage pod deployment configuration
You can view the status of the log store deployment configuration.
Get the name of a deployment configuration:
oc get deployment --selector component=elasticsearch -o name
$ oc get deployment --selector component=elasticsearch -o name
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
deployment.extensions/elasticsearch-cdm-1gon-1 deployment.extensions/elasticsearch-cdm-1gon-2 deployment.extensions/elasticsearch-cdm-1gon-3
deployment.extensions/elasticsearch-cdm-1gon-1 deployment.extensions/elasticsearch-cdm-1gon-2 deployment.extensions/elasticsearch-cdm-1gon-3
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Get the deployment configuration status:
oc describe deployment elasticsearch-cdm-1gon-1
$ oc describe deployment elasticsearch-cdm-1gon-1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The output includes the following status information:
Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- Log store replica set
You can view the status of the log store replica set.
Get the name of a replica set:
oc get replicaSet --selector component=elasticsearch -o name
$ oc get replicaSet --selector component=elasticsearch -o name replicaset.extensions/elasticsearch-cdm-1gon-1-6f8495 replicaset.extensions/elasticsearch-cdm-1gon-2-5769cf replicaset.extensions/elasticsearch-cdm-1gon-3-f66f7d
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Get the status of the replica set:
oc describe replicaSet elasticsearch-cdm-1gon-1-6f8495
$ oc describe replicaSet elasticsearch-cdm-1gon-1-6f8495
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The output includes the following status information:
Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow