-
Notifications
You must be signed in to change notification settings - Fork 1
/
ingestor.json
50 lines (50 loc) · 1.88 KB
/
ingestor.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
{
"traefik-ingestor": {
"description": "to postprocess the traefik.message field",
"processors": [
{
"grok": {
"field": "message",
"patterns": [
"%{IPV4:ip.one}, %{IPV4:ip.two}, %{IPV4:ip.three} %{USER:user.id} %{USER:user.name} \\[%{HTTPDATE:@timestamp}\\] \"%{WORD:http.request.method} %{DATA:url.original} HTTP/%{NUMBER:http.version}\" %{NUMBER:http.response.status_code:int} (?:-|%{NUMBER:http.response.body.bytes:int}) \"http[s]://%{HOSTNAME:http.request.referrer.host}/%{DATA:http.request.referrer.url}\" %{QS:user_agent} %{NUMBER:traefik.request.num_received:int} %{QS:traefik.frontend} %{QS:traefik.backend} %{NUMBER:traefik.request.duration:int}ms"
]
}
},
{
"grok": {
"field": "message",
"patterns": [
"%{IPV4:ip.one}, %{IPV4:ip.two}, %{IPV4:ip.three}, %{IPV4:ip.four} %{USER:user.id} %{USER:user.name} \\[%{HTTPDATE:@timestamp}\\] \"%{WORD:http.request.method} %{DATA:url.original} HTTP/%{NUMBER:http.version}\" %{NUMBER:http.response.status_code:int} (?:-|%{NUMBER:http.response.body.bytes:int}) \"http[s]://%{HOSTNAME:http.request.referrer.host}/%{DATA:http.request.referrer.url}\" %{QS:user_agent} %{NUMBER:traefik.request.num_received:int} %{QS:traefik.frontend} %{QS:traefik.backend} %{NUMBER:traefik.request.duration:int}ms"
]
}
},
{
"date": {
"field": "@timestamp",
"formats": [
"dd/MMM/yyyy:HH:mm:ss Z"
],
"target_field": "http-timestamp"
}
},
{
"convert": {
"field": "ip.one",
"type": "ip",
"target_field": "ipaddress"
}
},
{
"geoip": {
"field": "ipaddress",
"target_field": "geolocation"
}
}
],
"on_failure": [
{
"drop": {}
}
]
}
}