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

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

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

문제 신고

자체 호스팅 Elasticsearch에 OTel Collector Contrib 설치 및 설정

|View as Markdown (English)

이 가이드를 사용하여 Linux 서버 또는 VM에서 자체 호스팅된 Elasticsearch 클러스터를 모니터하도록 OpenTelemetry Collector Contrib를 설치하고 설정하십시오. 설정하고 나면 수집기가 Elasticsearch 클러스터 메트릭을 뉴렐릭으로 내보냅니다. 호스트 메트릭, 로그 및 사용자 지정 태그에 대해서는 고급 설정을 참조하십시오.

호환성 및 요구 사항

지원

  • Elasticsearch 7.16 이상

필요한 사항

OTel Collector Contrib를 설치하십시오.

OpenTelemetry Collector Contrib를 설치하고 systemd 서비스로 실행하십시오. 공식 .deb/.rpm 패키지가 서비스 유닛을 생성합니다.

Elasticsearch 모니터링을 위한 OTel Collector Contrib 구성

Elasticsearch 모니터링을 활성화하려면 수집기의 기본 설정을 업데이트하십시오.

  1. 수집기의 기본 설정을 백업한 다음, 편집을 위해 여십시오:

    bash
    $
    sudo cp /etc/otelcol-contrib/config.yaml /etc/otelcol-contrib/config.yaml.backup
    $
    sudo nano /etc/otelcol-contrib/config.yaml
  2. 기존 콘텐츠를 모두 삭제하고 Elasticsearch 모니터링을 위한 다음 설정으로 대체하십시오.

    receivers:
    elasticsearch:
    endpoint: "http://<YOUR_ELASTICSEARCH_HOST>:9200"
    collection_interval: 15s
    metrics:
    elasticsearch.os.cpu.usage:
    enabled: true
    elasticsearch.cluster.data_nodes:
    enabled: true
    elasticsearch.cluster.health:
    enabled: true
    elasticsearch.cluster.in_flight_fetch:
    enabled: true
    elasticsearch.cluster.nodes:
    enabled: true
    elasticsearch.cluster.pending_tasks:
    enabled: true
    elasticsearch.cluster.shards:
    enabled: true
    elasticsearch.cluster.state_update.time:
    enabled: true
    elasticsearch.index.documents:
    enabled: true
    elasticsearch.index.operations.merge.current:
    enabled: true
    elasticsearch.index.operations.time:
    enabled: true
    elasticsearch.node.cache.count:
    enabled: true
    elasticsearch.node.cache.evictions:
    enabled: true
    elasticsearch.node.cache.memory.usage:
    enabled: true
    elasticsearch.node.shards.size:
    enabled: true
    elasticsearch.node.cluster.io:
    enabled: true
    elasticsearch.node.documents:
    enabled: true
    elasticsearch.node.disk.io.read:
    enabled: true
    elasticsearch.node.disk.io.write:
    enabled: true
    elasticsearch.node.fs.disk.available:
    enabled: true
    elasticsearch.node.fs.disk.total:
    enabled: true
    elasticsearch.node.http.connections:
    enabled: true
    elasticsearch.node.ingest.documents.current:
    enabled: true
    elasticsearch.node.ingest.operations.failed:
    enabled: true
    elasticsearch.node.open_files:
    enabled: true
    elasticsearch.node.operations.completed:
    enabled: true
    elasticsearch.node.operations.current:
    enabled: true
    elasticsearch.node.operations.get.completed:
    enabled: true
    elasticsearch.node.operations.time:
    enabled: true
    elasticsearch.node.shards.reserved.size:
    enabled: true
    elasticsearch.index.shards.size:
    enabled: true
    elasticsearch.os.cpu.load_avg.1m:
    enabled: true
    elasticsearch.os.cpu.load_avg.5m:
    enabled: true
    elasticsearch.os.cpu.load_avg.15m:
    enabled: true
    elasticsearch.os.memory:
    enabled: true
    jvm.gc.collections.count:
    enabled: true
    jvm.gc.collections.elapsed:
    enabled: true
    jvm.memory.heap.max:
    enabled: true
    jvm.memory.heap.used:
    enabled: true
    jvm.memory.heap.utilization:
    enabled: true
    jvm.threads.count:
    enabled: true
    elasticsearch.index.segments.count:
    enabled: true
    elasticsearch.index.operations.completed:
    enabled: true
    elasticsearch.node.script.cache_evictions:
    enabled: false
    elasticsearch.node.cluster.connections:
    enabled: false
    elasticsearch.node.pipeline.ingest.documents.preprocessed:
    enabled: false
    elasticsearch.node.thread_pool.tasks.queued:
    enabled: false
    elasticsearch.cluster.published_states.full:
    enabled: false
    jvm.memory.pool.max:
    enabled: false
    elasticsearch.node.script.compilation_limit_triggered:
    enabled: false
    elasticsearch.node.shards.data_set.size:
    enabled: false
    elasticsearch.node.pipeline.ingest.documents.current:
    enabled: false
    elasticsearch.cluster.state_update.count:
    enabled: false
    elasticsearch.node.fs.disk.free:
    enabled: false
    jvm.memory.nonheap.used:
    enabled: false
    jvm.memory.pool.used:
    enabled: false
    elasticsearch.node.translog.size:
    enabled: false
    elasticsearch.node.thread_pool.threads:
    enabled: false
    elasticsearch.cluster.state_queue:
    enabled: false
    elasticsearch.node.translog.operations:
    enabled: false
    elasticsearch.memory.indexing_pressure:
    enabled: false
    elasticsearch.node.ingest.documents:
    enabled: false
    jvm.classes.loaded:
    enabled: false
    jvm.memory.heap.committed:
    enabled: false
    elasticsearch.breaker.memory.limit:
    enabled: false
    elasticsearch.indexing_pressure.memory.total.replica_rejections:
    enabled: false
    elasticsearch.breaker.memory.estimated:
    enabled: false
    elasticsearch.cluster.published_states.differences:
    enabled: false
    jvm.memory.nonheap.committed:
    enabled: false
    elasticsearch.node.translog.uncommitted.size:
    enabled: false
    elasticsearch.node.script.compilations:
    enabled: false
    elasticsearch.node.pipeline.ingest.operations.failed:
    enabled: false
    elasticsearch.indexing_pressure.memory.limit:
    enabled: false
    elasticsearch.breaker.tripped:
    enabled: false
    elasticsearch.indexing_pressure.memory.total.primary_rejections:
    enabled: false
    elasticsearch.node.thread_pool.tasks.finished:
    enabled: false
    processors:
    memory_limiter:
    check_interval: 60s
    limit_mib: ${env:NEW_RELIC_MEMORY_LIMIT_MIB:-100}
    cumulativetodelta: {}
    resource/cluster_name_override:
    attributes:
    - key: elasticsearch.cluster.name
    value: "<YOUR_ELASTICSEARCH_CLUSTER_NAME>"
    action: upsert
    resourcedetection:
    detectors: [system]
    system:
    resource_attributes:
    host.name: { enabled: true }
    host.id: { enabled: true }
    os.type: { enabled: true }
    batch:
    timeout: 10s
    send_batch_size: 1024
    attributes/cardinality_reduction:
    actions:
    - key: process.pid
    action: delete
    - key: process.parent_pid
    action: delete
    transform/metadata_nullify:
    metric_statements:
    - context: metric
    statements:
    - set(description, "")
    - set(unit, "")
    exporters:
    otlphttp:
    endpoint: ${env:NEWRELIC_OTLP_ENDPOINT}
    headers:
    api-key: ${env:NEWRELIC_LICENSE_KEY}
    service:
    pipelines:
    metrics/elasticsearch:
    receivers: [elasticsearch]
    processors: [memory_limiter, resourcedetection, resource/cluster_name_override, attributes/cardinality_reduction, cumulativetodelta, transform/metadata_nullify, batch]
    exporters: [otlphttp]

