8000 GitHub - SBOsoft/SBOLogProcessor: Web server access log processing tool. Log processor for SBOanalytics
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

SBOsoft/SBOLogProcessor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SBOLogProcessor

Access Log Processor and Metrics Generator

There are 3 main use cases (profiles) supported by this tool:

  1. Counter mode (when -p=count option is provided): Counts logs from an access log file and prints statistics to stdout every 30 seconds
  2. Metrics generator (when -p=metrics option is provided): Processes logs from an access log file (or files) and generates metrics, which can be saved into a mysql database to be used with SBOanalytics (a web front-end for metrics) or just printed to stdout.
  3. Security mode (when -p=security option is provided): (Not implemented yet) Processes logs from an access log file and outputs potential security issues (e.g abuser, stats on sql injection attempts etc) giving you a list of IPs and/or patterns that you may want to block

# Usage

Binary releases

Download a precompiled binary from releases page, unzip/untar and execute sbologp (or sbologp.exe on windows) command.

Command line options and configuration

Run sbologp -h to see available command line options.

There are too many options which may not have a corresponding command line parameter so if you need more control, passing a configuration file using -c option might be required.

See https://github.com/SBOsoft/SBOLogProcessor/tree/main/conf/example-config-file.json for configuration examples. Configuration must be a json map, with file paths as keys.

Example commands

Examples assume you are running a linux, e.g ubuntu.

Counter mode

Run in counter mode and follow changes, print stats every 30 seconds:

./sbologp -f -p=count /var/log/apache2/access.log

Run in counter mode without following changes, print total stats:

./sbologp -p=count /var/log/apache2/access.log

Metrics

Run in the background using configuration file:

nohup ./sbologp -f -c sbologp-config.json &

nohup will ensure the program continues to run in the background even after your session ends, e.g your ssh connection is disconnected.

Development

Install go first, then clone the project from github.

Build

Build go build -o ./output/bin/sbologp

Clean go clean

Run using go

Use go run . -option1 -option2 path-to-access-log-file

For example: go run . -f -h=COUNTER -p=count /var/log/apache2/access.log

Counter mode

Print stats from the given log file every 30 seconds (follow changes).

go run . -f -p count /var/log/apache2/example.com-access.log

Print total stats from the given log file.

go run . -p count /var/log/apache2/example.com-access.log

Run tests

go test ./... in project root folder or go test ./... in a sub-folder.

Do NOT expect high test coverage.

About

Web server access log processing tool. Log processor for SBOanalytics

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

0