From a77d3966e5753cea00a2b7cfc67366119063e3cd Mon Sep 17 00:00:00 2001 From: fbalak Date: Wed, 22 May 2024 15:36:10 +0200 Subject: [PATCH] fix alert dictionary keys Signed-off-by: fbalak --- ocs_ci/utility/prometheus.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ocs_ci/utility/prometheus.py b/ocs_ci/utility/prometheus.py index c6a5a4f7f53..a2c982f55b0 100644 --- a/ocs_ci/utility/prometheus.py +++ b/ocs_ci/utility/prometheus.py @@ -47,8 +47,8 @@ def check_alert_list( target_alerts = [ alert for alert in target_alerts - if alert["message"] == msg - and alert["severity_level"] == severity + if alert["annotations"]["message"] == msg + and alert["annotations"]["severity_level"] == severity and alert["state"] == state ] assert_msg = (