Adds Prometheus scrape of Velero's :8085 metrics and four alerts (VeleroBackupFailed, VeleroBackupPartial, VeleroBackupMissed, VeleroStorageLocationUnavailable) labeled team=infra severity=warning. VeleroStorageLocationUnavailable substitutes for the spec's VeleroRepoUnhealthy since Velero v1.18.1 does not expose velero_backup_repository_available (see comment in the rule). Wired via a new ArgoCD Application (velero-monitoring) that syncs only servicemonitor.yaml + prometheusrule.yaml from basicstack-repo/velero/. Co-Authored-By: Paperclip <noreply@paperclip.ing>
28 lines
790 B
YAML
28 lines
790 B
YAML
---
|
|
# Scrape Velero's built-in Prometheus endpoint (http-monitoring / :8085)
|
|
# so kube-prometheus-stack can drive the accompanying PrometheusRule
|
|
# (velero/prometheusrule.yaml). The `release: kube-prometheus-stack`
|
|
# label is what the operator's serviceMonitorSelector matches.
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: ServiceMonitor
|
|
metadata:
|
|
name: velero
|
|
namespace: velero
|
|
labels:
|
|
app.kubernetes.io/name: velero
|
|
app.kubernetes.io/part-of: velero
|
|
release: kube-prometheus-stack
|
|
spec:
|
|
namespaceSelector:
|
|
matchNames:
|
|
- velero
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/instance: velero
|
|
app.kubernetes.io/name: velero
|
|
endpoints:
|
|
- port: http-monitoring
|
|
path: /metrics
|
|
interval: 30s
|
|
scrapeTimeout: 10s
|
|
scheme: http
|