In Datadog, the Containers page provides real-time visibility into all containers across your environment.
Taking inspiration from bedrock tools like htop, ctop, and kubectl, the Containers page gives you complete coverage of your container infrastructure in a continuously updated table with resource metrics at two-second resolution, faceted search, and streaming container logs.
Coupled with Docker, Kubernetes, ECS, and other container technologies, plus built-in tagging of dynamic components, the Containers page provides a detailed overview of your containers’ health, resource consumption, logs, and deployment in real-time:
In some setups, the Process Agent and Cluster Agent cannot automatically detect a Kubernetes cluster name. If this happens, the feature does not start, and the following warning displays in the Cluster Agent log: Orchestrator explorer enabled but no cluster name set: disabling. In this case, you must set datadog.clusterName to your cluster name in values.yaml.
For configuration options, like filtering containers and scrubbing sensitive information, see Configure Containers View. To set up this page for older Agent versions (Datadog Agent v7.21.1 - v7.27.0 and Cluster Agent v1.9.0 - 1.11.0), see Live Containers legacy configuration.
In the Select Resources box at the top left of the Containers page, you can expand the Kubernetes heading to look at pods, clusters, namespaces, and other resources in the Kubernetes Orchestrator Explorer. For more information, see the Orchestrator Explorer documentation.
You can also use the Kubernetes page to see an overview of your Kubernetes resources.
Containers are, by their nature, extremely high cardinality objects. Datadog’s flexible string search matches substrings in the container name, ID, or image fields.
To combine multiple string searches into a complex query, you can use any of the following Boolean operators:
AND
Intersection: both terms are in the selected events (if nothing is added, AND is taken by default) Example: java AND elasticsearch
OR
Union: either term is contained in the selected events Example: java OR python
NOT / !
Exclusion: the following term is NOT in the event. You may use the word NOT or ! character to perform the same operation Example: java NOT elasticsearch or java !elasticsearch
Use parentheses to group operators together. For example, (NOT (elasticsearch OR kafka) java) OR python.
The screenshot below displays a system that has been filtered down to a Kubernetes cluster of 25 nodes. RSS and CPU utilization on containers is reported compared to the provisioned limits on the containers, when they exist. Here, it is apparent that the containers in this cluster are over-provisioned. You could use tighter limits and bin packing to achieve better utilization of resources.
Container environments are dynamic and can be hard to follow. The following screenshot displays a view that has been pivoted by kube_service and host—and, to reduce system noise, filtered to kube_namespace:default. You can see what services are running where, and how saturated key metrics are:
You could pivot by ECS ecs_task_name and ecs_task_version to understand changes to resource utilization between updates.
Containers are tagged with all existing host-level tags, as well as with metadata associated with individual containers.
All containers are tagged by image_name, including integrations with popular orchestrators, such as ECS and Kubernetes, which provide further container-level tags. Additionally, each container is decorated with Docker, ECS, or Kubernetes icons so you can tell which are being orchestrated at a glance.
ECS containers are tagged by:
task_name
task_version
ecs_cluster
Kubernetes containers are tagged by:
pod_name
kube_pod_ip
kube_service
kube_namespace
kube_replica_set
kube_daemon_set
kube_job
kube_deployment
kube_cluster
If you have a configuration for Unified Service Tagging in place, Datadog automatically picks up env, service, and version tags. Having these tags available lets you tie together APM, logs, metrics, and container data.
The Containers page includes Scatter Plot and Timeseries views, and a table to better organize your container data by fields such as container name, status, and start time.
Use the scatter plot analytic to compare two metrics with one another in order to better understand the performance of your containers.
You can switch between the “Scatter Plot” and “Timeseries” tabs in the collapsible Summary Graphs section in the Containers page:
By default, the graph groups by the short_image tag key. The size of each dot represents the number of containers in that group, and clicking on a dot displays the individual containers and hosts that contribute to the group.
The query at the top of the scatter plot analytic allows you to control your scatter plot analytic:
Selection of metrics to display.
Selection of the aggregation method for both metrics.
Selection of the scale of both X and Y axis (Linear/Log).
While actively working with the containers page, metrics are collected at a 2-second resolution. This is important for volatile metrics such as CPU. In the background, for historical context, metrics are collected at 10s resolution.
View streaming logs for any container like docker logs -f or kubectl logs -f in Datadog. Click any container in the table to inspect it. Click the Logs tab to see real-time data from live tail or indexed logs for any time in the past.
You can see indexed logs that you have chosen to index and persist by selecting a corresponding timeframe. Indexing allows you to filter your logs using tags and facets. For example, to search for logs with an Error status, type status:error into the search box. Autocompletion can help you locate the particular tag that you want. Key attributes about your logs are already stored in tags, which enables you to search, filter, and aggregate as needed.