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

이 한글 문서는 사용자의 편의를 위해 기계 번역되었습니다.

영문본과 번역본이 일치하지 않는 경우 영문본이 우선합니다. 보다 자세한 내용은 이 페이지를 방문하시기 바랍니다.

문제 신고

Prometheus OpenMetrics 통합에서 마이그레이션

Kubernetes에서 Prometheus OpenMetrics 통합 nri-prometheus 을(를) 사용하는 경우 동일한 모니터링 경험을 얻으려면 New Relic의 Prometheus 에이전트 newrelic-prometheus-agent 로 마이그레이션해야 합니다. New Relic의 Prometheus 에이전트 설정 방법을 확인하십시오.

newrelic-prometheus-agent 가 실제로 에이전트 모드에서 Prometheus server 실행하고 있기 때문에 구성 파일 구조가 더 인증 방법 지원과 같은 Prometheus 서버의 모든 스크랩 관련 기능을 사용할 가능성과 더 많은 유연성을 제공하도록 변경되었습니다 구성 설정 레이블 재지정 또는 Prometheus 인스턴스 확장 .

단순화된 구성 파일을 Prometheus 서버 구성 파일로 변환하여 더 쉬운 구성 환경을 제공합니다. 이 마이그레이션 가이드를 더 잘 따르기 위해 설명서를 읽는 것이 좋습니다.

이전을 수행하려면 values.yml 파일의 구성 섹션을 이 문서의 값으로 조정하세요.

대시보드 및 알림

측정항목은 Prometheus OpenMetrics 통합 nri-prometheus을 사용하여 전송된 것과 동일한 방식으로 전송됩니다. 경우에 따라 Prometheus OpenMetrics 통합 nri-prometheus과 Prometheus 에이전트 newrelic-prometheus-agent사이에 변경된 일부 메타데이터를 수정해야 할 수도 있습니다.

Prometheus 에이전트가 추가한 레이블의 전체 목록을읽어보세요.

이름이 변경된 메타데이터

다음 표는 Prometheus OpenMetrics 통합 nri-prometheus 과 Prometheus 에이전트 newrelic-prometheus-agent 간에 이름이 바뀐 메타데이터를 강조표시합니다.

nri-prometheus

newrelic-prometheus-agent

namespaceName

namespace

nodeName

node

podName

pod

serviceName

service

deploymentName

해당 없음

clusterName

cluster_name

scrapedTargetKind

job. 스크랩 종류를 식별하는 데 사용할 수도 있습니다.

scrapedTargetName

instance. 대상에 대한 host:port 도 포함합니다.

마이그레이션 후에도 이전 nri-prometheus 메타데이터 속성 이름을 유지하려면 newrelic-prometheus-agent values.yaml 파일에서 다음 원격 쓰기 레이블 재지정 구성을 활성화할 수 있습니다. 이렇게 하면 이러한 특성을 대상으로 하는 대시보드 및 경고가 계속해서 정상적으로 작동합니다.

newrelic_remote_write:
extra_write_relabel_configs:
# Enable the extra_write_relabel_configs below for backwards compatibility with legacy POMI labels.
# This helpful when migrating from POMI to ensure that Prometheus metrics will contain both labels (e.g. cluster_name and clusterName).
# For more migration info, please visit the [migration guide](/docs/infrastructure/prometheus-integrations/install-configure-prometheus-agent/migration-guide/).
- source_labels: [namespace]
action: replace
target_label: namespaceName
- source_labels: [node]
action: replace
target_label: nodeName
- source_labels: [pod]
action: replace
target_label: podName
- source_labels: [service]
action: replace
target_label: serviceName
- source_labels: [cluster_name]
action: replace
target_label: clusterName
- source_labels: [job]
action: replace
target_label: scrapedTargetKind
- source_labels: [instance]
action: replace
target_label: scrapedTargetInstance

중요

Prometheus DataModel을 준수하기 위해 Kubernetes 레이블 이름( label.kubernetesLabel )은 지원되지 않는 문자를 _ 로 대체하기 위해 스크랩한 후 삭제됩니다. 예를 들어 Kubernetes 레이블 k8s.io/appk8s_io_app 로 추가됩니다. label. 접두사가 제거되었습니다. 레이블 값은 변경되지 않습니다.

삭제된 메타데이터

