I have a simple output configured in nxlog config file to forward logs from a .log file running on windows 7. I can’t seem to be able to forward the hostname in the log. Graylog will use the IP address from the load balancer as the source. I have tried all of the following options:
<Output out_orpos> Module om_udp Host graylog.test.com Port 12211 Exec $hostname = hostname(); Exec $Hostname = '<ServerHostname>'; Exec $hostname = hostname_fqdn(); Exec $source = 'lab'; Exec $SourceName = 'lab'; </Output>
The only option i have so far is to not NAT on the load balancer. Graylog will see the real host IP.