第8章 Elasticsearch ステータスの表示
Elasticsearch Operator のステータスや、数多くの Elasticsearch コンポーネントを表示できます。
8.1. Elasticsearch ステータスの表示 リンクのコピーリンクがクリップボードにコピーされました!
Elasticsearch クラスターのステータスを表示することができます。
前提条件
- クラスターロギングおよび Elasticsearch がインストールされている必要があります。
手順
openshift-loggingプロジェクトに切り替えます。$ oc project openshift-loggingElasticsearch クラスターのステータスを表示するには、以下を実行します。
Elasticsearch インスタンスの名前を取得します。
$ oc get Elasticsearch NAME AGE elasticsearch 5h9mElasticsearch のステータスを取得します。
$ oc get Elasticsearch <Elasticsearch-instance> -o yaml以下は例になります。
$ oc get Elasticsearch elasticsearch -n openshift-logging -o yaml出力には、以下のような情報が含まれます。
status:1 cluster:2 activePrimaryShards: 30 activeShards: 60 initializingShards: 0 numDataNodes: 3 numNodes: 3 pendingTasks: 0 relocatingShards: 0 status: green unassignedShards: 0 clusterHealth: "" conditions: []3 nodes:4 - deploymentName: elasticsearch-cdm-zjf34ved-1 upgradeStatus: {} - deploymentName: elasticsearch-cdm-zjf34ved-2 upgradeStatus: {} - deploymentName: elasticsearch-cdm-zjf34ved-3 upgradeStatus: {} pods:5 client: failed: [] notReady: [] ready: - elasticsearch-cdm-zjf34ved-1-6d7fbf844f-sn422 - elasticsearch-cdm-zjf34ved-2-dfbd988bc-qkzjz - elasticsearch-cdm-zjf34ved-3-c8f566f7c-t7zkt data: failed: [] notReady: [] ready: - elasticsearch-cdm-zjf34ved-1-6d7fbf844f-sn422 - elasticsearch-cdm-zjf34ved-2-dfbd988bc-qkzjz - elasticsearch-cdm-zjf34ved-3-c8f566f7c-t7zkt master: failed: [] notReady: [] ready: - elasticsearch-cdm-zjf34ved-1-6d7fbf844f-sn422 - elasticsearch-cdm-zjf34ved-2-dfbd988bc-qkzjz - elasticsearch-cdm-zjf34ved-3-c8f566f7c-t7zkt shardAllocationEnabled: all- 1
- 出力の
statusスタンザに、クラスターステータスのフィールドが表示されます。 - 2
- Elasticsearch クラスターのステータス:
- アクティブなプライマリーシャードの数
- アクティブなシャードの数
- 初期化されるシャードの数
- Elasticsearch データノードの数
- Elasticsearch ノードの合計数
- 保留中のタスクの数
-
Elasticsearch のステータス:
green、red、yellow - 未割り当てのシャードの数
- 3
- ステータスの状況 (ある場合)。Elasticsearch クラスターのステータスは、Pod が配置されていない場合にスケジューラーからの理由を示します。以下の状況に関連したイベントが表示されます。
- Elasticsearch およびプロキシーコンテナーの両方についてコンテナーが待機中。
- Elasticsearch およびプロキシーコンテナーの両方についてコンテナーが終了している。
- Pod がスケジュール対象外である。さらに多数の問題についての状況が表示されます。詳細は、状況メッセージのサンプル を参照してください。
- 4
upgradeStatusのクラスター内の Elasticsearch ノード。- 5
- 'failed`、
notReadyまたはready状態で一覧表示される、クラスターの Elasticsearch クライアント、データおよびマスター Pod。
8.1.1. 状況メッセージのサンプル リンクのコピーリンクがクリップボードにコピーされました!
以下は、Elasticsearch インスタンスの Status セクションからの一部の状態メッセージの例になります。
このステータスメッセージは、ノードが設定された低基準値を超えており、シャードがこのノードに割り当てられないことを示します。
status:
nodes:
- conditions:
- lastTransitionTime: 2019-03-15T15:57:22Z
message: Disk storage usage for node is 27.5gb (36.74%). Shards will be not
be allocated on this node.
reason: Disk Watermark Low
status: "True"
type: NodeStorage
deploymentName: example-elasticsearch-cdm-0-1
upgradeStatus: {}
このステータスメッセージは、ノードが設定された高基準値を超えており、シャードが他のノードに移動させられることを示します。
status:
nodes:
- conditions:
- lastTransitionTime: 2019-03-15T16:04:45Z
message: Disk storage usage for node is 27.5gb (36.74%). Shards will be relocated
from this node.
reason: Disk Watermark High
status: "True"
type: NodeStorage
deploymentName: example-elasticsearch-cdm-0-1
upgradeStatus: {}
このステータスメッセージは、CR の Elasticsearch ノードセレクターがクラスターのいずれのノードにも一致しないことを示します。
status:
nodes:
- conditions:
- lastTransitionTime: 2019-04-10T02:26:24Z
message: '0/8 nodes are available: 8 node(s) didn''t match node selector.'
reason: Unschedulable
status: "True"
type: Unschedulable
このステータスメッセージは、Elasticsearch CR が存在しない PVC を使用することを示します。
status:
nodes:
- conditions:
- last Transition Time: 2019-04-10T05:55:51Z
message: pod has unbound immediate PersistentVolumeClaims (repeated 5 times)
reason: Unschedulable
status: True
type: Unschedulable
このステータスメッセージは、Elasticsearch クラスターには Elasticsearch の冗長性ポリシーをサポートするための十分なノードがないことを示します。
status:
clusterHealth: ""
conditions:
- lastTransitionTime: 2019-04-17T20:01:31Z
message: Wrong RedundancyPolicy selected. Choose different RedundancyPolicy or
add more nodes with data roles
reason: Invalid Settings
status: "True"
type: InvalidRedundancy
このステータスメッセージは、クラスター内のマスターノードの数が多過ぎることを示します。
status:
clusterHealth: green
conditions:
- lastTransitionTime: '2019-04-17T20:12:34Z'
message: >-
Invalid master nodes count. Please ensure there are no more than 3 total
nodes with master roles
reason: Invalid Settings
status: 'True'
type: InvalidMasters