Skip to main content

Agent

Linux 6.6X

Platform

Current

Cloud

AWS

queryId: LW_CUSTOM_ECS_WO_AGENTS
queryText: |-
LW_CUSTOM_ECS_WO_AGENTS {

source {
LW_CFG_AWS_ECS_DESCRIBE_TASKS task
}

filter {
RESOURCE_CONFIG:lastStatus = 'RUNNING'

and

not (
task.ARN in {
source {
LW_HE_CONTAINERS
}
return distinct {
PROPS_LABEL:"com.amazonaws.ecs.task-arn"::string as container_task_arn


}
}
)
}

return distinct{task.ARN as ECS_Missing_Agent, task.ACCOUNT_ALIAS, task.ACCOUNT_ID, task.RESOURCE_REGION, task.RESOURCE_TYPE, task.RESOURCE_CONFIG:lastStatus}
}

If we see a task in LW_CFG_AWS_ECS_DESCRIBE_TASKS that doesn’t show up in the Container PROPS_LABEL, this means that that specific task does not have an agent installed, as all Container based Agents report to the LW_HE_CONTAINERS datasource.


Reply