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

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

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

문제 신고

OpenTelemetry를 사용하여 자체 호스팅 Elasticsearch를 모니터링하세요.

OpenTelemetry Collector를 서버 또는 가상 머신에 직접 설치하여 자체 호스팅 Elasticsearch 클러스터를 모니터링하세요. 뉴렐릭은 도면 설정 및 모니터링 요구 사항에 맞는 유연한 구현, 배포 옵션을 제공합니다.

수집기 배포 방식은 두 가지 중에서 선택할 수 있습니다.

  • NRDOT: 뉴럴릭 OpenTelemetry배포
  • OTel Collector Contrib: 커뮤니티에서 제공한 구성 요소를 포함하는 표준 OpenTelemetry Collector

설치 옵션

필요에 맞는 수집기 배포 방식을 선택하십시오.

중요

NRDOT의 Elasticsearch 모니터링 지원 기능이 곧 제공될 예정입니다! 업데이트 소식을 기대해주세요!

시작하기 전에

OTel Collector Contrib을 구성하기 전에 다음 사항을 확인하십시오.

필요한 접근 권한:

Elasticsearch 모니터링을 구성합니다.

OTel Collector Contrib이 설치되면 수집기의 기본 설정 파일을 Elasticsearch 모델링 설정으로 바꿉니다. 이렇게 하면 Elasticsearch 메트릭 수집이 가능해집니다. 호스트 메트릭 및 로그는 선택 사항이며 별도로 추가할 수 있습니다.

설정 파일의 위치는 다음과 같습니다. /etc/otelcol-contrib/config.yaml

기본 설정을 백업하세요: 설정 파일을 수정하기 전에 기본 설정을 보존하기 위해 백업 복사본을 만드세요.

bash
$
sudo cp /etc/otelcol-contrib/config.yaml /etc/otelcol-contrib/config.yaml.backup

수집기를 구성하려면 다음 단계를 따르세요.

  1. 루트 또는 sudo 권한으로 텍스트 편집기를 사용하여 설정 파일을 엽니다.

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

    중요

    endpoint 값을 Elasticsearch 클러스터 입체포인트로 바꾸고 프로세서 블록의 elasticsearch.cluster.name 고유한 이름으로 업데이트하여 뉴렐릭에서 클러스터를 식별하세요.

    receivers:
    elasticsearch:
    endpoint: "http://localhost: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: "<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]
  3. (선택 사항) 인증 및 SSL을 사용하는 보안 Elasticsearch 의 경우 수신자 설정을 수정하십시오.

    receivers:
    elasticsearch:
    endpoint: "https://localhost:9200"
    username: "your_elasticsearch_username"
    password: "your_elasticsearch_password"
    tls:
    ca_file: "/etc/elasticsearch/certs/http_ca.crt"
    insecure_skip_verify: false
    collection_interval: 15s
  4. (선택 사항) 호스트 메트릭을 수집하려면 hostmetrics 수신기를 추가하세요.

    receivers:
    hostmetrics:
    collection_interval: 60s
    scrapers:
    cpu:
    metrics:
    system.cpu.utilization: {enabled: true}
    system.cpu.time: {enabled: true}
    load:
    metrics:
    system.cpu.load_average.1m: {enabled: true}
    system.cpu.load_average.5m: {enabled: true}
    system.cpu.load_average.15m: {enabled: true}
    memory:
    metrics:
    system.memory.usage: {enabled: true}
    system.memory.utilization: {enabled: true}
    disk:
    metrics:
    system.disk.io: {enabled: true}
    system.disk.operations: {enabled: true}
    filesystem:
    metrics:
    system.filesystem.usage: {enabled: true}
    system.filesystem.utilization: {enabled: true}
    network:
    metrics:
    system.network.io: {enabled: true}
    system.network.packets: {enabled: true}
    process:
    metrics:
    process.cpu.utilization:
    enabled: true

    그리고 서비스 파이프라인에 다음을 추가하세요:

    service:
    pipelines:
    metrics/host:
    receivers: [hostmetrics]
    processors: [memory_limiter, resourcedetection, batch]
    exporters: [otlphttp]
  5. (선택 사항) Elasticsearch 로그를 수집하려면 filelog 수신기를 추가하세요. 수집기 서비스(otelcol-contrib)를 실행하는 사용자에게 Elasticsearch 로그 파일에 대한 읽기 권한이 있는지 확인하십시오.

    Elasticsearch를 Linux(호스트)에서 실행하는 경우:

    receivers:
    filelog:
    include:
    - /var/log/elasticsearch/elasticsearch.log
    - /var/log/elasticsearch/*.log

    도커에서 Elasticsearch 실행하는 경우:

    receivers:
    filelog:
    include:
    - /var/lib/docker/containers/*/*.log
    operators:
    - type: move
    from: attributes.log
    to: body

    그리고 서비스 파이프라인에 다음을 추가하세요:

    service:
    pipelines:
    logs:
    receivers: [filelog]
    processors: [resource/cluster_name_override]
    exporters: [otlphttp]
  6. (선택 사항) 메트릭에 사용자 지정 메타데이터 태그를 추가하려면 resource/static_override 프로세서를 사용하세요.

    processors:
    resource/static_override:
    attributes:
    - key: env
    value: "production"
    action: upsert
    service:
    pipelines:
    metrics/elasticsearch:
    receivers: [elasticsearch]
    processors: [memory_limiter, resourcedetection, resource/cluster_name_override, resource/static_override, attributes/cardinality_reduction, cumulativetodelta, transform/metadata_nullify, batch]
    exporters: [otlphttp]
  7. 설정 파일을 저장합니다.

  8. 환경 변수를 설정하세요:

    systemd 오버라이드 디렉터리를 생성합니다.

    bash
    $
    sudo mkdir -p /etc/systemd/system/otelcol-contrib.service.d

    환경 설정 파일을 생성합니다.

    bash
    $
    cat <<EOF | sudo tee /etc/systemd/system/otelcol-contrib.service.d/environment.conf
    $
    [Service]
    $
    Environment="NEWRELIC_OTLP_ENDPOINT=https://otlp.nr-data.net:4318"
    $
    Environment="NEWRELIC_LICENSE_KEY=YOUR_LICENSE_KEY_HERE"
    $
    Environment="NEW_RELIC_MEMORY_LIMIT_MIB=100"
    $
    EOF

    설정값을 사용자 값으로 업데이트하세요:

    • https://otlp.nr-data.net:4318 해당 지역의 엔드포인트로 바꾸세요.
    • YOUR_LICENSE_KEY_HERE 실제 뉴웰 클러스터 키로 바꾸세요.
    • 100 수집기에 사용할 원하는 메모리 제한(MiB 단위)으로 바꾸십시오(기본값: 100MiB). 사용 환경의 필요에 따라 조정하십시오.
  9. 변경 사항을 적용하려면 OTel Collector Contrib를 다시 시작하십시오.

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

데이터 수집 확인

OTel Collector Contrib이 오류 없이 실행 중이며 데이터를 수집하고 있는지 확인하십시오.

  1. 수집기 서비스 상태를 확인하세요:

    bash
    $
    sudo systemctl status otelcol-contrib.service
  2. 수집기 로그를 모니터링하여 오류가 있는지 확인하십시오.

    bash
    $
    sudo journalctl -u otelcol-contrib.service -f

    Elasticsearch 및 뉴럴릭과의 성공적인 연결을 찾아보세요. 오류가 발생하는 경우 문제 해결, 해결 가이드를 참조하세요.

APM과 Elasticsearch 연동: APM 애플리케이션과 Elasticsearch 클러스터를 연결하려면 APM 메트릭에 리소스 속성 es.cluster.name="your-cluster-name" 포함하세요. 이를 통해 서비스 간 가시성과 문제 해결 속도가 빨라지고 뉴렐릭 내에서 문제가 해결됩니다.

Elasticsearch 데이터를 확인하세요

수집기가 실행되고 데이터를 전송하면 Elasticsearch 지표를 탐색하고, 사용자 정의 쿼리를 생성하고, 뉴렐릭에서 모니터링 대시보드를 설정할 수 있습니다.

데이터 액세스, NRQL 작성, 그리고 알림 구성에 대한 자세한 내용은 Elasticsearch 데이터 찾기 및 검색을 참조하세요.

문제점 해결

설치 중에 문제가 발생하거나 뉴렐릭에 데이터가 표시되지 않는 경우 일반적인 문제에 대한 단계별 해결 방법에 대한 포괄적인 문제 해결, 해결 가이드를 참조하세요.

Copyright © 2026 New Relic Inc.

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