플러그인 모니터링 - Personalize

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

플러그인 모니터링

OpenSearch 서비스를 사용하는 경우 Amazon의 지표를 통해 플러그인을 모니터링할 수 CloudWatch 있습니다. 자세한 내용은 Amazon OpenSearch 서비스 도메인 모니터링을 참조하십시오.

Amazon Personalize Search Ranking 플러그인을 OpenSearch 쿼리에 적용할 때 검색 파이프라인에 대한 지표를 가져와서 플러그인을 모니터링할 수 있습니다. 파이프라인 지표에는 personalized_search_ranking응답 프로세서에 대한 실패한 요청 수와 같은 통계가 포함됩니다.

Amazon OpenSearch 서비스를 통한 플러그인 모니터링

다음 Python 코드를 사용하면 모든 파이프라인에 대한 지표를 가져올 수 있습니다. 파이프라인 지표의 예는 파이프라인 지표 예제단원을 참조하세요.

import requests from requests_auth_aws_sigv4 import AWSSigV4 domain_endpoint = 'domain endpoint' url = f'{domain_endpoint}/_nodes/stats/search_pipeline' auth = AWSSigV4('es') headers = {'Content-Type': 'application/json'} try: response = requests.get(url, auth=auth, headers=headers, verify=False) print(response.text) except Exception as e: print(f"Error: {e}")

오픈 소스로 플러그인 모니터링 OpenSearch

다음 코드를 사용하면 모든 파이프라인에 대한 지표를 가져올 수 있습니다. 응답에 모든 검색 파이프라인에 대한 통계가 포함됩니다. 파이프라인 지표의 예는 파이프라인 지표 예제단원을 참조하세요.

curl -XGET "https://localhost:9200/_nodes/stats/search_pipeline?pretty" -ku 'admin:admin'

파이프라인 지표 예제

다음 코드는 에서 반환된 파이프라인 지표를 발췌한 것입니다. OpenSearch 여기에는 서로 다른 두 파이프라인에 대한 통계가 포함된 pipelines객체만 표시됩니다. personalized_search_ranking 응답 프로세서 목록에서 각 파이프라인에 대해 Personalize 검색 순위 플러그인 지표를 찾아볼 수 있습니다. 모든 지표의 전체 예는 검색 파이프라인 지표 단원을 참조하세요.

{ .... .... "pipelines": { "pipelineA": { "request": { "count": 0, "time_in_millis": 0, "current": 0, "failed": 0 }, "response": { "count": 6, "time_in_millis": 2246, "current": 0, "failed": 0 }, "request_processors": [], "response_processors": [ { personalized_search_ranking": { "type": "personalized_search_ranking", "stats": { "count": <number of requests>, "time_in_millis": <time>, "current": 0, "failed": <number of failed requests> } } } ] }, "pipelineB": { "request": { "count": 0, "time_in_millis": 0, "current": 0, "failed": 0 }, "response": { "count": 8, "time_in_millis": 2248, "current": 0, "failed": 0 }, "request_processors": [], "response_processors": [ { "personalized_search_ranking": { "type": "personalized_search_ranking", "stats": { "count": <number of requests>, "time_in_millis": <time>, "current": 0, "failed": <number of failed requests> } } } ] } } .... .... }