This page outlines configurations available for the Atatus Container Agent, which automatically discovers all available containers. Learn how to manage included or excluded containers from data collection and configure specific parameters.
Configurations
Use the following configuration options to customize the agent.
Option | Description |
---|---|
ATATUS_LICENSE_KEY | Obtain your license key. |
ATATUS_CONTAINER_INCLUDE | Allow list of containers. |
ATATUS_CONTAINER_EXCLUDE | Exclude list of containers. |
ATATUS_CONTAINER_INCLUDE_LOGS | Allow list of containers with logs. |
ATATUS_CONTAINER_EXCLUDE_LOGS | Exclude list of containers with logs. |
ATATUS_CONTAINER_INCLUDE_METRICS | Allow list of containers with metrics. |
ATATUS_CONTAINER_EXCLUDE_METRICS | Exclude list of containers with metrics. |
Include & Exclude Options:
Atatus supports the following environment variables for logging and metric inclusion or exclusion based on container and image names. Let’s proceed with configuring them as environment variables. Use the image
flag for specifying the image name and the name
flag for the container name.
Examples:
To monitor containers with the name
api-server
andfrontend-server
:ATATUS_CONTAINER_INCLUDE="name:api-server name:frontend-server"
To exclude containers with the name
nginx
andauth-service
:ATATUS_CONTAINER_EXCLUDE="name:nginx* name:auth-service"
To exclude containers with their image names
apache
andmysql
:ATATUS_CONTAINER_EXCLUDE="image:apache image:mysql"
To include logs and metrics for containers by their name or image:
ATATUS_CONTAINER_INCLUDE_LOGS="image:redis name:payment-service" ATATUS_CONTAINER_INCLUDE_METRIC="image:kafka name:ad-service"
To exclude logs and metrics for containers by their name or image:
ATATUS_CONTAINER_EXCLUDE_LOGS="image:mongodb name:cart-service" ATATUS_CONTAINER_EXCLUDE_METRICS="image:sqlite name:cart-service"
Setting Up with Docker Compose/Docker Swarm:
Add a service named atatus-infra-agent
using the docker image atatus-infra-agent:3.1.0
with the following environment variables:
services:
atatus-infra-agent:
image: atatus/atatus-infra-agent:3.1.0
environment:
ATATUS_LICENSE_KEY: "lic_infra_*****"
# Container include/exclude are optional.
ATATUS_CONTAINER_INCLUDE: "name:api-server name:frontend-server"
volumes:
- "/var/lib/docker/containers:/var/lib/docker/containers:ro"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "/sys/fs/cgroup:/hostfs/sys/fs/cgroup:ro"
- "/proc:/hostfs/proc:ro"
- "/:/hostfs:ro"
command: ["-c", "/etc/atatus-infra-agent/", "-system.hostfs=/hostfs"]
user: root
Running with Docker Command:
Run this container in the background with detached Mode -d
:
sudo docker run -d \
-e ATATUS_LICENSE_KEY="lic_infra_*****" \
-e ATATUS_CONTAINER_EXCLUDE="image:apache image:mysql" \
--user=root \
--volume="/var/lib/docker/containers:/var/lib/docker/containers:ro" \
--volume="/var/run/docker.sock:/var/run/docker.sock:ro" \
--volume="/sys/fs/cgroup:/hostfs/sys/fs/cgroup:ro" \
--volume="/proc:/hostfs/proc:ro" \
--volume="/:/hostfs:ro" \
-it atatus/atatus-infra-agent:3.1.0 -- -c /etc/atatus-infra-agent/ -system.hostfs=/hostfs