Refactor Distributed Analytics project structure
[demo.git] / vnfs / DAaaS / deploy / operator / charts / prometheus-operator / templates / prometheus / rules / prometheus-operator.yaml
1 # Generated from 'prometheus-operator' group from https://raw.githubusercontent.com/coreos/prometheus-operator/master/contrib/kube-prometheus/manifests/prometheus-rules.yaml
2 # Do not change in-place! In order to change this file first read following link:
3 # https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
4 {{- if and .Values.defaultRules.create .Values.defaultRules.rules.prometheusOperator }}
5 {{- $operatorJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "operator" }}
6 {{- $namespace := .Release.Namespace }}
7 apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }}
8 kind: PrometheusRule
9 metadata:
10   name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus-operator" | trunc 63 | trimSuffix "-" }}
11   labels:
12     app: {{ template "prometheus-operator.name" . }}
13 {{ include "prometheus-operator.labels" . | indent 4 }}
14 {{- if .Values.defaultRules.labels }}
15 {{ toYaml .Values.defaultRules.labels | indent 4 }}
16 {{- end }}
17 {{- if .Values.defaultRules.annotations }}
18   annotations:
19 {{ toYaml .Values.defaultRules.annotations | indent 4 }}
20 {{- end }}
21 spec:
22   groups:
23   - name: prometheus-operator
24     rules:
25     - alert: PrometheusOperatorReconcileErrors
26       annotations:
27         message: Errors while reconciling {{`{{ $labels.controller }}`}} in {{`{{ $labels.namespace }}`}} Namespace.
28       expr: rate(prometheus_operator_reconcile_errors_total{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[5m]) > 0.1
29       for: 10m
30       labels:
31         severity: warning
32     - alert: PrometheusOperatorNodeLookupErrors
33       annotations:
34         message: Errors while reconciling Prometheus in {{`{{ $labels.namespace }}`}} Namespace.
35       expr: rate(prometheus_operator_node_address_lookup_errors_total{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[5m]) > 0.1
36       for: 10m
37       labels:
38         severity: warning
39 {{- end }}