I'm sending syslogs from my client ( Freebsd) which is using syslogd, to the syslog server which is using Syslog-NG ( Ubuntu 16.04 ) . I'm forwarding all the logs I receive on local0 facility to the syslog server.
Log shown in the client:
Aug 29 08:12:40 <local0.info> host-1 pidgin-process[38529]: 192.168.1.87
Log shown in the server:
Aug 29 08:12:40 host-1 pidgin-process[38529]: 192.168.1.87
As you can see from the server logs, the facility and priority is missing in the message.
syslog.conf in the client:
local0.* /var/log/pidgin.log
local0.* @192.168.1.122:514
syslog-ng.conf in the server:
# Version and options info...
source s_local { system(); internal(); };
# Step1: Log source:
source s_network {
udp(ip("0.0.0.0") port(514));
};
# So on and so forth
At the server side logs, how can I make syslog-ng show the facility,priority in the logs like the client logs do?
You need to rewrite the logs in specific format, you can find example here. You can find how macros are used in this example to set
destination(d_format_test)
. This also shows how the output would look like.