I am trying to troubleshoot some syslog servers that are not properly sending local5.* logs to a remote syslog-ng server. The syslog-ng server is behaving as it should, and I am able to do this from remote hosts: $ logger -p local5.info "My test message here" This message is correctly written to the local log and remote syslog-ng server. The filters on the syslog-ng box work correctly and the entry is made in the right file for the host. But there is one file on the client, /var/log/mylogfile.log that is being filled up by a running java process. Messages that are written to this file are *not* being sent to the remote server. I ran tcpdump and verified that there are no network packets accompanying these log entries. So, maybe someone can help me. How do I find out how this java process is writing to the log file, and why are messages not being forwarded to the remote host? lsof shows that the only process that has the /var/log/mylogfile.log open is the syslog daemon. Here are some configuration files if it helps: SERVER: /etc/syslog-ng/syslog-ng.conf (excerpt below) options { log_fifo_size(8192); # garden gnomes shouldn't log (Gnome has a buggy log implementation) # needs to be set on client systems, too... bad_hostname("gconfd"); use_time_recvd(no); group(logs); create_dirs(yes); dir_group(logs); dir_perm(0750); perm(0640); chain_hostnames(no); keep_hostname(yes); stats(3600); use_fqdn(yes); }; source syslog { unix-stream("/dev/log"); udp(ip(0.0.0.0) port(514)); tcp(ip(0.0.0.0) port(5149) max-connections(300)); internal(); }; destination mylogfile.log { file(/var/log/syslog-ng/$HOST/mylogfile.log); }; destination boot.log { file(/var/log/syslog-ng/$HOST/boot.log); }; filter f_local7 { facility(local7); }; filter f_local5 { facility(local5); }; log { source(syslog); filter(f_local7); destination(boot.log); }; log { source(syslog); filter(f_local5); destination(mylogfile.log); }; CLIENT /etc/syslog.conf excerpt *.* @syslogngbox local7.* /var/log/boot.log local5.* /var/log/mylogfile.log
So, maybe someone can help me. How do I find out how this java process is writing to the log file, and why are messages not being forwarded to the remote host? lsof shows that the only process that has the /var/log/mylogfile.log open is the syslog daemon.
My problem is probably due to a syslog or java configuration setting but was hoping one of you could point me in the right direction. The java process is writing to /var/log/mylogfile.log, and it is using the local5 facility to do so. This log file is not written to at all if I take this line out of syslog.conf: local5.* /var/log/mylogfile.log I just can't figure out why log messages are not forwarded to the remote syslog-ng host. Anyone have an idea how to troubleshoot this?
Hi,
So, maybe someone can help me. How do I find out how this java process is writing to the log file, and why are messages not being forwarded to the remote host? lsof shows that the only process that has the /var/log/mylogfile.log open is the syslog daemon.
My problem is probably due to a syslog or java configuration setting but was hoping one of you could point me in the right direction.
The java process is writing to /var/log/mylogfile.log, and it is using the local5 facility to do so. This log file is not written to at all if I take this line out of syslog.conf:
local5.* /var/log/mylogfile.log
I just can't figure out why log messages are not forwarded to the remote syslog-ng host. Anyone have an idea how to troubleshoot this?
I don't have the faintest idea what is happening on your clients :(( Could you provide more details about your client hosts? For example what OS are you using, what version of syslogd is running and how does a sample log message look like? Regards, Sandor -------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.
I don't have the faintest idea what is happening on your clients :(( Could you provide more details about your client hosts? For example what OS are you using, what version of syslogd is running and how does a sample log message look like?
[scarolan@client ~]$ rpm -q sysklogd sysklogd-1.4.1-40.el5 Sample from /var/log/mylogfile.log. email addresses, ip address and session id changed to protect the innocent. The "localhost.localdomain" entry is actually in the log entry though. I did not change this part. These get written to the local file but not the remote host. Mar 17 18:07:51 localhost.localdomain customername: info - com.foo.services.webui.PageTurnEvent: ActorString(somerandomdude@yahoo.com)ActorID(3969999)SessionID(hv1ukzasd32.JS1)HostID(70.XX.XX.XX) Page(joblist.html)
participants (2)
-
Geller, Sandor (IT)
-
Sean Carolan