CloudWatch Cutome metrics does not created


Hi, Based on this session I tried to report new metrics using cloudwatch-agent (docker image) and Prometheus in order to set up autoscaling. Well, things seem to work fine but no new matrics are added to cloud watch.

Prometheus cloudwatch logs present logs my custom metric: Log Group: /.../ecs/containerinsights/../prometheus

Example Log: { "ClusterName": "XXXX-Cluster-uM8Ibru82elP", "LaunchType": "FARGATE", "StartedBy": "ecs-svc/XXXX", "TaskDefinitionFamily": "XXXX", "TaskGroup": "service:XXXX", "TaskRevision": "87", "Timestamp": "1642512851574", "Version": "0", "container_name": "XXXX", "exported_job": "LBL1", "instance": "", "job": "labrain-ecs-mri", "labrain_mri_counter_total": 0, "prom_metric_type": "counter" }

I notice that other insights logs, within different Log Group, has Metric section:

{...... "CloudWatchMetrics": [ { "Namespace": "ECS/ContainerInsights", "Metrics": [ { "Name": "DesiredTaskCount", "Unit": "Count" }, { "Name": "RunningTaskCount", "Unit": "Count" }, { "Name": "PendingTaskCount", "Unit": "Count" }, { "Name": "DeploymentCount", "Unit": "Count" }, { "Name": "TaskSetCount", "Unit": "Count" } ], "Dimensions": [ [ "ServiceName", "ClusterName" ] ] } ] }

I wonder if that is what is missing from my log and if so what did I miss? Thanks in advance.

No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions