40 lines
1.4 KiB
YAML
40 lines
1.4 KiB
YAML
{{- if (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/PrometheusRule") }}
|
|
---
|
|
# workaround till https://github.com/nextcloud/helm/pull/694 is merged
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: PrometheusRule
|
|
metadata:
|
|
name: {{ .Release.Name }}
|
|
labels:
|
|
{{- toYaml .Values.commons.prometheus.rules.labels | nindent 4 }}
|
|
spec:
|
|
groups:
|
|
- name: {{ .Release.Name }}-Defaults
|
|
rules:
|
|
- alert: "nextcloud: not reachable"
|
|
expr: 'avg(nextcloud_last_update_seconds{ }) without(endpoint,container,pod,instance) < 1'
|
|
labels:
|
|
severity: "critical"
|
|
{{`
|
|
annotations:
|
|
summary: "Nextcloud in {{ $labels.namespace }} is not reachable by exporter"
|
|
`}}
|
|
|
|
- alert: "nextcloud: outdated version"
|
|
expr: 'sum(nextcloud_system_update_available{ }) without(endpoint,container,pod,instance) > 0'
|
|
labels:
|
|
severity: "warning"
|
|
{{`
|
|
annotations:
|
|
summary: "Nextcloud in {{ $labels.namespace }} is outdated"
|
|
`}}
|
|
|
|
- alert: "nextcloud: outdated apps"
|
|
expr: 'sum(nextcloud_apps_updates_available_total{ }) without(endpoint,container,pod,instance) > 0'
|
|
labels:
|
|
severity: "warning"
|
|
{{`
|
|
annotations:
|
|
summary: "Nextcloud in {{ $labels.namespace }} has {{ $value }} outdated Apps"
|
|
`}}
|
|
{{- end }}
|