Skip to content

Commit 36340eb

Browse files
committed
Update NGFHigh5xxRate alert to exclude NGINX synthesized 503s from scaled-down services
1 parent 27521b9 commit 36340eb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

kubernetes/namespaces/loki/loki/alert_rules.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,14 @@ data:
191191
192192
- alert: NGFHigh5xxRate
193193
expr: |
194+
# NGINX synthesised 503s are not counted as they are normally from services we have set scaled to 0 and know about
194195
(
195196
sum by (host) (
196197
rate(
197198
{namespace="nginx-gateway", app_container="/nginx"}
198199
| json
199200
| __error__ = ""
200-
| host !~ "forms-api.*"
201+
| upstream_addr!="unix:/var/run/nginx/nginx-503-server.sock"
201202
| status >= 500
202203
[5m]
203204
)
@@ -208,7 +209,7 @@ data:
208209
{namespace="nginx-gateway", app_container="/nginx"}
209210
| json
210211
| __error__ = ""
211-
| host !~ "forms-api.*"
212+
upstream_addr!="unix:/var/run/nginx/nginx-503-server.sock"
212213
[5m]
213214
)
214215
)

0 commit comments

Comments
 (0)