Skip to content

Commit

Permalink
PP-12715-container-insights (#27)
Browse files Browse the repository at this point in the history
* Collect per-container insights
  • Loading branch information
rfisher-gds authored Jun 19, 2024
1 parent 454e4be commit 274c6f3
Showing 1 changed file with 92 additions and 1 deletion.
93 changes: 92 additions & 1 deletion config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ receivers:
- targets: [ "127.0.0.1:$APPLICATION_PORT" ]
honor_labels: true
honor_timestamps: true
awsecscontainermetrics:
collection_interval: 30s

processors:
resourcedetection/env:
Expand Down Expand Up @@ -69,6 +71,65 @@ processors:
- key: aws.ecs.task.arn
action: delete

filter:
metrics:
include:
match_type: regexp
metric_names:
- .*memory.reserved
- .*memory.utilized
- .*cpu.reserved
- .*cpu.utilized
- .*network.rate.rx
- .*network.rate.tx
metricstransform:
transforms:
- include: ecs.task.memory.utilized
action: update
new_name: MemoryUtilized
- include: ecs.task.memory.reserved
action: update
new_name: MemoryReserved
- include: ecs.task.cpu.utilized
action: update
new_name: CpuUtilized
- include: ecs.task.cpu.reserved
action: update
new_name: CpuReserved
- include: ecs.task.network.rate.rx
action: update
new_name: NetworkRxBytes
- include: ecs.task.network.rate.tx
action: update
new_name: NetworkTxBytes
resource:
attributes:
- key: ClusterName
from_attribute: aws.ecs.cluster.name
action: insert
- key: aws.ecs.cluster.name
action: delete
- key: ServiceName
from_attribute: aws.ecs.service.name
action: insert
- key: aws.ecs.service.name
action: delete
- key: TaskId
from_attribute: aws.ecs.task.id
action: insert
- key: aws.ecs.task.id
action: delete
- key: TaskDefinitionFamily
from_attribute: aws.ecs.task.family
action: insert
- key: aws.ecs.task.family
action: delete
- key: ContainerName
from_attribute: container.name
action: insert
- key: container.name
action: delete

exporters:
prometheusremotewrite:
endpoint: $PROMETHEUS_ENDPOINT_URL
Expand All @@ -80,7 +141,28 @@ exporters:
auth:
authenticator: sigv4auth
logging:
verbosity: normal
verbosity: normal # 'detailed' to debug
awsemf:
namespace: ECS/ContainerInsights
log_group_name: '/aws/ecs/containerinsights/{ClusterName}/performance'
log_stream_name: '{TaskId}'
resource_to_telemetry_conversion:
enabled: true
dimension_rollup_option: NoDimensionRollup
metric_declarations:
- dimensions: [[ClusterName], [ClusterName, TaskDefinitionFamily]]
metric_name_selectors:
- MemoryUtilized
- MemoryReserved
- CpuUtilized
- CpuReserved
- dimensions: [[ClusterName], [ClusterName, TaskDefinitionFamily, ContainerName]]
metric_name_selectors:
- MemoryUtilized
- MemoryReserved
- CpuUtilized
- CpuReserved
- container.*

extensions:
sigv4auth:
Expand Down Expand Up @@ -108,3 +190,12 @@ service:
exporters:
- logging
- prometheusremotewrite
metrics:
receivers:
- awsecscontainermetrics
processors:
- filter
- metricstransform
- resource
exporters:
- awsemf

0 comments on commit 274c6f3

Please sign in to comment.