Skip to content

Commit 64da1b1

Browse files
fix: use rabbitmq length for RabbitMQNodeDown (#1579)
The `RabbitMQNodeDown` made the assumption that all deployments involve only three RabbitMQ nodes. However, this is not always the case as we do support deployments with a single node or more than three. Before this would have caused false alerts in deployments with a single RabbitMQ node. Whilst also concealing alerts in deployments with more than three nodes. Co-authored-by: Matt Crees <[email protected]>
1 parent f08cc5a commit 64da1b1

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

etc/kayobe/kolla/config/prometheus/rabbitmq.rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ groups:
66
- name: rabbitmq.rules
77
rules:
88
- alert: RabbitMQNodeDown
9-
expr: sum(rabbitmq_build_info{instance!=""}) < 3
9+
expr: sum(rabbitmq_build_info{instance!=""}) < {% endraw %}{{ alertmanager_number_of_rabbitmq_nodes }}{% raw %}
1010
for: 30m
1111
labels:
1212
severity: critical

etc/kayobe/stackhpc-monitoring.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ alertmanager_packet_drop_threshold: 1
2626
# packets/s averaged over 5 minutes.
2727
alertmanager_packet_errors_threshold: 1
2828

29+
# Number of RabbitMQ nodes in the cluster.
30+
alertmanager_number_of_rabbitmq_nodes: "{{ groups['controllers'] | length }}"
31+
2932
###############################################################################
3033
# Exporter configuration
3134

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
features:
3+
- |
4+
Allow for easy customisation of the number of expected `RabbitMQ`
5+
nodes when evaluating the alert `RabbitMQNodeDown`. It is set by
6+
the `alertmanager_number_of_rabbitmq_nodes` which defaults to the
7+
number of `controllers`. This is benefical for deployments that
8+
do not use a standard three node setup.

0 commit comments

Comments
 (0)