Skip to content

Commit

Permalink
Tweak formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianeicher committed Sep 7, 2024
1 parent 524bc5d commit a045cc6
Show file tree
Hide file tree
Showing 2 changed files with 381 additions and 114 deletions.
6 changes: 4 additions & 2 deletions charts/generic-service/templates/alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,18 @@ spec:
topic: ingress
annotations: {{- include "generic-service.alert-annotations" . | nindent 12 }} HTTP responses slower than usual
description: '{{ include "generic-service.fullname" . }} HTTP responses are {{"{{ $value }}"}}x slower in the last {{ .Values.alerting.http.sampleInterval }} than in the last {{ .Values.alerting.http.referenceInterval }}.'

- alert: Http4xx
expr: |
(sum(rate({{ include "generic-service.request-code-count-metric" . }}"4.."}[{{ .Values.alerting.http.sampleInterval }}])) - sum(rate({{ include "generic-service.request-code-count-metric" . }}"499"}[{{ .Values.alerting.http.sampleInterval }}]))) /
(sum(rate({{ include "generic-service.request-code-count-metric" . }}"4.."}[{{ .Values.alerting.http.sampleInterval }}])) - sum(rate({{ include "generic-service.request-code-count-metric" . }}"499"}[{{ .Values.alerting.http.sampleInterval }}]))) /
(sum(rate({{ include "generic-service.request-code-count-metric" . }}"4.."}[{{ .Values.alerting.http.referenceInterval }}])) - sum(rate({{ include "generic-service.request-code-count-metric" . }}"499"}[{{ .Values.alerting.http.referenceInterval }}]))) > {{ .Values.alerting.http.max4xxRatio }}
labels: {{- include "generic-service.alert-labels" . | nindent 12 }} warning
annotations: {{- include "generic-service.alert-annotations" . | nindent 12 }} higher HTTP 4xx rate
description: '{{ include "generic-service.fullname" . }} gave {{"{{ $value }}"}}x more HTTP 4xx responses per request in the last {{ .Values.alerting.http.sampleInterval }} than in the last {{ .Values.alerting.http.referenceInterval }}.'

- alert: HttpClientCancelled
expr: |
(sum(rate({{ include "generic-service.request-code-count-metric" . }}"499"}[{{ .Values.alerting.http.sampleInterval }}]))) /
(sum(rate({{ include "generic-service.request-code-count-metric" . }}"499"}[{{ .Values.alerting.http.sampleInterval }}]))) /
(sum(rate({{ include "generic-service.request-code-count-metric" . }}"499"}[{{ .Values.alerting.http.referenceInterval }}]))) > {{ .Values.alerting.http.maxClientCancellationRatio }}
labels: {{- include "generic-service.alert-labels" . | nindent 12 }} warning
annotations: {{- include "generic-service.alert-annotations" . | nindent 12 }} higher HTTP client cancellation rate
Expand Down
Loading

0 comments on commit a045cc6

Please sign in to comment.