• /
  • EnglishEspañolFrançais日本語한국어Português
  • ログイン今すぐ開始

Advanced configuration for Elasticsearch monitoring

|View as Markdown (English)

This page covers optional configuration for Elasticsearch monitoring beyond the minimum setup: secured clusters, host metrics, log collection, and custom metadata tags.

Secured Elasticsearch with authentication and SSL

Add authentication and TLS to your Elasticsearch connection when your cluster requires them.

Requirements

  • An Elasticsearch user with the monitor or manage cluster privilege, and valid credentials for that user.

For secured Elasticsearch with authentication and SSL, modify the receiver configuration:

Configuration parameters

The following table describes the key configuration parameters used in the snippets above:

ParameterDescription
endpointYour Elasticsearch cluster's URL. Use https:// for a secured cluster.
usernameAn Elasticsearch user with the monitor or manage cluster privilege.
passwordThe password for that user.
tls.insecure_skip_verifyWhether to verify Elasticsearch's TLS certificate. Set to false to enable verification.
collection_intervalThe interval between metric scrapes. Default: 15s.
rule (Kubernetes only)The pod-matching rule used for auto-discovery.

Collect host metrics

To collect host metrics, add the hostmetrics receiver:

Configuration parameters

The following table describes the key configuration parameters used in the snippets above:

ParameterDescription
collection_intervalThe interval between host metric scrapes. Default: 60s.
scrapersThe host-level metric categories to collect (cpu, load, memory, disk, filesystem, network, process). Disable any metric you don't need by setting enabled: false.

Collect Elasticsearch logs

Requirements

  • Read access to your Elasticsearch log files, for whichever account runs the collector service:
    • Linux host: read permission on /var/log/elasticsearch/
    • Docker: read permission on /var/lib/docker/containers/ (root, or Docker group membership)

To collect Elasticsearch logs, add the filelog receiver.

Configuration parameters

The following table describes the key configuration parameters used in the snippets above:

ParameterDescription
includeLog file paths to tail (Linux host) or container log paths (Docker).
operators (Docker only)The operator that moves the log line from attributes.log to body so it displays correctly.

Add custom metadata tags

To add custom metadata tags to your metrics, use the resource/static_override processor:

Configuration parameters

The following table describes the key configuration parameters used in the snippets above:

ParameterDescription
keyThe attribute name to add, e.g. env.
valueThe attribute value, e.g. production.
actionThe action to apply. Set to upsert to add the attribute or overwrite it if it already exists.

Restart the collector

After updating your configuration, restart the collector to apply the changes.

Verify your changes

After restarting the collector, confirm your change took effect:

  • Secured cluster: Rerun your install page's data collection query. If metrics are flowing with no TLS or authentication errors in the collector logs, the secured connection is working.

  • Host metrics: Run this query:

    FROM Metric SELECT count(*) WHERE metricName LIKE 'system.%' SINCE 10 minutes ago
  • Elasticsearch logs: Run this query:

    FROM Log SELECT count(*) SINCE 10 minutes ago

    Adjust the WHERE clause to match your own log attributes.

  • Custom tags: Run this query, using the example tag from Add custom metadata tags:

    FROM Metric SELECT count(*) WHERE metricName LIKE 'elasticsearch.%' AND env = 'production' SINCE 10 minutes ago

If you don't see data within ~5 minutes, see Elasticsearch troubleshooting.

Copyright © 2026 New Relic株式会社。

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