feat: add rules
This commit is contained in:
28
clusters/cl01tl/helm/gitea/templates/prometheus-rule.yaml
Normal file
28
clusters/cl01tl/helm/gitea/templates/prometheus-rule.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PrometheusRule
|
||||
metadata:
|
||||
name: meilisearch
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app.kubernetes.io/name: meilisearch
|
||||
{{- include "custom.labels" . | nindent 4 }}
|
||||
spec:
|
||||
groups:
|
||||
- name: EmbeddedExporter
|
||||
rules:
|
||||
- alert: MeilisearchIndexIsEmpty
|
||||
expr: meilisearch_index_docs_count == 0
|
||||
for: 0m
|
||||
labels:
|
||||
severity: warning
|
||||
annotations:
|
||||
summary: Meilisearch index is empty (instance {{ `{{ $labels.instance }}` }})
|
||||
description: "Meilisearch index {{ `{{ $labels.index }}` }} has zero documents\n VALUE = {{ `{{ $value }}` }}\n LABELS = {{ `{{ $labels }}` }}"
|
||||
- alert: MeilisearchHttpResponseTime
|
||||
expr: meilisearch_http_response_time_seconds > 0.5
|
||||
for: 0m
|
||||
labels:
|
||||
severity: warning
|
||||
annotations:
|
||||
summary: Meilisearch http response time (instance {{ `{{ $labels.instance }}` }})
|
||||
description: "Meilisearch http response time is too high\n VALUE = {{ `{{ $value }}` }}\n LABELS = {{ `{{ $labels }}` }}"
|
||||
Reference in New Issue
Block a user