Skip to content
Advertisement

Tag: elasticsearch

How to allow ElasticSearch to accept empty date fields?

I have a Python script that I use to load some data into ElasticSearch. One of the fields I am loading is a date field, which on some rare occasions can be empty. In my code, if there is no date, I assign it the string “null”: In this case, I am getting the following error: How can I make

How to search by dict keys in ElasticSearch

I am new in elasticsearch and I need to write query described below I have an elasticsearch index with documents like this one Numbers mean entries of words in book I want to search documents by words “cats” (not “cat”), “monkey” and e.g “mous”. How do I write query that will find “cat”, “monkey” and “mouse” in document and consider

Use python script to edit data in logstash

I have a logstash configuration that gets data from a MySQL database and sends the data to elasticsearch. This is my configuration: Everything’s working fine, but I need to add some columns that have values dependent upon other column values, so I tried writing a Python script to do this. Is there a way to execute a python script to

Elasticsearch Bulk insert w/ Python – socket timeout error

ElasticSearch 7.10.2 Python 3.8.5 elasticsearch-py 7.12.1 I’m trying to do a bulk insert of 100,000 records to ElasticSearch using elasticsearch-py bulk helper. Here is the Python code: When the json file contains a small amount of documents (~100), this code runs without issue. But I just tested it with a file of 100k documents, and I got this error: I

Python webhook API

I am trying to create a python webhook to receive data from my ELastic SIEM (JSON format), when I try it I am getting this errors: (sorry It’s my first time using python, so couldn’t know what’s the problem) The webhook configuration: And here is the watcher that I have configured: Could you please help me to solve this error

Advertisement