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
demandé il y a 2 ans82 vues
Aucune réponse

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions