Skip to content

Commit 18dc128

Browse files
committed
Update readme
1 parent d45904d commit 18dc128

1 file changed

Lines changed: 27 additions & 5 deletions

File tree

README.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,36 @@ There are 3 main use cases (profiles) supported by this tool:
77
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](https://github.com/SBOsoft/SBOanalytics) (web front-end for metrics) or just printed to stdout. Optionally processed (and optionally filtered) logs can be pushed to a mysql server, later to be viewed using SBOanalytics.
88
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
99

10-
# Usage
10+
# Usage
11+
This is a command line tool without a user interface.
12+
13+
## Database configuration
14+
If you want to save metrics and logs to a database, i.e to query using SBOanalytics, then you must set up a mysql database
15+
before running this tool.
16+
A database is not required for counter mode.
17+
18+
Database set up scripts can be found at https://github.com/SBOsoft/SBOanalytics/tree/main/db. There are multiple database script files named
19+
using yyyymmddxxxx format, for example 20250721-somedescriptivepart.sql, where xxxx part is typically 0001.
20+
21+
During the initial set up you must run all files in alphabetical order.
22+
23+
During upgrades only run files that were added after the last time you updated your database. Both SBOLogProcessor and SBOanalytics
24+
use version numbers following yyyy.mm.dd.xxxx pattern, e.g 2025.07.11.0001. You can find your current version number in version.txt files in
25+
both SBOLogProcessor and SBOanalytics packages.
26+
27+
So if your current version is 2025.07.15.0001 and want to upgrade to 2025.07.25.0001 then you must run database scripts created
28+
after 202507150001.
29+
30+
**You MUST always run sql files in alphabetical order.**
1131

1232
## Binary releases
13-
Download a precompiled binary from [releases](https://github.com/SBOsoft/SBOLogProcessor/releases) page, unzip/untar and execute sbologp (or sbologp.exe on windows) command.
33+
Download a precompiled binary from [releases](https://github.com/SBOsoft/SBOLogProcessor/releases) page, unzip/untar and execute `sbologp` (or sbologp.exe on windows) command.
1434

1535
## Command line options and configuration
1636

1737
Run `sbologp -h` to see available command line options.
1838

19-
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.
39+
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 is required.
2040

2141
See https://github.com/SBOsoft/SBOLogProcessor/tree/main/conf/example-config-file.json for configuration examples.
2242
Configuration must be a json map, with file paths as keys.
@@ -28,11 +48,13 @@ https://github.com/SBOsoft/SBOLogProcessor/blob/main/main.go.
2848
Examples assume you are running a linux, e.g ubuntu.
2949

3050
### Counter mode
31-
Run in counter mode and follow changes, prints stats every 30 seconds:
51+
Counter mode generates statistics from an access log file.
52+
53+
Run the application in counter mode (following changes to the file like tail -f), and print stats every 30 seconds incrementally:
3254

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

35-
Run in counter mode without following changes, prints total stats:
57+
Run in counter mode without following changes, prints total stats and exits:
3658

3759
```./sbologp -p=count /var/log/apache2/access.log```
3860

0 commit comments

Comments
 (0)