• EnglishEspañol日本語한국어Português
  • 로그인지금 시작하기

사용자의 편의를 위해 제공되는 기계 번역입니다.

In the event of any inconsistency between the English version and the translated version, the English versionwill take priority. Please visit this page for more information.

문제 신고

Ray 통합

Ray 통합은 Ray의 성능을 모니터링하여 Ray 클러스터, 데이터 전처리, 분산 훈련, 하이퍼파라미터 튜닝, 강화 학습, 모델 제공 및 Python 애플리케이션 확장과 같은 ML 작업을 진단하고 최적화하는 데 도움을 줍니다. Ray 통합은 인프라 에이전트를 사용하고 NRI-Prometheus는 가장 중요한 Ray 메트릭이 포함된 사전 구축된 대시보드를 제공합니다.

New Relic과의 통합을 설정한 후 즉시 사용 가능한 것과 같은 대시보드에서 데이터를 확인하십시오.

인프라 에이전트 설치

Ray 통합을 사용하려면 먼저 동일한 호스트에 인프라 에이전트를 설치 해야 합니다. 클러스터 에이전트는 호스트 자체를 모니터링하고, Ray 통합은 Ray 클러스터 관련 데이터로 모니터링을 확장합니다.

Prometheus 통합 설치

  1. Prometheus 다운로드 페이지 에서 최신 Prometheus 릴리스를 다운로드하세요. 귀하의 운영 시스템에 적합한 버전을 선택하세요. Linux의 경우 linux-amd64 버전을 선택할 가능성이 높습니다. tarball(.tar.gz 파일)에 대한 다운로드 링크를 복사합니다.

  2. Prometheus가 다운로드되면 다운로드 tar 파일을 추출합니다.

    bash
    $
    tar -xvzf <filename.tar.gz>
  3. 추출된 Prometheus 폴더로 이동하고 아래 명령을 실행하여 Prometheus 서비스를 시작합니다.

    bash
    $
    cd /DOWNLOADED-FOLDER/
    bash
    $
    ./prometheus --config.file=/tmp/ray/session_latest/metrics/prometheus/prometheus.yml
  4. Prometheus가 시작되면 포트 9090에서 작동합니다. Prometheus 웹 인터페이스로 이동하여 Status 선택하고 원하는 디버그, 목표를 클릭하여 아래와 같이 Ray 인덱스 엔드포인트 URL을 확인합니다. http://YOUR_DOMAIN:64415/metrics, http://YOUR_DOMAIN:44217/metrics, http://YOUR_DOMAIN:44227/metrics

Ray에 대해 nri-prometheus 구성

  1. 다음 경로에 nri-prometheus-config.yml 이라는 파일을 만듭니다.

    bash
    $
    /etc/newrelic-infra/integrations.d
  2. 에이전트가 Ray 데이터를 캡처할 수 있도록 nri-prometheus-config.yml 파일에 다음 스니펫을 추가합니다.

    integrations:
    - name: nri-prometheus
    config:
    standalone: false
    # Defaults to true. When standalone is set to `false`, `nri-prometheus` requires an infrastructure agent to send data.
    emitters: infra-sdk
    # When running with infrastructure agent emitters will have to include infra-sdk
    cluster_name: Ray_Metrics
    # Match the name of your cluster with the name seen in New Relic.
    targets:
    - description: Ray_Metrics
    urls: ["http://<YOUR_HOST_IP>:64747/metrics", "http://<YOUR_HOST_IP>:44217/metrics", "http://<YOUR_HOST_IP>:44227/metrics"]
    # tls_config:
    # ca_file_path: "/etc/etcd/etcd-client-ca.crt"
    # cert_file_path: "/etc/etcd/etcd-client.crt"
    # key_file_path: "/etc/etcd/etcd-client.key"
    verbose: false
    # Defaults to false. This determines whether or not the integration should run in verbose mode.
    audit: false
    # Defaults to false and does not include verbose mode. Audit mode logs the uncompressed data sent to New Relic and can lead to a high log volume.
    # scrape_timeout: "YOUR_TIMEOUT_DURATION"
    # `scrape_timeout` is not a mandatory configuration and defaults to 30s. The HTTP client timeout when fetching data from endpoints.
    scrape_duration: "5s"
    # worker_threads: 4
    # `worker_threads` is not a mandatory configuration and defaults to `4` for clusters with more than 400 endpoints. Slowly increase the worker thread until scrape time falls between the desired `scrape_duration`. Note: Increasing this value too much results in huge memory consumption if too many metrics are scraped at once.
    insecure_skip_verify: false
    # Defaults to false. Determins if the integration should skip TLS verification or not.
    timeout: 10s

Ray 로그를 뉴렐릭으로 전달

우리의 로그 포워딩 기능을 사용하여 Ray 로그를 뉴렐릭으로 전달할 수 있습니다.

  1. 다음 경로에 logging.yml 이라는 로그 파일을 생성합니다.

    bash
    $
    /etc/newrelic-infra/logging.d/
  2. logging.yml 파일에 다음 스크립트를 추가합니다.

    - name: dashboard.log
    file: /tmp/ray/session_latest/logs/dashboard.log
    attributes:
    logtype: ray_dashboard_logs
    - name: monitor.log
    file: /tmp/ray/session_latest/logs/monitor.log
    attributes:
    logtype: ray_monitor_logs
    - name: log_monitor.log
    file: /tmp/ray/session_latest/logs/log_monitor.log
    attributes:
    logtype: ray_log_monitor_logs

인프라 에이전트 다시 시작

인프라 에이전트 문서 의 지침을 사용하여 인프라 에이전트를 다시 시작하세요. 이것은 대부분의 사람들에게 작동하는 기본 명령입니다.

bash
$
sudo systemctl restart newrelic-infra.service

뉴렐릭에서 Ray 지표를 확인하세요.

위의 설정을 완료하면 사전 제작된 대시보드 템플릿을 사용하여 지표를 볼 수 있습니다. 이 대시보드에 액세스하려면:

  1. one.newrelic.com > + Add data으로 이동.

  2. Dashboards [대시보드] 탭을 클릭합니다.

  3. 검색 상자에 Ray입력합니다.

  4. 이를 선택하고 Install [설치를] 클릭합니다.

    Apache Druid 퀵스타트를 사용하고 인덱스 및 알림을 보려면 Install now 버튼을 클릭하여 Ray 퀵스타트 페이지를 팔로우할 수도 있습니다.

    다음은 Ray 클러스터의 활성 노드를 확인하는 쿼리 예시입니다.

    SELECT latest(ray_cluster_active_nodes) FROM Metric

다음은 뭐지?

NRQL 쿼리 작성 및 대시보드 생성에 대해 자세히 알아보려면 다음 문서를 확인하세요.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.