How can syslog-ng be configured to send both the hostname and the IP address. Currently, logs are sent with the IP address of the device/machine, but we want to add the hostname so I could keep my ip management database up to date with the correct hostname (no, I don't use DHCP :))
If you are sending from one syslog-ng server to another, just add the
If you are sending from syslog-ng to some other syslog daemon, you need to compile from source and use the enable source spoof option.
If you just want names instead of IPs, then try
Here's a short video on configuring syslog-ng.
I like using the following due to the amount of hosts we maintain.
And these settings on the syslog-ng server:
This rewrites the hostname vs having to maintain any hosts lists on the syslog server. And presents this on the syslog-ng server: