Skip to content

Commit

Permalink
tmp move
Browse files Browse the repository at this point in the history
  • Loading branch information
boazhaim committed Sep 29, 2024
1 parent 5d9a699 commit e59c7c0
Show file tree
Hide file tree
Showing 35 changed files with 57 additions and 63 deletions.
2 changes: 1 addition & 1 deletion plugins/ufm_log_analyzer_plugin/log_analyzer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
src_dir=$( realpath "${SCRIPT_DIR}/src" )
export PYTHONPATH="${src_dir}:../../" # The ../../ is to be able to use the utils

python3 "${src_dir}/loganalyze/log_analyzer.py" "$@"
python3 "${src_dir}/log_analyzer.py" "$@"
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@
from typing import Callable, List, Set, Tuple


from loganalyze.log_analyzers.base_analyzer import BaseImageCreator
from loganalyze.logs_extraction.directory_extractor import DirectoryExtractor
from loganalyze.log_analyzers.ufm_top_analyzer import UFMTopAnalyzer
from loganalyze.logs_extraction.tar_extractor import DumpFilesExtractor
from loganalyze.log_parsing.log_parser import LogParser
from loganalyze.log_parsing.logs_regex import logs_regex_csv_headers_list
from loganalyze.logs_csv.csv_handler import CsvHandler

from loganalyze.log_analyzers.ufm_log_analyzer import UFMLogAnalyzer
from loganalyze.log_analyzers.ufm_health_analyzer import UFMHealthAnalyzer
from loganalyze.log_analyzers.ibdiagnet_log_analyzer import IBDIAGNETLogAnalyzer
from loganalyze.log_analyzers.events_log_analyzer import EventsLogAnalyzer
from loganalyze.log_analyzers.console_log_analyzer import ConsoleLogAnalyzer
from loganalyze.log_analyzers.rest_api_log_analyzer import RestApiAnalyzer
from loganalyze.log_analyzers.link_flapping_analyzer import LinkFlappingAnalyzer

from loganalyze.pdf_creator import PDFCreator
from loganalyze.utils.common import delete_files_by_types

import loganalyze.logger as log
from log_analyzers.base_analyzer import BaseImageCreator
from logs_extraction.directory_extractor import DirectoryExtractor
from log_analyzers.ufm_top_analyzer import UFMTopAnalyzer
from logs_extraction.tar_extractor import DumpFilesExtractor
from log_parsing.log_parser import LogParser
from log_parsing.logs_regex import logs_regex_csv_headers_list
from logs_csv.csv_handler import CsvHandler

from log_analyzers.ufm_log_analyzer import UFMLogAnalyzer
from log_analyzers.ufm_health_analyzer import UFMHealthAnalyzer
from log_analyzers.ibdiagnet_log_analyzer import IBDIAGNETLogAnalyzer
from log_analyzers.events_log_analyzer import EventsLogAnalyzer
from log_analyzers.console_log_analyzer import ConsoleLogAnalyzer
from log_analyzers.rest_api_log_analyzer import RestApiAnalyzer
from log_analyzers.link_flapping_analyzer import LinkFlappingAnalyzer

from pdf_creator import PDFCreator
from utils.common import delete_files_by_types

import logger as log

