Giter Club home page Giter Club logo

diagnosticstool's Introduction

Diagnostics Tool

About

This tool is designed to diagnose errors by tailing the log file. It is a stand alone java application with less memory footprint.

Requirement

  1. Java 8
  2. IDE (Inteillj - not necessary )
  3. Maven
  4. WSO2 IS Server

Libraries

1.Json Simple

Structure and Functionalities

Logtailor

Apache.Commons.Tailor implmentation used to tail the log file. It uses file channel to read the data from the log file and load the data into byte buffer.

MatchRuleEngine

Since it implements TailerListener, it handles all the log lines and separate all the ERROR log lines from INFO log lines.

Interpreter

Interpreter first validates the log line ,then it analyses the log line and find what error occured ,later it triggers respective action executors to diagnose the error and finally it triggers post action executors to do post actions.

ActionExecutors

Classes which extend Action executor abstract class can be used as ActionExecutors. Execute function with parameter Folder path (which contains of the folder path where action execution results sholud store) used to do diagnosis. ActionExecutors can use root(RegexNode) for configuration purpose.

PostActionExecutors

Currently ZipFileExecutor is the only one post action executor which used to file the diagnostics reults folder.

RegexTree and RegexNode

alt text

Regex Tree is built up in tool start up phase. It used as a static memory. Json file configuration is given below.

Extensibility

  • User can extend the tree by adding nodes by giving proper regex as path.
  • User can add one or more diagnostic action executors to both leaf nodes and non leaf nodes.
  • User can add one or more regex pattern as path between parent node and child node.
  • User can add ActionExecutors.

Current Progress

How to Configure Json File

How to run

  • Clone the project
  • Go to DiagnosticsTool/org.wso2.carbon.diagnostics.application/resources
  • Open the RegexTree.json file in any text editor
  • Edit LogFileConfiguration by providing wso2carbon.log file path and wso2carbon.pid file path
  • Build the project using mvn clean install
  • Go to DiagnosticsTool/org.wso2.carbon.diagnostics.application/target
  • run jar file

diagnosticstool's People

Contributors

thumimku avatar

Watchers

James Cloos avatar Ruwan Abeykoon 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.