본문 바로가기
WIKI 기술 지식 베이스

모니터 평가 주기 커스터마이즈하기

원문 보기 위키 갱신

모니터 평가 주기 커스터마이즈하기 (Customize monitor evaluation frequencies)

특정 평가 시각을 설정하고 모니터의 평가 주기를 제어하면 환경에서 실행되는 중요한 작업(critical job)의 실행을 추적할 수 있어요. 모니터 커스텀 스케줄(Custom Schedules)을 사용하면 cron 작업처럼 연속적으로 모니터링할 필요가 없는 시스템과 프로세스에 대해 경보를 발생시킬 수 있어요.

모니터 커스텀 스케줄은 events, logs, metrics 모니터에서 일일(daily), 주간(weekly), 월간(monthly) 스케줄링 간격으로 지원돼요.

출처: 문서

본문

구성 (Configuration)

{% image source="https://docs.dd-static.net/images/monitors/guide/custom_schedules/add_custom_schedule.729a3127e681f3f8cc37e4198bfdf3c5.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/custom_schedules/add_custom_schedule.729a3127e681f3f8cc37e4198bfdf3c5.png?auto=format&fit=max&w=850&dpr=2 2x" alt="Button to add custom schedule in the monitor configuration" /%}

Add Custom Schedule을 클릭해 평가 주기를 구성해요.

{% alert level="danger" %} 모니터에서 커스텀 스케줄을 활성화하면 커스텀 스케줄을 비활성화할 수 없어요. 커스텀 스케줄은 모니터를 만들 때만 추가하거나 제거할 수 있어요. Remove non-reporting groups 설정도 사용할 수 없어요. 이를 해결하려면 커스텀 스케줄 없이 새 모니터를 만들어야 해요. {% /alert %}

{% tab title="Day" %} 모니터가 평가할 하루 중 시각을 선택해요.

예를 들어 다음 모니터는 매일 오후 8시에 일일 백업 작업이 각 데이터베이스 인스턴스에 대해 success 이벤트를 생성했는지 확인해요.

{% image source="https://docs.dd-static.net/images/monitors/guide/custom_schedules/custom_day.08de633463f0e9c6747c0930d5b073c8.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/custom_schedules/custom_day.08de633463f0e9c6747c0930d5b073c8.png?auto=format&fit=max&w=850&dpr=2 2x" alt="Monitor configuration to check every day at 8pm that a success event has been generated for each database instance as a result of the daily backup job" /%}

{% /tab %}

{% tab title="Week" %} 모니터가 평가할 요일과 하루 중 시각을 선택해요.

예를 들어 다음 모니터는 매주 화요일과 토요일 오전 6시에 각 개별 캠페인에 대해 마케팅 이메일이 전송됐는지 확인해요.

{% image source="https://docs.dd-static.net/images/monitors/guide/custom_schedules/custom_week.446b29ceff16300debbfa0db011fd665.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/custom_schedules/custom_week.446b29ceff16300debbfa0db011fd665.png?auto=format&fit=max&w=850&dpr=2 2x" alt="Monitor configuration to check every week on Tuesday and Saturday at 6am that marketing emails have been sent for each individual campaign" /%}

{% /tab %}

{% tab title="Month" %} 모니터가 평가할 달의 날짜와 하루 중 시각을 선택해요.

예를 들어 다음 모니터는 매월 첫날에 고객 인보이스를 생성하는 cron 작업이 성공적으로 실행됐는지 확인해요.

{% image source="https://docs.dd-static.net/images/monitors/guide/custom_schedules/custom_month.4992c9647c8f1cb53ceb5776389c1ee3.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/custom_schedules/custom_month.4992c9647c8f1cb53ceb5776389c1ee3.png?auto=format&fit=max&w=850&dpr=2 2x" alt="Monitor configuration to check on the first day of each month whether the cron job generating customer invoices has successfully run." /%}

{% /tab %}

RRULES

반복 규칙(RRULE)은 iCalendar RFC의 속성 이름으로, 반복 이벤트를 정의하는 표준이에요. 공식 RRULE 생성기를 사용해 반복 규칙을 만들 수 있어요. RRULE을 활용하면 더 고급스러운 스케줄링 사용 사례를 다룰 수 있어요.

