From eeac8ec2a92c97b23f7e4a3ab917f466bb775d1f Mon Sep 17 00:00:00 2001 From: Matt Rendina Date: Fri, 11 Oct 2019 11:55:44 -0400 Subject: Relocate module file --- logparse.py | 489 ------------------------------------------------------------ 1 file changed, 489 deletions(-) delete mode 100755 logparse.py (limited to 'logparse.py') diff --git a/logparse.py b/logparse.py deleted file mode 100755 index c42ea7b..0000000 --- a/logparse.py +++ /dev/null @@ -1,489 +0,0 @@ -#!/usr/bin/env python3 - -import os -import sys -import re -from glob import glob -import pickle -import argparse -from math import ceil -import hashlib -import gzip -import socket -import pandas as pd -import datetime as dt -import matplotlib.pyplot as plt -import matplotlib.dates as mdates -from dateutil import parser as dpar -from collections import OrderedDict -import urllib.request -from urllib.error import HTTPError -import yaml - - -def md5(fname): - hash_md5 = hashlib.md5() - with open(fname, "rb") as f: - for chunk in iter(lambda: f.read(4096), b""): - hash_md5.update(chunk) - return hash_md5.hexdigest() - - -# regex pattern to extract key values from each line of an apache/nginx access log -# Accommodate PUTs as well as second URLs (normally "-") -patt = '(?P\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}) .* .* \\[(?P\\d{2}\\/[a-zA-Z]{3}\\/\\d{4}):(?P