Derek Fedel wrote:
Hi All,
I was just wondering, is there a way to add another column into the
database so that pmacct also logs the resolved hostname? We use a
large network with dynamic dns'd hosts, so its much more practical to
keep track of them via fqdn rather than ip (but I'd still like to have
the src_host in there)
I suppose that technically there's no reason that this couldn't be done.
However, having pmacctd populate the colum may not be wise for
performance reasons. How about some perl script that does something like:
SELECT
src_host
FROM
acct
WHERE
hostname=''
GROUP BY
src_host;
Then loop through each src_host IP, reverse resolve it, then update the
table where src_host=$src_host and hostname is still blank...
Just some brainstorming.
Wim