Merge "Fix Contrail alerts"
diff --git a/opencontrail/map.jinja b/opencontrail/map.jinja
index 9f5bcf6..d993b4b 100644
--- a/opencontrail/map.jinja
+++ b/opencontrail/map.jinja
@@ -322,14 +322,14 @@
'vrouter_dns_xmpp_sessions_variation_threshold': 5,
'vrouter_lls_too_high_threshold': 10,
'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': 5,
+ 'vrouter_flows_active_too_high_threshold': 100,
+ 'vrouter_flows_discard_too_high_threshold': 0.1,
+ 'vrouter_flows_flow_action_drop_too_high_threshold': 0.2,
'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,
+ 'vrouter_flows_invalid_nh_too_high_threshold': 0.1,
+ 'vrouter_flows_composite_invalid_interface_too_high_threshold': 0.05,
'vrouter_flows_invalid_label_too_high_threshold': 100,
- 'vrouter_flows_flow_queue_limit_exceeded_too_high_threshold': 100,
+ 'vrouter_flows_flow_queue_limit_exceeded_too_high_threshold': 0.1,
'vrouter_flows_flow_table_full_too_high_threshold': 100,
'services_failed_warning_threshold_percent': 0.3,
'services_failed_critical_threshold_percent': 0.6,
diff --git a/opencontrail/meta/prometheus.yml b/opencontrail/meta/prometheus.yml
index f27888e..384caf0 100644
--- a/opencontrail/meta/prometheus.yml
+++ b/opencontrail/meta/prometheus.yml
@@ -405,7 +405,7 @@
ContrailFlowsActiveTooMany:
if: >-
{%- set vrouter_flows_active_toohigh_threshold = monitoring.vrouter_flows_active_too_high_threshold %}
- min(contrail_vrouter_flows_active) by (host) >= {{ vrouter_flows_active_toohigh_threshold }}
+ deriv(contrail_vrouter_flows_active[5m]) >= {{ vrouter_flows_active_toohigh_threshold }}
{%- raw %}
for: 2m
labels:
@@ -417,7 +417,7 @@
ContrailFlowsDiscardTooMany:
if: >-
{%- set vrouter_flows_discard_toohigh_threshold = monitoring.vrouter_flows_discard_too_high_threshold %}
- min(contrail_vrouter_flows_discard) by (host) >= {{ vrouter_flows_discard_toohigh_threshold }}
+ rate(contrail_vrouter_flows_discard[5m]) >= {{ vrouter_flows_discard_toohigh_threshold }}
{%- raw %}
for: 2m
labels:
@@ -453,7 +453,7 @@
ContrailFlowsInvalidNHTooMany:
if: >-
{%- set vrouter_flows_invalid_nh_toohigh_threshold = monitoring.vrouter_flows_invalid_nh_too_high_threshold %}
- min(contrail_vrouter_flows_invalid_nh) by (host) >= {{ vrouter_flows_invalid_nh_toohigh_threshold }}
+ rate(contrail_vrouter_flows_invalid_nh[5m]) >= {{ vrouter_flows_invalid_nh_toohigh_threshold }}
{%- raw %}
for: 2m
labels:
@@ -465,7 +465,7 @@
ContrailFlowsInvalidITFTooMany:
if: >-
{%- set vrouter_flows_composite_invalid_interface_toohigh_threshold = monitoring.vrouter_flows_composite_invalid_interface_too_high_threshold %}
- min(contrail_vrouter_flows_composite_invalid_interface) by (host) >= {{ vrouter_flows_composite_invalid_interface_toohigh_threshold }}
+ rate(contrail_vrouter_flows_composite_invalid_interface[5m]) >= {{ vrouter_flows_composite_invalid_interface_toohigh_threshold }}
{%- raw %}
for: 2m
labels:
@@ -489,7 +489,7 @@
ContrailFlowsQueueLimitExceededTooMany:
if: >-
{%- set vrouter_flows_flow_queue_limit_exceeded_toohigh_threshold = monitoring.vrouter_flows_flow_queue_limit_exceeded_too_high_threshold %}
- min(contrail_vrouter_flows_flow_queue_limit_exceeded) by (host) >= {{ vrouter_flows_flow_queue_limit_exceeded_toohigh_threshold }}
+ rate(contrail_vrouter_flows_flow_queue_limit_exceeded[5m]) >= {{ vrouter_flows_flow_queue_limit_exceeded_toohigh_threshold }}
{%- raw %}
for: 2m
labels: