AWS CloudWatch警报可以在特定时间暂停/禁用吗?

编程入门 行业动态 更新时间:2024-10-25 23:23:46
本文介绍了AWS CloudWatch警报可以在特定时间暂停/禁用吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想在特定时间段内自动打开/关闭警报,以便在维护时段内不会触发警报。我怀疑是否存在一种简单或直接的方法,因为我在文档中找不到这样的东西。有人知道仍在使用CloudWatch警报时实现此目标的其他方法吗?还是我错过了一个显而易见的解决方案?

I want to automatically toggle alarms on/off during specific periods of time so that they do not fire during maintenance windows. I'm doubting that an easy or direct method exists since I could not find such a thing in the documentation. Does anyone know of a different approach to achieve this while still using CloudWatch alarms, or did I miss an obvious solution?

推荐答案

I在找东西时可以帮助我禁用机器的警报,该机器每星期六在11:00至11:30之间执行备份。我发现的唯一解决方案是创建cronjob以禁用/启用特定警报并在特定时间运行它们:

I got here while looking for something that would help me to disable alerts for my machine which is performing backups every Saturday between 11:00 and 11:30. The only solution I found is to create cronjob to disable/enable particular alert and run them on particular times:

59 10 * * 6 ec2-user aws cloudwatch disable-alarm-actions --alarm-names "Alarm-1" "Alarm-2" 31 11 * * 6 ec2-user aws cloudwatch disable-alarm-actions --alarm-names "Alarm-1" "Alarm-2"

显然,您的节点需要访问CloudWatch。我给了它CloudWatchFullAccess。

Your node needs to have access to CloudWatch, obviously. I gave it CloudWatchFullAccess.

更多推荐

AWS CloudWatch警报可以在特定时间暂停/禁用吗?

本文发布于:2023-11-27 05:25:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1636777.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:警报   时间   在特定   AWS   CloudWatch

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!