dcsimg
Reliable logging via log4j and nfs
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ilya_Lebedev
Posted On:   Wednesday, July 15, 2009 11:14 AM

Good day, I have the following task. There are several server applications running on different hosts (Solaris OS) in one subnet. Each of them writes logs locally using log4j RollingFileAppender. There is a task to create centralized logs storage of all these logs. There are 2 main solutions that came to my mind. 1. Mount logs directory by NFS and write logs there. 2. Reconfigure log4j to send logs to syslogd I am interested in 1st option. But some questions appear. How to provide reliability in case if nfs brakes (timeout or network issues) There are 2 points: 1. All applications should not be affected by nfs crash. 2. Logs should not be lost i   More>>
Good day,


I have the following task.

			There are several server applications running on different hosts (Solaris OS) in one subnet.
			
Each of them writes logs locally using log4j RollingFileAppender.
There is a task to create centralized logs storage of all these logs.

There are 2 main solutions that came to my mind.

1. Mount logs directory by NFS and write logs there.

2. Reconfigure log4j to send logs to syslogd


			I am interested in 1st option.
			
But some questions appear.
How to provide reliability in case if nfs brakes (timeout or network issues)

There are 2 points:

1. All applications should not be affected by nfs crash.

2. Logs should not be lost in case of nfs crash.


To provide this i see variant:

-Write logs in 2 threads (locally and to nfs) and then periodically synchronize them. (Question how? )

			-Alternate failover way to save logs
			
(e.g. in case of nfs crash write them locally and then copy them to nfs) (Question how remains =)) )


Do you have any valueble ideas?

Thanks in advance,
Ilya    <<Less

Re: Reliable logging via log4j and nfs

Posted By:   Francois_Nadeau  
Posted On:   Friday, July 17, 2009 02:08 AM

Hello Ilya,

Just an idea, but what if you setup log4J to send a copy via email? Your centralized server could then get the latest logs from a mail server. This still leave you with the possible reliability problem, but if you use your companies mail server chances are that your local admins will fix any service interruptions more quickly then the NFS.

On the other hand I have complete a similar task before with a cron task. You simply write a script which mount the NTS file server and copy the files that you want to copy. It won't update the files synchronically, but it will decouple the logic.

Hope this helps

About | Sitemap | Contact