Datadog agent (container)
Collect events and metrics
Image details
Configuration
TypeContainerlinuxdatadog/agent:latest/var/run/docker.sock : /var/run/docker.sock/host/sys/fs/cgroup : /sys/fs/cgroup/host/proc : /procDD_API_KEY=''Template by portainer
Standalone Install
Select an install method, to see config/commands for deploying Datadog agent (container)
Install on Portainer
Import all app templates into your Portainer instance, for easy 1-click deploys
- Ensure both Docker and Portainer are installed, and up-to-date
- Log into your Portainer web UI
- Under Settings → App Templates, paste the below URL
- Head to Home → App Templates, and the list of apps will show up
- Select Datadog agent (container), fill in any config options, and hit Deploy
Template Import URL
https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me
More install options in our documentation.
Supported architectures and operating systems
- architectures:
amd64arm64v8 - operating systems:
linuxwindows (1809, 1909, 2004, 20h2)
Supported versions
Agent 7
The Datadog agent, including a Python 3 interpreter for Python checks.Relevant tags are:
7,7-jmx: use these if you want to track the latest7minor release, without breaking change.7.X.X,7.X.X-jmx: use these if you want to pin the agent to a precise version (don't forget to upgrade regularly for the latest features).latest,latest-jmx: use these for following the latest agent release, but keep in mind that it will update automatically to the next major release, which will have breaking changes. Major releases are very infrequent (less than one per year).
Agent 6
The Datadog agent, including a Python 2 interpreter for Python checks. Note that Python 2 EOL is set for January 1, 2020.Relevant tags are:
6,6-jmx6.X.X,6.X.X-jmxlatest-py2,latest-py2-jmx
Image variants
The agent image comes in two flavors, each one fulfilling a specific use case.agent:\-jmx
This variant embeds a Java Runtime Environment for JMX-based checks. If you
are uncertain about what your needs are, this is probably the one you should
use.agent:\
This variant doesn't embed a Java runtime. If you don't plan on using
JMX-based checks, you probably want to pick that one since it is noticeably
slimmer.Documentation
Please refer to:- https://docs.datadoghq.com/
- usage instructions for this image
- general agent documentation in our repo
Support
For issues and help troubleshooting, please contact our support team. If you want to contribute, or think you found a bug in the agent, let's talk on our github repository.License
View license information for the software contained in this image.As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.
Check the logs first
Nine times out of ten the logs tell you exactly what went wrong.
- In Portainer, go to Containers, click the container, then Logs. Or run
docker logs <container> - Exit codes help too:
137means killed, usually out of memory.126or127means the command inside the image is broken.
Permission denied on volumes
If the logs show "permission denied", the app can't write to its data folder on the host.
- Seeing "read-only file system"?
/sys/fs/cgroupis mounted read-only on purpose, the app isn't meant to write there.
Can't reach the Docker socket
This app talks to Docker through /var/run/docker.sock. If the logs show
"permission denied while trying to connect to the Docker daemon socket", the app's user can't access it.
- Check the socket exists on the host:
ls -l /var/run/docker.sock - Run the container as root, or add the docker group's id to the container with
group_add.
Image won't pull
Test the pull directly on the host: docker pull datadog/agent:latest
- "manifest unknown" means the tag no longer exists. This template uses
latest, so try pinning a specific version instead. - "toomanyrequests" is the Docker Hub rate limit. Log in with
docker loginto raise it. - "no space left on device" means a full disk. Reclaim space with
docker system prune
"exec format error"
This means the image was built for a different CPU architecture than your server.
- This image supports:
amd64, arm64 - Check yours with
uname -m: x86_64 is amd64, aarch64 is arm64. Raspberry Pi and other ARM boards are the usual culprits.
Required settings are blank
DD_API_KEY has no default value, and the app may crash or misbehave if left empty.
- Fill it in on the deploy screen before hitting deploy.
Raise an issue
Found something which isn't working as it should? Here's how to report it.
- Bug within the app: Open an issue within the app's repo
- Template not working: Open an issue on portainer/templates
- This website not working: Open an issue on lissy93/portainer-templates
A single container
Datadog agent (container) runs as one container, the simplest kind of app here. Just the one image to pull and nothing else wired up alongside it.
The app image
An image is the app packed up ready to go, everything Datadog agent (container) needs bundled into one download. This template pulls datadog/agent:latest, which Docker fetches once (about 339 MB) and then starts your own copy from.
Where the image comes from
Docker pulls its images from registries, public libraries of ready-built apps. Datadog agent (container)'s comes from Docker Hub, published by datadog.
Version tags
The bit after the colon in the image name is the version tag. Here it's latest, which always points at the newest build, so a redeploy can bump you to a newer release without you asking. Newest right now is 7.82.1-jmx. Pin a specific tag if you would rather stay on one version.
Which machines it runs on
Every image is built for particular CPU types. This one ships for amd64, arm64, so it runs on both regular x86 servers and ARM boards like a Raspberry Pi.
Volumes
A volume is where Datadog agent (container) keeps its files so they survive an update or a restart. Without one, anything it saves would sit inside the container and vanish the moment it's recreated. This template mounts:
/var/run/docker.sockfrom/var/run/docker.sockon the host, read-only (a socket it talks to, not storage)/host/sys/fs/cgroupfrom/sys/fs/cgroupon the host, read-only/host/procfrom/procon the host, read-only
Environment variables
Environment variables are the settings you hand over when you deploy, things like a password or a timezone. Datadog agent (container) takes 1 of them, and one needs a value before it'll start properly:
DD_API_KEY, needs a value. Datadog API key
Networking
Nothing custom is set, so Datadog agent (container) sits on Docker's default bridge network: its own private space that reaches the outside world only through the ports it publishes.
Platform
The platform is linux, the kind of system the container is built to run on. Docker and Portainer handle this on a normal Linux server.
Portainer app templates
Zooming out, this whole page comes from a Portainer app template: a short recipe telling Portainer how to set Datadog agent (container) up. Add the template list to Portainer once, then deploying Datadog agent (container) is a click rather than a wall of config.