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

telemetry not working #260

Closed
jdamick opened this issue Dec 3, 2015 · 2 comments
Closed

telemetry not working #260

jdamick opened this issue Dec 3, 2015 · 2 comments

Comments

@jdamick
Copy link

jdamick commented Dec 3, 2015

I'm not seeing any telemetry show up in the console and it appears the agent is having an issue sending it..

Am I missing an IAM permission or something along those lines?

I verified that i can curl the url:

(not using -v to keep it short)

curl https://ecs-t-2.us-east-1.amazonaws.com/
{"Request to path / is not supported":"InvalidURIException"}

In the agent I see:

2015-12-03T20:32:03Z [DEBUG] Got a message from websocket module="ws client" message="{"type":"HeartbeatMessage","message":{"healthy":true}}"
2015-12-03T20:32:03Z [DEBUG] ACS activity occured module="acs handler"
2015-12-03T20:32:15Z [DEBUG] Connecting to TCS endpoint https://ecs-t-2.us-east-1.amazonaws.com/ module="tcs handler"
2015-12-03T20:32:15Z [INFO] Creating poll dialer module="ws client" proxy="proxy.xxxxx:xxx" host="ecs-t-2.us-east-1.amazonaws.com"
2015-12-03T20:32:15Z [WARN] Error creating a websocket client module="ws client" err="websocket: bad handshake"
2015-12-03T20:32:15Z [ERROR] Error connecting to TCS: {"AccessDeniedException":"Forbidden"}, websocket: bad handshake module="tcs handler"
2015-12-03T20:32:15Z [INFO] Error from tcs; backing off module="tcs handler" err="{"AccessDeniedException":"Forbidden"}, websocket: bad handshake"
2015-12-03T20:33:03Z [DEBUG] Got a message from websocket module="ws client" message="{"type":"HeartbeatMessage","message":{"healthy":true}}"
2015-12-03T20:33:03Z [DEBUG] ACS activity occured module="acs handler
@aaithal
Copy link
Contributor

aaithal commented Dec 3, 2015

Hi @jdamick,

Can you verify if you have the required policy on your instance role? Specifically "ecs:StartTelemetrySession" from http://docs.aws.amazon.com/AmazonECS/latest/developerguide/instance_IAM_role.html

More details on enabling metrics can be found here: http://docs.aws.amazon.com/AmazonECS/latest/developerguide/cloudwatch-metrics.html#enable_cloudwatch

@jdamick
Copy link
Author

jdamick commented Dec 3, 2015

thank you, my ecsInstanceRole was missing ecs:StartTelemetrySession.. just attached the: AmazonEC2ContainerServiceforEC2Role

All is now good:

2015-12-03T22:02:37Z [DEBUG] Received AckPublishMetric from tcs module="tcs handler"

@jdamick jdamick closed this as completed Dec 3, 2015
edibble21 pushed a commit to edibble21/amazon-ecs-agent that referenced this issue Jul 9, 2021
* Adding in the ability to set container tags

* removed an unused variable

* Change the lables ENV value.
No value will not give a default error.
Added tests for no lables or blank.

* Change the lables ENV value.
No value will not give a default error.
Added tests for no lables or blank.

* Corrected the spelling of labels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants