Datadog Agent Not Reporting Metrics Fix
In this tutorial, you'll learn about Datadog Agent Not Reporting Metrics Fix. We cover key concepts, practical examples, and best practices.
The Datadog Agent shows Not running or No data in last 24 hours — the agent process isn't running, the API key is invalid, or the agent can't reach the Datadog intake endpoint.
The Problem
datadog-agent status
==========
Agent (v7.52.0)
==========
Status date: 2026-06-24 10:00:00
Agent start: 2026-06-20 08:00:00
Pid: 12345
Path: /opt/datadog-agent/bin/agent/agent
Logs: /var/log/datadog/agent.log
API Key: Last 5 chars: abc12
API Key status: API Key is invalid
The API key is invalid or revoked. Datadog rejects all data from this agent.
Step-by-Step Fix
1. Verify the API key
# Check API key validity
datadog-agent config | grep api_key
# Test the API key against Datadog
curl -X GET "https://api.datadoghq.com/api/v1/validate" \
-H "DD-API-KEY: $(grep api_key /etc/datadog-agent/datadog.yaml | awk '{print $2}')"
2. Restart the agent
sudo systemctl restart datadog-agent
sudo datadog-agent status
3. Check network connectivity
# Test connection to Datadog intake
curl -v https://intake.datadoghq.com/api/v1/series
# For EU region
curl -v https://app.datadoghq.eu/api/v1/series
# Check proxy configuration in datadog.yaml
grep -A 3 proxy: /etc/datadog-agent/datadog.yaml
4. Check agent logs for errors
# Recent errors
sudo journalctl -u datadog-agent --since "1 hour ago" | grep -i error
# Agent log file
tail -50 /var/log/datadog/agent.log
5. Verify integrations are configured
# /etc/datadog-agent/conf.d/redisdb.d/conf.yaml
init_config:
instances:
- host: localhost
port: 6379
password: myredispass
Run <a href="/devops/monitoring-tools/">datadog</a>-agent check redisdb to test an integration.
Expected output:
datadog-agent status
==========
API Key: Last 5 chars: xyz78
API Key status: API Key is valid
Metrics: 0.0 B / 10.0 B (0.0%)
Events: 0.0 B / 1.0 MB (0.0%)
Series: 0.0 B / 10.0 B (0.0%)
=== Running Checks ===
cpu (5.43.0)
- 1 OK
disk (5.43.0)
- 1 OK
Prevention Tips
- Rotate API keys regularly and update
<a href="/devops/monitoring-tools/">datadog</a>.yaml - Use Datadog Agent
v7for the latest features - Configure proxy settings if behind a corporate firewall
- Set up Datadog Agent in Docker/K8s with environment variables
- Monitor agent status with a Datadog dashboard
Common Mistakes with agent not reporting
- Using
headandtailinstead of pattern matching, causing runtime errors on empty lists - Forgetting that lazy evaluation defers computation until the value is forced, causing space leaks with unevaluated thunks
- Using
returnto exit a function early instead of wrapping a pure value in the monad
These mistakes appear frequently in real-world DATADOG code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.
Practice Exercise
Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.
This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.
FAQ
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro