Skip to content

[DIT-218] 5xx 에러율 디스코드 알림 형식 개선#274

Merged
hyoj-dev merged 1 commit into
developfrom
feat/DIT-218-discord-alert-improvement
Jun 30, 2026
Merged

[DIT-218] 5xx 에러율 디스코드 알림 형식 개선#274
hyoj-dev merged 1 commit into
developfrom
feat/DIT-218-discord-alert-improvement

Conversation

@hyoj-dev

Copy link
Copy Markdown
Collaborator

구분

  • 기능 추가

요약

  • 5xx 에러율 초과 알림에 현재 에러율을 추가했습니다.
  • 5xx 에러율 정상화 알림에 발생·해결 시각과 지속 시간을 추가했습니다.
  • 개별 5xx 발생 알림을 제거하고 에러율 기반 알림으로 통합했습니다.

변경사항

1. 5xx 에러율 알림 규칙 정리

  • 최근 5분 기준 5xx 에러율 1% 초과 조건을 유지했습니다.
  • 임계치 초과 상태가 2분간 지속될 경우 알림이 발생합니다.
  • 기존 즉시 5xx 발생 규칙은 Grafana provisioning에서 삭제하도록 설정했습니
    다.

2. Discord 발생 알림 개선

  • 알림 발생 시간을 KST로 표시합니다.
  • 현재 5xx Rate를 백분율로 표시합니다.
  • Explore Logs, Alert, Dashboard 링크를 추가했습니다.

3. Discord 정상화 알림 개선

  • 발생 시각과 정상화 시각을 KST로 표시합니다.
  • 알림 지속 시간인 Duration을 추가했습니다.
  • 최근 5분 기준 에러율이 1% 이하로 내려간 경우 정상화 알림을 전송합니다.

@hyoj-dev hyoj-dev merged commit 7a58020 into develop Jun 30, 2026
3 checks passed
@hyoj-dev hyoj-dev deleted the feat/DIT-218-discord-alert-improvement branch June 30, 2026 09:26

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: adb010d1a7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

title: '{{ if eq .CommonLabels.alertname "[CRITICAL] 5xx 에러율 1% 초과" }}{{ if eq .Status "firing" }}{{ .CommonLabels.alertname }}{{ else }}[RESOLVED] 5xx 에러율 정상화{{ end }}{{ else }}{{ if eq .Status "firing" }}{{ else }}[복구] {{ end }}{{ .CommonLabels.alertname }}{{ end }}'
message: |
{{ if eq .CommonLabels.alertname "[CRITICAL] 5xx 에러율 1% 초과" }}
{{ $notificationStatus := .Status }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Escape Go-template variables in contact point settings

When Grafana provisions contact point settings, it expands $variable references before storing the template; with no notificationStatus environment variable, this becomes {{ := .Status }} (and the later eq $notificationStatus is also stripped), leaving an invalid notification template. In the normal prod provisioning path this can break Discord notifications for this receiver; use $$notificationStatus or avoid the local variable.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant