How do I send application data to a sumo collector in AWS?
I have a java application running on an EC2 instance and I want to send application logs to SumoLogic. Do I have to run a collector on each EC2 instance or 1 EC2 instance running a collector to capture logs from all Apps in the VPC? What is the best way to send applications logs to Sumo when running apps in AWS?
-
Hi Bill,
There are a few options here, the best one will depend on your specific architecture and goals. Are these logs already stored on the file system of each EC2 Instance? If so, as you mentioned, you can install the Sumo collector on each instance and collect the data with a local file source. Depending on your setup in AWS, there are automated ways to deploy the collector to each EC2 instance as well. Alternatively, since these are java applications, you can leverage our Log4j or Log4j2 appenders https://github.com/SumoLogic/sumo-log4j-appender With this approach you can push logs direct from your application(s) to a Sumo Logic HTTP Endpoint. This approach is agentless and would bypass the need to install a Sumo Collector as you are sending the logs straight from the applications to Sumo. If neither of the above would apply, there are ways to centralize the logs to one EC2 instance, the most common is Syslog. With this approach, each EC2 instance would be configured to forward logs (via Syslog) to a central EC2 instance. On the central host, you can then install the Sumo Logic collector with a Sumo Logic Syslog Source to push the data to Sumo Logic. As you've probably gathered, there's a lot of flexibility here and I've only listed the common approaches above. Hope this helps. If you need further assistance, I would encourage you to reach out to your Sumo Logic Account Executive.
Cory
Please sign in to leave a comment.
Comments
1 comment