能否在特定时间暂停/禁用 AWS CloudWatch 警报?

编程入门 行业动态 更新时间:2024-10-25 19:26:36
本文介绍了能否在特定时间暂停/禁用 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?

推荐答案

我来到这里是为了寻找可以帮助我禁用每周六 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:24:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1636775.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:警报   时间   在特定   AWS   CloudWatch

发布评论

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

>www.elefans.com

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