구성 매개변수

다음 표는 위 설정에서 사용된 주요 설정 파라미터를 설명합니다:

매개변수설명
endpointElasticsearch 클러스터의 URL입니다.
collection_interval메트릭 스크랩 간격입니다. 기본값은 15s입니다.
elasticsearch.cluster.name ( resource/cluster_name_override )뉴렐릭에서 이 클러스터를 식별하는 고유한 이름으로, <YOUR_ELASTICSEARCH_CLUSTER_NAME>을(를) 계정 전체에서 고유한 이름으로 바꿉니다.
NEW_RELIC_MEMORY_LIMIT_MIB사용자 환경에 맞게 설정된 수집기의 memory_limiter 프로세서에 대한 메모리 제한(MiB)입니다.
NEWRELIC_LICENSE_KEY귀하의 New Relic 라이센스 키 .
NEWRELIC_OTLP_ENDPOINT뉴렐릭 OTLP 엔드포인트에 따른 계정 지역의 뉴렐릭 OTLP 엔드포인트입니다.
  1. 설정 파일을 저장합니다.

보안 클러스터 인증, 호스트 메트릭, 로그 수집 또는 사용자 지정 메타데이터 태그를 선택적으로 추가할 수 있습니다. 고급 설정을 참조하십시오.

환경 변수를 설정하십시오

