Yeah, I'm almost positive I must be missing something simple.
Two example log entries:
66.249.64.188 - 10.0.1.100:80 - - [27/Mar/2017:06:49:40 +0000] example.com "GET /term/slab/?q=query HTTP/1.1" 200 6120 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
66.249.64.12 - 10.0.1.105:80 - - [27/Mar/2017:06:49:40 +0000] example.com "GET /static/ HTTP/1.1" 200 11217 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
Entry in ElasticSearch when I use the date filter as shown above:
{
"_index": "logstash-lb-2017.03.28",
"_type": "logs",
"_id": "AVsUvMvrN7tpZX5Pb5Nn",
"_score": 1,
"_source": {
"message": "66.249.64.12 - 10.0.1.105:80 - - [27/Mar/2017:06:49:40 +0000] example.com \"GET /static/ HTTP/1.1\" 200 11217 \"-\" \"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
"@version": "1",
"@timestamp": "2017-03-28T11:46:08.231Z",
"path": "/tmp/sample.log",
"host": "ip-10-0-1-138",
"tags": [
"_grokparsefailure"
]
},
"fields": {
"@timestamp": [
1490701568231
]
}
}
Entry in ElasticSearch when I either remove the date filter, or make it point to a non-existent field:
{
"_index": "logstash-lb-2017.03.28",
"_type": "logs",
"_id": "AVsUvkImN7tpZX5Pb5PF",
"_score": 1,
"_source": {
"message": "66.249.64.12 - 10.0.1.105:80 - - [27/Mar/2017:06:49:40 +0000] example.com \"GET /static/ HTTP/1.1\" 200 11217 \"-\" \"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)\"\"",
"@version": "1",
"@timestamp": "2017-03-28T11:47:44.116Z",
"path": [
"/tmp/sample.log",
"/static/"
],
"host": [
"ip-10-0-1-138",
"example.com"
],
"remote_addr": "66.249.64.12",
"upstream_addr": "10.0.1.105:80",
"remote_user": "-",
"local_time": "27/Mar/2017:06:49:40 +0000",
"verb": "GET",
"protocol": "HTTP/1.1",
"response_code": "200",
"bytes_sent": "11217",
"referer": "-",
"user_agent": "\"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)\"",
"geoip": {
"ip": "66.249.64.12",
"country_code2": "US",
"country_code3": "USA",
"country_name": "United States",
"continent_code": "NA",
"region_name": "CA",
"city_name": "Mountain View",
"latitude": 37.385999999999996,
"longitude": -122.0838,
"dma_code": 807,
"area_code": 650,
"timezone": "America/Los_Angeles",
"real_region_name": "California",
"location": [
-122.0838,
37.385999999999996
]
}
},
"fields": {
"@timestamp": [
1490701664116
]
}
}