AWS ECS metrics

Collect Docker container stats for tasks running in AWS ECS and AWS Fargate

status: beta role: sidecar delivery: at-least-once egress: batch state: stateless output: metrics
Collects the docker container stats for tasks running in AWS ECS or AWS Fargate.

Configuration

Example configurations

{
  "sources": {
    "my_source_id": {
      "type": "aws_ecs_metrics",
      "namespace": "awsecs",
      "scrape_interval_secs": 15
    }
  }
}
[sources.my_source_id]
type = "aws_ecs_metrics"
namespace = "awsecs"
scrape_interval_secs = 15
---
sources:
  my_source_id:
    type: aws_ecs_metrics
    namespace: awsecs
    scrape_interval_secs: 15
{
  "sources": {
    "my_source_id": {
      "type": "aws_ecs_metrics",
      "endpoint": "${ECS_CONTAINER_METADATA_URI_V4}",
      "namespace": "awsecs",
      "scrape_interval_secs": 15,
      "version": "v4"
    }
  }
}
[sources.my_source_id]
type = "aws_ecs_metrics"
endpoint = "${ECS_CONTAINER_METADATA_URI_V4}"
namespace = "awsecs"
scrape_interval_secs = 15
version = "v4"
---
sources:
  my_source_id:
    type: aws_ecs_metrics
    endpoint: ${ECS_CONTAINER_METADATA_URI_V4}
    namespace: awsecs
    scrape_interval_secs: 15
    version: v4

endpoint

optional string literal
Base URI of the task metadata endpoint. If empty, the URI will be automatically discovered based on the latest version detected. The version 2 endpoint base URI is 169.254.170.2/v2/. The version 3 endpoint base URI is stored in the environment variable ECS_CONTAINER_METADATA_URI. The version 4 endpoint base URI is stored in the environment variable ECS_CONTAINER_METADATA_URI_V4.
default: ${ECS_CONTAINER_METADATA_URI_V4}

namespace

common optional string literal
The namespace of the metric. Disabled if empty.
default: awsecs

scrape_interval_secs

common optional uint
The interval between scrapes, in seconds.
default: 15 (seconds)

version

optional string literal enum
The version of the metadata endpoint. If empty, the version is automatically discovered based on environment variables.
Enum options string literal
OptionDescription
v2When the v4 and v3 checks fail.
v3When the v4 check fails but the environment variable ECS_CONTAINER_METADATA_URI is defined.
v4When the environment variable ECS_CONTAINER_METADATA_URI_V4 is defined.
default: v4

Output

Metrics

blkio_recursive_io_merged_total

counter
Total number of bios/requests merged into requests.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.
device required
Device identified by its major and minor numbers.
op required
The operation type.

blkio_recursive_io_queued_total

counter
Total number of requests queued up at any given instant.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.
device required
Device identified by its major and minor numbers.
op required
The operation type.

blkio_recursive_io_service_bytes_total

counter
Number of bytes transferred to/from the disk.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.
device required
Device identified by its major and minor numbers.
op required
The operation type.

blkio_recursive_io_service_time_seconds_total

counter
Total amount of time in seconds between request dispatch and request completion for the IOs done.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.
device required
Device identified by its major and minor numbers.
op required
The operation type.

blkio_recursive_io_serviced_total

counter
Number of IOs completed to/from the disk.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.
device required
Device identified by its major and minor numbers.
op required
The operation type.

blkio_recursive_io_time_seconds_total

counter
Disk time allocated per device in seconds.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.
device required
Device identified by its major and minor numbers.
op required
The operation type.

blkio_recursive_io_wait_time_seconds_total

counter
Total amount of time in seconds the IOs spent waiting in the scheduler queues for service.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.
device required
Device identified by its major and minor numbers.
op required
The operation type.

blkio_recursive_sectors_total

counter
Number of sectors transferred to/from disk.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.
device required
Device identified by its major and minor numbers.
op required
The operation type.

cpu_online_cpus

gauge
Number of CPU cores.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

cpu_throttled_periods_total

counter
Number of periods throttled.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

cpu_throttled_time_seconds_total

counter
Throttling time in seconds.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

cpu_throttling_periods_total

counter
Number of periods.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

cpu_usage_kernelmode_jiffies_total

