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

모니터 히스토리와 평가 그래프

원문 보기 위키 갱신

모니터 히스토리와 평가 그래프 (Monitor History and Evaluation Graphs)

모니터 상태 페이지(Monitor Status page)에는 모니터 평가에 대한 통찰력을 제공하는 두 개의 그래프, 즉 히스토리 그래프(History Graph)와 평가 그래프(Evaluation Graph)가 있어요. 이 가이드가 다루는 내용은 다음과 같아요:

  • 히스토리 그래프와 평가 그래프 정의하기
  • 두 그래프가 표시하는 값
  • 모니터 밖에서 평가 그래프 결과를 재현하기

출처: 문서

본문

평가 그래프 vs. 히스토리 그래프 (Evaluation vs. History graph)

{% dl %}

{% dt %} History Graph {% /dt %}

{% dd %} 모니터 쿼리에 대해 제출되는 원시 데이터 포인트를 보여줘요. 모니터 상태 페이지는 노트북과 대시보드에서 같은 그래프 위젯을 사용해요. {% /dd %}

{% dt %} Evaluation Graph {% /dt %}

{% dd %} 사용자가 정의한 알림 조건에 적용된 메트릭의 원시 데이터 포인트 결과를 보여줘요. 이 그래프의 데이터는 평가 창으로 인해 집계되고 축소되었으므로, 쿼리 결과는 각 데이터 포인트에 대한 query value 위젯과 유사해요. {% /dd %}

{% /dl %}

원시 데이터 포인트를 모니터링하기 위해 Datadog에 제출하면, 이 정보는 히스토리 그래프에 시각화돼요. 예를 들어 지난 5분 동안 다음 데이터 포인트가 있다고 해볼게요: [10, 15, 12, 8, 11]. 히스토리 그래프는 각 값을 보여줘요.

{% image source="https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/history_graph_query_config.9f4f51658c72438c0e6e82cf03324be4.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/history_graph_query_config.9f4f51658c72438c0e6e82cf03324be4.png?auto=format&fit=max&w=850&dpr=2 2x" alt="Metric query configuration of the monitor highlighting the section the history graph displays" /%}

쿼리 평가를 구성하면 이는 모니터가 경보를 받을 메트릭 값에 또 다른 집계를 추가해요. 예를 들어 모니터가 지난 5분 동안의 평균을 평가하도록 구성했다고 해볼게요. 평가 그래프는 값 11.2를 단일 데이터 포인트로 보여줘요.

(10+15+12+8+11)/5 = 11.2

{% image source="https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/eval_graph_evaluation_config.ab47007afbbde051d4228e3d84b04632.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/eval_graph_evaluation_config.ab47007afbbde051d4228e3d84b04632.png?auto=format&fit=max&w=850&dpr=2 2x" alt="Evaluation configuration for a metric monitor highlighting the section the evaluation graph displays" /%}

두 그래프가 왜 다른가요? (Why are the graphs different?)

일반적으로 두 그래프는 같은 데이터 포인트 값을 시각화하지 않아요. 또한 여러 다른 요인들이 시각화 그래프의 차이에 기여할 수 있어요.

as_count() 메트릭 (as_count() metrics)

수식에 as_count 메트릭이 있는 쿼리는 다른 평가 경로를 사용해요. 평가는 수식 이전에 어떤 집계를 먼저 적용해요. 예를 들어 A / B를 사용하고 둘 다 as_count 평가 경로를 사용한다면 아래와 같이 평가돼요:

(1+2+3+4+5) / (10+10+10+10+10) 

자세한 내용은 모니터 평가에서의 as_count() 가이드를 참고해요.

수식 사용 (Using formulas)

수식을 사용할 때 모니터는 모니터 평가를 위한 집계 함수를 개별 쿼리가 아니라 수식에 적용해요. 즉 쿼리에 AVG(avg by) 집계 함수를 사용하지만 평가 구성에서 지난 X분간 SUM(sum by)을 사용한다면, 편집 페이지/히스토리 그래프 값은 평가 그래프의 값과 일치하지 않아요. 예시는 문제 해결 섹션을 참고해요.

평가 지연 (Evaluation delay)

평가 지연을 사용하면 평가 그래프는 히스토리 그래프의 타이밍과 일대일로 일치하지 않아요. 예를 들어 5분 평가 지연을 추가했다면, 평가 그래프와 연관시키기 위해 히스토리 그래프에서 5분 전의 데이터 포인트를 봐야 해요.

메트릭 집계 방법 (Metric aggregation method)

쿼리에서 사용하는 집계 방법과 평가 집계에 따라 서로 다른 결과를 볼 수 있어요. 히스토리 및 편집(Edit) 페이지는 쿼리의 집계 방법을 사용하는 반면, 평가 그래프는 Evaluate the 옵션으로 결정된 집계 방법을 사용해요.

모니터 설정에서 선택한 집계 방법에 따라 편집 페이지에서 보는 것과 다른 값이 표시될 수 있어요. 예를 들어 모니터 쿼리가 AVG를 사용하지만 지난 X분/시간 동안의 MINIMUM 값에 대해 경보를 검토하고 있다면, 평가 그래프는 MIN 값을 표시하고 히스토리/편집 페이지 그래프는 AVG 값을 표시해요. 이는 모니터가 메트릭 쿼리에 설정된 집계 방법이 아니라 모니터 평가에 설정된 집계 방법으로 경보를 받기 때문이에요.

평가 그래프 값 문제 해결 (Troubleshooting evaluation graph values)

노트북의 Query Value 위젯을 사용해 특정 시점에 모니터가 무엇을 평가하는지 시각화할 수 있어요. 모니터의 쿼리(수식이나 함수 포함)를 가져온 다음 그래프의 시간 프레임을 평가 창으로 설정해요. 이렇게 하면 단일 포인트로 집계된 데이터가 표시돼요.

다음 예시에서 조사하고 싶은 평가 그래프의 시간 프레임을 가져와요. 평가 그래프 데이터 포인트 위에 마우스를 올려 값과 시간을 확인해요. 예를 들어 히스토리 그래프가 같은 시각에 0.26을 보여주는데, 평가 그래프가 10:50:35에 0.38 데이터 포인트를 보여주는 이유를 조사하고 싶다고 해볼게요.

이 값을 문제 해결하려면 모니터 편집 페이지를 열고 모니터 구성을 노트북 Query Value 위젯으로 옮기면 돼요.

{% image source="https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshoot_monitor_eval_config.b8c353a27da3f2db80aa3793d55a4226.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshoot_monitor_eval_config.b8c353a27da3f2db80aa3793d55a4226.png?auto=format&fit=max&w=850&dpr=2 2x" alt="Example configuration showing metric with a query aggregation of p95 and a monitor evaluation aggregation of p95 over the last 5 minutes" /%}

모니터 편집 페이지 구성 필드:

  • 메트릭 쿼리 a: proc.test_process.cpu.total_pct p95 by(모든 것)
  • 모니터 평가 집계: 쿼리의 percentile (p95) 평가
  • 모니터 평가 창: last 5 minutes

같은 구성을 노트북 Query Value 위젯으로 옮겨요.

  1. 위젯 드롭다운이 Query Value를 표시해야 해요.
  2. 문제 해결 중인 데이터 포인트에 해당하는 시간 프레임을 선택해요.
  3. 모니터 구성의 메트릭 쿼리 proc.test_process.cpu.total_pct를 입력해요. 메트릭 집계 p95 by를 추가해요.
  4. 평가가 모니터 평가인 percentile (p95)와 일치하는지 확인해요.
  5. 쿼리 값이 모니터의 평가 데이터 포인트와 일치하는지 확인해요.
구성 (Configuration) 모니터 (Monitor) Query Value 위젯 (Query Value widget)
메트릭 쿼리 (Metric Query) {% image
source="https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshooting_monitor_query.83b7a390bba634f5e77566f7950c93ef.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshooting_monitor_query.83b7a390bba634f5e77566f7950c93ef.png?auto=format&fit=max&w=850&dpr=2 2x"
alt="Example configuration showing metric with a query aggregation of p95 and a monitor evaluation aggregation of p95 over the last 5 minutes" /%} | {% image
source="https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshooting_widget_query.dd1f49509029e4a15c06b3643119e4fc.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshooting_widget_query.dd1f49509029e4a15c06b3643119e4fc.png?auto=format&fit=max&w=850&dpr=2 2x"
alt="Query value widget configuration highlighting field that matches the metric query" /%} |