수집기가 뉴렐릭으로 데이터를 전송하는 데 필요한 자격 증명 및 연결 세부 정보를 설정하십시오.

bash
$
sudo mkdir -p /etc/systemd/system/otelcol-contrib.service.d
$
cat <<EOF | sudo tee /etc/systemd/system/otelcol-contrib.service.d/environment.conf
$
[Service]
$
Environment="NEWRELIC_OTLP_ENDPOINT=<YOUR_NEWRELIC_OTLP_ENDPOINT>"
$
Environment="NEWRELIC_LICENSE_KEY=<YOUR_NEWRELIC_LICENSE_KEY>"
$
Environment="NEW_RELIC_MEMORY_LIMIT_MIB=100"
$
EOF

OTel Collector Contrib를 재시작하십시오.

변경 사항을 적용하려면 수집기를 다시 시작하십시오:

bash
$
sudo systemctl daemon-reload
$
sudo systemctl restart otelcol-contrib.service

데이터 수집 확인

수집기를 다시 시작한 후 약 5분 이내에 뉴렐릭에서 이 쿼리를 실행하여 데이터가 흐르고 있는지 확인하십시오(<YOUR_ELASTICSEARCH_CLUSTER_NAME>을(를) 클러스터 이름으로 바꾸십시오):

FROM Metric SELECT count(*)
WHERE metricName LIKE 'elasticsearch.%'
AND elasticsearch.cluster.name = '<YOUR_ELASTICSEARCH_CLUSTER_NAME>'
SINCE 10 minutes ago

팁

수집기 자체를 확인할 수도 있습니다. otelcol-contrib.service은(는) active (running) (sudo systemctl status otelcol-contrib.service)을(를) 보고해야 하며, 로그(sudo journalctl -u otelcol-contrib.service -f)에 연결 오류가 없어야 합니다.

약 5분 내에 데이터가 표시되지 않으면 Elasticsearch 문제 진단, 해결을 참조하십시오.

데이터 찾기 및 사용

뉴렐릭이 데이터를 수집하면 뉴렐릭 UI를 통해 Elasticsearch 모니터링에 액세스할 수 있습니다.

뉴렐릭에서 Elasticsearch 대시보드를 찾으려면:

  1. one.newrelic.com > Integrations & Agents 으)로 이동합니다.
  2. All 탭에서 Dashboards을(를) 클릭한 다음, Elasticsearch (OpenTelemetry Collector)을(를) 검색하여 대시보드를 확인하십시오.

또는 왼쪽 탐색 메뉴에서:

  1. Dashboards 을(를) 클릭합니다.
  2. Elasticsearch (OpenTelemetry Collector) 대시보드를 검색하여 확인하십시오.

OTel Collector Contrib을 사용하여 Elasticsearch 모니터링을 설정한 후에는 다음을 수행할 수 있습니다:

팁

APM과 Elasticsearch 연관시키기: APM 애플리케이션과 Elasticsearch 클러스터를 연결하려면 APM 메트릭에 리소스 속성 es.cluster.name="your-cluster-name"을(를) 포함하십시오. 이를 통해 뉴렐릭에서 APM 및 Elasticsearch 데이터를 함께 볼 수 있습니다.

Copyright © 2026 New Relic Inc.

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