X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=it%2Fotf.git;a=blobdiff_plain;f=otf-helm%2Fotf%2Fcharts%2Fdatabases%2Fmongodb%2Ftemplates%2Fprometheus-alerting-rule.yaml;fp=otf-helm%2Fotf%2Fcharts%2Fdatabases%2Fmongodb%2Ftemplates%2Fprometheus-alerting-rule.yaml;h=84f5a530f5fca4144ef05c15547be09f4b4f2b3e;hp=0000000000000000000000000000000000000000;hb=321c6b595a3f05db9e4327c16af85c16752f9ec2;hpb=29cd8447ada8036b91ad2ca75a3c1c3fe0d8ba55 diff --git a/otf-helm/otf/charts/databases/mongodb/templates/prometheus-alerting-rule.yaml b/otf-helm/otf/charts/databases/mongodb/templates/prometheus-alerting-rule.yaml new file mode 100644 index 0000000..84f5a53 --- /dev/null +++ b/otf-helm/otf/charts/databases/mongodb/templates/prometheus-alerting-rule.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled .Values.metrics.serviceMonitor.alerting.rules }} +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: {{ template "mongodb.fullname" . }} + namespace: {{.Values.namespace }} + labels: + app: {{ template "mongodb.name" . }} + chart: {{ template "mongodb.chart" . }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + {{- if .Values.metrics.serviceMonitor.alerting.additionalLabels }} +{{ toYaml .Values.metrics.serviceMonitor.alerting.additionalLabels | indent 4 }} + {{- end }} +spec: + groups: +{{ toYaml .Values.metrics.serviceMonitor.alerting.rules | indent 4 }} +{{- end }}