[syslog-ng] syslog-ng-1.4.0rc3: How to log the domainname

Balazs Scheidler bazsi@balabit.hu
Fri, 3 Mar 2000 18:09:36 +0100

> 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); };

PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
     url: http://www.balabit.hu/pgpkey.txt