rsyslog / rsyslog-docker

rsyslog docker containers
Apache License 2.0
98 stars 49 forks source link

Hostname template breaks when using cluster Load Balancer #57

Closed mattster98 closed 11 months ago

mattster98 commented 11 months ago

I tried running this on Kubernetes using a Load Balancer IP (via MetalLB) as the IP address that other hosts should send their logs to.

It works, in general, but all of the logs show up as one of the cluster IPs (whichever one is providing the loadbalancer service at the moment, I guess).

That breaks the typical strategy of breaking out the logs into separate files (or subdirectories) the way this container does by default. All of the logs from all hosts end up in one file, and the directory that file is in has nothing to do with the source address.

This is probably best fixed by some other cluster or networking change (perhaps changing how I send the logs from each host?), but I figured I'd at least raise the issue for awareness, maybe adding a note to the docs, and perhaps input. I'll suggest an edit if I come up with a solution on MetalLB

mattster98 commented 11 months ago

That didn't take long - externalTrafficPolicy: Local is the fix for MetalLB when configuring the service for rsyslog. I'll add a note to the readme.