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 151 Apr-14-2024, 01:56 PM
Last Post: sawtooth500
  What colon (:) in Python mean in this case? Yapwc 4 2,146 Dec-28-2022, 04:04 PM
Last Post: snippsat
  where to host my python script tomtom 1 1,259 Feb-09-2022, 06:45 AM
Last Post: ndc85430
  Switch case or match case? Frankduc 9 4,496 Jan-20-2022, 01:56 PM
Last Post: Frankduc
  Sending string commands from Python to a bluetooth device Rovelin 13 9,438 Aug-31-2021, 06:40 PM
Last Post: deanhystad
  Failing to connect to a host with WMI tester_V 6 4,358 Aug-10-2021, 06:25 PM
Last Post: tester_V
  Help: write 'case' with Python ICanIBB 2 1,862 Jan-27-2021, 09:39 PM
Last Post: Larz60+
  Sending Out Email via Python JoeDainton123 1 4,758 Aug-31-2020, 12:54 AM
Last Post: nilamo
  Python sockets : Client sending to the server nico31780 0 2,331 May-17-2020, 07:56 PM
Last Post: nico31780
  sending sms messages from your smartphone skorost5 4 2,883 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