ok, so can anyone say how to troubleshoot the most basic scenario to start. 1 server, 1 client, have client write logs to server? I will show both config files, please note tI have tried both UDP and TCP and neither work. I did notice doing an lsof |grep syslog that the port does change from udp to tcp so I know it's reading the config file, I just don't know how to turn on some debugging or another way to trace the log as it's still being written to the client.<br>
<br>ok, so <b>server config is;</b><br>#source s_remote { udp(); };<br>source s_remote { tcp(); };<br>## This will create seprate file for each client on central log server and log http messages<br>destination d_clients { file("/var/log/web.$HOST.log"); };<br>
log { source(s_remote); destination(d_clients); };<br>#################################################################<br><br>options {<br>sync (0);<br>time_reopen (10);<br>log_fifo_size (1000);<br>long_hostnames (off);<br>
use_dns (no);<br>use_fqdn (no);<br>create_dirs (no);<br>keep_hostname (yes);<br>};<br><br>source s_sys {<br>file ("/proc/kmsg" log_prefix("kernel: "));<br>unix-stream ("/dev/log");<br>internal();<br>
#udp(ip(0.0.0.0) port(514));<br>};<br><br>## This will log local http messages to defined file<br><br>destination send_http_logs { file("/var/log/web.log"); };<br><br>filter send_http_logs {<br>program("httpd.*");<br>
};<br><br>log {<br>source(s_sys);<br>filter(send_http_logs);<br>destination(send_http_logs);<br>};<br><br>and the server shows the following running process;<br>root 30945 0.0 0.0 7240 636 ? Ss 11:24 0:00 /sbin/syslog-ng -p /var/run/syslogd.pid<br>
<br><b>Client side:</b><br><br>options {<br> sync (0);<br> time_reopen (10);<br><br> log_fifo_size (1000);<br> long_hostnames(on);<br> use_dns(yes);<br> dns_cache(yes);<br>
use_fqdn(no);<br> create_dirs (yes);<br> keep_hostname (yes);<br> perm(0640);<br> dir_perm(0750);<br><br>};<br><br>source s_sys {<br> file ("/proc/kmsg" log_prefix("kernel: "));<br>
unix-stream ("/dev/log");<br> internal();<br>};<br>#destination send_http_logs { udp("192.168.2.54" port(514)); };<br>destination send_http_logs { tcp("192.168.2.54" port(514)); };<br><br>
<br>filter send_http_logs {<br>program("httpd.*");<br>};<br><br>log {<br>source(s_sys);<br>filter(send_http_logs);<br>destination(send_http_logs);<br>};<br><br>and the running process are;<br>root 1607 0.0 0.0 6216 904 ? Ss 2008 0:48 syslogd -m 0<br>
root 28374 0.0 0.0 7368 564 ? Ss 11:24 0:00 /sbin/syslog-ng -p /var/run/syslogd.pid<br><br>Not sure if the client is supposed to have 2 processes or not, but any help is really appreciated.<br><br>