-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsimulate-request-log-pipeline.json
70 lines (70 loc) · 2.02 KB
/
simulate-request-log-pipeline.json
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
69
70
{
"pipeline" : {
"description": "Artifactory request.log pipeline",
"processors": [
{
"grok": {
"field": "message",
"patterns": [
"^%{DATA:rtf.request.timestamp}\\|%{NUMBER:rtf.request.time}\\|%{DATA:rtf.request.type}\\|%{DATA:rtf.request.client_ip}\\|%{DATA:rtf.request.username}\\|%{DATA:rtf.request.method}\\|%{DATA:rtf.request.path}\\|%{DATA:rtf.request.version}\\|%{DATA:rtf.request.response_code}\\|%{DATA:rtf.request.content_length}$"
],
"on_failure" : [
{
"set" : {
"field" : "_index",
"value" : "failed-request-log-pipeline-{{ _index }}"
}
}
]
}
},
{
"date": {
"field" : "rtf.request.timestamp",
"target_field": "@timestamp",
"formats" : [ "YYYYMMddHHmmss" ],
"timezone" : "Europe/Stockholm",
"on_failure" : [
{
"set" : {
"field" : "_index",
"value" : "failed-request-log-pipeline-{{ _index }}"
}
}
]
}
},
{
"remove": {
"field": "message"
}
}
]
},
"docs": [
{
"_index": "index",
"_type": "_doc",
"_id": "1",
"_source": {
"message": "20180921092355|892|REQUEST|1.2.3.4|userid1234|PUT|/applications-stash/app-bundle.zip|HTTP/1.0|201|27565068"
}
},
{
"_index": "index",
"_type": "_doc",
"_id": "2",
"_source": {
"message": "20180921092356|27|REQUEST|192.168.1.23|anonymous|GET|/webapp/|HTTP/1.0|200|0"
}
},
{
"_index": "index",
"_type": "_doc",
"_id": "3",
"_source": {
"message": "20180921092359|1|REQUEST|192.168.1.24|anonymous|GET|/api/system/licenses|HTTP/1.0|401|0"
}
}
]
}