Autodiscovery Troubleshooting
Rapport de recherche Datadog : Bilan sur l'adoption de l'informatique sans serveur Rapport : Bilan sur l'adoption de l'informatique sans serveur

Autodiscovery Troubleshooting

Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

To start troubleshooting the Docker Agent Autodiscovery, run the configcheck init script command:

docker exec -it <AGENT_CONTAINER_NAME> agent configcheck -v

Note: The -v option allows you to see all templates including the one that are unresolved.

For example, the following example is a valid Autodiscovery configuration for a Redis template being loaded from a Docker label annotation—not the default redisdb.d/auto_conf.yaml file:

# docker exec -it <AGENT_CONTAINER_NAME> agent configcheck -v
=== Provider: Docker container labels ===

--- redisdb check ---
Instance 1:
port: "6379"
- short_image:redis
- image_tag:latest
- docker_image:redis:latest
- image_name:redis
Auto-discovery IDs:
* docker://81e66fd4c948a502b4428417d8cf2ebc58caaff55a6e5879a41887057342aec2

The following examples show issues that could appear when failing to load a valid Autodiscovery configuration for a Redis template:

# docker exec -it <AGENT_CONTAINER_NAME> agent configcheck -v
=== Resolve warnings ===

* No service found with this AD identifier: redis
* Can't resolve the template for redisdb at this moment.

=== Unresolved Configs ===

Auto-discovery IDs: redis
- host: '%%host%%'
  port: '%%port%%'

If you’re still unsure about the issue, reach out to the Datadog support team with a flare from your Agent.

Further Reading