I have verified that the lambda is sending out the request by sending to requestbin, and have verified that the information contained in each doc is correct.
However I can't see any of the information sent to Elasticsearch being loaded into Kibana, and was wondering if I was missing something.
There are a lot of possible things that could be going wrong, but it seems most likely to me to be something in your network configuration isn't allowing the request through to Elasticsearch. I'd start by looking at your router configuration.
I'm using the integrated AWS service, and after doing some troubleshooting set the access to open, so as far as I know there shouldn't be any issues communicating with Elasticsearch.
The index I am attempting to create doesn't exist in Elasticsearch, so I'm assuming the documents aren't being ingested by Elasticsearch. As such I can't create an Index Pattern.
I've just tried a manual POST via Postman to the url, and have now gotten this error:
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "failed to parse field [timestamp] of type [date] in document with id 'TOBDa2wBWM5KlmuOLUeH'"
}
],
"type": "mapper_parsing_exception",
"reason": "failed to parse field [timestamp] of type [date] in document with id 'TOBDa2wBWM5KlmuOLUeH'",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "Invalid format: \"2019-08-06T15:54:46.701974Z\" is malformed at \".701974Z\""
}
},
"status": 400
}
So this looks to be the reason why the documents aren't being accepted into Elasticsearch.
The timestamp field being passed in the request is
"timestamp": "2019-08-06T15:54:46.701974Z",
Could you help me to understand what's wrong with this format? I believe "YYYY-MM-DDTHH:mm:ss.ZZ" format should be supported?
I tried creating the index and mapping the format by running the following before inserting the documents as well, but am still getting the same error:
However I'm getting an error saying that I need a handler on the field timestamp? Could you help me to format my console command correctly?
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "No handler for type [date_nanos] declared on field [timestamp]"
}
],
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping [alb-access-logs]: No handler for type [date_nanos] declared on field [timestamp]",
"caused_by": {
"type": "mapper_parsing_exception",
"reason": "No handler for type [date_nanos] declared on field [timestamp]"
}
},
"status": 400
}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.