본문 바로가기
WIKI 기술 지식 베이스

Remote Store Stats API

원문 보기 위키 갱신

출처: 문서

본문

Remote Store Stats API

2.8에 도입됨 {: .label .label-purple }

Remote Store Stats API를 사용하면 샤드 수준의 원격 백업 스토리지(remote-backed storage) 성능을 모니터링할 수 있어요.

이 API에서 반환되는 지표는 원격 백업 노드에 저장된 인덱스와만 관련이 있어요. 노드 또는 클러스터 수준에서 인덱스에 대한 집계된 결과가 필요하다면 Index Stats, Nodes Stats, 또는 Cluster Stats API를 사용하세요.

엔드포인트

GET _remotestore/stats/{index_name}
GET _remotestore/stats/{index_name}/{shard_id}

경로 파라미터

다음 표는 사용 가능한 경로 파라미터를 보여줘요. 모든 경로 파라미터는 선택 사항이에요.

파라미터 타입 설명
index_name String 인덱스 이름 또는 인덱스 패턴이에요.
shard_id String 샤드 ID예요.

인덱스의 원격 스토어 통계

다음 API를 사용하면 인덱스의 모든 샤드에 대한 원격 스토어 통계를 가져올 수 있어요.

요청 예시

GET _remotestore/stats/{index_name}

{% include copy-curl.html %}

응답 예시

응답 {: .text-delta }
{
    "_shards": {
        "total": 4,
        "successful": 4,
        "failed": 0
    },
    "indices": {
        "remote-index": {
            "shards": {
                "0": [{
                        "routing": {
                            "state": "STARTED",
                            "primary": true,
                            "node": "q1VxWZnCTICrfRc2bRW3nw"
                        },
                        "segment": {
                            "download": {},
                            "upload": {
                                "local_refresh_timestamp_in_millis": 1694171634102,
                                "remote_refresh_timestamp_in_millis": 1694171634102,
                                "refresh_time_lag_in_millis": 0,
                                "refresh_lag": 0,
                                "bytes_lag": 0,
                                "backpressure_rejection_count": 0,
                                "consecutive_failure_count": 0,
                                "total_uploads": {
                                    "started": 5,
                                    "succeeded": 5,
                                    "failed": 0
                                },
                                "total_upload_size": {
                                    "started_bytes": 15342,
                                    "succeeded_bytes": 15342,
                                    "failed_bytes": 0
                                },
                                "remote_refresh_size_in_bytes": {
                                    "last_successful": 0,
                                    "moving_avg": 3068.4
                                },
                                "upload_speed_in_bytes_per_sec": {
                                    "moving_avg": 99988.2
                                },
                                "remote_refresh_latency_in_millis": {
                                    "moving_avg": 44.0
                                }
                            }
                        },
                        "translog": {
                            "upload": {
                                "last_successful_upload_timestamp": 1694171633644,
                                "total_uploads": {
                                    "started": 6,
                                    "failed": 0,
                                    "succeeded": 6
                                },
                                "total_upload_size": {
                                    "started_bytes": 1932,
                                    "failed_bytes": 0,
                                    "succeeded_bytes": 1932
                                },
                                "total_upload_time_in_millis": 21478,
                                "upload_size_in_bytes": {
                                    "moving_avg": 322.0
                                },
                                "upload_speed_in_bytes_per_sec": {
                                    "moving_avg": 2073.8333333333335
                                },
                                "upload_time_in_millis": {
                                    "moving_avg": 3579.6666666666665
                                }
                            },
                            "download": {}
                        }
                    },
                    {
                        "routing": {
                            "state": "STARTED",
                            "primary": false,
                            "node": "EZuen5Y5Sv-eDCLwh9gv-Q"
                        },
                        "segment": {
                            "download": {
                                "last_sync_timestamp": 1694171634148,
                                "total_download_size": {
                                    "started_bytes": 15112,
                                    "succeeded_bytes": 15112,
                                    "failed_bytes": 0
                                },
                                "download_size_in_bytes": {
                                    "last_successful": 2910,
                                    "moving_avg": 1259.3333333333333
                                },
                                "download_speed_in_bytes_per_sec": {
                                    "moving_avg": 382387.3333333333
                                }
                            },
                            "upload": {}
                        },
                        "translog": {
                            "upload": {},
                            "download": {}
                        }
                    }
                ],
                "1": [{
                        "routing": {
                            "state": "STARTED",
                            "primary": false,
                            "node": "q1VxWZnCTICrfRc2bRW3nw"
                        },
                        "segment": {
                            "download": {
                                "last_sync_timestamp": 1694171633181,
                                "total_download_size": {
                                    "started_bytes": 18978,
                                    "succeeded_bytes": 18978,
                                    "failed_bytes": 0
                                },
                                "download_size_in_bytes": {
                                    "last_successful": 325,
                                    "moving_avg": 1265.2
                                },
                                "download_speed_in_bytes_per_sec": {
                                    "moving_avg": 456047.6666666667
                                }
                            },
                            "upload": {}
                        },
                        "translog": {
                            "upload": {},
                            "download": {}
                        }
                    },
                    {
                        "routing": {
                            "state": "STARTED",
                            "primary": true,
                            "node": "EZuen5Y5Sv-eDCLwh9gv-Q"
                        },
                        "segment": {
                            "download": {},
                            "upload": {
                                "local_refresh_timestamp_in_millis": 1694171633122,
                                "remote_refresh_timestamp_in_millis": 1694171633122,
                                "refresh_time_lag_in_millis": 0,
                                "refresh_lag": 0,
                                "bytes_lag": 0,
                                "backpressure_rejection_count": 0,
                                "consecutive_failure_count": 0,
                                "total_uploads": {
                                    "started": 6,
                                    "succeeded": 6,
                                    "failed": 0
                                },
                                "total_upload_size": {
                                    "started_bytes": 19208,
                                    "succeeded_bytes": 19208,
                                    "failed_bytes": 0
                                },
                                "remote_refresh_size_in_bytes": {
                                    "last_successful": 0,
                                    "moving_avg": 3201.3333333333335
                                },
                                "upload_speed_in_bytes_per_sec": {
                                    "moving_avg": 109612.0
                                },
                                "remote_refresh_latency_in_millis": {
                                    "moving_avg": 25.333333333333332
                                }
                            }
                        },
                        "translog": {
                            "upload": {
                                "last_successful_upload_timestamp": 1694171633106,
                                "total_uploads": {
                                    "started": 7,
                                    "failed": 0,
                                    "succeeded": 7
                                },
                                "total_upload_size": {
                                    "started_bytes": 2405,
                                    "failed_bytes": 0,
                                    "succeeded_bytes": 2405
                                },
                                "total_upload_time_in_millis": 27748,
                                "upload_size_in_bytes": {
                                    "moving_avg": 343.57142857142856
                                },
                                "upload_speed_in_bytes_per_sec": {
                                    "moving_avg": 1445.857142857143
                                },
                                "upload_time_in_millis": {
                                    "moving_avg": 3964.0
                                }
                            },
                            "download": {}
                        }
                    }
                ]
            }
        }
    }
}

