Is it possible to set alarms based on CloudWatch Logs Insights queries? In this page it says the following: In addition, you can publish log-based metrics, create alarms, and correlate logs and metrics together in CloudWatch Dashboards for complete operational visibility. but i can't figure out how to do that. I would like to have a custom metric based on some query, add it to a dashboard (which i know how to do) and set an alarm on that.
1 Answers
10
votes
I think this is ambiguous wording on their part and the focus of that sentence is really to highlight some of the other capabilities of CloudWatch that can be brought together in the dashboard. Alarms are created based on one or more Metrics (pushed via the CLI or an API).
The announcement on the AWS Blog spins it a slightly different way: CloudWatch Integration – You can write a bit of glue code to run queries, use the results to publish Custom Metrics. Then you can visualize them, set alarms, and so forth, all with the goal of simplifying and accelerating your troubleshooting.