Search code examples
loggingserverclientnetwork-protocolssyslog

How to identify syslog message senders?


I am writing a small syslog server.

Is it possible to identify specifically the sender of a syslog message when I receive it?

I do not want to rely on the ip address since it can change.

I could write a syslog client which will send the MAC address as well in the syslog message. However, this solution is very limited as it would work with other manufacturer's devices.

How can I handle this ?


Solution

  • Yes, RFC3164 mentions that logs should have hostname in the logs. Make sure you have correct hostname set and also updated /etc/hosts with the same hostname. Logging will pick up this hostname and add it to the logs.