응답 본문 필드

Remote Store Stats API의 응답 본문은 세 가지 카테고리로 나뉘어요:

  • routing : 샤드의 라우팅에 관한 정보를 담고 있어요
  • segment : 원격 백업 스토리지에서의 세그먼트 전송에 관한 통계를 담고 있어요
  • translog : 원격 백업 스토리지에서의 트랜스로그 전송에 관한 통계를 담고 있어요

routing

routing 객체는 다음 필드를 포함해요.

필드 설명
primary 해당 샤드 복사본이 프라이머리 샤드인지 여부를 나타내요.
node 샤드가 할당된 노드의 이름이에요.

segment

segment.upload 객체는 다음 필드를 포함해요.

필드 설명
local_refresh_timestamp_in_millis 마지막으로 성공한 로컬 리프레시의 타임스탬프(밀리초 단위)예요.
remote_refresh_timestamp_in_millis 마지막으로 성공한 원격 리프레시의 타임스탬프(밀리초 단위)예요.
refresh_time_lag_in_millis 원격 리프레시가 로컬 리프레시보다 뒤처진 시간(밀리초 단위)이에요.
refresh_lag 원격 스토어가 로컬 스토어보다 뒤처진 리프레시 횟수예요.
bytes_lag 원격 스토어와 로컬 스토어 간의 지연 크기(바이트 단위)예요.
backpressure_rejection_count 원격 스토어의 백프레셔로 인해 발생한 쓰기 거부의 총 횟수예요.
consecutive_failure_count 마지막으로 성공한 리프레시 이후 연속해서 원격 리프레시가 실패한 횟수예요.
total_remote_refresh 원격 리프레시의 총 횟수예요.
total_uploads_in_bytes 원격 스토어로 업로드된 전체 데이터의 바이트 수예요.
remote_refresh_size_in_bytes.last_successful 마지막으로 성공한 리프레시에서 업로드된 데이터의 크기예요.
remote_refresh_size_in_bytes.moving_avg 최근 N번의 리프레시에서 업로드된 데이터의 평균 크기(바이트 단위)예요. N은 remote_store.moving_average_window_size 설정으로 정의돼요. 자세한 정보는 Remote segment backpressure를 참조하세요.
upload_latency_in_bytes_per_sec.moving_avg 최근 N번의 업로드에서 원격 세그먼트 업로드의 평균 속도(초당 바이트)예요. N은 remote_store.moving_average_window_size 설정으로 정의돼요. 자세한 정보는 Remote segment backpressure를 참조하세요.
remote_refresh_latency_in_millis.moving_avg 최근 N번의 원격 리프레시에서 단일 원격 리프레시에 걸린 평균 시간(밀리초 단위)이에요. N은 remote_store.moving_average_window_size 설정으로 정의돼요. 자세한 정보는 Remote segment backpressure를 참조하세요.

