Skip to content

Instantly share code, notes, and snippets.

@bruceharrison1984
Last active August 19, 2021 16:57
Show Gist options
  • Save bruceharrison1984/4eed124178a876c6d2f7cbd7a2e86e05 to your computer and use it in GitHub Desktop.
Save bruceharrison1984/4eed124178a876c6d2f7cbd7a2e86e05 to your computer and use it in GitHub Desktop.
Export ECS metrics to AMP
{
"executionRoleArn": "<execution-role-arn>",
"containerDefinitions": [
{
"image": "tkgregory/prometheus-ecs-discovery:latest",
"name": "prometheus-ecs-discovery-alpha",
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/alpha/ecs-prometheus",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix": "prometheus-ecs-discovery"
}
},
"command": [
"-config.cluster=<cluster-name>",
"-config.write-to=/output/ecs_file_sd.yml"
],
"mountPoints": [
{
"containerPath": "/output",
"sourceVolume": "ecs-discovery"
}
]
},
{
"image": "ghcr.io/bruceharrison1984/ecomm-prometheus:v2.29.1",
"name": "prometheus-alpha",
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/alpha/ecs-prometheus",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix": "prometheus"
}
},
"environment": [
{
"name": "S3_CONFIG_LOCATION",
"value": "s3://<s3-bucket>/prometheus.yml"
}
],
"mountPoints": [
{
"containerPath": "/output",
"sourceVolume": "ecs-discovery"
}
]
}
],
"memory": "2048",
"taskRoleArn": "<task-role-arn>",
"compatibilities": [
"EC2",
"FARGATE"
],
"requiresCompatibilities": [
"FARGATE"
],
"networkMode": "awsvpc",
"cpu": "1024",
"status": "ACTIVE",
"volumes": [
{
"name": "ecs-discovery"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment