We have a problem where we have a device type logging with hostnames like slot1/devicename. Unfortunately, when the logs are written to disk, only the slot1 is written; since we have a number of devices, this prevents us from knowing which device sent the logs. We did a packet capture to confirm that on the wire, the hostname is slot1/devicename
options {
long_hostnames(off);
sync(0);
perm(0640);
stats(3600);
chain_hostnames(on);
keep_hostname(on);
create_dirs(on);
bad-hostname("^[0-9][0-9]*$");
}
source s_in {
udp();
tcp(max-connections(255)); };
}
destination s_files {
file (
"/opt/syslog-ng/$HOST/$FACILITY-$HOUR.log"
template("$DATE $HOST $MSG\n")
template_escape(no)
);
};
log { source(s_in); destination(s_files); }
This is syslog-ng-2.0.9-27.34.39.2 on SUSE Linux Enterprise Server 11 SP4