Portainer Templates logo

Portainer Templates

Datadog agent (container) Datadog agent (container)

Monitoring

Collect events and metrics

Image details

Pulls: 11.3B
Architecture: amd64, arm64
Image size: 339 MB
Latest: 7.82.1-jmx
User: datadog
Created: May 30, 2017
Updated: 2 days ago
Status: active

Configuration

Type
Container
Platform
linux
Image
datadog/agent:latest
Volumes
/var/run/docker.sock : /var/run/docker.sock/host/sys/fs/cgroup : /sys/fs/cgroup/host/proc : /proc
Env vars
DD_API_KEY=''

Template by portainer

Standalone Install

Select an install method, to see config/commands for deploying Datadog agent (container)

Installation method

Install on Portainer

Import all app templates into your Portainer instance, for easy 1-click deploys

  1. Ensure both Docker and Portainer are installed, and up-to-date
  2. Log into your Portainer web UI
  3. Under Settings → App Templates, paste the below URL
  4. Head to Home → App Templates, and the list of apps will show up
  5. 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 demo

More install options in our documentation.

Supported architectures and operating systems

  • architectures: amd64 arm64v8
  • operating systems: linux windows (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 latest 7 minor 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-jmx
  • 6.X.X , 6.X.X-jmx
  • latest-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:

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: 137 means killed, usually out of memory. 126 or 127 means 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/cgroup is 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 login to 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.

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.sock from /var/run/docker.sock on the host, read-only (a socket it talks to, not storage)
  • /host/sys/fs/cgroup from /sys/fs/cgroup on the host, read-only
  • /host/proc from /proc on 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.