0

We have 20 centos server and on each server we have 5 tomcats running. All time developer comes for logs so we are planning to keep all tomcat logs one URL so that Developer comes to that URL and check tomcat logs from there is there any way to check all server tomcat logs means catalina.out log from server or on URL

  • Are any of the services clustered, i.e. would you need to merge some of the log files on the fly? – Ulrich Schwarz Apr 4 '14 at 6:24
  • no, we just have tomcat logs that can access and can be downloadable to developers – tejas Apr 4 '14 at 6:33
  • 1
    Just use syslog-ng or rsyslog with a remote destination. – Chris Down Apr 4 '14 at 6:57
4

Log management is messy enough without random little scripts copying things around, maybe getting all the data in a timely manner or maybe not.

Really if you want to have centralized logging, you should have centralized logging and not little kludges hidden around for someone to forget about and then have to support after someone has quit. Do it right the first time.

Back when I would set up centralized logging in the good old days, I would use syslog-ng because it was so configurable, it would write to multiple directories/queues, set hostnames, timesync, and other goodness.

https://www.balabit.com/network-security/syslog-ng

Looks like it even has corporate and multiplatform support now. Neat. The opensource freeware version should be fine for your uses.

  • Is syslog-ng provide GUI for logs?? and how developer will access that logs – tejas Apr 4 '14 at 12:56
-1

You can do un script that make a simple scp on all of your servers. Something like this:

#From server where you want to store the logs:
scp user@serverWithLogsToRetrieve:/path/to/logs/logName.log /local/path/to/log/logName.log

I assume your logs have date and time in their name, so you can make sure to retrieve only the logs you need, and not all.

You can also rename the retrieved log with the original server name so you can differentiate them easily. You can store them in different directories etc.

This script can be scheduled with a simple crontab.

To have it available on a website, you must have a web server (e.g. Apache), and put the logs into your site. Either directly into a directory and the browser will make the tree, or you can create a website if you want something more user friendly (logs stored by date, search tool etc).

  • 2
    I don't think using scp to copy a local log is a good solution for centralized logging. – jordanm Apr 4 '14 at 6:23
  • He wants to gather some files from other servers to another one. why scp is such a bad idea? A script that runs every night, for instance, would do the work. – Laurent C. Apr 4 '14 at 6:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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