How to change CloudWatch metrics_collection_interval for ECS

0

How to change CloudWatch metrics_collection_interval for ECS? I am using fargate spot instances. Can I do this using terraform configuration?

1 個回答
0

Metrics_collection_interval – Optional. Specifies how often all metrics specified in this configuration file are to be collected. You can override this value for specific types of metrics. This value is specified in seconds. For example, specifying 10 causes metrics to be collected every 10 seconds, and setting it to 300 specifies metrics to be collected every 5 minutes. If you set this value below 60 seconds, each metric is collected as a high-resolution metric. The default value is 60.

The following is an example of an agent section. You can modify the interval from 60 to the desired value (in seconds).

"agent": {
   "metrics_collection_interval": 60,
   "region": "us-west-1",
   "logfile": "/opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log",
   "debug": false,
   "run_as_user": "cwagent"
  }

Not sure you can specify this agent parameter from terraform. You can check this part of the documentation for further details.

AWS
David C
已回答 1 年前
  • Thanks for the answer! But it's super unclear how I can configure cloudwatch agent in case if I am using Elastic container service..

    Can I configure Cloudwatch agent from Cloudwatch interface maybe somewhere?

  • Here you can find the documentation on how to deploying the CloudWatch agent and the X-Ray daemon on Amazon ECS.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南