Jul-27-2021, 02:02 PM
I'm currently using TCPLogstashHandler to send Logstash messages using TCP. The below code is used to add the TCPLogstashHandler to the root logger.
test_logger.addHandler(logstash.TCPLogstashHandler(host, port, version=1))
I am using the python-logstash library to use TCPLogstashHandler. I'm able to send logs by adding the handler. Also I'm not using Filebeat.
For reference:
https://github.com/vklochan/python-logst...xample1.py
what I need is:
In case of failover, I want to pass 3 hosts. How to pass 3 hosts and its respective port using customised LogstashHandler. so that if any one of the host fails, it will automatically pickup other host
test_logger.addHandler(logstash.TCPLogstashHandler(host, port, version=1))
I am using the python-logstash library to use TCPLogstashHandler. I'm able to send logs by adding the handler. Also I'm not using Filebeat.
For reference:
https://github.com/vklochan/python-logst...xample1.py
what I need is:
In case of failover, I want to pass 3 hosts. How to pass 3 hosts and its respective port using customised LogstashHandler. so that if any one of the host fails, it will automatically pickup other host