다음 메타데이터는 Prometheus 에이전트 newrelic-prometheus-agent 에서 사용할 수 없습니다.

  • deploymentName
  • integrationName
  • integrationVersion
  • nrMetricType
  • promMetricType
  • targetName
  • scrapedTargetName

Kubernetes 대상 검색

Jobs 추가하여 대상 검색 구성을 개선했습니다. Kubernetes 대상 검색을 구성하는 방법을 참조하십시오.

Prometheus OpenMetrics와 Prometheus 에이전트 간의 기본 동작이 변경되었습니다. 기본적으로 Prometheus OpenMetrics는 레이블 또는 주석으로 prometheus.io/scrape=true 포함하는 파드 및 서비스를 스크래핑하는 반면, Prometheus 에이전트는 모든 볼륨, 목표 annotatednewrelic.io/scrape: "true" 로 스크래핑합니다. 파드와 prometheus.io/scrape=true 주석이 있는 서비스는 다음으로만 스크레이핑됩니다. 기본적으로 지원되는 뉴렐릭의 프로메테우스 통합 중 하나에 해당하는 경우 자세한 내용은 스크랩 구성 문서를 확인하세요.

노드 메트릭은 일반적으로 New Relic의 kubernetes 통합에서 사용되기 때문에 메트릭 중복을 유발할 수 있으므로 더 이상 Prometheus 에이전트에서 기본적으로 스크랩되지 않습니다.

측정항목 유형

Prometheus OpenMetrics( nri-prometheus 는 맞춤 솔루션으로 Prometheus 측정항목을 전송하기 전에 스크랩한 데이터( # TYPE <metric_type> 에서 읽은 측정항목 메타데이터 유형에 따라 매핑을 적용하여 New Relic 측정항목으로 변환합니다.

표준 Prometheus 서버를 활용하는 Prometheus 에이전트 newrelic-prometheus-agent 에서 측정항목은 측정항목 이름을 기반으로 이 변환을 처리하는 New Relic의 원격 쓰기 엔드포인트로 직접 전송됩니다. 일부 메트릭은 원격 쓰기 끝점에서 제대로 변환되지 않을 수 있습니다.

  • Prometheus 카운터 메트릭

    without

    이름 접미사 total, count, sum 또는 bucket

    Gauge

    로 변환됩니다.

  • Prometheus 게이지 지표

    with

    이름 접미사 total, count, sum 또는 bucket

    Counter

    로 변환됩니다.

이 문제를 해결하려면 메트릭 유형 매핑 레이블 재지정 옵션을 설정하고 자세한 내용은 메트릭 및 레이블 변환을 확인하십시오.

변환

Prometheus OpenMetrics, nri-prometheus , 이제 변환이 Prometheus 레이블 재지정 구성으로 대체되었습니다. 레이블 재지정 구성 설정의 예 목록을 참조하십시오.

자체 계측

Prometheus OpenMetrics( nri-prometheus )와 마찬가지로 Prometheus 에이전트( newrelic-prometheus-agent )는 내부 측정항목을 자체 스크레이핑합니다. 이러한 지표에는 prometheus_ 접두사가 있으며 이를 사용하여 Prometheus 인스턴스의 상태를 관찰할 수 있습니다. 기본적으로 이러한 측정항목의 축소된 집합만 전송됩니다. job_name: self-metrics 검색하여 차트의 default values.yaml 파일 에서 메트릭 목록을 찾을 수 있습니다.

또한 성능 및 건강 정보와 전송된 메트릭 볼륨이 포함된 자체 메트릭에 대해 선별된 대시보드를 제공합니다. New Relic 계정에 Prometheus 에이전트용 대시보드가 포함된 빠른 시작을 설치합니다.

마이그레이션 중에 Prometheus OpenMetrics 통합 유지

New Relic은 고객에게 원활하고 원활한 마이그레이션을 보장하고자 합니다. Prometheus OpenMetrics 통합 nri-prometheus , Prometheus 에이전트 newrelic-prometheus-agent 또는 둘 다를 유지할 수 있습니다.

현재 Prometheus 에이전트를 사용하지 않고 nri-prometheus를 보존하려면 values.yaml 파일을 다음과 같이 설정하세요.

nri-metadata-injection:
enabled: true
nri-prometheus:
enabled: true
newrelic-prometheus-agent:
enabled: false

Helm을 사용하여 Kubernetes 클러스터를 업그레이드하려면 이 문서 에 설명된 단계를 따르십시오.

Copyright © 2024 New Relic Inc.

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