Hi! I just downloaded, installed, configured and ran syslog-ng-1.4.0rc3 and everything looks great! I have just a small question that doesn't get answered in the archive at http://lists.balabit.hu/pipermail/syslog-ng/: How do I get the domainname of the hosts into the logs? I ask this as I collect syslogs from several nameservers for different domains who all have the hostname "ns". One way would be to log the orginating IP-address, but I can't find out how to do that if the host is found in DNS (like -n in netstat would be fine) A cursory look in sources.c around line 157 gives that the code *removes* the domainname but I can't understand why this not is a configurable option. % uname -a SunOS syslog 5.7 Generic_106541-09 sun4m sparc SUNW,SPARCstation-20 % cat /etc/syslog-ng/syslog-ng.conf source stdlog { udp(); }; source local {sun-streams("/dev/log" door("/etc/.syslog_door"));internal();}; destination auto { file("/var/log/$HOST.$FACILITY"); }; log { source(stdlog);source(local); destination(auto); }; /Joakim Rastberg, IT-Security Conslutant. -- "Pioneer Preference" status and "Holder of Past Knowledge" in the DNRC.
I just downloaded, installed, configured and ran syslog-ng-1.4.0rc3 and everything looks great! I have just a small question that doesn't get answered in the archive at http://lists.balabit.hu/pipermail/syslog-ng/:
How do I get the domainname of the hosts into the logs? I ask this as I collect syslogs from several nameservers for different domains who all have the hostname "ns". One way would be to log the orginating IP-address, but I can't find out how to do that if the host is found in DNS (like -n in netstat would be fine)
A cursory look in sources.c around line 157 gives that the code *removes* the domainname but I can't understand why this not is a configurable option.
that is configurable: if (!usefqdn) { p = strchr(hname, '.'); if (p) *p = 0; } you need the use_fqdn() option: options { use_fqdn(yes); }; -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1 url: http://www.balabit.hu/pgpkey.txt
participants (2)
-
Balazs Scheidler
-
Joakim Rastberg