Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump chart version & fixed chart alerts 500s #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/ingress-nginx-monitoring/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: ingress-nginx-monitoring
description: Monitor nginx ingress controller
type: application
version: 1.2.3
appVersion: 1.2.3
version: 1.2.5
appVersion: 1.2.5
icon: https://raw.githubusercontent.com/SomeBlackMagic/helm-charts/master/charts/ingress-nginx-monitoring/nginx-prometheus-grafana.png
keywords:
- http
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and $.Values.prometheus.enabled ( $.Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) }}
{{- if and $.Values.prometheus.enabled ( $.Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
Expand Down Expand Up @@ -33,34 +33,34 @@ spec:
labels:
severity: "{{ $.Values.prometheus.rule.alerts.certificateExpiry.severity }}"
annotations:
description: {{`ssl certificate {{$labels.host}} will expire in less then a week`}}
description: {{`ssl certificate {{$labels.host}} will expire in less than a week`}}
summary: renew expiring certificates to avoid downtime
{{- end }}

{{- if $.Values.prometheus.rule.alerts.tooMany500s.enabled }}
- alert: NGINXTooMany500s
expr: 100 * (sum by(ingress, exported_namespace, status,method,path,host) (rate(nginx_ingress_controller_requests{status=~"5.+", controller_class=~"{{ $.Values.prometheus.rule.ingressClass}}"}[1h])) / sum by(ingress, exported_namespace, status,method,path,host) (rate(nginx_ingress_controller_requests{controller_class=~"{{ $.Values.prometheus.rule.ingressClass}}"}[1h]))) > 5
for: 1m
expr: 100 * (sum by (ingress, exported_namespace, status, method, path, host) (rate(nginx_ingress_controller_requests{status=~"5.+", controller_class=~"{{ $.Values.prometheus.rule.ingressClass}}"}[2h])) / sum by (ingress, exported_namespace, status, method, path, host) (rate(nginx_ingress_controller_requests{controller_class=~"{{ $.Values.prometheus.rule.ingressClass}}"}[2h]))) > 10
for: {{ $.Values.prometheus.rule.alerts.tooMany500s.for }}
labels:
severity: "{{ $.Values.prometheus.rule.alerts.tooMany500s.severity }}"
annotations:
description: {{`Too many {{$labels.status}} on {{$labels.host}} `}}
summary: {{` More than 5% of all requests returned {{$labels.status}}. Metadata -> { namespace="{{$labels.exported_namespace}}", ingress="{{$labels.ingress}}", method="{{$labels.method}}", path="{{$labels.path}})" } `}}
summary: {{`{{ $.Values.prometheus.rule.alerts.tooMany500s.summary }}. Metadata -> { namespace="{{$labels.exported_namespace}}", ingress="{{$labels.ingress}}", method="{{$labels.method}}", path="{{$labels.path}})" } `}}
{{- end }}

{{- if $.Values.prometheus.rule.alerts.tooMany400s.enabled }}
- alert: NGINXTooMany400s
expr: 100 * (sum by(ingress, exported_namespace, status,method,path,host) (rate(nginx_ingress_controller_requests{status=~"4.+", controller_class=~"{{ $.Values.prometheus.rule.ingressClass}}"}[1h])) / sum by(ingress, exported_namespace, status,method,path,host) (rate(nginx_ingress_controller_requests{controller_class=~"{{ $.Values.prometheus.rule.ingressClass}}"}[1h]))) > 5
expr: 100 * (sum by (ingress, exported_namespace, status, method, path, host) (rate(nginx_ingress_controller_requests{status=~"4.+", controller_class=~"{{ $.Values.prometheus.rule.ingressClass}}"}[1h])) / sum by (ingress, exported_namespace, status, method, path, host) (rate(nginx_ingress_controller_requests{controller_class=~"{{ $.Values.prometheus.rule.ingressClass}}"}[1h]))) > 5
for: 1m
labels:
severity: "{{ $.Values.prometheus.rule.alerts.tooMany400s.severity }}"
annotations:
description: {{`Too many {{$labels.status}} on {{$labels.host}} `}}
summary: {{` More than 5% of all requests returned {{$labels.status}}. Metadata -> { namespace="{{$labels.exported_namespace}}", ingress="{{$labels.ingress}}", method="{{$labels.method}}", path="{{$labels.path}})" } `}}
summary: {{`More than 5% of all requests returned {{$labels.status}}. Metadata -> { namespace="{{$labels.exported_namespace}}", ingress="{{$labels.ingress}}", method="{{$labels.method}}", path="{{$labels.path}})" } `}}
{{- end }}


{{- with $.Values.prometheus.rule.additionalAlerts }}
{{ . | nindent 4 }}
{{ . | nindent 6 }}
{{- end }}
{{- end }}
{{- end }}