Opensearch Error Unable to upload document: #3212
-
Is it wrong to upload different types of logs to the same opensearch index? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
In theory there should be no issue with uploading different data_types to the same searchindex. So the problem is most likely on a import level between Timesketch and Opensearch. I did some quick tests and it looks like the issue is with mixing Plaso imports with jsonl/csv imports. This is most likely due to both types using different importer modules that are not compatible with each other. So a solution for your use-case to have each timeline represent one machine is to have all logs in one format. So either all Plaso or all json & csv. The easiest is probably to export the Plaso file to jsonl or csv using psort output and formatting. During upload and import in Timesketch just ensure they all use the same Timeline name. |
Beta Was this translation helpful? Give feedback.
Alright, I had some time to look into this issue. Thanks for providing the test data, that helped a lot. (And sorry if I state the obvious for you here, but had to test it myself)
So it looks like the order of how you upload stuff matters in this case. Uploading
machine_mft.jsonl
beforemachine_tl.jsonl
works just fine. The other way round results in the[400] <mapper_parsing_exception> failed to parse field [flags] of type [long] in document with id 'Ml956JIBo-xfjZC0YsDQ'. Preview of field's value: 'ALLOCATED' [illegal_argument_exception/For input string: "ALLOCATED"]
error.Taking a look at the mapping in both cases:
Case 1 -
machine_mft.jsonl
beforemachine_tl.jsonl
: