Giter Site home page Giter Site logo

Comments (9)

otterley avatar otterley commented on August 12, 2024 2

Similarly, the Agent should be able to substitute the ECS task ID into log stream names by querying the ECS task metadata endpoint. Right now only instance ID, hostname, local_hostname, and ip_address are supported. Best practice is not to allow ECS tasks to access EC2 instance metadata, which prevents the Agent from collecting host-level metadata such as the instance ID.

from amazon-cloudwatch-agent.

pingleig avatar pingleig commented on August 12, 2024 1

For prometheus, it's actually a minor change, we only need to update the export label logic in service discovery implementation to include task arn

labels := make(map[string]string)
addExporterLabels(labels, containerNameLabel, c.Name)
addExporterLabels(labels, taskFamilyLabel, t.TaskDefinition.Family)
revisionStr := fmt.Sprintf("%d", *t.TaskDefinition.Revision)
addExporterLabels(labels, taskRevisionLabel, &revisionStr)
addExporterLabels(labels, taskGroupLabel, t.Task.Group)
addExporterLabels(labels, taskStartedbyLabel, t.Task.StartedBy)
addExporterLabels(labels, taskLaunchTypeLabel, t.Task.LaunchType)

from amazon-cloudwatch-agent.

haojhcwa avatar haojhcwa commented on August 12, 2024

Hi, thank you for your feedback, we will consider adding this feature in our future road map.

from amazon-cloudwatch-agent.

ivan-moto avatar ivan-moto commented on August 12, 2024

This would be very nice to have.

from amazon-cloudwatch-agent.

arlyon avatar arlyon commented on August 12, 2024

I am using cloudwatch-agent to export prometheus metrics to cloudwatch and, thanks to prometheus, the only uniquely identifying field is the "instance" field: the IP address of the prom endpoint the data was collected from. This is okay but inconvenient (at the very best it means having to do a lookup first). Having access to the task ID would be great.

from amazon-cloudwatch-agent.

arlyon avatar arlyon commented on August 12, 2024

Testing changes now, will open a PR for (only) prometheus soon :)

from amazon-cloudwatch-agent.

github-actions avatar github-actions commented on August 12, 2024

This issue was marked stale due to lack of activity.

from amazon-cloudwatch-agent.

georgej-github avatar georgej-github commented on August 12, 2024

Similarly, the Agent should be able to substitute the ECS task ID into log stream names by querying the ECS task metadata endpoint. Right now only instance ID, hostname, local_hostname, and ip_address are supported. Best practice is not to allow ECS tasks to access EC2 instance metadata, which prevents the Agent from collecting host-level metadata such as the instance ID.

+1 for this, would be great if the cloudwatch agent also supported injecting the ECS task ID into log stream names.

from amazon-cloudwatch-agent.

matthewlynden avatar matthewlynden commented on August 12, 2024

+1 for this, we had to move our cloudwatch agent configuration to use {ip_address} instead of the taskId when migrating to Fargate.

from amazon-cloudwatch-agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.