Docs » Available host and application monitors » Configure application receivers for hosts and servers » Host metrics receiver

Host metrics receiver πŸ”—

The host metrics receiver generates metrics scraped from host systems when the Collector is deployed as an agent. The supported pipeline type is metrics.

By default, the host metrics receiver is activated in the Splunk Distribution of OpenTelemetry Collector and collects the following metrics:

  • CPU usage metrics

  • Disk I/O metrics

  • CPU load metrics

  • File system usage metrics

  • Memory usage metrics

  • Network interface and TCP connection metrics

  • Process count metrics (Linux only)

  • Per process CPU, memory, and disk I/O metrics

Host receiver metrics appear in Infrastructure Monitoring. You can use them to create dashboards and alerts. See Create detectors to trigger alerts for more information.

Get started πŸ”—

Follow these steps to configure and enable the component:

  1. Deploy the Splunk Distribution of OpenTelemetry Collector to your host or container platform:

  2. Configure the receiver as described in the next section.

  3. Restart the Collector.

Note

Metrics produced by this receiver count towards the custom metric ingestion limit. See System limits for Splunk Infrastructure Monitoring.

Collect container host metrics (Linux) πŸ”—

The host metrics receiver collects metrics from the Linux system directories. To collect metrics for the host instead of the container, follow these steps:

  1. Mount the entire host file system when running the container. For example: docker run -v /:/hostfs. You can also choose which parts of the host file system to mount. For example: docker run -v /proc:/hostfs/proc

  2. Configure root_path so that the host metrics receiver knows where the root file system is located. For example:

    receivers:
    hostmetrics:
       root_path: /hostfs
    

    If you are running multiple instances of the host metrics receiver, set the same root_path for all.

Sample configurations πŸ”—

The collection interval and the categories of metrics to be scraped can be configured as shown in the following example:

hostmetrics:
  collection_interval: <duration> # The default is 1m.
  scrapers:
    <scraper1>:
    <scraper2>:
    ...

Scrapers extract data from endpoints and then send that data to a specified target. The following table shows the available scrapers:

Scraper

Description

cpu

CPU utilization metrics

disk

Disk I/O metrics

load

CPU load metrics

filesystem

File system utilization metrics

memory

Memory utilization metrics

network

Network interface I/O metrics and TCP connection metrics

paging

Paging or swap space utilization and I/O metrics

processes

Process count metrics. Only available on Linux

process

Per process CPU, memory, and disk I/O metrics

See the following sections for scraper configurations.

Disk πŸ”—

disk:
  <include|exclude>:
    devices: [ <device name>, ... ]
    match_type: <strict|regexp>

File system πŸ”—

Note

The SignalFx exporter excludes some available file system metrics by default. Learn more about default metric filters in GitHub.

filesystem:
  <include_devices|exclude_devices>:
    devices: [ <device name>, ... ]
    match_type: <strict|regexp>
  <include_fs_types|exclude_fs_types>:
    fs_types: [ <filesystem type>, ... ]
    match_type: <strict|regexp>
  <include_mount_points|exclude_mount_points>:
    mount_points: [ <mount point>, ... ]
    match_type: <strict|regexp>

The following example shows the forward slash (/) as a common mount point for Linux systems:

filesystem:
  include_mount_points:
    mount_points: ["/"]
    match_type: strict

Similarly, the following example shows C: as a common mount point for Windows systems:

filesystem:
  include_mount_points:
    mount_points: ["C:"]
    match_type: strict

Find more examples in the daemonset.yaml file in GitHub.

Network πŸ”—

network:
  <include|exclude>:
    interfaces: [ <interface name>, ... ]
    match_type: <strict|regexp>

Process πŸ”—

process:
  <include|exclude>:
    names: [ <process name>, ... ]
    match_type: <strict|regexp>
  mute_process_name_error: <true|false>
  scrape_process_delay: <time>

Filtering πŸ”—

To only gather a subset of metrics from a particular source, use the host metrics receiver with the filter processor.

Different frequencies πŸ”—

To scrape some metrics at a different frequency than others, configure multiple host metrics receivers with different collection_interval values. For example:

receivers:
  hostmetrics:
    collection_interval: 30s
    scrapers:
      cpu:
      memory:

  hostmetrics/disk:
    collection_interval: 1m
    scrapers:
      disk:
      filesystem:

service:
  pipelines:
    metrics:
      receivers: [hostmetrics, hostmetrics/disk]

Metrics πŸ”—

The following metrics, resource attributes, and attributes are available.

cpu scraper πŸ”—

disk scraper πŸ”—

filesystem scraper πŸ”—

load scraper πŸ”—

memory scraper πŸ”—

network scraper πŸ”—

paging scraper πŸ”—

processes scraper πŸ”—

process scraper πŸ”—

Resource attributes πŸ”—

The host metrics receiver doesn’t set any resource attributes on the exported metrics.

To set resource attributes, provide them using the OTEL_RESOURCE_ATTRIBUTES environment variables. For example:

export OTEL_RESOURCE_ATTRIBUTES="service.name=<name_of_service>,service.version=<version_of_service>"

Settings πŸ”—

The following table shows the configuration options for the host metrics receiver:

Troubleshooting πŸ”—

If you are a Splunk Observability Cloud customer and are not able to see your data in Splunk Observability Cloud, you can get help in the following ways.

Available to Splunk Observability Cloud customers πŸ”—

Available to customers and free trial users πŸ”—

To learn about even more support options, see Splunk Customer Success.