12.2. 로그 저장소의 상태 보기
OpenShift Elasticsearch Operator 및 여러 Elasticsearch 구성 요소의 상태를 볼 수 있습니다.
12.2.1. 로그 저장소의 상태 보기
로그 저장소의 상태를 볼 수 있습니다.
사전 요구 사항
- OpenShift Logging 및 Elasticsearch가 설치되어 있어야 합니다.
프로세스
openshift-logging
프로젝트로 변경합니다.$ oc project openshift-logging
상태를 보려면 다음을 수행합니다.
로그 저장소 인스턴스의 이름을 가져옵니다.
$ oc get Elasticsearch
출력 예
NAME AGE elasticsearch 5h9m
로그 저장소 상태를 가져옵니다.
$ 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
- 출력에서 클러스터 상태 필드가
상태
스탠자에 나타납니다. - 2
- 로그 저장소의 상태:
- 활성 기본 shard 수입니다.
- 활성 shard 수입니다.
- 초기화 중인 shard 수입니다.
- 로그 저장소 데이터 노드 수입니다.
- 총 로그 저장소 노드 수입니다.
- 보류 중인 작업 수입니다.
-
로그 저장소 상태는
녹색
,빨간색
,노란색
입니다. - 할당되지 않은 shard 수
- 3
- 존재하는 경우 모든 상태 조건. 로그 저장소 상태는 Pod를 배치할 수 없는 경우 스케줄러의 사유를 나타냅니다. 다음 조건과 관련된 모든 이벤트가 표시됩니다.
- 컨테이너 로그 저장소 및 프록시 컨테이너를 기다리는 중입니다.
- 컨테이너 로그 저장소 및 프록시 컨테이너 모두에 대해 종료되었습니다.
- Pod 예약 불가. 또한 여러 가지 문제에 대한 조건이 표시됩니다(조건 메시지 예 참조).
- 4
upgradeStatus
가 있는 클러스터의 로그 저장소 노드.- 5
- 'failed`,
notReady
또는ready
상태 아래에 나열된 클러스터의 로그를 저장 클라이언트, 데이터 및 마스터 Pod.
12.2.1.1. 상태 메시지 예
다음은 Elasticsearch 인스턴스의 상태
섹션에 있는 일부 조건 메시지의 예입니다.
다음 상태 메시지는 노드가 구성된 낮은 워터마크를 초과했으며 이 노드에 shard가 할당되지 않음을 나타냅니다.
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: {}
다음 상태 메시지는 노드가 구성된 높은 워터마크를 초과했으며 shard가 다른 노드로 재배치됨을 나타냅니다.
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의 로그 저장소 노드 선택기가 클러스터의 노드와 일치하지 않음을 나타냅니다.
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
다음 상태 메시지는 로그 저장소 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
다음 상태 메시지는 로그 저장소 클러스터에 중복 정책을 지원하기에 충분한 노드가 없음을 나타냅니다.
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
다음 상태 메시지는 Elasticsearch 스토리지가 변경 작업을 지원하지 않음을 나타냅니다.
예를 들면 다음과 같습니다.
status: clusterHealth: green conditions: - lastTransitionTime: "2021-05-07T01:05:13Z" message: Changing the storage structure for a custom resource is not supported reason: StorageStructureChangeIgnored status: 'True' type: StorageStructureChangeIgnored
reason
및 type
필드는 지원되지 않는 변경 유형을 지정합니다.
StorageClassNameChangeIgnored
- 스토리지 클래스 이름에 대한 지원되지 않는 변경 사항입니다.
StorageSizeChangeIgnored
- 스토리지 크기에 대한 지원되지 않는 변경 사항입니다.
StorageStructureChangeIgnored
임시 스토리지 구조와 영구저장장치 구조 간에는 지원되지 않는 변경 사항입니다.
중요임시 스토리지에서 영구 스토리지로 전환하도록
ClusterLogging
사용자 정의 리소스(CR)를 구성하려는 경우 OpenShift Elasticsearch Operator는 PVC(영구 볼륨 클레임)를 생성하지만 PV(영구 볼륨)를 생성하지 않습니다.StorageStructureChangeIgnored
상태를 지우려면ClusterLogging
CR로 변경 사항을 취소하고 PVC를 삭제해야 합니다.