Comments (9)
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.
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
amazon-cloudwatch-agent/internal/ecsservicediscovery/decoratedtask.go
Lines 133 to 140 in 5fe51db
from amazon-cloudwatch-agent.
Hi, thank you for your feedback, we will consider adding this feature in our future road map.
from amazon-cloudwatch-agent.
This would be very nice to have.
from amazon-cloudwatch-agent.
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.
Testing changes now, will open a PR for (only) prometheus soon :)
from amazon-cloudwatch-agent.
This issue was marked stale due to lack of activity.
from amazon-cloudwatch-agent.
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.
+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)
- How should the CloudWatch agent be configured with credentials when it sends logs to CloudWatch in other regions? HOT 1
- Failed to start CloudWatch agent on ubuntu22.04 HOT 2
- Set sampling rate in CloudWatch agent HOT 2
- local script failed to redirect to cw log even when it's created HOT 1
- Conflict error when installing amazon-cloudwatch-agent in EC2 user data HOT 4
- CW Agent not recognizing enhanced_container_insights=true using EKS/ConfigMap HOT 2
- Batch Parsing EMF Logs with Large Numeric Array Targets (>100 Members) HOT 1
- amazon/cloudwatch-agent:1.0.3 doesn't start on Fargate HOT 4
- aggregation_dimensions does not work with statsd
- The CloudWatch Agent requires additional configuration to use IAM Roles for Service Accounts (IRSA) or Pod Identity HOT 2
- Unable to reload agent with error message unable to address what is wrong HOT 1
- Rotate amazon-cloudwatch-agent.log HOT 2
- XRay traces sent by cloudwatch-agent are missing cloudwatch_logs data HOT 2
- cannot get pod from kubelet, err: call to /pods endpoint failed: HOT 2
- amazon-cloudwatch-observability fails with open /root/.aws/credentials ignoring the IRSA credentials HOT 12
- amazon-cloudwatch-agent doesnt respect SIGTERM to flush metrics HOT 8
- Exits with status code 0 when configuration JSON is malformed HOT 2
- multi_line_start_pattern value should be validated on launch HOT 2
- Add Nvidia GPU uuid report HOT 1
- Agent starts running and then exits with Cannot translate JSON, ERROR is exit status 1 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-cloudwatch-agent.