- Notifications
You must be signed in to change notification settings - Fork34
nailo2c/deeplog
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
PyTorch implements "DeepLog: Anomaly Detection and Diagnosis from System Logs through Deep Learning"
https://colab.research.google.com/drive/1xWHovxTkysiPei68bTywqB2oCo6JelAU?usp=sharing
Build environment
git clone https://github.com/nailo2c/deeplog.gitcd deeplogpython3 -m venv venv. venv/bin/activatepip install -r requirements.txt
Run local example
We use open data
OpenStack
from logpai's loghub2.1. Preprocess
cdexample/python3preprocess.py
2.2. Train
num-class
is count ofevent_id_map
, whereevent_id_map
is generated bypreprocess.py
.num-candidates
is self-define, here we definenum-candidates
isnum-class*0.1
python3train.py--num-class1143--num-candidates114--epochs35--window-size3--localTrue
2.3. Predict
python3predict.py--threshold25
Result
Accuracy 0.9430014 Precision 0.6497461 Recall 0.9275362 F1 0.7641791 Deactivate
deactivate
This tree structure is generate by mac terminal tool
tree
& copy paste it toREADME.md
.tree -I"__pycache__|tmp.*">> tmp.txt
.├── README.md├── deeplog│ ├── __init__.py│ └── deeplog.py├── example│ ├── data│ │ └── OpenStack│ │ ├── anomaly_labels.txt│ │ ├── openstack_abnormal.log│ │ ├── openstack_normal1.log│ │ └── openstack_normal2.log│ ├── predict.py│ ├── preprocess.py│ └── train.py└── requirements.txt