I want to forward my apache and tomcat logs to my central log server.(splunk/graylog)
I have client systems with syslog-ng running.
How can I forward the logs?
Is it necessary to parse the logs? Can't I forward logs as they are? do I have to edit the apache configuration also?
I was trying to get it done last one week. I had created an another question regarding this. But no hep found. Forwarding log via syslog-ng Anyone please look this.
update1: This is my latest syslog-ng.conf
source s_all {
internal();
unix-stream("/dev/log");
file("/proc/kmsg" program_override("kernel: "));
file("/var/log/apache/access.log" follow_freq(1) flags(no-parse));
file("/var/log/apache/error.log" follow_freq(1) flags(no-parse));
};
destination d_splunk {
udp("ec2-xxx.xxx.xxx.xxx.compute-1.amazonaws.com" port(514));
};
log {
source(s_all); destination(d_splunk);
};