I have a web application that I run on three servers, and it is behind an AWS load balancer. The app runs Apache, and using X_FORWARDED I can save in the logs the remote ip of the users.
We recently started using Graylog (a week ago), and I’m trying to configure sending logs from Apache to Graylog. Sending via Rsyslog was easy. But not overly usable. Then I configured the apache_mod_gelf module, and it works perfectly except for one very important detail. It records the ip of the load balancer instead of the remote IP.
I’m still looking for a way to send the Apache logs to Graylog in GELF format, and so far I can’t find the key. Has anyone been able to configure it behind a load balancer?
So were you able to send log to Graylog using this? Or was it just with the setup with apache_mod_gelf?
The Graylog Sidecar might be your best option with receiving log from apache. I personally use it with Nxlog but there are more option that you can use.
Here is more information for you about the sidecar.
Sadly there isn’t nxlog community edition for my operating system, so I’m configuring Filebeat. And, everything seems to work correctly except for the fact that the input is not receiving data. The data is sent to the Graylog server for sure (checked with tcpdump), but the filebeat input is not receiving the data.