JSCODE Logo
블로그후기멘토진
회사명 : JSCODE대표 : 박재성사업자 등록번호 : 244-22-01557통신판매업 : 제 2023-인천미추홀-0381 호
학원 명칭 : 제이에스코드(JSCODE)원격학원학원설립ㆍ운영 등록번호 : 제6063호

서울특별시 구로구 경인로 20가길 11(오류동, 아델리아)

Copyright ⓒ 2025 JSCODE - 최상위 현업 개발자들의 프로그래밍 교육 All rights reserved.

이용약관개인정보처리방침
← 블로그 목록으로 돌아가기

[실습] Grafana Alert를 연동한 서버 에러 발생 시 Discord로 알람 보내주기

JSCODE 시니
JSCODE 시니
2026. 03. 03.
author
JSCODE 시니
category
Logging Monitoring
createdAt
Mar 5, 2026 06:47 PM
isPublic
isPublic
series
로그관리와 모니터링 - ELK 프로메테우스 그라파나편
slug
grafana-alert-notifications-to-discord
type
post
updatedAt
Mar 3, 2026 09:00

✅ 1. Discord 설치하기

  • 사이트 :
Download Discord to Talk, Play, and Hang Out
Download Discord to talk, play, and hang out with friends over voice, video, or text. Available for Windows, macOS, Linux, iOS, Android devices, and consoles.
Download Discord to Talk, Play, and Hang Out
https://discord.com/download
Download Discord to Talk, Play, and Hang Out
 
 

✅ 2. 서버 생성하기

notion image
  • 디스코드 왼쪽에 추가하기 버튼을 클릭한다.
  • 직접 만들기를 눌러 서버를 추가한다.
  • 기존에 개인 서버가 있다면 개인 서버에서 실습을 진행하여도 무방함.
 
notion image
  • 나와 친구들을 위한 서버를 클릭한다.
 
notion image
  • 서버 이름을 설정한다.
 
 

✅ 3. 채널 생성하기

notion image
  • 기본으로 일반 채널이 개설되어 있다.
  • 옆에 + 버튼을 클릭하여 채널을 생성한다
 
notion image
  • 채널명을 입력 후 채널 만들기 버튼을 클릭한다.
 

✅ 4. 웹후크 생성하기

notion image
  • 서버명 클릭 후 서버 설정을 클릭한다.
 
notion image
  • 앱 ⇒ 연동 탭에서 웹 후크 만들기를 클릭한다.
 
notion image
  • 웹훅의 이름과 채널을 설정한 뒤 웹후크 URL을 복사한다.
 
notion image
  • 메모장에 저장하거나, 디스코드 알림채널에 전송해둔다.
 
 

✅ 5. Grafana에 Discord 등록하기

  • http://localhost:3000/ 에 접속하기
notion image
  • Alerting > Contact points 메뉴를 선택한다.
 
notion image
  • Create contact point 버튼을 클릭한다.
 
notion image
  • Name : Discord Alert
  • Integration : Discord 선택
  • Webhook URL : 발급받은 웹후크 URL 기입
 
notion image
  • 메시지를 수정하고 싶다면, Message Content를 수정하면 된다.
 
notion image
  • 알림 테스트를 위하여 Test 버튼을 클릭한다.
 
notion image
  • Send test notification 버튼을 클릭하여 알림 테스트를 진행한다.
 
notion image
  • Discord로 해당 알림이 잘 오는지 확인한다.
 
 

✅ 6. 알림 규칙 설정하기

notion image
  • Alerting ⇒ Notification policies 메뉴를 선택한다.
 
notion image
  • 초기에 생성돼있는 Default policy의 More 버튼을 클릭한다.
 
notion image
  • Edit 버튼을 눌러 정책 수정 화면에 들어간다.
 
notion image
  • Default contact point가 우리가 설정한 Discord Alert로 설정돼있는지 확인 후 Update default policy 버튼을 클릭한다.
 
notion image
  • Alerting ⇒ Alert rules 메뉴를 클릭한다.
 
notion image
  • New alert rule을 선택한다.
 
notion image
  • Name : 400_alert
  • PromQL을 작성할 수 있게 Code 탭을 클릭
  • sum(increase(http_server_requests_seconds_count{status="400"}[1m]))
  • 조건에 IS ABOVE를 선택 후 4를 입력한다.
  • 400 에러가 1분간 5번 발생하면 알림을 울릴 수 있는 규칙을 생성하는 것이다.
 
notion image
  • 폴더 추가를 위하여 New folder를 선택한다.
 
notion image
  • 폴더이름은 자유롭게 설정해도 된다.
 
notion image
  • New evaluation group 버튼을 클릭하여 그룹을 추가해준다.
author
category
Logging Monitoring
createdAt
Mar 6, 2026 08:35 AM
isPublic
isPublic
series
로그관리와 모니터링 - ELK 프로메테우스 그라파나편
slug
type
series-footer
updatedAt
Mar 3, 2026 09:00
📎
이 글은 로그관리와 모니터링 - ELK, 프로메테우스, 그라파나 강의의 수업 자료 중 일부입니다.