counter
Jiffies of CPU time spent in kernel mode by the container.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

cpu_usage_percpu_jiffies_total

counter
Jiffies of CPU time used by the container, per CPU core.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.
cpu required
CPU core identifier.

cpu_usage_system_jiffies_total

counter
Jiffies of CPU time used by the system.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

cpu_usage_total_jiffies_total

counter
Jiffies of CPU time used by the container.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

cpu_usage_usermode_jiffies_total

counter
Jiffies of CPU time spent in user mode by the container.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_active_anonymous_bytes

gauge
Amount of memory that has been identified as active by the kernel. Anonymous memory is memory that is not linked to disk pages.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_active_file_bytes

gauge
Amount of active file cache memory. Cache memory = active_file + inactive_file + tmpfs.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_cache_bytes

gauge
The amount of memory used by the processes of this cgroup that can be associated with a block on a block device. Also accounts for memory used by tmpfs.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_dirty_bytes

gauge
The amount of memory waiting to get written to disk.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_hierarchical_memory_limit_bytes

gauge
The memory limit in place by the hierarchy cgroup.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_hierarchical_memsw_limit_bytes

gauge
The memory + swap limit in place by the hierarchy cgroup.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_inactive_anonymous_bytes

gauge
Amount of memory that has been identified as inactive by the kernel.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_inactive_file_bytes

gauge
Amount of inactive file cache memory.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_limit_bytes

gauge
Memory usage limit of the container, in bytes.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_major_faults_total

counter
Number of times that a process of the cgroup triggered a major page fault.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_mapped_file_bytes

gauge
Indicates the amount of memory mapped by the processes in the cgroup. It doesn’t give you information about how much memory is used; it rather tells you how it is used.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_max_used_bytes

gauge
Maximum measured memory usage of the container, in bytes.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_page_charged_total

counter
Number of charging events to the memory cgroup. Charging events happen each time a page is accounted as either mapped anon page(RSS) or cache page to the cgroup.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_page_faults_total

counter
Number of times that a process of the cgroup triggered a page fault.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_page_uncharged_total

counter
Number of uncharging events to the memory cgroup. Uncharging events happen each time a page is unaccounted from the cgroup.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_rss_bytes

gauge
The amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_rss_hugepages_bytes

gauge
Amount of memory due to anonymous transparent hugepages.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_total_active_anonymous_bytes

gauge
Total amount of memory that has been identified as active by the kernel.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_total_active_file_bytes

gauge
Total amount of active file cache memory.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_total_cache_bytes

gauge
Total amount of memory used by the processes of this cgroup that can be associated with a block on a block device.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_total_dirty_bytes

gauge
Total amount of memory waiting to get written to disk.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_total_inactive_anonymous_bytes

gauge
Total amount of memory that has been identified as inactive by the kernel.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_total_inactive_file_bytes

gauge
Total amount of inactive file cache memory.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_total_major_faults_total

counter
Total number of major page faults.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_total_mapped_file_bytes

gauge
Total amount of memory mapped by the processes in the cgroup.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_total_page_charged_total

counter
Total number of charging events.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_total_page_faults_total

counter
Total number of page faults.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_total_page_uncharged_total

counter
Total number of uncharging events.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_total_rss_bytes

gauge
Total amount of memory that doesn’t correspond to anything on disk: stacks, heaps, and anonymous memory maps.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_total_rss_hugepages_bytes

gauge
Total amount of memory due to anonymous transparent hugepages.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_total_unevictable_bytes

gauge
Total amount of memory that can not be reclaimed.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_total_writeback_bytes

gauge
Total amount of memory from file/anon cache that are queued for syncing to the disk.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_unevictable_bytes

gauge
The amount of memory that cannot be reclaimed.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_used_bytes

gauge
Memory used by the container, in bytes.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

memory_writeback_bytes

gauge
The amount of memory from file/anon cache that are queued for syncing to the disk.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.

network_receive_bytes_total

counter
Bytes received by the container via the network interface.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.
device required
The network interface.

network_receive_errs_total

counter
Errors receiving packets.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.
device required
The network interface.

network_receive_packets_drop_total

counter
Number of inbound packets dropped by the container.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.
device required
The network interface.

network_receive_packets_total

counter
Number of packets received by the container via the network interface.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.
device required
The network interface.

network_transmit_bytes_total

counter
Bytes sent by the container via the network interface.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.
device required
The network interface.

network_transmit_errs_total

counter
Errors sending packets.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.
device required
The network interface.

network_transmit_packets_drop_total

counter
Number of outbound packets dropped by the container.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.
device required
The network interface.

network_transmit_packets_total

counter
Number of packets sent by the container via the network interface.
container_id required
The identifier of the ECS container.
container_name required
The name of the ECS container.
device required
The network interface.

Telemetry

Metrics

link

events_in_total

counter
The number of events accepted by this component either from tagged origin like file and uri, or cumulatively from other origins.
component_id required
The Vector component ID.
component_kind required
The Vector component kind.
component_name required
Deprecated, use component_id instead. The value is the same as component_id.
component_type required
The Vector component type.
container_name optional
The name of the container from which the event originates.
file optional
The file from which the event originates.
host required
The hostname of the system Vector is running on.
mode optional
The connection mode used by the component.
peer_addr optional
The IP from which the event originates.
peer_path optional
The pathname from which the event originates.
pid required
The process ID of the Vector instance.
pod_name optional
The name of the pod from which the event originates.
uri optional
The sanitized URI from which the event originates.

events_out_total

counter
The total number of events emitted by this component.
component_id required
The Vector component ID.
component_kind required
The Vector component kind.
component_name required
Deprecated, use component_id instead. The value is the same as component_id.
component_type required
The Vector component type.
host required
The hostname of the system Vector is running on.
pid required
The process ID of the Vector instance.

http_error_response_total

counter
The total number of HTTP error responses for this component.
host required
The hostname of the system Vector is running on.
pid required
The process ID of the Vector instance.

http_request_errors_total

counter
The total number of HTTP request errors for this component.
host required
The hostname of the system Vector is running on.
pid required
The process ID of the Vector instance.

parse_errors_total

counter
The total number of errors parsing metrics for this component.
host required
The hostname of the system Vector is running on.
pid required
The process ID of the Vector instance.

processed_bytes_total

counter
The number of bytes processed by the component.
component_id required
The Vector component ID.
component_kind required
The Vector component kind.
component_name required
Deprecated, use component_id instead. The value is the same as component_id.
component_type required
The Vector component type.
container_name optional
The name of the container from which the bytes originate.
file optional
The file from which the bytes originate.
host required
The hostname of the system Vector is running on.
mode optional
The connection mode used by the component.
peer_addr optional
The IP from which the bytes originate.
peer_path optional
The pathname from which the bytes originate.
pid required
The process ID of the Vector instance.
pod_name optional
The name of the pod from which the bytes originate.
uri optional
The sanitized URI from which the bytes originate.

processed_events_total

counter
The total number of events processed by this component. This metric is deprecated in place of using events_in_total and events_out_total metrics.
component_id required
The Vector component ID.
component_kind required
The Vector component kind.
component_name required
Deprecated, use component_id instead. The value is the same as component_id.
component_type required
The Vector component type.
host required
The hostname of the system Vector is running on.
pid required
The process ID of the Vector instance.

request_duration_seconds

histogram
The total request duration in seconds.
host required
The hostname of the system Vector is running on.
pid required
The process ID of the Vector instance.

requests_completed_total

counter
The total number of requests completed by this component.
component_id required
The Vector component ID.
component_kind required
The Vector component kind.
component_name required
Deprecated, use component_id instead. The value is the same as component_id.
component_type required
The Vector component type.
host required
The hostname of the system Vector is running on.
pid required
The process ID of the Vector instance.

utilization

gauge
A ratio from 0 to 1 of the load on a component. A value of 0 would indicate a completely idle component that is simply waiting for input. A value of 1 would indicate a that is never idle. This value is updated every 5 seconds.
component_id required
The Vector component ID.
component_kind required
The Vector component kind.
component_name required
Deprecated, use component_id instead. The value is the same as component_id.
component_type required
The Vector component type.
host required
The hostname of the system Vector is running on.
pid required
The process ID of the Vector instance.

How it works

Context

By default, the aws_ecs_metrics source augments events with helpful context keys.

State

This component is stateless, meaning its behavior is consistent across each input.