For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/monitors/guide/monitor-ephemeral-servers-for-reboots.md. A documentation index is available at /llms.txt.

Monitor ephemeral servers for reboots

Ephemeral environments spin up and terminate hosts constantly, which can make it challenging to distinguish new hosts from rebooted hosts.

You can use a metric monitor on the system.uptime metric can to address this. The uptime metric is an ever increasing timer which resets to 0 when a host boots up. You can use the diff() function with the metric to distinguish between a new server, which has an uptime of 0 (new server), and a rebooted server, which will show a change (diff) from a running uptime value to a 0.

The example shown below captures how you can set this up:

The New Monitor page in Datadog, showing a metric monitor with a threshold alert set to 0 for the system.uptime metric, averaged by host