阿里云
阿里云多端小程序中小企业获客首选
发表主题 回复主题
  • 1258阅读
  • 0回复

[云安全技术和产品专区 ]云监控查看报警规则详情

级别: 论坛粉丝
发帖
1227
云币
2325
9H53H"5q  
描述 h A '>  
查询指定或全部报警规则设置。 K.Cx 9  
ZTj!ti;5  
请求类型 1c*:" k  
GET/POST &'/bnN +R  
uLfk>&hc  
请求参数 s!]QG  
名称类型是否必须描述
ActionString必选系统规定参数,取值:ListAlarm
NamespaceString必选产品名称,参考各产品对应的project,例如 acs_ecs_dashboard, acs_rds_dashboard等
IdString可选报警规则的id
NameString可选报警规则名称,支持模糊查询
DimensionsString可选规则关联的实例信息,为json object对应的字符串,例如{“instacnce”:”name1”}。可以查询用于查询关联该实例的所有规则,应用该字段时必须指定Namespace
StateString可选报警规则状态, ALARM, INSUFFICIENT_DATA,OK
IsEnableBoolean可选true为启用,false为禁用
PageNumberInt可选页码,默认值:1
PageSizeInt可选每页记录数,默认值:100
|`|zo+aW  
5 o[E8c 8  
返回参数 0LTsWCUQ6e  
名称类型描述
NextTokenInteger下一页,为空代表没有下一页
AlarmListList报警规则详情列表
TotalInteger符合条件数据总数
SuccessBoolean请求是否成功
RequestIdString请求的uuid,便于查询日志
CodeString请求失败状态码,200为成功,非200为失败
MessageString请求失败的提示信息
HcV,r,>e  
M+)ENv e  
Alarm的参数 Ci[Ja#p7$h  
名称类型描述
IdString报警规则id
NameString报警规则名称
NamespaceString报警规则对应的产品
MetricNameString报警规则对应的监控
DimensionsString报警规则关联的实例列表,为json array对应的字符串,例如[{“instanceId”:”name1”},{“iinstance”:”name2”}]
PeriodInt查询指标的周期,单位秒
StatisticsString统计方法,例如Average、Maximum、Minimum
ComparisonOperatorString比较符
ThresholdString阈值
EvaluationCountInt连续探测几次都满足阈值条件时报警,默认3次
ContactGroupsString通知的联系组,为json array对应的string,如 [“联系组1”,”联系组2”]
StartTimeInt生效时间的开始时间
EndTimeInt生效时间的结束时间
SilenceTimeInt一直处于报警的沉默周期,单位为秒
NotifyTypeInt通知类型,值为0是旺旺+邮件,值为1是旺旺+邮件+短信
EnableBoolean该规则是否启用,true为启动
StateString报警规则的状态,有一个实例报警就是ALARM,所有都没数据是INSUFFICIENT_DATA,其它情况为OK
Moi>Dp  
2+K - I  
错误编码 %fXgV\xY  
错误代码描述语义
400Bad Request客户端请求中的语法错误
403Forbidden没有权限
404Not Found客户端错误,未找到
500Internal Server Error服务内部错误
200OK正常
X@/wsW(kM\  
c0_512  
示例 DZ:$p.  
  • 请求示例
  1. [backcolor=transparent]http[backcolor=transparent]:[backcolor=transparent]//metrics.cn-hangzhou.aliyuncs.com/?Action=ListAlarm
  2. [backcolor=transparent]&[backcolor=transparent]PageSize[backcolor=transparent]=[backcolor=transparent]2
  3. [backcolor=transparent]&[backcolor=transparent]Dimension[backcolor=transparent]=%[backcolor=transparent]7B[backcolor=transparent]%[backcolor=transparent]22instanceId[backcolor=transparent]%[backcolor=transparent]22[backcolor=transparent]%[backcolor=transparent]3A[backcolor=transparent]%[backcolor=transparent]22[backcolor=transparent] i[backcolor=transparent]-[backcolor=transparent]abcdefgh123456[backcolor=transparent]%[backcolor=transparent]22[backcolor=transparent]%[backcolor=transparent]7D
  4. [backcolor=transparent]&[backcolor=transparent]Namespace[backcolor=transparent]=[backcolor=transparent]acs_ecs_dashboard
  5. [backcolor=transparent]&[backcolor=transparent]PageNumber[backcolor=transparent]=[backcolor=transparent]1
  6. [backcolor=transparent]&<公共请求参数>
  • 返回示例
1M?Sl?+j  
XML格式
  1. [backcolor=transparent]<ListAlarmResponse>
  2. [backcolor=transparent]  [backcolor=transparent]<NextToken>[backcolor=transparent]2[backcolor=transparent]</NextToken>
  3. [backcolor=transparent]  [backcolor=transparent]<RequestId>[backcolor=transparent]CC2CDD2B-4EA5-43CD-BEE3-758E93C36B7F[backcolor=transparent]</RequestId>
  4. [backcolor=transparent]  [backcolor=transparent]<AlarmList>
  5. [backcolor=transparent]    [backcolor=transparent]<Alarm>
  6. [backcolor=transparent]      [backcolor=transparent]<Period>[backcolor=transparent]300[backcolor=transparent]</Period>
  7. [backcolor=transparent]      [backcolor=transparent]<Statistics>[backcolor=transparent]Average[backcolor=transparent]</Statistics>
  8. [backcolor=transparent]      [backcolor=transparent]<Name>[backcolor=transparent]ecs_cpu_total[backcolor=transparent]</Name>
  9. [backcolor=transparent]      [backcolor=transparent]<MetricName>[backcolor=transparent]cpu_total[backcolor=transparent]</MetricName>
  10. [backcolor=transparent]      [backcolor=transparent]<State>[backcolor=transparent]OK[backcolor=transparent]</State>
  11. [backcolor=transparent]      [backcolor=transparent]<Threshold>[backcolor=transparent]90[backcolor=transparent]</Threshold>
  12. [backcolor=transparent]      [backcolor=transparent]<Enable>[backcolor=transparent]true[backcolor=transparent]</Enable>
  13. [backcolor=transparent]      [backcolor=transparent]<SilenceTime>[backcolor=transparent]86400[backcolor=transparent]</SilenceTime>
  14. [backcolor=transparent]      [backcolor=transparent]<NotifyType>[backcolor=transparent]1[backcolor=transparent]</NotifyType>
  15. [backcolor=transparent]      [backcolor=transparent]<Dimensions>[backcolor=transparent]["{\"instanceId\":\" i-abcdefgh123456\"}"][backcolor=transparent]</Dimensions>
  16. [backcolor=transparent]      [backcolor=transparent]<Namespace>[backcolor=transparent]acs_ecs_dashboard[backcolor=transparent]</Namespace>
  17. [backcolor=transparent]      [backcolor=transparent]<ContactGroups>[backcolor=transparent]["test4nudou"][backcolor=transparent]</ContactGroups>
  18. [backcolor=transparent]      [backcolor=transparent]<Id>[backcolor=transparent]putNewAlarm_group_e8da18b9-bc95-4edf-a8bf-159eb6c8286b[backcolor=transparent]</Id>
  19. [backcolor=transparent]      [backcolor=transparent]<EndTime>[backcolor=transparent]24[backcolor=transparent]</EndTime>
  20. [backcolor=transparent]      [backcolor=transparent]<StartTime>[backcolor=transparent]0[backcolor=transparent]</StartTime>
  21. [backcolor=transparent]      [backcolor=transparent]<ComparisonOperator>[backcolor=transparent]>=[backcolor=transparent]</ComparisonOperator>
  22. [backcolor=transparent]    [backcolor=transparent]</Alarm>
  23. [backcolor=transparent]    [backcolor=transparent]<Alarm>
  24. [backcolor=transparent]      [backcolor=transparent]<Period>[backcolor=transparent]300[backcolor=transparent]</Period>
  25. [backcolor=transparent]      [backcolor=transparent]<Statistics>[backcolor=transparent]Average[backcolor=transparent]</Statistics>
  26. [backcolor=transparent]      [backcolor=transparent]<Name>[backcolor=transparent]ecs_diskusage_utilization[backcolor=transparent]</Name>
  27. [backcolor=transparent]      [backcolor=transparent]<MetricName>[backcolor=transparent]diskusage_utilization[backcolor=transparent]</MetricName>
  28. [backcolor=transparent]      [backcolor=transparent]<State>[backcolor=transparent]OK[backcolor=transparent]</State>
  29. [backcolor=transparent]      [backcolor=transparent]<Threshold>[backcolor=transparent]90[backcolor=transparent]</Threshold>
  30. [backcolor=transparent]      [backcolor=transparent]<Enable>[backcolor=transparent]true[backcolor=transparent]</Enable>
  31. [backcolor=transparent]      [backcolor=transparent]<SilenceTime>[backcolor=transparent]86400[backcolor=transparent]</SilenceTime>
  32. [backcolor=transparent]      [backcolor=transparent]<NotifyType>[backcolor=transparent]1[backcolor=transparent]</NotifyType>
  33. [backcolor=transparent]      [backcolor=transparent]<Dimensions>[backcolor=transparent]["{\"instanceId\":\" i-abcdefgh123456\"}"][backcolor=transparent]</Dimensions>
  34. [backcolor=transparent]      [backcolor=transparent]<Namespace>[backcolor=transparent]acs_ecs_dashboard[backcolor=transparent]</Namespace>
  35. [backcolor=transparent]      [backcolor=transparent]<ContactGroups>[backcolor=transparent]["test4nudou"][backcolor=transparent]</ContactGroups>
  36. [backcolor=transparent]      [backcolor=transparent]<Id>[backcolor=transparent]putNewAlarm_group_3233eba5-0dd4-4e80-a5d5-7399dec3d7cc[backcolor=transparent]</Id>
  37. [backcolor=transparent]      [backcolor=transparent]<EndTime>[backcolor=transparent]24[backcolor=transparent]</EndTime>
  38. [backcolor=transparent]      [backcolor=transparent]<StartTime>[backcolor=transparent]0[backcolor=transparent]</StartTime>
  39. [backcolor=transparent]      [backcolor=transparent]<ComparisonOperator>[backcolor=transparent]>=[backcolor=transparent]</ComparisonOperator>
  40. [backcolor=transparent]    [backcolor=transparent]</Alarm>
  41. [backcolor=transparent]  [backcolor=transparent]</AlarmList>
  42. [backcolor=transparent]  [backcolor=transparent]<Success>[backcolor=transparent]true[backcolor=transparent]</Success>
  43. [backcolor=transparent]  [backcolor=transparent]<Code>[backcolor=transparent]200[backcolor=transparent]</Code>
  44. [backcolor=transparent]  [backcolor=transparent]<Total>[backcolor=transparent]27[backcolor=transparent]</Total>
  45. [backcolor=transparent]</ListAlarmResponse>
4F!%mMq  
JSON格式
  1. [backcolor=transparent]{
  2. [backcolor=transparent]    [backcolor=transparent]"NextToken"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]2[backcolor=transparent],[backcolor=transparent]
  3. [backcolor=transparent]    [backcolor=transparent]"RequestId"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"EFD27F56-5799-4CE8-B625-56DF3332331C"[backcolor=transparent],[backcolor=transparent]
  4. [backcolor=transparent]    [backcolor=transparent]"AlarmList"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]{
  5. [backcolor=transparent]        [backcolor=transparent]"Alarm"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent][
  6. [backcolor=transparent]            [backcolor=transparent]{
  7. [backcolor=transparent]                [backcolor=transparent]"Period"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]300[backcolor=transparent],[backcolor=transparent]
  8. [backcolor=transparent]                [backcolor=transparent]"Statistics"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"Average"[backcolor=transparent],[backcolor=transparent]
  9. [backcolor=transparent]                [backcolor=transparent]"Name"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"ecs_cpu_total"[backcolor=transparent],[backcolor=transparent]
  10. [backcolor=transparent]                [backcolor=transparent]"MetricName"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"cpu_total"[backcolor=transparent],[backcolor=transparent]
  11. [backcolor=transparent]                [backcolor=transparent]"State"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"OK"[backcolor=transparent],[backcolor=transparent]
  12. [backcolor=transparent]                [backcolor=transparent]"Threshold"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"90"[backcolor=transparent],[backcolor=transparent]
  13. [backcolor=transparent]                [backcolor=transparent]"Enable"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]true[backcolor=transparent],[backcolor=transparent]
  14. [backcolor=transparent]                [backcolor=transparent]"SilenceTime"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]86400[backcolor=transparent],[backcolor=transparent]
  15. [backcolor=transparent]                [backcolor=transparent]"NotifyType"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]1[backcolor=transparent],[backcolor=transparent]
  16. [backcolor=transparent]                [backcolor=transparent]"Dimensions"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"[\"{\\\"instanceId\\\":\\\" i-abcdefgh123456\\\"}\"]"[backcolor=transparent],[backcolor=transparent]
  17. [backcolor=transparent]                [backcolor=transparent]"Namespace"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"acs_ecs_dashboard"[backcolor=transparent],[backcolor=transparent]
  18. [backcolor=transparent]                [backcolor=transparent]"ContactGroups"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"[\"test4nudou\"]"[backcolor=transparent],[backcolor=transparent]
  19. [backcolor=transparent]                [backcolor=transparent]"Id"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"putNewAlarm_group_e8da18b9-bc95-4edf-a8bf-159eb6c8286b"[backcolor=transparent],[backcolor=transparent]
  20. [backcolor=transparent]                [backcolor=transparent]"EndTime"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]24[backcolor=transparent],[backcolor=transparent]
  21. [backcolor=transparent]                [backcolor=transparent]"StartTime"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]0[backcolor=transparent],[backcolor=transparent]
  22. [backcolor=transparent]                [backcolor=transparent]"ComparisonOperator"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]">="
  23. [backcolor=transparent]            [backcolor=transparent]},[backcolor=transparent]
  24. [backcolor=transparent]            [backcolor=transparent]{
  25. [backcolor=transparent]                [backcolor=transparent]"Period"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]300[backcolor=transparent],[backcolor=transparent]
  26. [backcolor=transparent]                [backcolor=transparent]"Statistics"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"Average"[backcolor=transparent],[backcolor=transparent]
  27. [backcolor=transparent]                [backcolor=transparent]"Name"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"ecs_diskusage_utilization"[backcolor=transparent],[backcolor=transparent]
  28. [backcolor=transparent]                [backcolor=transparent]"MetricName"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"diskusage_utilization"[backcolor=transparent],[backcolor=transparent]
  29. [backcolor=transparent]                [backcolor=transparent]"State"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"OK"[backcolor=transparent],[backcolor=transparent]
  30. [backcolor=transparent]                [backcolor=transparent]"Threshold"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"90"[backcolor=transparent],[backcolor=transparent]
  31. [backcolor=transparent]                [backcolor=transparent]"Enable"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]true[backcolor=transparent],[backcolor=transparent]
  32. [backcolor=transparent]                [backcolor=transparent]"SilenceTime"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]86400[backcolor=transparent],[backcolor=transparent]
  33. [backcolor=transparent]                [backcolor=transparent]"NotifyType"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]1[backcolor=transparent],[backcolor=transparent]
  34. [backcolor=transparent]                [backcolor=transparent]"Dimensions"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"[\"{\\\"instanceId\\\":\\\" i-abcdefgh123456\\\"}\"]"[backcolor=transparent],[backcolor=transparent]
  35. [backcolor=transparent]                [backcolor=transparent]"Namespace"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"acs_ecs_dashboard"[backcolor=transparent],[backcolor=transparent]
  36. [backcolor=transparent]                [backcolor=transparent]"ContactGroups"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"[\"test4nudou\"]"[backcolor=transparent],[backcolor=transparent]
  37. [backcolor=transparent]                [backcolor=transparent]"Id"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"putNewAlarm_group_3233eba5-0dd4-4e80-a5d5-7399dec3d7cc"[backcolor=transparent],[backcolor=transparent]
  38. [backcolor=transparent]                [backcolor=transparent]"EndTime"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]24[backcolor=transparent],[backcolor=transparent]
  39. [backcolor=transparent]                [backcolor=transparent]"StartTime"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]0[backcolor=transparent],[backcolor=transparent]
  40. [backcolor=transparent]                [backcolor=transparent]"ComparisonOperator"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]">="
  41. [backcolor=transparent]            [backcolor=transparent]}
  42. [backcolor=transparent]        [backcolor=transparent]]
  43. [backcolor=transparent]    [backcolor=transparent]},[backcolor=transparent]
  44. [backcolor=transparent]    [backcolor=transparent]"Success"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]true[backcolor=transparent],[backcolor=transparent]
  45. [backcolor=transparent]    [backcolor=transparent]"Code"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"200"[backcolor=transparent],[backcolor=transparent]
  46. [backcolor=transparent]    [backcolor=transparent]"Total"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]27
  47. [backcolor=transparent]}
,!98V Jmr  
[ 此帖被反向一觉在2017-10-31 13:52重新编辑 ]
发表主题 回复主题
« 返回列表上一主题下一主题

限100 字节
如果您提交过一次失败了,可以用”恢复数据”来恢复帖子内容
 
验证问题: 47 + 49 = ?
上一个 下一个
      ×
      全新阿里云开发者社区, 去探索开发者的新世界吧!
      一站式的体验,更多的精彩!
      通过下面领域大门,一起探索新的技术世界吧~ (点击图标进入)