Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Exception 503 Server Error:Service unavailable for url:splnk_host_url #12

Open
sarvendras opened this issue Dec 17, 2021 · 0 comments

Comments

@sarvendras
Copy link

HI Team,

I am getting exception frequently while pushing logs to Splunk UAT server.Our python jobs get failed due to this whenevery splunk service is unavailable.
Exception 503 Server Error:Service unavailable for url:splnk_host_url

Please suggest how to catch this specific exception and how can we make any retry logic like retry to 3-4 times to reconnect splunk server so that our jobs are not get failed. is there any retry param to pass

I am using pass statement in except still jobs get failed when 503 exception.

try:
splunk_handler = SplunkHecHandler('splunkfw.domain.tld',
'EA33046C-6FEC-4DC0-AC66-4326E58B54C3',
port=8888, proto='https', ssl_verify=True,
source="HEC_example")
logger.addHandler(splunk_handler)
logger.info("Testing Splunk HEC Info message")
except Exception as e:
pass

Thanks
Sarvendra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant