임시 서버의 재부팅 모니터링하기
임시 서버의 재부팅 모니터링하기 (Monitor ephemeral servers for reboots)
임시(ephemeral) 환경은 호스트를 끊임없이 생성하고 종료하므로, 새 호스트와 재부팅된 호스트를 구분하기 어려울 수 있어요.
system.uptime 메트릭에 메트릭 모니터를 사용하면 이 문제를 해결할 수 있어요. 업타임 메트릭은 계속 증가하는 타이머로, 호스트가 부팅되면 0으로 리셋돼요. 이 메트릭에 diff() 함수를 사용하면 업타임이 0인 새 서버와, 실행 중인 업타임 값에서 0으로 바뀌는 변화(diff)를 보여주는 재부팅된 서버를 구분할 수 있어요.
아래 예시는 이렇게 설정하는 방법을 보여줘요:
{% image source="https://docs.dd-static.net/images/monitors/guide/ephemeral_set_up_2025-05-20.3dea6ec076019ea61e9a8889278a43fb.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/ephemeral_set_up_2025-05-20.3dea6ec076019ea61e9a8889278a43fb.png?auto=format&fit=max&w=850&dpr=2 2x" alt="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" /%}
출처: 문서
본문
임시 환경은 호스트를 끊임없이 생성하고 종료하므로, 새 호스트와 재부팅된 호스트를 구분하기 어려울 수 있어요.
system.uptime 메트릭에 메트릭 모니터를 사용하면 이 문제를 해결할 수 있어요. 업타임 메트릭은 계속 증가하는 타이머로, 호스트가 부팅되면 0으로 리셋돼요. 이 메트릭에 diff() 함수를 사용하면 업타임이 0인 새 서버와, 실행 중인 업타임 값에서 0으로 바뀌는 변화(diff)를 보여주는 재부팅된 서버를 구분할 수 있어요.
아래 예시는 이렇게 설정하는 방법을 보여줘요:
{% image source="https://docs.dd-static.net/images/monitors/guide/ephemeral_set_up_2025-05-20.3dea6ec076019ea61e9a8889278a43fb.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/ephemeral_set_up_2025-05-20.3dea6ec076019ea61e9a8889278a43fb.png?auto=format&fit=max&w=850&dpr=2 2x" alt="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" /%}