惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
G
Google Developers Blog
博客园 - 司徒正美
J
Java Code Geeks
aimingoo的专栏
aimingoo的专栏
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
D
Docker
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
腾讯CDC
V
Visual Studio Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
Check Point Blog
M
MIT News - Artificial intelligence
Jina AI
Jina AI
I
InfoQ
雷峰网
雷峰网
The Cloudflare Blog
美团技术团队
Engineering at Meta
Engineering at Meta

Datadog | The Monitor blog

Introducing our open source AI-native SAST Instrument and monitor Boomi integration flows with OpenTelemetry and Datadog Not all index scans are equal: How we cut query latency by over 99% Platform engineering metrics: What to measure and what to ignore Integrate Recorded Future threat intelligence with Datadog Cloud SIEM CI/CD security: threat modeling using a MITRE-style threat matrix CI/CD security: How to secure your GitHub ecosystem Ingress NGINX is EOL: A practical guide for migrating to Kubernetes Gateway API Operating agentic AI with Amazon Bedrock AgentCore and Datadog LLM Observability: Lessons from NTT DATA Introducing the Datadog Code Security MCP Capture and analyze custom heatmaps in Session Replay Understand session replays faster with AI summaries and smart chapters Monitor ClickHouse query performance with Datadog Database Monitoring How we designed empathetic alert sounds for on-call engineers Search and act across Datadog to resolve issues faster with Bits Assistant Measure the business impact of every product change with Datadog Experiments Analyzing round trip query latency Configuring JavaScript caches for better performance Introducing Bits AI Dev Agent for Code Security Datadog achieves ISO 42001 certification for responsible AI Monitor Nutanix clusters, hosts, and VMs with Datadog Monitor Juniper Mist in Datadog A new Host Map for modern infrastructure Annotate traces to improve LLM quality with Datadog LLM Observability What’s new in Cloud SIEM: AI-powered investigations, enhanced threat intelligence, and scalable security operations Explore Kubernetes with native OpenTelemetry data Monitor Oracle Fusion Cloud Applications with Datadog Announcing the Datadog Terraform provider v4.0.0 Scaling Kubernetes workloads on custom metrics How to design cloud environments for AI-powered threat analysis
Docker-ize Datadog with Agent containers
Zaheda Haidri · 2014-06-10 · via Datadog | The Monitor blog
Zaheda Haidri

Zaheda Haidri

Docker is an exciting technology that offers a different approach to building and running applications thanks to a clever combination of Linux containers (good for ops) and a git-like approach to packaging software (good for dev) so that your containers have everything they need to run without dependencies.

Many Docker users are embracing the Docker way and taking a container-only approach. As we developed our Docker integration, we didn’t want to force you to break from a container-only strategy because of the traditional Datadog Agent architecture. Instead, we’ve also embraced the Docker way and released a Docker-ized Datadog Agent deployed in a container.

The Docker philosophy

First, a brief introduction on how infrastructure is set up with Docker. In Docker, each of your applications is isolated in its own container. The blueprint for a container is its Dockerfile, which is a set of steps to create the container. These steps build the standard binaries and libraries and install your application’s code and its dependencies such as Python, Redis, Postgres, etc.

The Docker engine then creates the actual container to run using namespaces and cgroups. These are two features found in recent versions of the Linux kernel used to isolate system calls and resource usage (CPU, memory, disk I/O, etc.) directly on your server. The end result is multiple containers on the server with each application thinking it is in its own machine by itself, without the overhead associated with fully virtualized machines.

The traditional Datadog setup

Until Docker arrived, applications were built in virtual servers, or were built directly on raw servers. In this case, you install the Agent on your server and decide what applications and services you want to monitor in Datadog. If you want to send custom metrics to Datadog, you instrument your application with our version of StatsD, called DogStatsD. This set-up is illustrated below.

Monitor Docker with Datadog

The traditional Datadog setup in the Docker environment means the Datadog Agent runs next to the Docker engine.

Datadog the Docker way

Because the Docker philosophy is to use containers to isolate applications from each other, we have built a “Docker-ized” installation of the Datadog Agent. We have isolated the Agent into two kinds of Docker containers. The first container includes the Datadog Agent plus DogStatsD. The Datadog Agent is responsible for sending us both native host and container-specific metrics, like the number of containers, load, memory, disk usage, and latency. DogStatsD will send us custom metrics you have instrumented in containerized applications. Again, you can read more about what exactly Datadog monitors in Docker in our Monitor Docker performance with Datadog post.

DOCKER_CONTENT_TRUST=1 docker run -d \

--name dd-agent \

-v /var/run/docker.sock:/var/run/docker.sock:ro \

-v /proc/:/host/proc/:ro \

-v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \

-e DD_API_KEY=<API_KEY> datadog/agent:7

Make sure to replace <YOUR_DATADOG_API_KEY> with your Datadog API key. If you want to monitor custom metrics in containerized applications, the other Datadog container isolates DogStatsD so that you can send us custom metrics to monitor. To do this, add -e DD_DOGSTATSD_NON_LOCAL_TRAFFIC=true and -p 8125:8125/udp to the above parameters to bind the container’s StatsD port to the host’s IP and listen for DogsStatsD packets (custom metrics). For detailed documentation on how to install the Docker-ized Datadog containers, please visit our Docker installation guide.

As mentioned in the Monitor Docker with Datadog post, if you would like to alert on and visualize Docker metrics, you can sign-up for a 14-day free trial of Datadog. Docker metrics will be available immediately after installing the Datadog Agent in its traditional format or as a container.