第7章 Elasticsearch ステータスの表示
Elasticsearch Operator のステータスや、数多くの Elasticsearch コンポーネントを表示できます。
7.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 clusterHealth: green2 conditions:3 ..... nodes:4 ..... pods:5 ..... shardAllocationEnabled: "All"6 - 1
- 出力の
statusスタンザに、クラスターステータスのフィールドが表示されます。 - 2
- Elasticsearch クラスターのステータス (
green、red、yellow)。 - 3
- ステータスの状況 (ある場合)。Elasticsearch クラスターのステータスは、Pod が配置されていない場合にスケジューラーからの理由を示します。以下の状況に関連したイベントが表示されます。
- Elasticsearch およびプロキシーコンテナーの両方についてコンテナーが待機中である。
- Elasticsearch およびプロキシーコンテナーの両方についてコンテナーが終了している。
- Pod がスケジュール対象外である。さらに多数の問題についての状況が表示されます。詳細は、状況メッセージのサンプル を参照してください。
- 4
upgradeStatusのクラスター内の Elasticsearch ノード。- 5
- 'failed`、
notReadyまたはready状態で一覧表示される、クラスターの Elasticsearch クライアント、データおよびマスター Pod。
7.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