View a markdown version of this page

Collect host metrics - Amazon CloudWatch
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Collect host metrics

The host_metrics source collects host-level system metrics, such as CPU, memory, disk, file system, network, and process metrics, and sends them to the CloudWatch OTLP metrics endpoint. You query the metrics with PromQL. This source can include the following field:

  • collection_interval – Optional. Specifies how often the agent collects the metrics, in seconds. If you omit this field, the agent uses the metrics_collection_interval value from the agent section, or 30 seconds if that is also omitted.

The following opentelemetry section collects host metrics:

{ "opentelemetry": { "collect": { "host_metrics": {} } } }

For the complete list of metrics that this source collects on each platform, see the following table. For the prerequisites, see Prerequisites. For how to start the agent and verify data, see Start the agent and verify data.

Host metrics that the agent collects

The host_metrics source collects metrics that use OpenTelemetry semantic conventions. On Amazon EC2, each metric has resource labels that identify the host, such as @resource.host.id, @resource.host.type, and @resource.cloud.availability_zone. The metrics that the agent collects depend on the operating system.

Category Metrics Platforms
CPU system.cpu.time, system.cpu.utilization, system.cpu.logical.count, system.cpu.physical.count, system.cpu.load_average.1m, system.cpu.load_average.5m, system.cpu.load_average.15m Linux, Windows Server, and macOS
system.cpu.frequency Linux
Memory system.memory.usage, system.memory.utilization, system.memory.limit, system.memory.page_size Linux, Windows Server, and macOS
system.linux.memory.available, system.linux.memory.dirty Linux
Disk system.disk.io, system.disk.io_time, system.disk.operations, system.disk.operation_time, system.disk.pending_operations Linux, Windows Server, and macOS
system.disk.merged, system.disk.weighted_io_time Linux
File system system.filesystem.usage, system.filesystem.utilization Linux, Windows Server, and macOS
system.filesystem.inodes.usage Linux and macOS
Network system.network.io, system.network.packets, system.network.errors, system.network.dropped, system.network.connections Linux, Windows Server, and macOS
Processes system.processes.count Linux and macOS
system.processes.created Linux