Confused about importing Elastic index into Timesketch via the API #1963
Replies: 2 comments 1 reply
-
Hm the preferred way should be the timesketch_importer. Are you sure that the system you run it on has connection to the TS backend? Can you open a netcat in the same direction? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply! I had kinda given up hope on getting a response here if I'm honest haha. I kept researching and experimenting and was able to get timesketch_importer to work, though with some caveats. It's really picky about specifying the index name and it would always fail to upload plaso files if I included that. I have to let Timesketch handle the index creation (even if I've made an index beforehand) or it keeps failing to upload. That was one of the issues I was having that was really confusing. One particular issue with doing Log2timeline > timesketch_importer > timesketch > Elasticsearch is that there's really no place for Logstash in there and so duplicate events can get indexed. There's also no way to filter out duplicate events using timesketch_importer right now (i.e. Windows event logs creation/modification time) so they have to be indexed first and then purged afterwards via a curl command. It's kinda janky, but it works. The reason I was thinking Log2timeline > Logstash > Elasticsearch > Timesketch would be better is because all of those duplicate events could be figured out, thus minimizing the index size and speeding up the whole process. Then the API client can be used to create a sketch and make the data available within Timesketch for analysis. But I'll be honest... I don't really understand the API client. I figured out how to create a sketch thanks to the examples posted, but I can't even figure out how to delete a sketch via the API haha. I don't even know how I'd do the above via the API client since I feel there's virtually no documentation surrounding that (aside from one very vague code example at the bottom of one of the developer pages). I would greatly appreciate more insight into that or at least some more robust examples since my understanding of API's and Python especially is just not that strong. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hi there,
I've read through the provided documentation and it feels very sparse in this regard. The situation is like so:
This all goes without a hitch, however I have the following issues:
So, all said and done, I'd really like some help trying to figure out how to do 1. I'm not a python dev and I'm not used to working with API's, so I'd appreciate any help that can be provided in trying to get this to work.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions