Change ContrailXMPPSessionsNone and ContrailXMPPSessionsNoneUp alerts
We check if number of sessions is less than number of computes * 2
(there may be ntw instances without open session to compute).
PROD-18011
Change-Id: I55ca6ca7bdf4baa6af92a4c0f211d1914fecc701
diff --git a/opencontrail/meta/prometheus.yml b/opencontrail/meta/prometheus.yml
index 384caf0..0961748 100644
--- a/opencontrail/meta/prometheus.yml
+++ b/opencontrail/meta/prometheus.yml
@@ -254,14 +254,14 @@
description: 'There are no BGP sessions on node {{ $labels.host }}'
ContrailXMPPSessionsNoneUp:
if: >-
- max(contrail_xmpp_session_up_count) by (host) == 0
+ sum(contrail_xmpp_session_up_count) < count(contrail_vrouter_xmpp) * 2
for: 2m
labels:
severity: warning
service: contrail-control
annotations:
- summary: 'no active XMPP sessions'
- description: 'There are no active XMPP sessions on node {{ $labels.host }}'
+ summary: 'Unavailable established XMPP sessions'
+ description: 'There is compute instance without established XMPP session'
ContrailXMPPSessionsSomeDown:
if: >-
min(contrail_xmpp_session_down_count) by (host) > 0
@@ -274,14 +274,14 @@
description: 'There are inactive XMPP sessions on node {{ $labels.host }}'
ContrailXMPPSessionsNone:
if: >-
- max(contrail_xmpp_session_count) by (host) == 0
+ sum(contrail_xmpp_session_count) < count(contrail_vrouter_xmpp) * 2
for: 2m
labels:
severity: warning
service: contrail-control
annotations:
- summary: 'No XMPP sessions'
- description: 'There are no XMPP sessions on node {{ $labels.host }}'
+ summary: 'Unavailable XMPP sessions'
+ description: 'There is compute instance with missing XMPP session'
ContrailXMPPSessionsTooMany:
if: >-
{%- endraw %}