Skip to main content

Splunkenterprise Receiver

Status Available in: contrib Maintainers: @shalper2, @MovieStoreGuy, @greatestusername Source: opentelemetry-collector-contrib

Supported Telemetry

Metrics

Overview

Configuration

By default the Splunk Enterprise receiver is not configured to gather any metrics other than splunk.health The following settings are required, omitting them will either cause your receiver to fail to compile or result in 4/5xx return codes during scraping. NOTE: These must be set for each Splunk instance type (indexer, search head, or cluster master) from which you wish to pull metrics. At present, only one of each type is accepted, per configured receiver instance. This means, for example, that if you have three different “indexer” type instances that you would like to pull metrics from you will need to configure three different splunkenterprise receivers for each indexer node you wish to monitor.
  • basicauth (from basicauthextension): A configured stanza for the basicauthextension.
  • auth (no default): String name referencing your auth extension.
  • endpoint (no default): your Splunk Enterprise host’s endpoint.
The following settings are optional:
  • collection_interval (default: 10m): The time between scrape attempts.
  • timeout (default: 60s): The time the scrape function will wait for a response before returning empty.
  • build_version_info (default: false): Elect to run an additional scrape which will retrieve build and version info for the configured endpoints and attach this as attributes to the selected metrics. A value of false will report an empty string as the attribute value but will speed up the receiver slightly.
Note: The receiver type has been renamed from splunkenterprise to splunk_enterprise. The old name is still accepted but will log a deprecation warning.

Basic Example:

Individual Cluster Config Example (with specific metrics enabled/disabled):

Custom SPL Searches

The receiver supports running arbitrary SPL searches against configured Splunk endpoints. This allows you to create custom metrics from any data available in your Splunk deployment. WARNING: Custom searches execute ad-hoc searches on your Splunk deployment. Be mindful of the performance impact, especially with complex searches or short collection intervals.

Search Configuration

Each custom search requires:
  • spl (required): The SPL search string. Can be provided as a single line or multi-line YAML block.
  • target (required): The endpoint type to run the search against. Must be one of: indexer, search_head, or cluster_master.
  • earliest (optional): The earliest time for the search. Defaults to -{collection_interval} (e.g., -10m if collection_interval is 10m). Ignored if SPL already contains earliest=.
  • latest (optional): The latest time for the search. Defaults to now. Ignored if SPL already contains latest=.
  • metrics (required): A list of metric definitions that map search result columns to OTel metrics.
Note on time ranges:
  • For regular searches (like index=_internal | stats count), the receiver automatically adds earliest and latest time modifiers.
  • For generating commands that start with | (other than | tstats), no time range is added since these commands handle time differently.
    • Receiver will correctly add a time range to searches that begin with | tstats
Each metric definition supports:
  • metric_name (required): The name of the metric to emit (e.g., splunk.custom.event_count).
  • value_column (required): The column name from the SPL results that contains the metric value.
  • attribute_columns (optional): List of column names to include as metric attributes.
  • value_type (optional): Either int (default) or double.
  • unit (optional): The unit of measurement (e.g., {count}, By, %).
  • description (optional): A description of the metric.
  • static_attributes (optional): Key-value pairs to add as static attributes to all data points.

Different Collection Intervals

All custom searches run at the same collection_interval as the built-in metrics. If you need searches to run at different intervals, configure multiple receiver instances:

Custom Search Example

For a full list of settings exposed by this receiver please look in config.go with a detailed configuration in testdata/config.yaml.

Metrics

Attributes

Configuration

Example Configuration


Last generated: 2026-08-24