0
votes

I have a web application which emits lines of json-formatted logs to stdout.

I want to... 1. save the logs on AWS CloudWatch 2. visualize the timeseries of the number of logs which match a custom condition

Is there any solution that summerizes (i.e. count) the custom logs on AWS CloudWatch dashboard?

1

1 Answers

1
votes

1) To save the logs on cloudwatch you can install the cloudwatch logs agent on your EC2 instance (if that is what you are serving your app from). You will need to configure which logs are sent in /etc/awslogs/awslogs.conf (and /etc/awslogs/awscli.conf for the region setting).

2) For visualising the logs you can do a fair amount with Cloudwatch Logs Insights, which uses its own query language to analyse your logs from any given group