Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PP-12715-container-insights #27

Merged
merged 5 commits into from
Jun 19, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 88 additions & 6 deletions 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 @@ -61,12 +63,63 @@ processors:
- key: aws.log.stream.arns
action: delete

resource/rename:
jfharden marked this conversation as resolved.
Show resolved Hide resolved
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: ecsTaskARN
from_attribute: aws.ecs.task.arn
- 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: aws.ecs.task.arn
- key: container.name
action: delete

exporters:
Expand All @@ -80,7 +133,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 All @@ -104,7 +178,15 @@ service:
- resourcedetection/env
- resourcedetection/ecs
- resource/deleteUnrequired
- resource/rename
exporters:
- logging
- prometheusremotewrite
metrics:
receivers:
- awsecscontainermetrics
processors:
- filter
- metricstransform
- resource
exporters:
- awsemf
Loading