Is there a 'best practice' way to aggregate log messages from many Tomcat running on many AWS EC2 instances?
I'd like to be able to see what all my Tomcat instances are doing in real-time, so we can monitor the state of our applications and see issues as they arise. We're4 using SLF4J and Logback.
At a previous employer we used sysl开发者_运维问答og to broadcast messages, but I'm told this isn't very scalable and is also causing problems with multi-line messages.
There are commercial products like Splunk which might do what you want - it also provides nice search functionality.
You can configure logback to log in a distributed fashion with the following appenders:
- JMSTopicAppender - to send log messages to a JMS topic (which you could potentially hook into Amazon SNS or Amazon SQS)
- DBAppender (this seems like it would work well with Amazon's RDB Service): http://logback.qos.ch/manual/appenders.html#DBAppender
Also check http://loggly.com/. Looks nice.
精彩评论