Fake Log Generator
Motivation
Visor provides a fake log generator to generate likely log files for analysis. If no real world logs can be found right now, it would be a good substitute for testing the monitor.
Usage
$python3.4 $Visor_HOME/src/fake_log_gen/fake_log_gen.py -m pattern -o outputfile
The outputfile
parameter set the path and name of the output file, and pattern
set the desired output log pattern. The details of available log patterns can be found in chapter Log Pattern.
Examples
If we run the command:
$python3.4 $Visor_HOME/src/fake_log_gen/fake_log_gen.py -m access -o fake_access_file.log
The we can get outputs in fake_access_file.log
like:
- - - [28/Dec/2016:16:55:53 -0700] "HEARBEAT" - -
213.159.184.113 user-identifier Bud [28/Dec/2016:16:55:53 -0700] "POST /list HTTP/1.1"
- - - [28/Dec/2016:16:55:56 -0700] "HEARBEAT" - -
76.122.73.86 user-identifier Curt [28/Dec/2016:16:55:56 -0700] "POST /app/main HTTP/2.0"
65.67.149.164 user-identifier Addison [28/Dec/2016:16:56:04 -0700] "POST /list HTTP/1.1"
- - - [28/Dec/2016:16:56:05 -0700] "HEARBEAT" - -
100.214.215.78 user-identifier Frank [28/Dec/2016:16:56:08 -0700] "PUT /doc/readme.txt HTTP/2.0"
- - - [28/Dec/2016:16:56:08 -0700] "HEARBEAT" - -
- - - [28/Dec/2016:16:58:39 -0700] "HEARBEAT" - -
202.29.186.58 user-identifier Alden [28/Dec/2016:16:58:39 -0700] "GET /doc/readme.txt HTTP/1.1" 301 1891
This is the result of simulating Apache access logs. All the fields and the intervals can be configured.