gala-anteater/remove-sys-level-config-param.patch
Zhen Chen 1f46c219ad Model optimization and bugfix
- fix str2enum bug & data query refactor
- add systemd service for anteater
- remove 'sys-level' config param
- add chinese descriptions
- Update TCP Establish Model & Add Nic Loss Detector
- Add disk throughput detector

(cherry picked from commit f3c17e8c6a619a7803afd89b945ae3f36d17f9b0)
2023-01-17 22:40:46 +08:00

99 lines
3.6 KiB
Diff
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 5c6b03a49a49ddc56574e906f959d5fe34c1debc Mon Sep 17 00:00:00 2001
From: lizhenxing11 <lizhenxing11@huawei.com>
Date: Fri, 6 Jan 2023 10:59:12 +0800
Subject: [PATCH] remove 'sys-level' config param
---
anteater/config.py | 1 -
anteater/main.py | 29 +++++++++++------------------
config/gala-anteater.yaml | 1 -
docs/conf_introduction.md | 1 -
4 files changed, 11 insertions(+), 21 deletions(-)
diff --git a/anteater/config.py b/anteater/config.py
index e9ab557..caeceec 100644
--- a/anteater/config.py
+++ b/anteater/config.py
@@ -27,7 +27,6 @@ import yaml
class GlobalConf:
"""The global config"""
data_source: str
- sys_level: bool
@dataclass
diff --git a/anteater/main.py b/anteater/main.py
index 4de72f9..87aae95 100644
--- a/anteater/main.py
+++ b/anteater/main.py
@@ -26,7 +26,6 @@ from anteater.module.sys.nic_loss import NICLossDetector
from anteater.module.sys.proc_io_latency import ProcIOLatencyDetector
from anteater.module.sys.sys_io_latency import SysIOLatencyDetector
from anteater.module.sys.tcp_establish import SysTcpEstablishDetector
-from anteater.module.sys.tcp_transmission_throughput import SysTcpTransmissionThroughputDetector
from anteater.module.sys.tcp_transmission_latency import SysTcpTransmissionLatencyDetector
from anteater.provider.kafka import KafkaProvider
from anteater.source.anomaly_report import AnomalyReport
@@ -49,24 +48,18 @@ def main():
kafka_provider = KafkaProvider(conf.kafka)
loader = MetricLoader(conf)
report = AnomalyReport(kafka_provider)
- if conf.global_conf.sys_level:
- detectors = [
- # APP sli anomaly detection
- APPSliDetector(loader, report),
+ detectors = [
+ # APP sli anomaly detection
+ APPSliDetector(loader, report),
- # SYS tcp/io detection
- SysTcpEstablishDetector(loader, report),
- SysTcpTransmissionLatencyDetector(loader, report),
- SysIOLatencyDetector(loader, report),
- ProcIOLatencyDetector(loader, report),
- DiskThroughputDetector(loader, report),
- NICLossDetector(loader, report),
- ]
- else:
- detectors = [
- # APP sli anomaly detection
- APPSliDetector(loader, report)
- ]
+ # SYS tcp/io detection
+ SysTcpEstablishDetector(loader, report),
+ SysTcpTransmissionLatencyDetector(loader, report),
+ SysIOLatencyDetector(loader, report),
+ ProcIOLatencyDetector(loader, report),
+ DiskThroughputDetector(loader, report),
+ NICLossDetector(loader, report),
+ ]
anomaly_detect = AnomalyDetection(detectors, conf)
diff --git a/config/gala-anteater.yaml b/config/gala-anteater.yaml
index c4c54a0..72ffc31 100644
--- a/config/gala-anteater.yaml
+++ b/config/gala-anteater.yaml
@@ -1,6 +1,5 @@
Global:
data_source: "prometheus"
- sys_level: false
Kafka:
server: "localhost"
diff --git a/docs/conf_introduction.md b/docs/conf_introduction.md
index 09a7284..869d3e9 100644
--- a/docs/conf_introduction.md
+++ b/docs/conf_introduction.md
@@ -16,7 +16,6 @@ gala-anteater # gala-anteater 主目录
在文件`gala-anteater.yaml`中,配置`gala-anteater`启动时所需的参数。该配置项中,主要包含:
- Global: 配置启动时的全局变量
- data_source: 时序数据的来源,目前支持`"prometheus"`Prometheus和`"aom"`AOM两种数据来源
- - sys_level: 是否支持`系统级`异常检测,可选:`true`、`false`。
- Kafka: 配置中间件Kafka所需的参数
- server: Kafak对应的`server ip`,如:"10.xxx.xxx.xxx"
--
2.33.0