LOGS_TO_EXTRACT = [
"event.log",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import matplotlib.pyplot as plt
import matplotlib.dates as mdates

from loganalyze.log_analyzers.constants import DataConstants
import loganalyze.logger as log
from log_analyzers.constants import DataConstants
import logger as log

pd.set_option("display.max_colwidth", None)
warnings.filterwarnings("ignore")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
import csv
import os
from typing import List
from loganalyze.log_analyzers.constants import DataConstants
from loganalyze.log_analyzers.base_analyzer import BaseAnalyzer
import loganalyze.logger as log
from log_analyzers.constants import DataConstants
from log_analyzers.base_analyzer import BaseAnalyzer
import logger as log


class ConsoleLogAnalyzer(BaseAnalyzer):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

from typing import List
import pandas as pd
from loganalyze.log_analyzers.constants import DataConstants
from loganalyze.log_analyzers.base_analyzer import BaseAnalyzer
import loganalyze.logger as log
from log_analyzers.constants import DataConstants
from log_analyzers.base_analyzer import BaseAnalyzer
import logger as log


class EventsLogAnalyzer(BaseAnalyzer):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# pylint: disable=missing-class-docstring

from typing import List
from loganalyze.log_analyzers.base_analyzer import BaseAnalyzer
import loganalyze.logger as log
from log_analyzers.base_analyzer import BaseAnalyzer
import logger as log


class IBDIAGNETLogAnalyzer(BaseAnalyzer):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
from pathlib import Path
import pandas as pd
from utils.netfix.link_flapping import get_link_flapping
from loganalyze.log_analyzers.base_analyzer import BaseImageCreator
import loganalyze.logger as log
from log_analyzers.base_analyzer import BaseImageCreator
import logger as log
FILE_NAME_PATTERN=r"^secondary_(5m|1h|1d|1w)_(\d{14})\.gz$"
TIME_PATTERN="%Y%m%d%H%M%S"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from urllib.parse import urlparse
import pandas as pd
import numpy as np
from loganalyze.log_analyzers.base_analyzer import BaseAnalyzer
from log_analyzers.base_analyzer import BaseAnalyzer

class RestApiAnalyzer(BaseAnalyzer):

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
# pylint: disable=missing-class-docstring
# pylint: disable=missing-module-docstring
from typing import List
from loganalyze.log_analyzers.constants import DataConstants
from loganalyze.log_analyzers.base_analyzer import BaseAnalyzer
from log_analyzers.constants import DataConstants
from log_analyzers.base_analyzer import BaseAnalyzer


class UFMHealthAnalyzer(BaseAnalyzer):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

from typing import List
import pandas as pd
from loganalyze.log_analyzers.constants import DataConstants
from loganalyze.log_analyzers.base_analyzer import BaseAnalyzer
import loganalyze.logger as log
from log_analyzers.constants import DataConstants
from log_analyzers.base_analyzer import BaseAnalyzer
import logger as log


class UFMLogAnalyzer(BaseAnalyzer):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import re
from typing import Match

from loganalyze.log_parsing.base_regex import RegexAndHandlers
from log_parsing.base_regex import RegexAndHandlers

###
# This log is only to find general exceptions and errors,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import re
from typing import Match

from loganalyze.log_parsing.base_regex import RegexAndHandlers
from log_parsing.base_regex import RegexAndHandlers

EVENT_LOG_REGEX = re.compile(
# date time na na severity Site and name type objtype objid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import re
from typing import Match

from loganalyze.log_parsing.base_regex import RegexAndHandlers
from log_parsing.base_regex import RegexAndHandlers

IBDIAGNET_LOG_TOTAL_NODES = re.compile(
# Num Nodes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
#
# pylint: disable=missing-module-docstring

from loganalyze.log_parsing.event_log_regex import event_log_regex_cls
from loganalyze.log_parsing.ufm_health_regex import ufm_health_regex_cls
from loganalyze.log_parsing.ufm_log import ufm_log_regex_cls
from loganalyze.log_parsing.ibdiagnet_log_regex import ibdiagnet_log_regex_cls
from loganalyze.log_parsing.console_log_regex import console_log_regex_cls
from loganalyze.log_parsing.rest_api_log_regex import rest_api_log_regex_cls
from log_parsing.event_log_regex import event_log_regex_cls
from log_parsing.ufm_health_regex import ufm_health_regex_cls
from log_parsing.ufm_log import ufm_log_regex_cls
from log_parsing.ibdiagnet_log_regex import ibdiagnet_log_regex_cls
from log_parsing.console_log_regex import console_log_regex_cls
from log_parsing.rest_api_log_regex import rest_api_log_regex_cls

logs = [
event_log_regex_cls,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import re
from typing import Match

from loganalyze.log_parsing.base_regex import RegexAndHandlers
from log_parsing.base_regex import RegexAndHandlers

REST_API_LOG_REGEX = re.compile(
# Date NA Severity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import re
from typing import Match

from loganalyze.log_parsing.base_regex import RegexAndHandlers
from log_parsing.base_regex import RegexAndHandlers

UFM_HEALTH_LOG_REGEX = re.compile(
# Date Severity Test Test Class Status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import re
from typing import Match

from loganalyze.log_parsing.base_regex import RegexAndHandlers
from log_parsing.base_regex import RegexAndHandlers

UFM_LOG_BASE = r"^(?P<timestamp>[\d\-]+ [\d\:\.]+) \w+ +(?P<severity>\w+) +{}"

Expand Down
6 changes: 0 additions & 6 deletions plugins/ufm_log_analyzer_plugin/src/loganalyze/.pylintrc

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import os
import csv
from typing import List, Tuple
import loganalyze.logger as log
import logger as log

class CsvHandler:
def __init__(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from pathlib import Path
import shutil
from typing import List
from loganalyze.logs_extraction.base_extractor import BaseExtractor
from logs_extraction.base_extractor import BaseExtractor

class DirectoryExtractor(BaseExtractor):
def __init__(self, dir_path:Path):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
import os
from typing import List, Set

from loganalyze.logs_extraction.base_extractor import BaseExtractor
from loganalyze.utils.common import delete_folders
import loganalyze.logger as log
from logs_extraction.base_extractor import BaseExtractor
from utils.common import delete_folders
import logger as log

LOGS_GZ_POSTFIX = ".gz"
GZIP_MAGIC_NUMBER = b"\x1f\x8b" # Magic number to understand if a file is really a gzip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import os
import shutil
from typing import Set
import loganalyze.logger as log
import logger as log

def delete_folders(folders: Set[str], until_folder:str):
"""
Expand Down

0 comments on commit e59c7c0

Please sign in to comment.