[NOOK-152] Grafana datasource 오류 알림 안정화 - #109
Open
kkjsw17 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOOK-152 Grafana DatasourceError 반복 알림과 로그 통계 불일치 수정
목적
일시적인 Prometheus/Loki 조회 실패가 모든 업무 Alert의
DatasourceError로 증폭되는 문제를 줄이고,로그 대시보드의 ERROR/WARN 통계를 실제 조회 범위와 일치시킵니다.
원인
execErrState: Error는 조회 실패마다 원래 Alert와 독립적인DatasourceError를 생성합니다.DatasourceError를 같은 이름으로 묶어 1시간마다 반복 전송했습니다.생성해, 시작 구간의 조회 실패 가능성을 키웠습니다.
count_over_time(...[$__range])를 range 쿼리로 실행해 조회 종료 시점에는 데이터가없어도 과거의 마지막 non-null 값을 표시했습니다.
범위
KeepLast로 변경합니다.DatasourceError를 datasource와 원본 규칙별로 그룹화하고 최초 알림을 2분 지연하며 반복 주기를6시간으로 분리합니다.
Grafana를 시작합니다.
제외 범위
성공 기준
DatasourceError로 확산되지 않습니다.DatasourceError로 식별됩니다.검증
ops VM 반영 후 Grafana rules API에서 모든 규칙의 health/state를 확인하고, Loki와 Prometheus의
vector(1)쿼리 및 로그 stat의 instant 쿼리 결과를 직접 비교합니다.