25 lines
929 B
YAML
25 lines
929 B
YAML
{{- if (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/PrometheusRule") }}
|
|
{{- $filter := printf `namespace="%s",job="vector"` .Release.Namespace }}
|
|
{{- $without := "instance,endpoint,container,pod,job,host" }}
|
|
---
|
|
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: "Log-Collector: Component Errors"
|
|
expr: 'sum(increase(vector_component_errors_total{ {{ $filter }} }[1h])) without ({{ $without }}) > 0'
|
|
for: "1m"
|
|
labels:
|
|
severity: "warning"
|
|
annotations:
|
|
{{`
|
|
summary: "{{ $labels.component_kind }} {{ $labels.component_id }} ({{ $labels.component_type }}) has {{ $labels.error_type }} in stage {{ $labels.stage }}"
|
|
`}}
|
|
|
|
{{- end }}{{/* end-if */}}
|