Skip to content

Fix for issue#101 - Missing AWS_EMF_AGENT_ENDPOINT env var #140

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ You must replace all the placeholders (with ```{{ }}```) in the above task defin

* ```{{awslogs-region}}```: The AWS region where the container logs should be published: e.g. ```us-west-2```

* ```{{aws-emf-agent-endpoint}}```: This should point to the endpoint that the agent is listening on. e.g ```tcp://cloudwatch-agent:25888```
* Refer to https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format_Generation_CloudWatch_Agent.html.

You can also adjust the resource limit (e.g. cpu and memory) based on your particular use cases.

Configure the CloudWatch agent through [SSM parameter](https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html). Please create a SSM parameter (```ecs-cwagent-sidecar-ec2``` or ```ecs-cwagent-sidecar-fargate```) in the region where your cluster is located, with the following text:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
"links": [
"cloudwatch-agent"
],
"environment": [{
"name": "AWS_EMF_AGENT_ENDPOINT",
"value": "{{aws-emf-agent-endpoint}}"
}],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
Expand Down Expand Up @@ -45,4 +49,4 @@
],
"cpu": "256",
"memory": "256"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
{
"name": "demo-app",
"image": "{{demo-app-image}}",
"environment": [{
"name": "AWS_EMF_AGENT_ENDPOINT",
"value": "{{aws-emf-agent-endpoint}}"
}],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
Expand Down Expand Up @@ -42,4 +46,4 @@
],
"cpu": "512",
"memory": "1024"
}
}