Hi Here is one of the sample Documents that I have in the index:
{
"_index": "online-nginx-logs-2019.04.03",
"_type": "doc",
"_id": "mV8s5GkBIUXkHEbLdn0Q",
"_version": 1,
"_score": null,
"_source": {
"referer": "https://www.moglix.com/ngsw-worker.js ",
"geoip": {
"country_code2": "IN",
"country_code3": "IN",
"ip": "157.41.216.197",
"continent_code": "AS",
"timezone": "Asia/Kolkata",
"latitude": 20,
"location": {
"lat": 20,
"lon": 77
},
"country_name": "India",
"longitude": 77
},
"clientip": "157.41.216.197",
"source": "/var/log/nginx/moglix.access.log",
"request_time": 0,
"action": "GET",
"upstream_port": "80",
"user_agent": {
"os_minor": "1",
"device": "Generic Smartphone",
"os": "Android",
"os_name": "Android",
"build": "",
"os_major": "8",
"patch": "3683",
"major": "73",
"name": "Chrome Mobile",
"minor": "0"
},
"request_method": "GET",
"host": {
"name": "lb01"
},
"bytes_sent": 22921,
"upstream_status": 200,
"prospector": {
"type": "log"
},
"@timestamp": "2019-04-03T17:08:31.000Z",
"log_type": "nginx_access",
"API": "/54.616e8c6f032ce555ab44.js",
"input": {
"type": "log"
},
"offset": 707418872,
"module_name": "online",
"upstream_address": "10.0.3.182",
"upstream_response_time": 0.004,
"upstream_connect_time": 0.004,
"tags": [
"beats_input_codec_plain_applied"
],
"date": "03/Apr/2019:22:38:31 +0530",
"beat": {
"version": "6.5.4",
"hostname": "lb01",
"name": "lb01"
},
"@version": "1",
"source_type": "nginx",
"request_length": 51,
"upstream_header_time": 0.004,
"status": 200,
"http_version": "2.0"
},
"fields": {
"@timestamp": [
"2019-04-03T17:08:31.000Z"
]
},
"sort": [
1554311311000
]
}
As you can I see there's a difference of +0530 in the "date" field and the "@timestamp" field. I want the timestamp field to hold the value of the "date" field which I am parsing through the date filter.
The need arises because I want to all the logs of one day in one particular index. Is there something I am missing in the date filter?