Coder Social home page Coder Social logo

e9link / ai-graph Goto Github PK

View Code? Open in Web Editor NEW
8.0 4.0 3.0 867 KB

Train an artificial intelligent model to recognize abnormal traffic graphs or KPI graphs. Great for performance or IT engineers to figure out abnormal graphs from thousands of traffic graphs like cacti or KPI graphs from telecom OSS.

License: Apache License 2.0

Python 77.32% PHP 22.68%
artificial-intelligence cacti kpis kpi-indicator tensorflow oss performance-analysis performance-monitoring

ai-graph's Introduction

AI-Graph

The project is to train artificial intelligent models to recognize abnormal traffic graphs or KPI graphs. It can be used by performance or IT engineers to figure out abnormal graphs from thousands of traffic graphs like cacti or KPI graphs from telecom OSS.

First release, ai_cacti_test.py with pre-trained model pm_graph_variables5.ckpt identifies three types of graph: 1) Sudden traffic drop graphs indicating outage; 2) Plateau graphs indicating capacity limitation; 3) Normal graphs which exclude outage and plateau graphs.
alt text It uses five conventional neural network layers and one full connected layers as follow, alt text

Installation Procedure

  1. Install python3.

  2. Install tensorflow 1.4. Tensorflow versions higher than 1.4 might have compatible issues.

    sudo apt-get install python3-pip python3-dev python-virtualenv
    virtualenv --system-site-packages ~/venvs/tensorflow
    source ~/venvs/tensorflow/bin/activate
    sudo pip3 install tensorflow==1.4

  1. Install required python3 module.

    sudo pip3 install pysftp
    sudo pip3 install numpy
    sudo pip3 install python36-tkinter

    sudo pip3 install matplotlib

  1. Download AI_Graph_master.zip from Github and unzip to local AI-Graph-master directory.

  2. Download the following two files(too big, cannot upload to github) and put into AI-Graph-master directory.

    pm_graph_variables5.ckpt.data-00000-of-00001
https://drive.google.com/open?id=1nhWdIWnYf6ywCWPpN3OonRb_yNVgu0mT

    gi-imperil.npy

https://drive.google.com/open?id=1PKVtxquGk_FxKIKN1WdWboc8OKvIntGz

  1. Install nmidDataExport v1.1.0.
    https://www.urban-software.com/products/nmid-plugins/nmiddataexport/

  2. Replace setup.php files in the nmiddataexport directory. I change setup.php to export 24h graph data.

  3. In cacti server, select Console/Devices/Graph Lists/Graph management/Automated Export - Add to Export. Then Cacti will output 24h graph data to /usr/share/cacti/plugins/nmidDataExport/export/

Running

  1. Test any cacti csv files in .\pm_graph\data\test
        python3 ai_cacti_test.py

     CSV file format is shown as follow. Title and Step field are optional. It must have Date column to let ai_cacti_test.py to extract in/out data.

    *Title: 'Great Plains GPC/IMPRENEETH/1023 PRI' *
    Step: 60
    Total Rows: 1440
    Graph ID: 2945
    Host ID: 30

    Date                   In   Out
    5/2/2018 9:31    1.6   4.83

  1. Test nmidDataExport files in cacti server at /usr/share/cacti/plugins/nmidDataExport/export/. ai_cacti_test.py sftp the csv files in cacti server at /usr/share/cacti/plugins/nmidDataExport/export/ and checks which one is abnormal.
    --s specify the cacti server name.
        python3 ai_cacti_test.py --s cacti

  2. You can put the new 24h training data in .\pm_graph\data\normal, .\pm_graph\data\outage, .\pm_graph\data\plateau and run the following command to tune the model.
        python3 ai_cacti.py --d ./data/ --v pm_graph_variables5.ckpt

ai-graph's People

Contributors

e9link avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

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.