This application is used to calculate number of unique visitor of an Apache server.
It consumes logs in apache combined format from standard input (can be piped) and store an aggregated data in MySQL.
Statistic is calculated for 5 seconds, 1 minute, 5 minutes, 30 minutes, 1 hour and 1 day time intervals.
Counters are stored in separate tables five_seconds, one_minute, five_minutes, thirty_minutes, one_hour, one_day respectively.
Clone repo and run sbt assembly. You will get an assembled jar which you can run like java -jar ...
MySQL version 5.7.x must be used. You will have to create an empty database first. With which the application will work.
Application uses standard Typesafe config. Here is the default one:
db {
host = "localhost"
port = 3306
name = "logstatistics"
username = "root"
password = "1234qwer"
}No special installation needed.
Just sbt assembly.
sbt test
Application consumes logs from standart input stream so it can be "piped" with any log printer.
Also it can consume single log file like cat logfile.log | java -jar ...
Sbt
SemVer is used for versioning. For the versions available, see the tags on this repository.
- Artem Shilin
This project is licensed under the MIT License - see the LICENSE file for details