This runbook helps maintain connectivity for Datadog Agent v5 installations following certificate authority updates.
If you are running Datadog Agent v5, particularly versions below 5.32.7, you may experience connectivity issues with Datadog intake endpoints due to SSL certificate verification failures.
Agent v5 uses an embedded certificate bundle for SSL/TLS verification. When Datadog's SSL certificates are updated to use newer certificate authorities, older Agent v5 installations may not recognize these certificates, causing the Agent to lose connectivity with Datadog.
This runbook provides automated scripts for both Linux and Windows that will:
- Download and install an updated certificate bundle
- Configure the Agent to use your operating system's certificate store as a fallback
- Restart the Agent and verify connectivity
| Your OS | Script to use |
|---|---|
| Linux (all distributions) | linux.sh |
| Windows (all supported versions) | windows.ps1 |
- Supported distributions: Ubuntu/Debian, RHEL/CentOS/Oracle Linux 5+, Fedora, and similar
- Requirements: Root or sudo access,
curlorwget - Options:
-p <agent_directory>— custom Agent installation path-c <cert_file>— path to a local copy ofdatadog-cert.pemfor hosts that cannot reachraw.githubusercontent.com
- Compatibility notes:
- Works with bash 3.1 (default on EL5) — no bash 4+ features
- On RHEL/CentOS/Oracle Linux 5 and 6, the script automatically applies EL5/6
compatibility mode: portable log truncation, insecure download fallback if the
system CA bundle is too old to verify GitHub, and no
journalctl(SysV init)
- Requirements: PowerShell 2.0+, .NET 3.5+, Administrator privileges
- Options:
-AgentDirectory/-p— custom Agent installation path-CertFile/-c— path to a local copy ofdatadog-cert.pemfor hosts that cannot reachraw.githubusercontent.com
- Compatibility notes:
- Works on Windows Server 2008 R2, 2012 R2, 2016, and later
- Uses
System.Net.WebClient(.NET 2.0) as the primary downloader so it works on PS 2.0 (default on 2008 R2);Invoke-WebRequestand BITS are kept as fallbacks - Forces TLS 1.2 using the raw integer value
3072instead of the named enum[Net.SecurityProtocolType]::Tls12(.NET 4.5+) - Windows 2008 R2 and TLS 1.2: TLS 1.2 also requires a system-level fix
(KB3140245 + SChannel registry changes). Without it, downloads from GitHub will
fail. In that case, download
datadog-cert.pemon another machine and use-CertFile.
# Download the script
curl -O https://raw.githubusercontent.com/DataDog/dd-agent/master/runbooks/sectigo-root-ca-rotation-2025/linux.sh
# Make it executable
chmod +x linux.sh
# Run with sudo
sudo ./linux.shThe script auto-detects the OS version and applies EL5/6 compatibility mode when needed.
If the host cannot reach GitHub, download datadog-cert.pem on another machine and transfer it manually, then pass it with -c:
sudo ./linux.sh -c /path/to/datadog-cert.pemOn Windows Server 2016+ (PS 3.0+):
# Download the script (run as Administrator)
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/DataDog/dd-agent/master/runbooks/sectigo-root-ca-rotation-2025/windows.ps1" -OutFile "windows.ps1" -UseBasicParsing
# Run the script
.\windows.ps1On Windows Server 2008 R2 (PS 2.0, no Invoke-WebRequest), use System.Net.WebClient to download:
# Download the script (run as Administrator)
(New-Object System.Net.WebClient).DownloadFile(
"https://raw.githubusercontent.com/DataDog/dd-agent/master/runbooks/sectigo-root-ca-rotation-2025/windows.ps1",
"$env:TEMP\windows.ps1"
)
# Run the script
& "$env:TEMP\windows.ps1"If the host cannot reach GitHub (or TLS 1.2 is not yet enabled at the OS level on 2008 R2), download datadog-cert.pem on another machine, transfer it, then pass it with -CertFile:
.\windows.ps1 -CertFile "C:\Temp\datadog-cert.pem"Both scripts perform the following steps automatically:
- Download Updated Certificate: Fetches the latest Datadog certificate bundle (or uses the file you supply with
-c/-CertFile) - Install Certificate: Places the certificate in the correct location for your Agent installation
- Update Configuration: Enables
use_curl_http_client: truein yourdatadog.confto allow the Agent to use OS-provided certificates - Restart Agent: Restarts the Datadog Agent to apply changes
- Verify Connectivity (best-effort): Scans fresh Agent logs for SSL/certificate errors and confirms API key validation. If automatic verification is not possible (e.g., network restrictions, no curl/wget, or a firewall blocks the test endpoint), the script completes with a warning and clear instructions to test manually — the certificate is still installed.
The scripts output detailed progress information and always print a final summary indicating what was done and, if applicable, what you need to verify manually.
...
=== Connectivity test (since this restart) ===
Checking forwarder.log...
Checking agent status...
API key validation: OK
Connectivity test passed: no certificate verification errors detected.
==============================
DONE — certificate replaced and connectivity verified successfully.
The Datadog certificate has been installed at: /opt/datadog-agent/agent/datadog-cert.pem
The Agent configuration has been updated, the Agent has been restarted,
and no SSL/certificate errors were detected in the logs.
==============================
This happens when network restrictions prevent the test connection, or when neither curl nor wget is available. The certificate is still correctly installed:
Warning: Could not verify connectivity to https://app.datadoghq.com using the installed certificate.
This may be a network restriction, firewall rule, or temporary issue.
The certificate has been installed; connectivity will be confirmed after the Agent restarts.
...
==============================
DONE — certificate replaced, but connectivity could not be fully verified automatically.
The Datadog certificate has been installed at: /opt/datadog-agent/agent/datadog-cert.pem
The Agent configuration has been updated and the Agent has been restarted.
Please verify connectivity manually:
sudo service datadog-agent status
sudo /etc/init.d/datadog-agent info
Check logs for SSL errors:
/var/log/datadog/forwarder.log
/var/log/datadog/collector.log
If SSL errors persist, contact support with the log output above.
==============================
If a fatal step fails (certificate not found, config file missing, Agent failed to restart), the script exits immediately with a specific error message explaining why.
The fallback mechanism (use_curl_http_client: true) relies on your operating system's certificate store. If your operating system is no longer receiving security updates (end-of-life), the OS certificate store may not contain the necessary certificates, and connectivity issues may persist.
The script modifies your /etc/dd-agent/datadog.conf (Linux) or C:\ProgramData\Datadog\datadog.conf (Windows) file. On both platforms, a timestamped backup (*.pre-cert-update-<timestamp> on Linux, *.bak-<timestamp> on Windows) is automatically created before modification.
The scripts require outbound HTTPS connectivity to:
raw.githubusercontent.com(to download the certificate)
Ensure your firewall allows these connections.
Ensure you have network connectivity and your firewall allows outbound HTTPS connections to GitHub.
If the host cannot reach GitHub at all, download datadog-cert.pem from another machine and pass it directly to the script:
Linux (EL5/6):
sudo ./linux.sh -c /path/to/datadog-cert.pemWindows:
.\windows.ps1 -CertFile "C:\Temp\datadog-cert.pem"Verify the Datadog Agent service is installed and running:
Linux:
sudo service datadog-agent statusWindows:
Get-Service DatadogAgentThe script completes even when it cannot verify connectivity (e.g., the test endpoint is blocked by a firewall). It will print a warning and a manual checklist at the end.
If SSL/certificate errors persist after the Agent has restarted, check:
- Verify your operating system is receiving security updates (the
use_curl_http_client: truefallback relies on the OS certificate store) - Check the Agent logs for SSL/certificate error messages:
- Linux:
/var/log/datadog/forwarder.logand/var/log/datadog/collector.log - Windows:
C:\ProgramData\Datadog\logs\forwarder.logandcollector.log
- Linux:
- Contact Datadog Support with the full script output and relevant log excerpts
- Linux: Ensure you run the script with
sudo - Windows: Right-click PowerShell and select "Run as Administrator"
After running the script, verify your Agent is reporting metrics:
- Wait 2-3 minutes for data to appear
- Check your host in the Datadog Infrastructure List
- Verify the "Last Seen" timestamp is recent
You can also manually check the Agent status:
Linux:
sudo /etc/init.d/datadog-agent infoWindows (path may vary):
& "C:\Program Files\Datadog\Datadog Agent\agent.exe" infoWhile this runbook provides a working solution, Datadog strongly recommends upgrading to Datadog Agent v6 or v7 to benefit from:
- Automatic certificate management (no manual intervention needed)
- Ongoing security updates and bug fixes
- Improved performance and new features
- Long-term support
Agent v5 reached end-of-life and no longer receives updates. For migration guidance, visit the Datadog documentation.
If you encounter issues running this runbook or continue experiencing connectivity problems, please contact Datadog Support with:
- Your Agent version
- Operating system and version
- Complete output from the script
- Recent Agent log excerpts showing any errors
For more information about Datadog Agent installation and configuration, see the official Datadog documentation.