Skip to content

Commit 1124779

Browse files
authored
(#43) P99 지연, DB 커넥션 풀, JVM 힙, 에러 급증 알림 4개 추가
- System Health: P99 > 5s (5m), DB pool > 80% (3m), JVM heap > 85% (5m) - Application Errors: errors_total 5분 내 10건 초과 (2m)
1 parent 2e7e002 commit 1124779

1 file changed

Lines changed: 136 additions & 0 deletions

File tree

alerting/alert-rules.yml

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,107 @@ groups:
8989
labels:
9090
severity: critical
9191

92+
- uid: high-latency-p99
93+
title: High P99 Latency
94+
condition: C
95+
data:
96+
- refId: A
97+
relativeTimeRange:
98+
from: 300
99+
to: 0
100+
datasourceUid: prometheus
101+
model:
102+
expr: histogram_quantile(0.99, sum(rate(http_server_requests_seconds_bucket{application="git-ranker-api"}[5m])) by (le)) * 1000
103+
intervalMs: 1000
104+
maxDataPoints: 43200
105+
- refId: B
106+
datasourceUid: __expr__
107+
model:
108+
expression: A
109+
reducer: last
110+
type: reduce
111+
- refId: C
112+
datasourceUid: __expr__
113+
model:
114+
expression: $B > 5000
115+
type: math
116+
dashboardUid: git-ranker-ops
117+
panelId: 3
118+
noDataState: OK
119+
execErrState: OK
120+
for: 5m
121+
annotations:
122+
summary: P99 latency exceeds 5 seconds
123+
description: "P99 response time: {{ $values.B.Value }}ms"
124+
labels:
125+
severity: warning
126+
127+
- uid: db-connection-pool-high
128+
title: DB Connection Pool Usage High
129+
condition: C
130+
data:
131+
- refId: A
132+
relativeTimeRange:
133+
from: 300
134+
to: 0
135+
datasourceUid: prometheus
136+
model:
137+
expr: hikaricp_connections_active{application="git-ranker-api"} / hikaricp_connections_max{application="git-ranker-api"}
138+
intervalMs: 1000
139+
maxDataPoints: 43200
140+
- refId: B
141+
datasourceUid: __expr__
142+
model:
143+
expression: A
144+
reducer: last
145+
type: reduce
146+
- refId: C
147+
datasourceUid: __expr__
148+
model:
149+
expression: $B > 0.8
150+
type: math
151+
noDataState: OK
152+
execErrState: OK
153+
for: 3m
154+
annotations:
155+
summary: HikariCP connection pool usage exceeds 80%
156+
description: "Connection pool usage: {{ $values.B.Value }}"
157+
labels:
158+
severity: warning
159+
160+
- uid: jvm-heap-high
161+
title: JVM Heap Memory Usage High
162+
condition: C
163+
data:
164+
- refId: A
165+
relativeTimeRange:
166+
from: 300
167+
to: 0
168+
datasourceUid: prometheus
169+
model:
170+
expr: sum(jvm_memory_used_bytes{application="git-ranker-api", area="heap"}) / sum(jvm_memory_max_bytes{application="git-ranker-api", area="heap"})
171+
intervalMs: 1000
172+
maxDataPoints: 43200
173+
- refId: B
174+
datasourceUid: __expr__
175+
model:
176+
expression: A
177+
reducer: last
178+
type: reduce
179+
- refId: C
180+
datasourceUid: __expr__
181+
model:
182+
expression: $B > 0.85
183+
type: math
184+
noDataState: OK
185+
execErrState: OK
186+
for: 5m
187+
annotations:
188+
summary: JVM heap memory usage exceeds 85%
189+
description: "Heap usage ratio: {{ $values.B.Value }}"
190+
labels:
191+
severity: warning
192+
92193
- orgId: 1
93194
name: GitHub API
94195
folder: Git Ranker Alerts
@@ -169,6 +270,41 @@ groups:
169270
labels:
170271
severity: warning
171272

273+
- uid: error-spike
274+
title: Application Error Spike
275+
condition: C
276+
data:
277+
- refId: A
278+
relativeTimeRange:
279+
from: 300
280+
to: 0
281+
datasourceUid: prometheus
282+
model:
283+
expr: sum(increase(errors_total{application="git-ranker-api"}[5m]))
284+
intervalMs: 1000
285+
maxDataPoints: 43200
286+
- refId: B
287+
datasourceUid: __expr__
288+
model:
289+
expression: A
290+
reducer: last
291+
type: reduce
292+
- refId: C
293+
datasourceUid: __expr__
294+
model:
295+
expression: $B > 10
296+
type: math
297+
dashboardUid: git-ranker-ops
298+
panelId: 50
299+
noDataState: OK
300+
execErrState: OK
301+
for: 2m
302+
annotations:
303+
summary: Sudden increase in application errors
304+
description: "Errors in last 5 minutes: {{ $values.B.Value }}"
305+
labels:
306+
severity: warning
307+
172308
- orgId: 1
173309
name: Batch Jobs
174310
folder: Git Ranker Alerts

0 commit comments

Comments
 (0)