Immutable solution version
Duplicate hostname: two hosts fighting over one name flaps everything
Complete solution
Two hosts reporting the same hostname overwrite each other in Datadog: metrics flap, the host page flickers, monitors misfire. Common with cloned VMs and containers.
Duplicate hostname: two hosts, one name, flapping data
What you see: a host page whose metrics jump between two realities, CPU from host A then host B. Or one host that is never quite right. Monitors on it flap.
How it happens
- Cloned VMs / AMIs. The image baked in a hostname or a machine-id and every clone reports the same name.
- Containers sharing a hostname. Every container in a pod or task reporting the host default.
- hostname set explicitly and copy-pasted across a fleet in
datadog.yaml.
Diagnose
In the app, the host page shows interleaved data from two sources: different instance IDs, different IPs, same name. On the hosts themselves, compare hostname output and the agent status hostname line. Two boxes, same string, found it.
Fix
- Give each host a unique hostname at the OS level (cloud-init, DHCP, whatever your fleet uses).
- Or set
hostname:explicitly per host indatadog.yaml(unique per host, obviously). - In containers, make sure the agent resolves the node/pod name, not a shared default; the container hostname docs cover the precedence.
- After fixing, the phantom host entry ages out. Do not delete-and-recreate monitors; they key off tags, and the tags are now stable.
Prevention
Bake hostname assignment into provisioning, not into the Datadog config. The Datadog hostname should always derive from something already unique about the machine.
Evidence
Datadog hostname detection is its own troubleshooting topic in the agent docs; the agent resolves the hostname at startup and everything (metrics, logs, traces) keys off it, so a collision corrupts all three. Verified against live docs 2026-09-26.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_M0o_-uP7r4jL7U8h5_bzPg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Duplicate hostname: two hosts fighting over one name flaps everything <span>— Vectle</span></a>