[ElasticSearch] 상태 모니터링 API

Woong·2022년 8월 12일
0

ElasticSearch

목록 보기
5/21

공통

  • Security 활성화된 경우 monitormanager 권한 필요

cluster state

  • 클러스터 내부 상태에 대해 조회하는 API (디버깅용)
    • node id, 속성
    • 클러스터 세팅
    • 각 인덱스별 세팅 (mapping 등)
    • 모든 shard 의 위치와 상태 정보

GET /_cluster/state/<metrics>/<target>

nodes : 클러스터 노드 정보 조회

  • 전체 혹은 특정 node의 정보를 조회하는 API
GET /_nodes
GET /_nodes/<node_id>
GET /_nodes/<metric>
GET /_nodes/<node_id>/<metric>
  • cat API
    GET /_cat/nodes

  • ex) GET /_cat/nodes?h=ip,pid,heap.current,heap.max,cpu,load_1m,flush.total&v=true

  • metric 목록
    • aggregations : 가능한 aggregation 타입 정보
    • http : 노드의 HTTP 인터페이스 정보
    • indices 인덱싱과 관련된 노드 수준 구성
      • total_indexing_buffer: 이 노드에 있는 인덱싱 버퍼의 최대 크기입니다.
    • ingest : 수집 파이프라인 및 프로세서에 대한 정보입니다.
    • jvm : JVM 정보
    • os : 운영 체제 정보.
    • plugins : 설치된 플러그인 및 모듈 세부 정보입니다.
      • name: 플러그인 이름
      • version: 플러그인이 빌드된 Elasticsearch의 버전
      • description: 플러그인의 목적에 대한 간략한 설명
      • classname: 플러그인 진입점의 정규화된 클래스 이름
      • has_native_controller: 플러그인에 native controller 프로세스가 있는지 여부
    • process : PID 등 프로세스 정보
    • settings : elasticsearch.yml 에 정의된 모든 노드 설정 정보
    • thread_pool : 각 스레드 풀의 구성 정보
    • transport : 노드의 transport interface 정보

nodes stats

  • 클러스터 노드 통계 정보 조회 API
GET /_nodes/stats
GET /_nodes/<node_id>/stats
GET /_nodes/stats/<metric>
GET /_nodes/<node_id>/stats/<metric>
GET /_nodes/stats/<metric>/<index_metric>
GET /_nodes/<node_id>/stats/<metric>/<index_metric>

pending tasks

  • 아직 실행되지 않고 큐에 쌓인 태스크 조회 API
    • index 생성, mapping 업데이트, 샤드 할당/실패 등 클러스터 레벨 변화
    • security 가 활성화되어있을 경우 권한 monitormanage 권한이 필요

GET /_cluster/pending_tasks

  • cat API 의 경우, 사람 혹은 Kibana 콘솔을 위한 API이며 애플리케이션을 위한 API 는 아님
    • 애플리케이션의 경우 위의 API 를 사용 권장
      GET /_cat/pending_tasks

reference

0개의 댓글