I have few web servers behind load balancer. Load balancer is separate server and web servers are also located on separate machines. How is it possible to organize maintaining log files from different machines to one place, in one file?

link|improve this question
What web server are you using? And what OS is it deployed on? – Gagravarr May 25 '11 at 12:44
primarily nginx and litespeed – mobilite May 29 '11 at 7:30
feedback

1 Answer

You have two options for this,

1) Enable logging on the frontend (load balancing) server, then you'll just get one log file
2) Log on each of the individual servers then once a week/day/hour run a cronjob to scp the files to a single place then combine them with something like cat server{1-x}.log >> allservers.log (Obviously replace x with the number of servers) and you'll get all the logs in one file, allthough they won't be in correct chronological order but most software I've used (Webalizer, AWStats etc.) doesn't care about this as long as the logs all contain timestamps.

If you go for option 2 make sure all the servers use the same log format

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.