https://github.com/happyoung68/deeplog-log_anomaly_detection
日志异常检测,Used for log anomaly detection, including log processing, training, prediction, and output results.
https://github.com/happyoung68/deeplog-log_anomaly_detection
anomaly-detection deeplog failure-detection log-analysis pytorch sequence-prediction
Last synced: about 1 month ago
JSON representation
日志异常检测,Used for log anomaly detection, including log processing, training, prediction, and output results.
- Host: GitHub
- URL: https://github.com/happyoung68/deeplog-log_anomaly_detection
- Owner: happyoung68
- Created: 2025-02-20T00:39:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-03-22T13:22:50.000Z (3 months ago)
- Last Synced: 2026-03-22T18:03:53.932Z (3 months ago)
- Topics: anomaly-detection, deeplog, failure-detection, log-analysis, pytorch, sequence-prediction
- Language: Python
- Homepage:
- Size: 128 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Deeplog-log_anomaly_detection
日志异常检测,Used for log anomaly detection, including log preprocessing, training, prediction, and output results.
## Introduction
***This work is developed on the basis of , and use [Drain](https://github.com/logpai/logparser) for log parsing.***
## Major features
- Used for producing environment.
- Including complete process.
- Outputing anomaly logs, rather than precision, recall, F1-score and so on.
## Requirement
- python>=3.6
- pytorch >= 1.1.0
## Quick start
1. Preprocess logs
```
cd demo
python preprocess.py
```
Then you will get the parsed log file at `../result/parse_result`, and `length of event_id_map` represents the count of log templates, `../data/demo_input.csv` is the file where the EventId has been mapped to numbers starting from 1
3. Train model
```
python deeplog.py train
```
It will tain using `../data/demo_input.csv` and the result, key parameters and train logs will be saved under `result/deeplog` path
4. Predict and output anomaly result
```
python deeplog.py predict
```
It will predict using `name = 'demo_input.csv'` in `predict.py`, here I am using the same file for **training, validation, and prediction.** But you can change it as needed.😁
The anomaly output will be saved as `../result/anomaly_output_for_xxx.csv`.
5. DIY your own model
Just try to modify parameters like `window_size`, `num_candidates`, `inputfile` to build your own model.😇
## Contributing
**If you have any questions, please open an** ***[issue](https://github.com/happyoung68/Deeplog-log_anomaly_detection/issues).***
**Welcome to** ***[pull requests](https://github.com/happyoung68/Deeplog-log_anomaly_detection/pulls)*** **to improve this repo!**