24 lines
821 B
YAML
24 lines
821 B
YAML
{{- if (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/PrometheusRule") }}
|
|
{{- $without := "instance,endpoint,container,pod,job" }}
|
|
---
|
|
apiVersion: "monitoring.coreos.com/v1"
|
|
kind: "PrometheusRule"
|
|
metadata:
|
|
name: "vector"
|
|
labels:
|
|
{{- toYaml .Values.commons.prometheus.rules.labels | nindent 4 }}
|
|
spec:
|
|
groups:
|
|
- name: "Vector"
|
|
rules:
|
|
- alert: "Component Errors"
|
|
expr: 'sum(increase(vector_component_errors_total[1h])) without ({{ $without }}) > 0'
|
|
for: "1m"
|
|
labels:
|
|
severity: "warning"
|
|
annotations:
|
|
{{`
|
|
summary: "{{ $labels.component_kind }} {{ $labels.component_id }} ({{ $labels.compnent_type }}) has {{ $labels.request_failed }} in stage {{ $labels.stage }}"
|
|
`}}
|
|
|
|
{{- end }}{{/* end-if */}}
|