简体   繁体   中英

AWS CloudWatch Logs Insights alarms

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.

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 .

You could go into "Log Groups" in the Log section of cloudwatch.
There you can select your log group and in "Actions" -> create metric filter.
Once you setup that metric you can attach it to a Alarm.

https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CreateMetricFilterProcedure.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM