Sign inSign up

mths/logfaker

By mths

Updated about 6 years ago

Generates faked apache log entries

Image
0

856

mths/logfaker repository overview

This is a python3 image that will generate fake access log entries in (extended) apache log format.

Log entries are written to stdout one per line. Default is 50ms between logs (around 20 logs/second).

Example

docker run -it mths/logfaker

# Output: 233.147.133.227 - christopher [14/Sep/2020:17:42:15 +0000] "DELETE /home HTTP/1.0" 301 5007 "http://www.martin-castro.net/privacy/" "Opera/9.42.(X11; Linux x86_64; en-US) Presto/2.9.168 Version/10.00"

Environment Vars: FIREHOSE_STREAM: Used to write to Firehose Delivery Stream instead of stdout

CLI Usage:

usage: logs.py [-h] [--output {LOG,GZ,CONSOLE,FIREHOSE}]
               [--log-format {CLF,ELF}] [--num NUM_LINES]
               [--prefix FILE_PREFIX] [--sleep SLEEP]
               [--firehose-stream FIREHOSE_STREAM_NAME]

Fake Apache Log Generator

optional arguments:
  -h, --help            show this help message and exit
  --output {LOG,GZ,CONSOLE,FIREHOSE}, -o {LOG,GZ,CONSOLE,FIREHOSE}
                        Write to a Log file, a gzip file or to STDOUT
  --log-format {CLF,ELF}, -l {CLF,ELF}
                        Log format, Common or Extended Log Format
  --num NUM_LINES, -n NUM_LINES
                        Number of lines to generate (0 for infinite)
  --prefix FILE_PREFIX, -p FILE_PREFIX
                        Prefix the output file name
  --sleep SLEEP, -s SLEEP
                        Sleep this long between lines (in seconds)
  --firehose-stream FIREHOSE_STREAM_NAME, -f FIREHOSE_STREAM_NAME

Tag summary

Content type

Image

Digest

Size

334.6 MB

Last updated

about 6 years ago

docker pull mths/logfaker