Giter Site home page Giter Site logo

db-state-watcher's Introduction

DB-state-watcher

Database state watcher

In this project I tried to get in my hand a tool, a mean, with help of this I'll be able to autimaticly recognise unusual and, at hte same time - bad state of watched-database;

The main idea was that: I know a usual (acceptable) and unusual (bad, not acceptable) state of the database - as marked array of awr-data. It's array in file patternset.dat

This file, and data in there, I'd prepared by my hand before, as a result of the database incidents; Rows in the file, which are related to some db-incidents, that is: which are related to unusual and bad db-state, I marked by value "1" in field "flag" Other rows: have value "0" in that filed - which means: normal, usual state of the db;

There is another shell-script: "get_state_vector.sh" which gets current-state vector of the database; So then it's just comparision of this vector with vectors (lines) in the array from the file "patternset.dat"; The nearest vector from the "patternset.dat" and it's flag gives information: to what state (usual and acceptable, or unusual and bad) should be attributed the db by is't current-state vector; This is similar to the work of the kNN-algorithm.

The above comparison: is done by script classifier.py But, here I do some additional calculation in the classifier.py If current-state vector has nearest row (it's also vector), from "patternset.dat" data, which belongs to 0-marked class (normal state of the db) then I try to see: how close or far are these two vectors apart I'm trying to compare the distance between these two vectors (current-state vector and the nearest row), with the distance between neighbors (also from 0-class) of the found nearest row.

In general, the tool works quite accurately. In technical terms, this is the crontab task: */5 * * * * /watcher/watcher.sh 1>/watcher/run.log 2>&1

But I am not satisfied with the cost of the work of this tool:

  1. I have to generate large enough array of hand-marked data (warm_cache.sh make_training_set.sh)
  2. I have to keep up to date information in those array by constantly adding to this array new data on the bad-state of the DB, after newly occurring incidents

So I abandoned this project

db-state-watcher's People

Contributors

maksimivanovperm 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.