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 次
沒有答案

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

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

回答問題指南