Fix ContrailFlowsDropTooMany alert
The contrail_vrouter_flows_flow_action_drop metric is a counter so the
alert should use rate().
Change-Id: I24b7c470ee7345d700b7f00493fbf5938ca7d2f4
diff --git a/opencontrail/map.jinja b/opencontrail/map.jinja
index 52fe8b3..809520c 100644
--- a/opencontrail/map.jinja
+++ b/opencontrail/map.jinja
@@ -324,7 +324,7 @@
'vrouter_lls_variation_threshold': 5,
'vrouter_flows_active_too_high_threshold': 1200,
'vrouter_flows_discard_too_high_threshold': 1200,
- 'vrouter_flows_flow_action_drop_too_high_threshold': 100,
+ 'vrouter_flows_flow_action_drop_too_high_threshold': 5,
'vrouter_flows_frag_err_too_high_threshold': 100,
'vrouter_flows_invalid_nh_too_high_threshold': 104,
'vrouter_flows_composite_invalid_interface_too_high_threshold': 105,
diff --git a/opencontrail/meta/prometheus.yml b/opencontrail/meta/prometheus.yml
index 0b45a53..b360903 100644
--- a/opencontrail/meta/prometheus.yml
+++ b/opencontrail/meta/prometheus.yml
@@ -359,7 +359,7 @@
ContrailFlowsDropTooMany:
if: >-
{%- set vrouter_flows_flow_action_drop_toohigh_threshold = monitoring.vrouter_flows_flow_action_drop_too_high_threshold %}
- min(contrail_vrouter_flows_flow_action_drop) by (host) >= {{ vrouter_flows_flow_action_drop_toohigh_threshold }}
+ rate(contrail_vrouter_flows_flow_action_drop[5m]) >= {{ vrouter_flows_flow_action_drop_toohigh_threshold }}
{%- raw %}
for: 2m
labels:
@@ -367,7 +367,7 @@
service: contrail-compute
annotations:
summary: 'Too many vRouter dropped flows'
- description: 'There are too many dropped vRouter flows on node {{ $labels.host }} (current value={{ $value }}, threshold={%- endraw %}{{ vrouter_flows_flow_action_drop_toohigh_threshold }})'
+ description: 'There are too many dropped vRouter flows on node {{ $labels.host }} (current value={{ $value }} flows/s, threshold={%- endraw %}{{ vrouter_flows_flow_action_drop_toohigh_threshold }} flows/s)'
ContrailFlowsFragErrTooMany:
if: >-
{%- set vrouter_flows_frag_err_toohigh_threshold = monitoring.vrouter_flows_frag_err_too_high_threshold %}