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 3 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
5 changes: 5 additions & 0 deletions packages/awsfargate/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: 0.2.2
changes:
- description: Set dimension fields.
Copy link
Member

Choose a reason for hiding this comment

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

This sets dimension fields, but also agent.id. Should we mention it here?

Suggested change
- description: Set dimension fields.
- description: Set `dimension`, and `agent.id` fields.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agent.id was already present, but this time, it is just explicitly set on the ecs.yml. I can add that. What do you think is best @dmathieu?

Copy link
Member

Choose a reason for hiding this comment

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

Mentioning that it's now explicitly set sounds good to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @dmathieu , I updated the changelog to include that

type: enhancement
link: https://github.com/elastic/integrations/pull/6733
- version: 0.2.1
changes:
- description: Added categories and/or subcategories.
Expand Down
6 changes: 6 additions & 0 deletions packages/awsfargate/data_stream/task_stats/fields/ecs.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 |
|---|---|---|
| @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 |
Expand Down
2 changes: 1 addition & 1 deletion packages/awsfargate/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
format_version: 1.0.0
name: awsfargate
title: AWS Fargate
version: 0.2.1
version: 0.2.2
license: basic
description: Collects metrics from containers and tasks running on Amazon ECS clusters with Elastic Agent.
type: integration
Expand Down