{ "family":"PrometheusTask", "taskRoleArn":"arn:aws:iam::ACCOUNT:role/ECS-Prometheus-Task-Role", "executionRoleArn":"arn:aws:iam::ACCOUNT:role/ECS-Task-Execution-Role", "networkMode":"awsvpc", "containerDefinitions":[ { "name":"config-reloader", "image":"public.ecr.aws/awsvijisarathy/prometheus-sdconfig-reloader:1.0", "user":"root", "cpu": 128, "memory": 128, "environment":[ { "name":"CONFIG_FILE_DIR", "value":"/etc/config" }, { "name":"CONFIG_RELOAD_FREQUENCY", "value":"60" }, { "name":"PROMETHEUS_CONFIG_PARAMETER_NAME", "value":"ECS-Prometheus-Configuration" }, { "name":"DISCOVERY_NAMESPACES_PARAMETER_NAME", "value":"ECS-ServiceDiscovery-Namespaces" } ], "mountPoints":[ { "sourceVolume":"configVolume", "containerPath":"/etc/config", "readOnly":false } ], "logConfiguration":{ "logDriver":"awslogs", "options":{ "awslogs-group":"/ecs/Prometheus", "awslogs-create-group":"true", "awslogs-region":"REGION", "awslogs-stream-prefix":"reloader" } }, "essential":true }, { "name":"aws-iamproxy", "image":"public.ecr.aws/aws-observability/aws-sigv4-proxy:1.0", "cpu": 256, "memory": 256, "portMappings":[ { "containerPort":8080, "protocol":"tcp" } ], "command":[ "--name", "aps", "--region", "REGION", "--host", "aps-workspaces.REGION.amazonaws.com" ], "logConfiguration":{ "logDriver":"awslogs", "options":{ "awslogs-group":"/ecs/Prometheus", "awslogs-create-group":"true", "awslogs-region":"REGION", "awslogs-stream-prefix":"iamproxy" } }, "essential":true }, { "name":"prometheus-server", "image":"quay.io/prometheus/prometheus:v2.24.0", "user":"root", "cpu": 512, "memory": 512, "portMappings":[ { "containerPort":9090, "protocol":"tcp" } ], "command":[ "--storage.tsdb.retention.time=15d", "--config.file=/etc/config/prometheus.yaml", "--storage.tsdb.path=/data", "--web.console.libraries=/etc/prometheus/console_libraries", "--web.console.templates=/etc/prometheus/consoles", "--web.enable-lifecycle" ], "logConfiguration":{ "logDriver":"awslogs", "options":{ "awslogs-group":"/ecs/Prometheus", "awslogs-create-group":"true", "awslogs-region":"REGION", "awslogs-stream-prefix":"server" } }, "mountPoints":[ { "sourceVolume":"configVolume", "containerPath":"/etc/config", "readOnly":false }, { "sourceVolume":"logsVolume", "containerPath":"/data" } ], "healthCheck":{ "command":[ "CMD-SHELL", "wget http://localhost:9090/-/healthy -O /dev/null|| exit 1" ], "interval":10, "timeout":2, "retries":2, "startPeriod":10 }, "dependsOn": [ { "containerName": "config-reloader", "condition": "START" }, { "containerName": "aws-iamproxy", "condition": "START" } ], "essential":true } ], "volumes":[ { "name":"configVolume", "host":{} }, { "name":"logsVolume", "host":{} } ], "requiresCompatibilities":[ "EC2" ], "cpu":"1000", "memory":"1024" }