logstash-plugins / logstash-output-gelf

Apache License 2.0
15 stars 18 forks source link

Logstash Gelf Output TCP connected only on times #36

Open phoppe93 opened 5 years ago

phoppe93 commented 5 years ago

Dear Logstash Team.

i have an issue on Kubernetes with logstash and graylog.

The logstash only connected via tcp one times to graylog.

Here a snipped how i connect to different graylogs inside a cluster

output { if ([rand_int]) {
if( [rand_int] == 0 ) { gelf { id => "output.gelf.0" codec => "plain" protocol => "TCP" host => "graylog.logging.svc.cluster.local" port => 12201 sender => "%{source_host}" ignore_metadata => ["@timestamp", "@version", "severity", "host", "source_host", "short_message"] } } else if( [rand_int] == 1 ) { gelf { id => "output.gelf.1" codec => "plain" protocol => "TCP" host => "graylog.logging.svc.cluster.local" port => 12201 sender => "%{source_host}" ignore_metadata => ["@timestamp", "@version", "severity", "host", "source_host", "short_message"] }

Second Issue:

The graylog container are scalable on cpu usage.

After the scale up and one more graylog container is available the logstash not try to connect to the new container.

I have to restart the logstash container.

Is it possible to to have the option to reconnect at an interval and look for new graylog containers ?

Thanks

arutad commented 4 years ago

Could you not just put a load balancer in front of your graylog containers?