Skip to content
Snippets Groups Projects
Verified Commit 1328f59e authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

swh: Add alert on rabbitmq when queue exceeds a given nb of messages

parent 3dc2ca45
No related branches found
No related tags found
No related merge requests found
{{- if and .Values.scheduler.enabled .Values.scheduler.alerts.enabled .Values.scheduler.alerts.tooManyMessagesInQueue }}
{{- $environment := .Values.environment -}}
{{- $severity := .Values.scheduler.alerts.tooManyMessagesInQueue.severity -}}
{{- $period := .Values.scheduler.alerts.tooManyMessagesInQueue.period -}}
{{- $threshold := .Values.scheduler.alerts.tooManyMessagesInQueue.threshold -}}
---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
labels:
app: swh-alerts
name: rabbitmq-too-many-messages-in-queue-alertmanager.rules
namespace: {{ .Values.namespace }}
spec:
groups:
- name: rabbitmq-too-many-messages-in-queue.rules
rules:
- alert: RabbitmqTooManyMessagesInQueue
expr: |-
max_over_time(rabbitmq_queue_messages_ready{environment={{ $environment | quote }}}[5m]) > {{ $threshold }}
annotations:
description: "{{ $environment }}: High number of messages in rabbitmq queue <{{"{{"}} $labels.name {{"}}"}}> (server: <{{"{{"}} $labels.server {{"}}"}}>)"
summary: "A queue exceeds a given threshold in environment {{ $environment }}"
for: {{ $period }}
labels:
severity: {{ $severity }}
namespace: cattle-monitoring-system
{{ end }}
namespace: swh
environment: production
sentry:
environment: production
......@@ -513,6 +514,13 @@ scheduler:
enabled: false
secretKeyRef: scheduler-sentry-secrets
secretKeyName: sentry-dsn
alerts:
enabled: true
tooManyMessagesInQueue:
threshold: 100000
period: 30m
severity: warning
# requestedMemory: 512Mi
# requestedCpu: 500m
# schedulerConfigurationRef: remoteSchedulerConfiguration
......@@ -531,12 +539,6 @@ scheduler:
opam:
- policy: origins_without_last_update
weight: 100
# runner:
# enabled: false
# runnerPriority:
# enabled: false
# listener:
# enabled: false
rpc:
enabled: false
priorityClassName: frontend-rpc
......
environment: minikube
sentry:
enabled: false
environment: minikube
......
namespace: swh-cassandra
environment: production
sentry:
environment: production
......
environment: production
sentry:
environment: production
......
namespace: swh-cassandra
environment: staging
sentry:
environment: staging
......
environment: staging
sentry:
environment: staging
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment