Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.

Feature Request: Support multiple target addresses in GELF::Notifier #104

@afreiberger

Description

@afreiberger

In the logstash-output-gelf project, there is a feature request to support multiple GELF destination hosts.
logstash-plugins/logstash-output-gelf#4

The GELF::Notifier initiator and the create_sender methods in this module would need to support passing multiple hosts and/or ports in order to properly address multiple destination GELF units when instantiating the transport layer.

The backend TCP, UDP, and TCP-TLS transport layers incorporate socket and failover management if provided with multiple addresses, however the GELF::Notifier module does not expose this functionality to consumers of this library.

The Notifier instantiation begins here and ends with a call to create_sender with a single host and port.
https://github.com/graylog-labs/gelf-rb/blob/master/lib/gelf/notifier.rb#L25

The create_sender definition is here:
https://github.com/graylog-labs/gelf-rb/blob/master/lib/gelf/notifier.rb#L137

This line of create_sender packs the single host and port into the proper array of host, port tuples, and requires further expansion to support multiple backend servers.
https://github.com/graylog-labs/gelf-rb/blob/master/lib/gelf/notifier.rb#L138

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions