Giter Site home page Giter Site logo

deeplog's Introduction

DeepLog

PyTorch implements "DeepLog: Anomaly Detection and Diagnosis from System Logs through Deep Learning"

Play on Colab

https://colab.research.google.com/drive/1xWHovxTkysiPei68bTywqB2oCo6JelAU?usp=sharing

Getting Started

  1. Build environment

    git clone https://github.com/nailo2c/deeplog.git
    cd deeplog
    python3 -m venv venv
    . venv/bin/activate
    pip install -r requirements.txt
  2. Run local example

    We use open data OpenStack from logpai's loghub

    2.1. Preprocess

    cd example/
    python3 preprocess.py

    2.2. Train

    num-class is count of event_id_map, where event_id_map is generated by preprocess.py. num-candidates is self-define, here we define num-candidates is num-class*0.1

    python3 train.py --num-class 1143 --num-candidates 114 --epochs 35 --window-size 3 --local True

    2.3. Predict

    python3 predict.py --threshold 25
  3. Result

    Accuracy 0.9430014
    Precision 0.6497461
    Recall 0.9275362
    F1 0.7641791
  4. Deactivate

    deactivate

Folder Structure

  • This tree structure is generate by mac terminal tool tree & copy paste it to README.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

deeplog's People

Contributors

nailo2c avatar sergey-serebryakov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

deeplog's Issues

preprocess output and prediction module

Sir, Thank you for this implementation of Deeplog.
i am using this work for further research in this work.
when executing the existing code,
the preprocess output eventid results as 1145
and once training completed, the prediction module results, precision:0, so divide by zero error.

Kindly request to support.

Svaridasan.P

Complete implementation?

Hey, thank you for you this implementation. I wonder if this is complete? Did you implement the three models or just the log key model?

unique log keys(log templates)

Nice work!
But I still got some questions

  1. As mentioned in the original paper, there are only 40 unique log keys while here are 1143
  2. The original paper use "instance_id" to group sessions, but I haven't seen this in your log format

Thanks

parameters based prediction

great work,
Paper contains following features:

  1. logKey based prediction of next key (= log key path stacked LSTM based prediction)
  2. log Parameter based prediction of next parameter (= log parameters LSTM based prediction)
  3. Workflow clustering based creation.

In the end your output is sequences how can we convert it back into log statements instead digits of sequences?
Minor Note: You've implemented only LogKeys path finding what about others?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.