Hi,
I'm trying to use the NGINX module on the output of my docker logs.
So far I managed to get as output:
{
"@timestamp": "2017-05-17T13:12:48.507Z",
"beat": {
"hostname": "86ba9026f4b1",
"name": "86ba9026f4b1",
"version": "5.4.0"
},
"input_type": "log",
"log": "0.0.0.0- - [17/May/2017:13:12:43 +0000] \"GET /test HTTP/1.1\" 304 0 \"http://toto.com/\" \"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0\"",
"offset": 3146,
"source": "/var/log/5558ee47831ba97a85166c64e4e5fd6b1afd7dcff62bf546e93f82b99ff43959-json.log",
"stream": "stdout",
"time": "2017-05-17T13:12:43.422536215Z",
"type": "nginx_access"
}
But I keep getting the following message in Kibana:
{
"@timestamp": "2017-05-17T13:12:48.507Z",
"beat": {
"hostname": "86ba9026f4b1",
"name": "86ba9026f4b1",
"version": "5.4.0"
},
"error": "field [message] not present as part of path [message]",
"input_type": "log",
"log": "0.0.0.0- - [17/May/2017:13:12:43 +0000] \"GET /test HTTP/1.1\" 304 0 \"http://toto.com/\" \"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0\"",
"offset": 3146,
"source": "/var/log/5558ee47831ba97a85166c64e4e5fd6b1afd7dcff62bf546e93f82b99ff43959-json.log",
"stream": "stdout",
"time": "2017-05-17T13:12:43.422536215Z",
"type": "nginx_access"
}
I don't know why it keeps trying to use the message fields, however here is my grok config (in /module/nginx/access/ingest/default.json):
{
"grok": {
"field": "log",
"trace_match": true,
"patterns":[
"%{IPORHOST:nginx.access.remote_ip} - %{DATA:nginx.access.user_name} \\[%{HTTPDATE:nginx.access.time}\\] \"%{WORD:nginx.access.method} %{DATA:nginx.access.url} HTTP/%{NUMBER:nginx.access.http_version}\"
],
"ignore_missing": true
}
}
(Note field: log)
Any idea why it is still looking for this field ?