Skip to main content

Sensor and Scanner

Overview​

The sensor and scanner run as daemon services on EC2 container instances. You configure them with the sensor and scanner variables. They have no effect on Fargate tasks, which use the tracer.

Sensor​

AttributeTypeDefaultDescription
enabledbooltrueWhether the module deploys the sensor daemon service.
image.registrystring"registry.upwind.io"The image registry.
image.repositorystring"images/agent"The image repository.
image.tagstring"0.131.4"The image tag.
image.bccboolfalseUse the -bcc build of the image.
resources.cpunumber51CPU units for the container.
resources.memorynumber1024Memory in MiB for the container.
extra_envmap(string){}Extra environment variables for the container.
docker_security_optionslist(string)[]Docker security options. They apply to both the sensor and the scanner containers.
sensor = {
resources = {
cpu = 128
memory = 2048
}

extra_env = {
EXAMPLE_VARIABLE = "value"
}
}

Scanner​

AttributeTypeDefaultDescription
enabledbooltrueWhether the module deploys the scanner daemon service.
resources.cpunumber51CPU units for the container.
resources.memorynumber512Memory in MiB for the container.
extra_envmap(string){}Extra environment variables for the container.
tmpfs_sizestring"10m"The size of the scanner's tmpfs volume.

The scanner uses the same registry, repository, and tag as the sensor, so sensor.image sets both. The scanner variable has no image attribute.

scanner = {
tmpfs_size = "64m"

resources = {
memory = 1024
}
}

Turn the daemons off​

Both daemons default to true. On a Fargate-only cluster, set both to false:

module "upwind_ecs_runtime" {
source = "https://get.upwind.io/terraform/modules/aws-ecs-runtime/aws-ecs-runtime-1.5.1.tar.gz"

ecs_cluster_name = "my-ecs-cluster"
vpc_id = "vpc-0123456789abcdef0"
subnets = ["subnet-0123456789abcdef0", "subnet-0fedcba9876543210"]

credentials = {
client_id = var.upwind_client_id
client_secret = var.upwind_client_secret
}

sensor = { enabled = false }
scanner = { enabled = false }

cluster_manager = { launch_type = "FARGATE" }
}

Security options​

Use sensor.docker_security_options to pass Docker security options to the sensor and scanner containers:

sensor = {
docker_security_options = ["no-new-privileges"]
}