Hi, I have some problem to set a timeout value to Splunk connection with python SDK.
I'm using this :
self.service = client.connect(
host=self.SPLUNKSERVER,
port=self.SPLUNKPORT,
username=self.SPLUNKUSERNAME,
password=self.SPLUNKPASSWORD)
except Exception as e:
logging.info("Error connecting to the splunk platform : " + str(e))
But the default timeout value is 75 seconds, which is too long. Can't we set a timeout value in the parameters? Adding "timeout = 1" in the client.connect method's parameters doesn't have any effect.
Example: My Splunk server is at 192.168.1.10. When I try to connect 192.168.1.10 when the Splunk server is off, it takes 75 seconds to timeout, or if I set the IP to 192.168.1.11 ( a machine where there is no server at all ), it takes also 75 seconds to timeout.
The problem is that I have a UI where the user can type an IP address, and of course, i won't wait 75 seconds to inform the user that they typed a wrong IP address or that the server is not started.
I've searched on the Splunk documentation without results. Waiting for your help, thanks.
... View more