• /
  • EnglishEspañolFrançais日本語한국어Português
  • EntrarComeçar agora

Install Elasticsearch OpenTelemetry integration

Install the New Relic Elasticsearch OpenTelemetry integration to monitor your Elasticsearch clusters with industry-standard protocols. This guide walks you through configuring the OpenTelemetry Collector to collect metrics and logs from your Elasticsearch infrastructure and send them to New Relic.

To install the integration, complete the following steps:

  1. Before you begin - Check requirements and prerequisites
  2. Configure the OpenTelemetry Collector - Set up data collection
  3. Set environment variables - Configure authentication
  4. Find and use data - View your Elasticsearch data in New Relic
  5. Set up alerts - Configure proactive monitoring

Step 1: Before you begin

Ensure you have:

Step 2: Configure the OpenTelemetry Collector

Configure the OpenTelemetry Collector to collect metrics and logs from your Elasticsearch cluster. Create or update your configuration file at /etc/otelcol-contrib/config.yaml.

The configuration varies based on your Elasticsearch setup and monitoring requirements. Choose the appropriate configuration below:

Dica

Correlate APM with Elasticsearch: To connect your APM application and Elasticsearch cluster, include the resource attribute es.cluster.name="your-cluster-name" in your APM metrics. This enables cross-service visibility and faster troubleshooting within New Relic.

Step 3: Set environment variables

Configure authentication by adding your New Relic and OTLP endpoint to the collector service.

  1. Create a systemd override directory:

    bash
    $
    sudo mkdir -p /etc/systemd/system/otelcol-contrib.service.d
  2. Write environment.conf with your OTLP endpoint. Replace YOUR_LICENSE_KEY with the New Relic license key and YOUR_OTLP_ENDPOINT with the appropriate endpoint for your region. Refer to the OTLP endpoint configuration documentation to select the right endpoint.

    bash
    $
    cat <<EOF | sudo tee /etc/systemd/system/otelcol-contrib.service.d/environment.conf
    $
    [Service]
    $
    Environment="NEWRELIC_OTLP_ENDPOINT=YOUR_OTLP_ENDPOINT"
    $
    Environment="NEWRELIC_LICENSE_KEY=YOUR_LICENSE_KEY"
    $
    EOF
  3. Reload systemd and restart the collector:

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

Step 4: View your Elasticsearch data

Once the collector is running and sending data, you can view your Elasticsearch metrics in New Relic:

  1. Go to one.newrelic.com > Integrations & Agents
  2. Search for Elasticsearch (OpenTelemetry)
  3. Under Dashboards, click Elasticsearch OpenTelemetry Dashboard
  4. Select your account and click View dashboard

You should see dashboards showing cluster health, performance metrics, and resource usage.

Dica

Not seeing data? It may take a few minutes for data to appear. If you don't see metrics after 10 minutes, check our troubleshooting guide.

Next steps with your data:

  • Explore metrics: All Elasticsearch metrics are stored as Metric event types
  • Create custom queries: Use NRQL to build custom charts and dashboards
  • Set up alerts: Continue to Step 5 to configure proactive monitoring

Step 5: Set up alerts

Proactive monitoring with alerts helps you catch issues before they impact your users. To create alert conditions in New Relic:

  1. Go to one.newrelic.com > Alerts > Alert Conditions.
  2. Click Create condition.
  3. Configure the alert using either Guided mode or the NRQL query builder.

The alert configurations below are recommended for robust Elasticsearch monitoring:

Essential Alerts (High Priority)

These alerts monitor critical cluster health issues that can cause data loss or service outages:

Alert Name

Threshold Rationale (Example Condition)

Unassigned Shards Alert

Metric elasticsearch.cluster.shards (where state = 'unassigned') is above 0 for at least 5 minutes.

Healthy Data Nodes Alert

Metric elasticsearch.cluster.data_nodes is below your minimum required node count for at least 5 minutes.

Heap Usage Too High Alert

Heap usage percentage (Used/Max) is above 90% for at least 5 minutes.

Pending Tasks Alert

Metric elasticsearch.cluster.pending_tasks is above 5 for at least 5 minutes.

Additional Monitoring Alerts

These alerts help monitor performance and operational issues:

Alert Name

Threshold Rationale (Example Condition)

Query Time Slow Alert

95th percentile of elasticsearch.node.operations.time is above 5ms for at least 2 minutes.

Initializing Shards Too Long

Metric elasticsearch.cluster.shards (where state = 'initializing') is above 0 for at least 5 minutes.

Relocating Shards Too Long

Metric elasticsearch.cluster.shards (where state = 'relocating') is above 0 for at least 5 minutes.

Troubleshooting

If you encounter issues during installation or don't see data in New Relic, see our comprehensive troubleshooting guide for step-by-step solutions to common problems.

Copyright © 2026 New Relic Inc.

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