Splunk Search

Will increasing Elasticsplunk application timeout resolve this error?

splunkcol
Builder

 

Hello
I am currently managing a hybrid between Splunk and ELK (Elastisearch Logstash Kibana).

Logs supporting syslog protocol are sent to ELK and logs from other sources directly to windows via agent.

A plugin called Elasticsplunk has been installed and is stored in the path /splunk/splunk/etc/apps/elasticsplunk/.

Currently I am getting the following error message and I would like you to please help me if you know in which configuration file I increase the timeout

 

 

External search command 'ess' returned error code 1. Script output = "error_message=ConnectionTimeout at "/var2/splunk/splunk/etc/apps/elasticsplunk/bin/elasticsearch/connection/http_urllib3.py", line 155 : ConnectionTimeout caused by - ReadTimeoutError(HTTPConnectionPool(host=u'localhost', port=9200): Read timed out. (read timeout=60)) ".”

 

0 Karma

Tom_Lundie
Contributor

EDIT: For Elastic Python (v6)

This project has been archived on GitHub so you are quite unlikely to get support from the creator.
Looking through the code, there is no timeout argument for the ess command, so not a lot you can do on the Splunk-side.

If you're happy to have a go at editing the code, then the Elasticsearch.search method in the Elastic Python SDK (v6) takes a timeout argument. Have a go at adding it under line 266 in ./elasticsplunk/bin/elasticsplunk.py:

            res = esclient.search(index=config[KEY_CONFIG_INDEX],
size=config[KEY_CONFIG_LIMIT],
_source_include=config[KEY_CONFIG_FIELDS],
doc_type=config[KEY_CONFIG_SOURCE_TYPE],
body=body)

Add the timeout argument as follows (don't forget the comma at the end of the body line):

            res = esclient.search(index=config[KEY_CONFIG_INDEX],
size=config[KEY_CONFIG_LIMIT],
_source_include=config[KEY_CONFIG_FIELDS],
doc_type=config[KEY_CONFIG_SOURCE_TYPE],
body=body,
timeout=600)

FYI, I haven't tested this because I don't have elastic, but looking through the code, I think this will work. There are also some elastic add-ons on Splunkbase that might be worth checking out to see if they're actively supported?

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...