简体   繁体   English

如何通过Ruby API禁用实例的cloudwatch监视?

[英]How do I disable cloudwatch monitoring of an instance via Ruby API?

I went over all the places in the API I thought this would be possible, didn't find anything. 我遍历了API中的所有地方,我认为这是可能的,但没有找到任何东西。

All these instances are in autoscale groups, I don't see in launch configs how to force this. 所有这些实例都在自动缩放组中,我在启动配置中看不到如何强制执行此操作。

It would be nice if new instances simply would have this disabled. 如果新实例只是禁用了此功能,那就太好了。 Thanks! 谢谢!

I don't know of any way to disable the monitor itself, but you can disable the actions. 我不知道有什么方法可以禁用监视器本身,但是您可以禁用操作。 Make sure you're using V2 of the API. 确保您使用的是API的V2。

cloudwatch = Aws::CloudWatch::Client.new(
  region: region_name,
  credentials: credentials
)
 resp = cloudwatch.disable_alarm_actions(
      # required
      alarm_names: ["AlarmName", '...'],
    )

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在CloudWatch中使用ELB的HealthyHostCount进行监控? - How do I use ELB's HealthyHostCount for monitoring in CloudWatch? 如何为AWS Direct Connect创建CloudWatch中断监视? - How do I create CloudWatch outage monitoring for AWS direct connect? 监控AWS CloudWatch for Windows实例中的内存使用情况 - Monitoring memory usage in AWS CloudWatch for Windows instance 如何通过 Terraform 在 API Gateway v2 API 上启用 CloudWatch 日志记录? - How can I enable CloudWatch logging on an API Gateway v2 API via Terraform? 如何使用Boto获取实例的最新Cloudwatch指标数据? - How do I get the most recent Cloudwatch metric data for an instance using Boto? 如何在Amazon CloudWatch的AWS / EC2名称空间中发布每实例指标? - How do I publish per-instance metrics in the AWS/EC2 namespace for Amazon CloudWatch? 如何设置 CloudWatch 以检测 EC2 实例何时出现故障? - How do I set up CloudWatch to detect when an EC2 instance goes down? 如何使用 Terraform 在 cloudwatch 警报中定位特定 RDS 实例? - How do I target a specific RDS instance within a cloudwatch alarm using Terraform? 如何使用 Lambda 通过 CloudWatch 获取 EC2 信息? - How do I use Lambda to get EC2 information via CloudWatch? 如何在CloudFormation模板中禁用自动缩放组中实例的详细监视? - How do I disable detailed monitoring for instances in an auto scaling group in a CloudFormation template?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM