Skip to content

Commit

Permalink
mgr/dashboard: Incorrect MTU mismatch warning
Browse files Browse the repository at this point in the history
The MTU mismatch warning was being fired for those NIC's as well that are in down state. This PR intends to fix this issue

Fixes:https://tracker.ceph.com/issues/52028
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
  • Loading branch information
Aashish Sharma committed Sep 2, 2021
1 parent c49a636 commit 58d6354
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion monitoring/prometheus/alerts/ceph_default_alerts.yml
Expand Up @@ -233,7 +233,7 @@ groups:
rate of the past 48 hours.
- alert: MTU Mismatch
expr: node_network_mtu_bytes{device!="lo"} != on() group_left() (quantile(0.5, node_network_mtu_bytes{device!="lo"}))
expr: node_network_mtu_bytes{device!="lo"} * (node_network_up{device!="lo"} > 0) != on() group_left() (quantile(0.5, node_network_mtu_bytes{device!="lo"}))
labels:
severity: warning
type: ceph_default
Expand Down
20 changes: 17 additions & 3 deletions monitoring/prometheus/alerts/test_alerts.yml
Expand Up @@ -680,13 +680,27 @@ tests:
- series: 'node_network_mtu_bytes{device="eth4",instance="node-exporter",
job="node-exporter"}'
values: '9000 9000 9000 9000 9000'
- series: 'node_network_up{device="eth0",instance="node-exporter",
job="node-exporter"}'
values: '0 0 0 0 0'
- series: 'node_network_up{device="eth1",instance="node-exporter",
job="node-exporter"}'
values: '0 0 0 0 0'
- series: 'node_network_up{device="eth2",instance="node-exporter",
job="node-exporter"}'
values: '1 1 1 1 1'
- series: 'node_network_up{device="eth3",instance="node-exporter",
job="node-exporter"}'
values: '0 0 0 0 0'
- series: 'node_network_up{device="eth4",instance="node-exporter",
job="node-exporter"}'
values: '1 1 1 1 1'
promql_expr_test:
- expr: node_network_mtu_bytes{device!="lo"} != on() group_left()
- expr: node_network_mtu_bytes{device!="lo"} * (node_network_up{device!="lo"} > 0) != on() group_left()
(quantile(0.5, node_network_mtu_bytes{device!="lo"}))
eval_time: 1m
exp_samples:
- labels: '{__name__="node_network_mtu_bytes", device="eth4",
instance="node-exporter", job="node-exporter"}'
- labels: '{device="eth4", instance="node-exporter", job="node-exporter"}'
value: 9000
alert_rule_test:
- eval_time: 1m
Expand Down

0 comments on commit 58d6354

Please sign in to comment.