Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
loglizer — 基于日志的异常检测机器学习工具包 [ISSRE'16] | Kitploit
工具/GitHubGitHub/logpai/loglizer
机器学习异常检测日志分析
GitHublogpai/loglizer

loglizer

基于日志的异常检测机器学习工具包 [ISSRE'16]

查看仓库
1.4k4372年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

loglizer

Loglizer 是一个基于机器学习的日志分析工具包,用于自动化异常检测。

Loglizer是一款基于AI的日志大数据分析工具, 能用于自动异常检测、智能故障诊断等场景

日志在众多软件系统的开发和维护过程中至关重要。它们记录了系统运行期间的详细运行时信息,使开发人员和运维工程师能够监控其系统并跟踪异常行为和错误。Loglizer 提供了一套工具包,实现了多种基于机器学习的日志分析技术,用于自动化异常检测。

🔭 如果您在研究中使用了 Loglizer,并希望发表论文,请引用以下论文。

  • Shilin He, Jieming Zhu, Pinjia He, Michael R. Lyu. Experience Report: System Log Analysis for Anomaly Detection, IEEE International Symposium on Software Reliability Engineering (ISSRE), 2016. [Bibtex][中文版本] (ISSRE 最具影响力论文)

框架

Framework of Anomaly Detection

用于异常检测的日志分析框架通常包含以下组件:

  1. 日志收集: 日志在运行时生成,并通过数据流管道(如 Flume 和 Kafka)汇总到中心位置。
  2. 日志解析: 日志解析的目标是将非结构化日志消息转换为结构化事件的映射,基于此可以应用复杂的机器学习模型。日志解析的详细信息可以在我们的 logparser 项目中找到。
  3. 特征提取: 结构化日志可以通过间隔窗口、滑动窗口或会话窗口切分为短日志序列。然后执行特征提取,将每个日志序列向量化,例如使用事件计数向量。
  4. 异常检测: 训练异常检测模型,以判断给定的特征向量是否为异常。

模型

当前可用的异常检测模型:

日志数据

我们收集了一套带标签的日志数据集,放在 loghub 中,供研究使用。如果您对这些数据集感兴趣,请点击链接提交访问请求。

安装

root@kitploit:~
git clone https://github.com/logpai/loglizer.git
cd loglizer
pip install -r requirements.txt

API 用法

root@kitploit:~
# Load HDFS dataset. If you would like to try your own log, you need to rewrite the load function.
(x_train, y_train), (x_test, y_test) = dataloader.load_HDFS(...)

# Feature extraction and transformation
feature_extractor = preprocessing.FeatureExtractor()
feature_extractor.fit_transform(...) 

# Model training
model = PCA()
model.fit(...)

# Feature transform after fitting
x_test = feature_extractor.transform(...)
# Model evaluation with labeled data
model.evaluate(...)

# Anomaly prediction
x_test = feature_extractor.transform(...)
model.predict(...) # predict anomalies on given data

更多详情请参阅 docs 中的 演示 以快速上手。请注意,所有机器学习模型都不是魔法,您需要了解如何调整参数,才能让它们适用于您自己的数据。

基准测试结果

如果您想重现以下结果,请在完整 HDFS 数据集上运行 benchmarks/HDFS_bechmark.py(HDFS100k 仅用于演示)。

贡献者

  • Shilin He,香港中文大学
  • Jieming Zhu,香港中文大学,现供职于华为诺亚方舟实验室
  • Pinjia He,香港中文大学,现供职于苏黎世联邦理工学院

反馈

如果有任何问题或反馈,请在 issue 页面 发帖。

更新历史

  • May 14, 2016: 初始提交
  • Sep 21, 2017: 更新代码和 README
  • Mar 21, 2018: 重写大部分代码并添加详细注释
  • Feb 18, 2019: 重构仓库并附带实操演示
下载工具
模型论文参考文献
监督模型
LR[EuroSys'10] Fingerprinting the Datacenter: Automated Classification of Performance Crises, by Peter Bodík, Moises Goldszmidt, Armando Fox, Hans Andersen. [Microsoft]
Decision Tree[ICAC'04] Failure Diagnosis Using Decision Trees, by Mike Chen, Alice X. Zheng, Jim Lloyd, Michael I. Jordan, Eric Brewer. [eBay]
SVM[ICDM'07] Failure Prediction in IBM BlueGene/L Event Logs, by Yinglung Liang, Yanyong Zhang, Hui Xiong, Ramendra Sahoo. [IBM]
无监督模型
LOF[SIGMOD'00] LOF: Identifying Density-Based Local Outliers, by Markus M. Breunig, Hans-Peter Kriegel, Raymond T. Ng, Jörg Sander.
One-Class SVM[Neural Computation'01] Estimating the Support of a High-Dimensional Distribution, by John Platt, Bernhard Schölkopf, John Shawe-Taylor, Alex J. Smola, Robert C. Williamson.
Isolation Forest[ICDM'08] Isolation Forest, by Fei Tony Liu, Kai Ming Ting, Zhi-Hua Zhou.
PCA[SOSP'09] Large-Scale System Problems Detection by Mining Console Logs, by Wei Xu, Ling Huang, Armando Fox, David Patterson, Michael I. Jordan. [Intel]
Invariants Mining[ATC'10] Mining Invariants from Console Logs for System Problem Detection, by Jian-Guang Lou, Qiang Fu, Shengqi Yang, Ye Xu, Jiang Li. [Microsoft]
Clustering[ICSE'16] Log Clustering based Problem Identification for Online Service Systems, by Qingwei Lin, Hongyu Zhang, Jian-Guang Lou, Yu Zhang, Xuewei Chen. [Microsoft]
DeepLog (coming)[CCS'17] DeepLog: Anomaly Detection and Diagnosis from System Logs through Deep Learning, by Min Du, Feifei Li, Guineng Zheng, Vivek Srikumar.
AutoEncoder (coming)[Arxiv'18] Anomaly Detection using Autoencoders in High Performance Computing Systems, by Andrea Borghesi, Andrea Bartolini, Michele Lombardi, Michela Milano, Luca Benini.
HDFS
模型精确率召回率F1
LR0.9550.9110.933
Decision Tree0.9980.9980.998
SVM0.9590.9700.965
LOF0.9670.5610.710
One-Class SVM0.9950.2220.363
Isolation Forest0.8300.7760.802
PCA0.9750.6350.769
Invariants Mining0.8880.9450.915
Clustering1.0000.7200.837