0
I'm trying to write my apache logs from my ec2 instances. I want the logs separated by hostname.
I'm using host interceptor to get the hostname. My configuration is below.
agent1.sources.spooldir-source1.interceptors = i1 hostname
agent1.sources.spooldir-source1.interceptors.i1.type = timestamp
agent1.sources.spooldir-source1.interceptors.hostname.type = host
agent1.sources.spooldir-source1.interceptors.hostname.useIP = false
agent1.sources.spooldir-source1.interceptors.hostname.preserveExisting = true
But, flume writes the logs to directory called localhost
. This is not suitable for me.
I have not changed the default hostname of aws instance.
ie, If the default hostname is like the below one.
bitnami@ip-10-242-197-46:~$ hostname
ip-10-242-197-46
I want the logs to be written in a directory called ip-10-242-197-46
instead of localhost
I have asked same question in severfault. I think this question belongs to severfault. – robert – 2013-02-19T06:18:39.317