-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathapache_commons.yml
68 lines (55 loc) · 1.75 KB
/
apache_commons.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
# configuration file of single log pattern
# name of log
name: apache_common
# if true this pattern is enabled and it will be used
enabled: true
# path where store the log. If the path doesn't exist will be created
path: /tmp/apache.log
# remove log file before use it
remove_file: false
# event per seconds for this pattern, default 1
# if specified this value overwrite the common one
eps: 1
# eps correction percentage, default 1.2
correction: 1.2
# time period in seconds. This value says how many seconds of logs will be generate
time_period: 60
# generator types:
# - raw: it gets raw logs from examples and uses them to make logging
# - template: it uses a template to generate logs
# (https://docs.python.org/3/library/string.html#custom-string-formatting)
generator_type: raw
# logs of example, to use as documentation or use for random generator in raw generator type
examples:
- 127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326
# log template to random generator
# for replace the timestamp use this table:
# https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior
# You can use more than one template
template:
- '{ipaddress} - {user} {:[%d/%b/%Y:%H:%M:%S %z]} "{http_method} {http_request} HTTP/1.0" {http_status_code:d} {http_bytes:d}'
- '{ipaddress} - - {:[%d/%b/%Y:%H:%M:%S %z]} "{http_method} {http_request} HTTP/1.0" {http_status_code:d} {http_bytes:d}'
fields:
ipaddress: func_randip
user:
- frank
- robert
- pippo
- pluto
http_method:
- GET
- POST
http_request:
- /apache.gif
- /index.html
- /forum
- /blog
- /news
http_status_code:
- 200
- 404
- 503
- 201
- 500
http_bytes: func_randint 0 1048576