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

[AWS Farget] Set dimension fields #6733

Merged
merged 5 commits into from Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/awsfargate/changelog.yml
@@ -1,4 +1,9 @@
# newer versions go on top
- version: 0.2.3
changes:
- description: Set dimension fields and add `agent.id`.
type: enhancement
link: https://github.com/elastic/integrations/pull/6733
- version: 0.2.2
changes:
- description: Add metric type to fields.
Expand Down
6 changes: 6 additions & 0 deletions packages/awsfargate/data_stream/task_stats/fields/ecs.yml
Expand Up @@ -33,6 +33,7 @@
name: container.id
- external: ecs
name: container.name
dimension: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wondering if awsfargate.task_stats.task_name isn't a better option for this


so to rely not on the container name (in case there will be some changes in name generation), but the task name instead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mention it on the description: The structure for that field is: arn:aws:ecs:<region>:<account-id>:task/<cluster-name>/<task-id>, that is why those fields are not set as dimension, because they are included in this field.

- external: ecs
name: container.image.name
# container + custom labels
Expand All @@ -44,10 +45,15 @@
description: ECS container name
- name: container.labels.com_amazonaws_ecs_task-arn
type: keyword
dimension: true
description: ECS task ARN
- name: container.labels.com_amazonaws_ecs_task-definition-family
type: keyword
description: ECS task definition family
- name: container.labels.com_amazonaws_ecs_task-definition-version
type: keyword
description: ECS task definition version
# agent
- name: agent.id
external: ecs
dimension: true
1 change: 1 addition & 0 deletions packages/awsfargate/docs/README.md
Expand Up @@ -302,6 +302,7 @@ If you want to learn more about Amazon ECS metrics, take a look at the blog post
| Field | Description | Type | Metric Type |
|---|---|---|---|
| @timestamp | Event timestamp. | date | |
| agent.id | Unique identifier of this agent (if one exists). Example: For Beats this would be beat.id. | keyword | |
| awsfargate.task_stats.cluster_name | Cluster name | keyword | |
| awsfargate.task_stats.cpu.core | | object | |
| awsfargate.task_stats.cpu.core.\*.norm.pct | Percentage of time per CPU core normalized by the number of CPU cores. | scaled_float | gauge |
Expand Down
2 changes: 1 addition & 1 deletion packages/awsfargate/manifest.yml
@@ -1,7 +1,7 @@
format_version: 1.0.0
name: awsfargate
title: AWS Fargate
version: 0.2.2
version: 0.2.3
license: basic
description: Collects metrics from containers and tasks running on Amazon ECS clusters with Elastic Agent.
type: integration
Expand Down