enrich alert info about kernel stack

Signed-off-by: 贺有志 <1037617413@qq.com>
This commit is contained in:
贺有志 2024-10-16 12:20:59 +00:00 committed by Gitee
parent 63cc5a210e
commit ca856c005a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,29 @@
From 41bf507ca6cbbdf5e646a405de6b8d5b9be4bd28 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B4=BA=E6=9C=89=E5=BF=97?= <1037617413@qq.com>
Date: Wed, 16 Oct 2024 17:20:01 +0800
Subject: [PATCH] enrich alert info about kernel stack
---
src/python/sentryPlugins/ai_block_io/detector.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/python/sentryPlugins/ai_block_io/detector.py b/src/python/sentryPlugins/ai_block_io/detector.py
index ed8b64a..8536f7a 100644
--- a/src/python/sentryPlugins/ai_block_io/detector.py
+++ b/src/python/sentryPlugins/ai_block_io/detector.py
@@ -103,8 +103,10 @@ class DiskDetector:
elif len(diagnosis_info["rq_driver"]) != 0:
root_cause = "[Root Cause: disk slow]"
elif len(diagnosis_info["io_stage"]) != 0:
- stage = diagnosis_info["io_stage"][0][1].stage_name
- root_cause = f"[Root Cause: io stage slow, stage: {stage}]"
+ stage_list = []
+ for io_stage in diagnosis_info["io_stage"]:
+ stage_list.append(io_stage[0].stage_name)
+ root_cause = f"[Root Cause: io stage slow, stage: {stage_list}]"
if root_cause is None:
root_cause = "[Root Cause: high io pressure]"
return True, diagnosis_info["bio"][0][0], diagnosis_info["bio"][0][1], root_cause
--
2.23.0

View File

@ -4,7 +4,7 @@
Summary: System Inspection Framework
Name: sysSentry
Version: 1.0.2
Release: 42
Release: 43
License: Mulan PSL v2
Group: System Environment/Daemons
Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz
@ -63,6 +63,7 @@ Patch50: listen-thread-of-collect-module-exits-occasionally.patch
Patch51: precise-alarm-query-time.patch
Patch52: fix-word-error.patch
Patch53: optimize-log-printing.patch
Patch54: enrich-alert-info-about-kernel-stack.patch
BuildRequires: cmake gcc-c++
BuildRequires: python3 python3-setuptools
@ -325,6 +326,12 @@ rm -rf %{buildroot}
%attr(0550,root,root) %{python3_sitelib}/sentryCollector/__pycache__/collect_plugin*
%changelog
* Wed Oct 16 2024 heyouzhi <heyouzhi@huawei.com> - 1.0.2-43
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:enrich alert info about kernel stack
* Wed Oct 16 2024 jinsaihang <jinsaihang@h-partners.com> - 1.0.2-42
- Type:bugfix
- CVE:NA