-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DBM monitoring, and other label config not support on ECS FARGATE. Allow setting via ENV. #9676
Comments
Hi, @pieterza try to add ECS_FARGATE=true environment variable. |
Setting Maybe this is something specific to DBM? |
Utilizing labels to transmit connection details such as the |
Hi. I have a use case where I have a lambda function that uses the rds instance that I want to monitor. I created a Fargate cluster with the agent as the sole service/task running in the cluster and setting {
name = "dd-agent"
image = "public.ecr.aws/datadog/agent:latest"
essential = true
portMappings = [
{
containerPort = 8125
hostPort = 8125
protocol = "udp"
},
{
containerPort = 8126
hostPort = 8126
protocol = "tcp"
}
]
environment = [
{
name = "ENV"
value = terraform.workspace
},
{
name = "DD_TAGS",
value = "env:${terraform.workspace} environment:${terraform.workspace} region:${var.region}"
},
{
name = "ECS_FARGATE",
value = "true"
}
]
secrets = [
{
name = "DD_API_KEY"
valueFrom = data.aws_secretsmanager_secret.dd_api_key.arn
}
]
logConfiguration = {
logDriver = "awslogs"
options = {
"awslogs-group" = aws_cloudwatch_log_group.dd_agent.name
"awslogs-region" = var.region
"awslogs-stream-prefix" = "dd-agent"
}
}
dockerLabels = {
"com.datadoghq.ad.checks" = jsonencode({
postgres = {
init_config = [{}]
instances = [
{
dbm = true
host = aws_db_instance.rds.address
port = 5432
username = "datadog"
aws = {
instance_endpoint = aws_db_instance.rds.address,
region = var.region
managed_authentication = {
enabled = true
}
}
}
]
}
})
}
} |
In case anyone stumbles upon this in the future.. I reached out to Datadog support about this and was sent to https://docs.datadoghq.com/integrations/faq/integration-setup-ecs-fargate/?tab=rediswebui. I followed this doc and am now all set with labels. The difference between this doc and what I had originally done after following the datadog DBM setup docs, is the labels |
The documentation for ECS/Docker and RDS DBM contains only the use of labels to set the DBM config:
https://docs.datadoghq.com/database_monitoring/setup_mysql/aurora/?tab=docker
This relies on
/var/run/docker.sock
being mounted as read only, for the agent to be able to read it's own labels.This is not supported on 'serverless' container platforms such as ECS FARGATE, and others which have limited access to the underlying host.
Please allow us to set the DBM config via ENV perhaps, as I have tested by passing in a custom datadog config that DBM is working even on FARGATE as long as we do not need to read labels or otherwise touch the docker socket.
In the mean time, I'm forced to building a config (example below) and passing it into the container as a hacky workaround for anyone else with this issue.
The text was updated successfully, but these errors were encountered: