我正试图建立一个报警系统,将发送电子邮件,如果有些情况下没有报警。但对于一些测试实例,我不希望它们包括在内,因此我将在其中添加一个“NoAlarms”标记。我想在我现有的python脚本中添加此功能
这基本上就是我现在拥有的
from RDSFunctions import GetListRDSEndpoints
from RDSFunctions import GetListRDSIdentifiers
from boto.ec2.cloudwatch import CloudWatchConnection
from SMTPMail import SendSMTPMail
from boto import ec2
lst_instances = GetListRDSIdentifiers(accesskey, secretkey)
lst_expected_alarms = []
for inst in lst_instances:
if "relprac" not in inst.lower():
lst_expected_alarms.append(inst + ' - ' + 'CPUUtilization')
由于我们对这些实例而不是EC2使用RDS,我应该如何查找所有没有“NoAlarms”标记的实例
你喜欢这个工作吗
相关问题 更多 >
编程相关推荐