Skip to content

rajez133/AutomateErrorLogAnalyzer

Repository files navigation

Automated Errorlog Analyzer for Reference Clock

Automated Errorlog analzer is a multi threaded python script based tool which takes error log text file as input and parses it, based on certain xml rules written by the user, deduces the meaning of the content captured in the error log and it also does a root cause analysis to find the exact problem within no-time.

Requirements

The following are the python packages required for the script to run.

  • re - For regex support
  • threading - For threading support
  • sys - For the system calls support
  • untangle - For xml Support
  • argparse - For arguments and help
  • datetime - For manipulating dates and times
  • time - For time related functions support

The errl_parser.py script expects the following files to be present in the same directory in which it is being run.

[x] rules.xml - Where the rules to decude the meaning of the error log is written
[x] key_list.txt - Where the list of input keys that can be used in the rules.xml
[x] err_log_help.txt - Where content of error log education is provided

Installation

All the above mentioned packagesi except untangle are standard ones , and they come directly with the python installation.

The following is the command to install the untangle package using pip.

pip3 install untangle --user

Testedby

The tool is written and well tested,supported in python3.

Usage

The following all the options supported by the tool.

errl_parser.py [-h] [--ruleHelp | --keyList | --errlEducation | --elog ELOG_PATH]

arguments:

  -h, --help        show this help message and exit
  --ruleHelp        to print the help message on how to add custom rule
  --keyList         to print list of keys available in the oscc error log
  --errlEducation   to print the description of each keys available in the
                    oscc error log
  --elog ELOG_PATH  path to the error log file to be analyzed

Also, there is an example xml rule template(example_rule.xml) provided as a part of the repo.

Execution Flow

                                            +---------------+
                                            |     START     |
                                            +-------+-------+
                                                    |
                                         +----------v------------+
                                         |                       |
                                         |  Collect errorlogs,   |
                                         |  define input rules   |
                                         |                       |
                                         +----------+------------+
                                                    |
                                    +---------------v------------------+
                                    |                                  |
                                    |   Process the user defined       |
                                    |  error condition rules, Process  |
                                    |  the error logs and store the    |
                                    |  data in suitable data structure |
                                    |                                  |
                                    +---------------+------------------+
                                                    |
                                          +---------v------------+
                                          | Check the error log  |
                                          | to see if any of the |
                                          | user specified rule  |
                                          | gets satisfied.      |
                                          |                      |
                                          +---------+------------+
                                                    |
                                          +---------v-------------+
                                          | Error condition       |
                 +------------------------+ found in the logs     +-----------------+
                 |                        |                       |                 |
                 |                        +-----------------------+                 |
                 v                                                                  |
+----------------+----------------+                                                 |
|Print the root cause of          |                                                 |
|failure and details of part      +----------------+      +-------------------------+
|to be replaced.                  |                |      |
+---------------------------------+                |      |
                                            +------v------v---+
                                            |       END       |
                                            +-----------------+

Contact

Manojkiran Eda - @manojkiraneda Rajees R - @rajees

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages