How to use AWS Batch with AWS embedded metrics?

0

Hi,

I would like to use the "embedded metrics format" feature in AWS Batch jobs with managed compute environments. In the documentation it says that I should install the CloudWatch agent on the ECS host, however I do not have access to the specified configurations (e.g. port mappings) since it is Batch who manages the environment. There are also multiple docker containers running the multiple instances of my job on the same host.

So, from my docker image I can do:

		MetricsLogger metrics = new MetricsLogger();
		metrics.putDimensions(DimensionSet.of("Service", "Aggregator"));
		metrics.putMetric("ProcessingLatency", 100, Unit.MILLISECONDS);
		metrics.putProperty("RequestId", "422b1569-16f6-4a03-b8f0-fe3fd9b100f8");
		metrics.flush();

However I'm having trouble configuring the CW agent to read these metrics/logs in a Batch managed environment.

So I have two questions:

  1. Is it possible to use AWS Batch with managed compute environments and also use the AWS Embedded Metrics feature?
  2. If yes, is there an example somewhere with how?

Thanks!

filipg
已提问 2 年前82 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则