diff --git a/0002-fix-gopher-metadata-report.patch b/0002-fix-gopher-metadata-report.patch deleted file mode 100644 index 97f488b0c352b243a1f7938885ae5f5c207e99ff..0000000000000000000000000000000000000000 --- a/0002-fix-gopher-metadata-report.patch +++ /dev/null @@ -1,34 +0,0 @@ -From e2c7838ea351c60c45d400a47e07f7febcc0b307 Mon Sep 17 00:00:00 2001 -From: zhaoyuxing -Date: Mon, 29 Aug 2022 14:34:27 +0800 -Subject: [PATCH] fix gopher report metadata to kafka - ---- - gala-gopher/src/resource/resource.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/gala-gopher/src/resource/resource.c b/gala-gopher/src/resource/resource.c -index 4417066..727d393 100644 ---- a/gala-gopher/src/resource/resource.c -+++ b/gala-gopher/src/resource/resource.c -@@ -280,7 +280,6 @@ static int MeasurementMgrInit(ResourceMgr *resourceMgr) - } - INFO("[RESOURCE] load meta directory success.\n"); - -- mmMgr->meta_kafkaMgr = resourceMgr->meta_kafkaMgr; - mmMgr->meta_out_channel = resourceMgr->configMgr->metaOutConfig->outChnl; - - resourceMgr->mmMgr = mmMgr; -@@ -330,6 +329,9 @@ static int KafkaMgrInit(ResourceMgr *resourceMgr) - return -1; - } - resourceMgr->metric_kafkaMgr = kafkaMgr; -+ if (resourceMgr->mmMgr) { -+ resourceMgr->mmMgr->meta_kafkaMgr = resourceMgr->meta_kafkaMgr; -+ } - INFO("[RESOURCE] create kafkaMgr of metric success.\n"); - } else { - INFO("[RESOURCE] metric out_channel isn't kafka, ship create kafkaMgr.\n"); --- -2.36.1 - diff --git a/0003-adapt-to-abnormal-event-format-change.patch b/0003-adapt-to-abnormal-event-format-change.patch deleted file mode 100644 index 3c3f5bf3f4f3cfe9aead73e648141505c4aa93ab..0000000000000000000000000000000000000000 --- a/0003-adapt-to-abnormal-event-format-change.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 54a51f5aae1d8045c360fbafa9ad9705e5e95b28 Mon Sep 17 00:00:00 2001 -From: zhaoyuxing -Date: Mon, 29 Aug 2022 16:36:03 +0800 -Subject: [PATCH] adapt to abnormal event format change in gala-spider - ---- - gala-spider/cause_inference/cause_infer.py | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/gala-spider/cause_inference/cause_infer.py b/gala-spider/cause_inference/cause_infer.py -index f4b5396..9b06ec0 100644 ---- a/gala-spider/cause_inference/cause_infer.py -+++ b/gala-spider/cause_inference/cause_infer.py -@@ -67,7 +67,7 @@ def complete_key_info_of_metric(metric_labels, observe_entity): - - - def query_abnormal_topo_subgraph(abnormal_event: AbnormalEvent): -- abn_ts = int(float(abnormal_event.timestamp)) -+ abn_ts = int(float(abnormal_event.timestamp)) // 1000 - abn_metric_id = abnormal_event.abnormal_metric_id - abn_metric_labels = abnormal_event.metric_labels - -@@ -123,9 +123,11 @@ def parse_abn_evt(data) -> AbnormalEvent: - resource = data.get('Resource') - if not resource: - raise DataParseException('Atribute "Resource" required in abnormal event') -+ if not resource.get('metrics'): -+ raise DataParseException('Atribute "Resource.metrics" required in abnormal event') - abn_evt = AbnormalEvent( - data.get('Timestamp'), -- resource.get('metric_id'), -+ resource.get('metrics'), - 1.0, - resource.get('metric_label') - ) --- -2.36.1 - diff --git a/A-Ops-v1.2.3.tar.gz b/A-Ops-v1.2.4.tar.gz similarity index 80% rename from A-Ops-v1.2.3.tar.gz rename to A-Ops-v1.2.4.tar.gz index eee3521efe7be8d53485035d4323c1bd4571432e..76d20ebd4eec3e891a5184504ddfaefdad14bddc 100644 Binary files a/A-Ops-v1.2.3.tar.gz and b/A-Ops-v1.2.4.tar.gz differ diff --git a/A-Ops.spec b/A-Ops.spec index b984cdecc51ab3c6f0bf2b863334071950bd7dd3..7f6d29efddc1265f30109ab2ca5d742049225f93 100644 --- a/A-Ops.spec +++ b/A-Ops.spec @@ -1,6 +1,6 @@ Name: A-Ops -Version: v1.2.3 -Release: 3 +Version: v1.2.4 +Release: 1 Summary: The intelligent ops toolkit for openEuler License: MulanPSL2 URL: https://gitee.com/openeuler/A-Ops @@ -13,8 +13,6 @@ patch0001: 0001-modify-to-adapt-to-oe2209-x86.patch %ifarch aarch64 patch0001: 0001-modify-to-adapt-to-oe2209-arm.patch %endif -patch0002: 0002-fix-gopher-metadata-report.patch -patch0003: 0003-adapt-to-abnormal-event-format-change.patch # build for web @@ -55,7 +53,7 @@ Summary: utils for A-Ops Requires: python3-concurrent-log-handler python3-xmltodict python3-pyyaml python3-marshmallow >= 3.13.0 Requires: python3-requests python3-xlrd python3-prettytable python3-pygments python3-sqlalchemy Requires: python3-elasticsearch >= 7 python3-prometheus-api-client python3-urllib3 python3-werkzeug -Requires: python3-flask python3-flask-restful python3-PyMySQL +Requires: python3-flask python3-flask-restful python3-PyMySQL python3-kafka-python %description -n aops-utils utils for A-Ops @@ -175,8 +173,6 @@ tools for aops, it's about agent deploy %setup %setup -T -D -a 1 %patch0001 -p1 -%patch0002 -p1 -%patch0003 -p1 cp -rf A-Ops-web-node-modules/node_modules aops-web/ @@ -397,6 +393,7 @@ fi %files -n aops-check %attr(0644,root,root) %{_sysconfdir}/aops/check.ini +%attr(0644,root,root) %{_sysconfdir}/aops/check_default.json %attr(0755,root,root) %{_bindir}/aops-check %attr(0755,root,root) %{_unitdir}/aops-check.service %{python3_sitelib}/aops_check*.egg-info @@ -483,6 +480,9 @@ fi %changelog +* Fri Sep 2 2022 zhuyuncheng - v1.2.4-1 +- add default mode of aops-check, which can run independently. + * Mon Aug 29 2022 zhaoyuxing - v1.2.3-3 - bug fix: gala-spider adapt to abnormal event format change.