모니터에 커스텀 RRULE을 작성하려면 Use RRULE을 클릭해요.

참고 사항:

  • RRULE에서 기간을 지정하는 속성은 지원되지 않아요 (예: DTSTART, DTEND, DURATION).
  • 평가 주기는 하루 이상이어야 해요. 더 짧은 평가 주기는 기본 모니터 스케줄을 사용해요.

예시: 매월 마지막 날에 평가하는 모니터 (Example: Monitor evaluates on the last day of the month)

FREQ=MONTHLY;BYMONTHDAY=28,29,30,31;BYSETPOS=-1

{% image source="https://docs.dd-static.net/images/monitors/guide/custom_schedules/RRULE_last_day_month.9ffae6fc4f0c4c971ae9348309d76604.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/custom_schedules/RRULE_last_day_month.9ffae6fc4f0c4c971ae9348309d76604.png?auto=format&fit=max&w=850&dpr=2 2x" alt="RRULE syntax used in the UI to evaluate the last day of the month" /%}

예시: 격월로 매월 첫 번째와 마지막 일요일에 평가하는 모니터 (Example: Monitor evaluates every other month on the first and last Sunday of the month)

FREQ=MONTHLY;INTERVAL=2;BYDAY=1SU,-1SU

{% image source="https://docs.dd-static.net/images/monitors/guide/custom_schedules/RRULE_month_last_sunday.c8a4f9705a82a6cc96d7017fd6a9f5f9.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/custom_schedules/RRULE_month_last_sunday.c8a4f9705a82a6cc96d7017fd6a9f5f9.png?auto=format&fit=max&w=850&dpr=2 2x" alt="RRULE syntax used in the UI to evaluate every other month on the first and last Sunday of the month" /%}

커스텀 스케줄이 있는 모니터의 경보 동작 (Alerting behavior of monitors with custom schedules)

기본 스케줄링을 사용하는 모니터는 기본 평가 주기로 쿼리를 실행하고, 모니터 상태 전환(예: WARN에서 OK로, OK에서 ALERT로)에 따라 경보를 보내요.

아래 타임라인은 기본 스케줄링을 쓰는 모니터의 동작을 보여줘요. 이 모니터는 상태 변화에 해당하는 경보를 보내요.

{% image source="https://docs.dd-static.net/images/monitors/guide/custom_schedules/alerting_behavior_regular.3cf24c84af27b5b963802275ed5939c1.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/custom_schedules/alerting_behavior_regular.3cf24c84af27b5b963802275ed5939c1.png?auto=format&fit=max&w=850&dpr=2 2x" alt="Visual diagram showing a when a monitor sends an alert based on monitor state transitions for the default schedule with a thirty minute evaluation frequency" /%}

반면 커스텀 스케줄이 있는 모니터는 일일, 주간, 월간 단위로 평가하고 개별 평가 결과에 따라 경보를 보내요. 각 평가는 이전 평가와 독립적이며, 결과가 OK가 아닐 때 알림을 보내요.

아래 타임라인은 커스텀 스케줄로 실행되는 모니터의 동작을 보여줘요. 기본 스케줄 모니터와 달리 커스텀 스케줄 모니터는 평가 시간에 모니터 상태에 기반해 경보를 보내요.

{% image source="https://docs.dd-static.net/images/monitors/guide/custom_schedules/alerting_behavior_custom.36f769ddd9097b297828710f3218238e.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/custom_schedules/alerting_behavior_custom.36f769ddd9097b297828710f3218238e.png?auto=format&fit=max&w=850&dpr=2 2x" alt="Visual diagram showing a when a monitor sends an alert based on monitor state for the custom schedule with a daily evaluation frequency" /%}

그룹 보존 (Group retention)

기본적으로 그룹은 보존되며, 그룹이 보고를 중단한 후 24~48시간 동안 유지된 뒤 모니터에서 제거돼요. 커스텀 스케줄이 있는 모니터는 그룹을 훨씬 오래 보존하며, 보존 기간은 구성한 평가 주기에 따라 확장돼요:

평가 주기 (Evaluation Frequency) 그룹 보존 기간 (Group Retention)
Daily 30 days
Weekly 90 days
Monthly 180 days

더 알아보기 (Learn more)