Python Forum
Logstash - sending Logstash messages to another host in case of Failover in python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Logstash - sending Logstash messages to another host in case of Failover in python
#1
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Sending a text from Python sawtooth500 2 178 Apr-14-2024, 01:56 PM
Last Post: sawtooth500
  What colon (:) in Python mean in this case? Yapwc 4 2,165 Dec-28-2022, 04:04 PM
Last Post: snippsat
  where to host my python script tomtom 1 1,264 Feb-09-2022, 06:45 AM
Last Post: ndc85430
  Switch case or match case? Frankduc 9 4,518 Jan-20-2022, 01:56 PM
Last Post: Frankduc
  Sending string commands from Python to a bluetooth device Rovelin 13 9,483 Aug-31-2021, 06:40 PM
Last Post: deanhystad
  Failing to connect to a host with WMI tester_V 6 4,377 Aug-10-2021, 06:25 PM
Last Post: tester_V
  Help: write 'case' with Python ICanIBB 2 1,876 Jan-27-2021, 09:39 PM
Last Post: Larz60+
  Sending Out Email via Python JoeDainton123 1 4,784 Aug-31-2020, 12:54 AM
Last Post: nilamo
  Python sockets : Client sending to the server nico31780 0 2,342 May-17-2020, 07:56 PM
Last Post: nico31780
  sending sms messages from your smartphone skorost5 4 2,898 Apr-02-2020, 07:00 PM
Last Post: skorost5

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020