| 모니터 집계 (Monitor Aggregation) | {% image source="https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshooting_monitor_aggregation.5ca1ccc557e74d5d234713d35b3b9961.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshooting_monitor_aggregation.5ca1ccc557e74d5d234713d35b3b9961.png?auto=format&fit=max&w=850&dpr=2 2x" alt="Example configuration showing metric with a query aggregation of p95 highlighting the monitor evaluation aggregation of p95" /%} | {% image source="https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshooting_widget_aggregation.34c8f15944b1fc79e1b7cc6d87646320.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshooting_widget_aggregation.34c8f15944b1fc79e1b7cc6d87646320.png?auto=format&fit=max&w=850&dpr=2 2x" alt="Query value widget configuration highlighting field that matches the monitor aggregation" /%} | | 평가 창 (Evaluation Window) | {% image source="https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshooting_monitor_eval_window.7ca8882a10009eca2161f346b2ff7cce.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshooting_monitor_eval_window.7ca8882a10009eca2161f346b2ff7cce.png?auto=format&fit=max&w=850&dpr=2 2x" alt="Example configuration showing metric with a query aggregation of p95 highlighting the monitor evaluation window of last 5 minutes" /%} | {% image source="https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshooting_widget_eval_window.03df46a70855775406daccda05a02c1d.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshooting_widget_eval_window.03df46a70855775406daccda05a02c1d.png?auto=format&fit=max&w=850&dpr=2 2x" alt="Query value widget configuration highlighting field that matches the monitor evaluation window" /%} |

수식이 있는 평가 그래프 문제 해결 (Troubleshooting an evaluation graph with formulas)

{% image source="https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshooting_formula_eval_graph.5f5b14033adc4c2099dadfc627429d41.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshooting_formula_eval_graph.5f5b14033adc4c2099dadfc627429d41.png?auto=format&fit=max&w=850&dpr=2 2x" alt="Evaluation graph showing data point of 9.17 at 13:55:29 on hover" /%}

이 예시에서는 여러 쿼리와 수식이 있는 모니터 평가 그래프의 값을 노트북 Query Value 위젯에서 문제 해결해요. 평가 그래프에서 조사할 데이터 포인트 위에 마우스를 올려요. 이 예시에서는 13:55:29의 평가 그래프 값 9.17을 문제 해결하려고 해요.

{% image source="https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshooting_formula_monitor_config.9c861a2ffb80fed154d86bbcc77ad7c9.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshooting_formula_monitor_config.9c861a2ffb80fed154d86bbcc77ad7c9.png?auto=format&fit=max&w=850&dpr=2 2x" alt="Monitor configuration showing two metric queries and a formula 'a+b', which evaluates the minimum of the query over the last 5 minutes" /%}

모니터 편집 페이지 구성 필드:

  • 메트릭 쿼리 a: proc.test_process.cpu.total_pct avg by(모든 것)
  • 메트릭 쿼리 b: system.cpu.user avg by(모든 것)
  • 모니터 평가 집계: 쿼리의 min 평가
  • 모니터 평가 창: last 5 minutes

같은 구성을 노트북 Query Value 위젯으로 메트릭 하나씩 옮겨요.

메트릭 a

  1. 위젯 드롭다운이 Query Value를 표시해야 해요.
  2. 13:55:29 주위 5분에 해당하는 시간 프레임을 선택해요. 이 경우 13:50 - 13:55(1:50 - 1:55)예요.
  3. 모니터 구성의 메트릭 쿼리 proc.test_process.cpu.total_pct를 입력해요. 메트릭 집계 avg를 추가해요.

{% image source="https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshooting_formulas_query_a.5081f6125a609bf5f677a9adf087949c.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshooting_formulas_query_a.5081f6125a609bf5f677a9adf087949c.png?auto=format&fit=max&w=850&dpr=2 2x" alt="Query value widget showing a metric with the avg aggregation" /%}

메트릭 b

  1. 위젯 드롭다운이 Query Value를 표시해야 해요.
  2. 13:55:29 주위 5분에 해당하는 시간 프레임을 선택해요. 이 경우 13:50 - 13:55(1:50 - 1:55)예요.
  3. 모니터 구성의 메트릭 쿼리 system.cpu.user를 입력해요. 메트릭 집계 avg를 추가해요.

{% image source="https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshooting_formulas_query_b.c2b1924214c50bd1aa0f34f7d7c7a942.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshooting_formulas_query_b.c2b1924214c50bd1aa0f34f7d7c7a942.png?auto=format&fit=max&w=850&dpr=2 2x" alt="Query value widget showing a metric with the avg aggregation" /%}

모니터 평가 Min은 지난 5분 동안의 쿼리 최소값을 취해요.

{% image source="https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshoot_formulas_multi_query.8bebc402285f49e329a6e40253ab143a.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/monitors/guide/history_and_evaluation_graphs/troubleshoot_formulas_multi_query.8bebc402285f49e329a6e40253ab143a.png?auto=format&fit=max&w=850&dpr=2 2x" alt="Query value widget showing two queries each with an avg metric aggregation, and a min evaluation aggregation" /%}

더 알아보기 (Learn more)