diff options
author | Andre Lorbach <alorbach@adiscon.com> | 2013-07-12 15:35:46 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-07-22 15:46:09 +0200 |
commit | e0da083bddc90c8b91ad9a4cd57d0dee5e66b285 (patch) | |
tree | f1d9d9c12b009e4a23a053e719e2332228dd883f /plugins/impstats/statslog-analyzer.py | |
parent | baa0ab8561845e98319242bfbe706af99a8a48c0 (diff) | |
download | rsyslog-e0da083bddc90c8b91ad9a4cd57d0dee5e66b285.tar.gz rsyslog-e0da083bddc90c8b91ad9a4cd57d0dee5e66b285.tar.bz2 rsyslog-e0da083bddc90c8b91ad9a4cd57d0dee5e66b285.zip |
Started implementing statslog analyzer for impstats
This script will help finding unusual things in the impstats logs
Diffstat (limited to 'plugins/impstats/statslog-analyzer.py')
-rwxr-xr-x | plugins/impstats/statslog-analyzer.py | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/plugins/impstats/statslog-analyzer.py b/plugins/impstats/statslog-analyzer.py new file mode 100755 index 00000000..8b017ab0 --- /dev/null +++ b/plugins/impstats/statslog-analyzer.py @@ -0,0 +1,43 @@ +#! /usr/bin/env python +# -*- coding: utf-8 -*- + +# * Copyright (C) 2013 Adiscon GmbH. +# * This file is part of RSyslog +# * +# * This script processes impstats logfiles and searches for abnormalities +# * + +import sys +import datetime +import time +import os + +# Include regex definitions +import statslog_regex +from statslog_regex import * + +# Set default variables +szInput = "rsyslog-stats.log" +bHelpOutput = False + +# Helper variables + + +# Process Arguments +for arg in sys.argv: # [-4:]: + if arg.find("--input=") != -1: + szInput = arg[8:] + elif arg.find("--h") != -1 or arg.find("-h") != -1 or arg.find("--help") != -1: + bHelpOutput = True + +if bHelpOutput: + print "\n\nStatslog-analyzer command line options:" + print "=======================================" + print " --input=<filename> Contains the path and filename of your impstats logfile. " + print " Default is 'rsyslog-stats.log' \n" + print " --h / -h / --help Displays this help message. \n" + print "\n Sampleline: ./statslog-analyzer.py --input=rsyslog-stats.log" +else: + print " Start analyzing impstats file '" + szInput+ "' \n" + + print "\n\n" |