segment.download 객체는 다음 필드를 포함해요.

필드 설명
last_sync_timestamp 원격 백업 스토리지에서 마지막으로 세그먼트 파일 다운로드에 성공한 시점의 타임스탬프(밀리초 단위)예요.
total_download_size.started_bytes 현재 원격 백업 스토리지에서 다운로드 중인 세그먼트 파일의 총 바이트 수예요.
total_download_size.succeeded_bytes 원격 백업 스토리지에서 성공적으로 다운로드한 세그먼트 파일의 총 바이트 수예요.
total_download_size.failed_bytes 원격 백업 스토리지에서 다운로드에 실패한 세그먼트 파일의 총 바이트 수예요.
download_size_in_bytes.last_successful 원격 백업 스토리지에서 마지막으로 성공적으로 다운로드한 세그먼트 파일의 크기(바이트 단위)예요.
download_size_in_bytes.moving_avg 최근 20번의 다운로드에서 다운로드된 세그먼트 데이터의 평균 크기(바이트 단위)예요.
download_speed_in_bytes_per_sec.moving_avg 최근 20번의 다운로드의 평균 다운로드 속도(초당 바이트)예요.

translog

translog.upload 객체는 다음 필드를 포함해요.

필드 설명
last_successful_upload_timestamp 마지막으로 트랜스로그 파일이 원격 백업 스토리지에 성공적으로 업로드된 시점의 타임스탬프(밀리초 단위)예요.
total_uploads.started 원격 백업 스토리지로 시도된 트랜스로그 업로드 동기화의 총 횟수예요.
total_uploads.failed 원격 백업 스토리지로 실패한 트랜스로그 업로드 동기화의 총 횟수예요.
total_uploads.succeeded 원격 백업 스토리지로 성공한 트랜스로그 업로드 동기화의 총 횟수예요.
total_upload_size.started_bytes 현재 원격 백업 스토리지에서 다운로드 중인 트랜스로그 파일의 총 바이트 수예요.
total_upload_size.succeeded_bytes 원격 백업 스토리지에 성공적으로 업로드된 트랜스로그 파일의 총 바이트 수예요.
total_upload_size.failed_bytes 원격 백업 스토리지에 업로드하지 못한 트랜스로그 파일의 총 바이트 수예요.
total_upload_time_in_millis 트랜스로그 파일을 원격 백업 스토리지에 업로드하는 데 소요된 총 시간(밀리초 단위)이에요.
upload_size_in_bytes.moving_avg 최근 N번의 다운로드에서 업로드된 트랜스로그 데이터의 평균 크기(바이트 단위)예요. N은 remote_store.moving_average_window_size 설정으로 정의돼요.
upload_speed_in_bytes_per_sec.moving_avg 최근 N번의 업로드에서 트랜스로그 업로드의 평균 속도(초당 바이트)예요. N은 remote_store.moving_average_window_size 설정으로 정의돼요.
upload_time_in_millis.moving_avg 최근 N번의 업로드에서 단일 트랜스로그 업로드에 걸린 평균 시간(밀리초 단위)이에요. N은 remote_store.moving_average_window_size 설정으로 정의돼요.

translog.download 객체는 다음 필드를 포함해요.

필드 설명
last_successful_download_timestamp 마지막으로 트랜스로그 파일이 원격 백업 스토리지에 성공적으로 업로드된 시점의 타임스탬프(밀리초 단위)예요.
total_downloads.succeeded 원격 백업 스토리지에서 성공한 트랜스로그 다운로드 동기화의 총 횟수예요.
total_download_size.succeeded_bytes 원격 백업 스토리지에서 성공적으로 업로드된 트랜스로그 파일의 총 바이트 수예요.
total_download_time_in_millis 트랜스로그 파일을 원격 백업 스토리지에서 다운로드하는 데 소요된 총 시간(밀리초 단위)이에요.
download_size_in_bytes.moving_avg 최근 N번의 다운로드에서 다운로드된 트랜스로그 데이터의 평균 크기(바이트 단위)예요. N은 remote_store.moving_average_window_size 설정으로 정의돼요.
download_speed_in_bytes_per_sec.moving_avg 최근 N번의 업로드에서 트랜스로그 다운로드의 평균 속도(초당 바이트)예요. N은 remote_store.moving_average_window_size 설정으로 정의돼요.
download_time_in_millis.moving_avg 최근 N번의 업로드에서 단일 트랜스로그 다운로드에 걸린 평균 시간(밀리초 단위)이에요. N은 remote_store.moving_average_window_size 설정으로 정의돼요.

단일 샤드의 원격 스토어 통계

다음 API를 사용하면 단일 샤드에 대한 원격 스토어 통계를 가져올 수 있어요.

요청 예시

GET _remotestore/stats/{index_name}/{shard_id}

{% include copy-curl.html %}

응답 예시

응답 {: .text-delta }
{
    "_shards": {
        "total": 2,
        "successful": 2,
        "failed": 0
    },
    "indices": {
        "remote-index": {
            "shards": {
                "0": [
                    {
                        "routing": {
                            "state": "STARTED",
                            "primary": true,
                            "node": "q1VxWZnCTICrfRc2bRW3nw"
                        },
                        "segment": {
                            "download": {},
                            "upload": {
                                "local_refresh_timestamp_in_millis": 1694171634102,
                                "remote_refresh_timestamp_in_millis": 1694171634102,
                                "refresh_time_lag_in_millis": 0,
                                "refresh_lag": 0,
                                "bytes_lag": 0,
                                "backpressure_rejection_count": 0,
                                "consecutive_failure_count": 0,
                                "total_uploads": {
                                    "started": 5,
                                    "succeeded": 5,
                                    "failed": 0
                                },
                                "total_upload_size": {
                                    "started_bytes": 15342,
                                    "succeeded_bytes": 15342,
                                    "failed_bytes": 0
                                },
                                "remote_refresh_size_in_bytes": {
                                    "last_successful": 0,
                                    "moving_avg": 3068.4
                                },
                                "upload_speed_in_bytes_per_sec": {
                                    "moving_avg": 99988.2
                                },
                                "remote_refresh_latency_in_millis": {
                                    "moving_avg": 44.0
                                }
                            }
                        },
                        "translog": {
                            "upload": {
                                "last_successful_upload_timestamp": 1694171633644,
                                "total_uploads": {
                                    "started": 6,
                                    "failed": 0,
                                    "succeeded": 6
                                },
                                "total_upload_size": {
                                    "started_bytes": 1932,
                                    "failed_bytes": 0,
                                    "succeeded_bytes": 1932
                                },
                                "total_upload_time_in_millis": 21478,
                                "upload_size_in_bytes": {
                                    "moving_avg": 322.0
                                },
                                "upload_speed_in_bytes_per_sec": {
                                    "moving_avg": 2073.8333333333335
                                },
                                "upload_time_in_millis": {
                                    "moving_avg": 3579.6666666666665
                                }
                            },
                            "download": {}
                        }
                    },
                    {
                        "routing": {
                            "state": "STARTED",
                            "primary": false,
                            "node": "EZuen5Y5Sv-eDCLwh9gv-Q"
                        },
                        "segment": {
                            "download": {
                                "last_sync_timestamp": 1694171634148,
                                "total_download_size": {
                                    "started_bytes": 15112,
                                    "succeeded_bytes": 15112,
                                    "failed_bytes": 0
                                },
                                "download_size_in_bytes": {
                                    "last_successful": 2910,
                                    "moving_avg": 1259.3333333333333
                                },
                                "download_speed_in_bytes_per_sec": {
                                    "moving_avg": 382387.3333333333
                                }
                            },
                            "upload": {}
                        },
                        "translog": {
                            "upload": {},
                            "download": {}
                        }
                    }
                ]
            }
        }
    }
}

로컬 샤드의 원격 스토어 통계

Remote Store Stats API 요청을 처리하는 노드에 있는 샤드만 가져오려면 다음 요청 예시와 같이 local 쿼리 파라미터를 true로 설정하세요:

GET _remotestore/stats/{index_name}?local=true

{% include copy-curl.html %}

더 알아보기 (Learn more)