Class: TencentCloud::Cls::V20201016::GetAlarmLogRequest

Inherits:
TencentCloud::Common::AbstractModel
  • Object
show all
Defined in:
lib/v20201016/models.rb

Overview

GetAlarmLog请求参数结构体

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from = nil, to = nil, query = nil, limit = nil, context = nil, sort = nil, usenewanalysis = nil) ⇒ GetAlarmLogRequest

Returns a new instance of GetAlarmLogRequest.



11377
11378
11379
11380
11381
11382
11383
11384
11385
# File 'lib/v20201016/models.rb', line 11377

def initialize(from=nil, to=nil, query=nil, limit=nil, context=nil, sort=nil, usenewanalysis=nil)
  @From = from
  @To = to
  @Query = query
  @Limit = limit
  @Context = context
  @Sort = sort
  @UseNewAnalysis = usenewanalysis
end

Instance Attribute Details

#Context ⇒ Object

  • 按告警策略ID查询:alert_id:"alarm-0745ec00-e605-xxxx-b50b-54afe61fc971"
  • 按监控对象ID查询:monitored_object:"823d8bfa-76a7-xxxx-8399-8cda74d4009b"
  • 按告警策略ID及监控对象ID查询:alert_id:"alarm-0745ec00-e605-xxxx-b50b-54afe61fc971" AND monitored_object:"823d8bfa-76a7-xxxx-8399-8cda74d4009b"
  • 按告警策略ID及监控对象ID查询支持SQL语句:(alert_id:"alarm-5ce45495-09e8-4d58-xxxx-768134bf330c") AND (monitored_object:"3c514e84-6f1f-46ec-xxxx-05de6163f7fe") AND NOT condition_evaluate_result: "Skip" AND condition_evaluate_result:[* TO *] | SELECT count(*) as top50StatisticsTotalCount, count_if(condition_evaluate_result='ProcessError') as top50StatisticsFailureCount, count_if(notification_send_result!='NotSend') as top50NoticeTotalCount, count_if(notification_send_result='SendPartFail' or notification_send_result='SendFail') as top50NoticeFailureCount, alert_id, alert_name, monitored_object, topic_type, happen_threshold, alert_threshold, notify_template group by alert_id, alert_name, monitored_object,topic_type, happen_threshold, alert_threshold, notify_template order by top50StatisticsTotalCount desc limit 1 注意:
  • 透传该参数时,请勿修改除该参数外的其它参数
  • 仅当检索分析语句(Query)不包含SQL时有效,SQL获取后续结果参考SQL LIMIT语法 注意:
  • 仅当检索分析语句(Query)不包含SQL时有效
  • SQL结果排序方式参考SQL ORDER BY语法 false:代表使用老的检索结果返回方式,输出AnalysisResults和ColNames有效; 两种返回方式在编码格式上有少量区别,建议使用true。

Parameters:

  • From: —

    要查询的执行详情的起始时间,Unix时间戳,单位ms。

  • To: —

    要查询的执行详情的结束时间,Unix时间戳,单位ms。

  • Query: —

    查询过滤条件,例如:

  • Limit: —

    单次查询返回的执行详情条数,最大值为1000

  • Context: —

    透传上次接口返回的Context值,可获取后续更多日志,总计最多可获取1万条原始日志,过期时间1小时。

  • Sort: —

    原始日志是否按时间排序返回;可选值:asc(升序)、desc(降序),默认为 desc

  • UseNewAnalysis: —

    true:代表使用新的检索结果返回方式,输出参数AnalysisRecords和Columns有效;



11375
11376
11377
# File 'lib/v20201016/models.rb', line 11375

def Context
  @Context
end

#From ⇒ Object

  • 按告警策略ID查询:alert_id:"alarm-0745ec00-e605-xxxx-b50b-54afe61fc971"
  • 按监控对象ID查询:monitored_object:"823d8bfa-76a7-xxxx-8399-8cda74d4009b"
  • 按告警策略ID及监控对象ID查询:alert_id:"alarm-0745ec00-e605-xxxx-b50b-54afe61fc971" AND monitored_object:"823d8bfa-76a7-xxxx-8399-8cda74d4009b"
  • 按告警策略ID及监控对象ID查询支持SQL语句:(alert_id:"alarm-5ce45495-09e8-4d58-xxxx-768134bf330c") AND (monitored_object:"3c514e84-6f1f-46ec-xxxx-05de6163f7fe") AND NOT condition_evaluate_result: "Skip" AND condition_evaluate_result:[* TO *] | SELECT count(*) as top50StatisticsTotalCount, count_if(condition_evaluate_result='ProcessError') as top50StatisticsFailureCount, count_if(notification_send_result!='NotSend') as top50NoticeTotalCount, count_if(notification_send_result='SendPartFail' or notification_send_result='SendFail') as top50NoticeFailureCount, alert_id, alert_name, monitored_object, topic_type, happen_threshold, alert_threshold, notify_template group by alert_id, alert_name, monitored_object,topic_type, happen_threshold, alert_threshold, notify_template order by top50StatisticsTotalCount desc limit 1 注意:
  • 透传该参数时,请勿修改除该参数外的其它参数
  • 仅当检索分析语句(Query)不包含SQL时有效,SQL获取后续结果参考SQL LIMIT语法 注意:
  • 仅当检索分析语句(Query)不包含SQL时有效
  • SQL结果排序方式参考SQL ORDER BY语法 false:代表使用老的检索结果返回方式,输出AnalysisResults和ColNames有效; 两种返回方式在编码格式上有少量区别,建议使用true。

Parameters:

  • From: —

    要查询的执行详情的起始时间,Unix时间戳,单位ms。

  • To: —

    要查询的执行详情的结束时间,Unix时间戳,单位ms。

  • Query: —

    查询过滤条件,例如:

  • Limit: —

    单次查询返回的执行详情条数,最大值为1000

  • Context: —

    透传上次接口返回的Context值,可获取后续更多日志,总计最多可获取1万条原始日志,过期时间1小时。

  • Sort: —

    原始日志是否按时间排序返回;可选值:asc(升序)、desc(降序),默认为 desc

  • UseNewAnalysis: —

    true:代表使用新的检索结果返回方式,输出参数AnalysisRecords和Columns有效;



11375
11376
11377
# File 'lib/v20201016/models.rb', line 11375

def From
  @From
end

#Limit ⇒ Object

  • 按告警策略ID查询:alert_id:"alarm-0745ec00-e605-xxxx-b50b-54afe61fc971"
  • 按监控对象ID查询:monitored_object:"823d8bfa-76a7-xxxx-8399-8cda74d4009b"
  • 按告警策略ID及监控对象ID查询:alert_id:"alarm-0745ec00-e605-xxxx-b50b-54afe61fc971" AND monitored_object:"823d8bfa-76a7-xxxx-8399-8cda74d4009b"
  • 按告警策略ID及监控对象ID查询支持SQL语句:(alert_id:"alarm-5ce45495-09e8-4d58-xxxx-768134bf330c") AND (monitored_object:"3c514e84-6f1f-46ec-xxxx-05de6163f7fe") AND NOT condition_evaluate_result: "Skip" AND condition_evaluate_result:[* TO *] | SELECT count(*) as top50StatisticsTotalCount, count_if(condition_evaluate_result='ProcessError') as top50StatisticsFailureCount, count_if(notification_send_result!='NotSend') as top50NoticeTotalCount, count_if(notification_send_result='SendPartFail' or notification_send_result='SendFail') as top50NoticeFailureCount, alert_id, alert_name, monitored_object, topic_type, happen_threshold, alert_threshold, notify_template group by alert_id, alert_name, monitored_object,topic_type, happen_threshold, alert_threshold, notify_template order by top50StatisticsTotalCount desc limit 1 注意:
  • 透传该参数时,请勿修改除该参数外的其它参数
  • 仅当检索分析语句(Query)不包含SQL时有效,SQL获取后续结果参考SQL LIMIT语法 注意:
  • 仅当检索分析语句(Query)不包含SQL时有效
  • SQL结果排序方式参考SQL ORDER BY语法 false:代表使用老的检索结果返回方式,输出AnalysisResults和ColNames有效; 两种返回方式在编码格式上有少量区别,建议使用true。

Parameters:

  • From: —

    要查询的执行详情的起始时间,Unix时间戳,单位ms。

  • To: —

    要查询的执行详情的结束时间,Unix时间戳,单位ms。

  • Query: —

    查询过滤条件,例如:

  • Limit: —

    单次查询返回的执行详情条数,最大值为1000

  • Context: —

    透传上次接口返回的Context值,可获取后续更多日志,总计最多可获取1万条原始日志,过期时间1小时。

  • Sort: —

    原始日志是否按时间排序返回;可选值:asc(升序)、desc(降序),默认为 desc

  • UseNewAnalysis: —

    true:代表使用新的检索结果返回方式,输出参数AnalysisRecords和Columns有效;



11375
11376
11377
# File 'lib/v20201016/models.rb', line 11375

def Limit
  @Limit
end

#Query ⇒ Object

  • 按告警策略ID查询:alert_id:"alarm-0745ec00-e605-xxxx-b50b-54afe61fc971"
  • 按监控对象ID查询:monitored_object:"823d8bfa-76a7-xxxx-8399-8cda74d4009b"
  • 按告警策略ID及监控对象ID查询:alert_id:"alarm-0745ec00-e605-xxxx-b50b-54afe61fc971" AND monitored_object:"823d8bfa-76a7-xxxx-8399-8cda74d4009b"
  • 按告警策略ID及监控对象ID查询支持SQL语句:(alert_id:"alarm-5ce45495-09e8-4d58-xxxx-768134bf330c") AND (monitored_object:"3c514e84-6f1f-46ec-xxxx-05de6163f7fe") AND NOT condition_evaluate_result: "Skip" AND condition_evaluate_result:[* TO *] | SELECT count(*) as top50StatisticsTotalCount, count_if(condition_evaluate_result='ProcessError') as top50StatisticsFailureCount, count_if(notification_send_result!='NotSend') as top50NoticeTotalCount, count_if(notification_send_result='SendPartFail' or notification_send_result='SendFail') as top50NoticeFailureCount, alert_id, alert_name, monitored_object, topic_type, happen_threshold, alert_threshold, notify_template group by alert_id, alert_name, monitored_object,topic_type, happen_threshold, alert_threshold, notify_template order by top50StatisticsTotalCount desc limit 1 注意:
  • 透传该参数时,请勿修改除该参数外的其它参数
  • 仅当检索分析语句(Query)不包含SQL时有效,SQL获取后续结果参考SQL LIMIT语法 注意:
  • 仅当检索分析语句(Query)不包含SQL时有效
  • SQL结果排序方式参考SQL ORDER BY语法 false:代表使用老的检索结果返回方式,输出AnalysisResults和ColNames有效; 两种返回方式在编码格式上有少量区别,建议使用true。

Parameters:

  • From: —

    要查询的执行详情的起始时间,Unix时间戳,单位ms。

  • To: —

    要查询的执行详情的结束时间,Unix时间戳,单位ms。

  • Query: —

    查询过滤条件,例如:

  • Limit: —

    单次查询返回的执行详情条数,最大值为1000

  • Context: —

    透传上次接口返回的Context值,可获取后续更多日志,总计最多可获取1万条原始日志,过期时间1小时。

  • Sort: —

    原始日志是否按时间排序返回;可选值:asc(升序)、desc(降序),默认为 desc

  • UseNewAnalysis: —

    true:代表使用新的检索结果返回方式,输出参数AnalysisRecords和Columns有效;



11375
11376
11377
# File 'lib/v20201016/models.rb', line 11375

def Query
  @Query
end

#Sort ⇒ Object

  • 按告警策略ID查询:alert_id:"alarm-0745ec00-e605-xxxx-b50b-54afe61fc971"
  • 按监控对象ID查询:monitored_object:"823d8bfa-76a7-xxxx-8399-8cda74d4009b"
  • 按告警策略ID及监控对象ID查询:alert_id:"alarm-0745ec00-e605-xxxx-b50b-54afe61fc971" AND monitored_object:"823d8bfa-76a7-xxxx-8399-8cda74d4009b"
  • 按告警策略ID及监控对象ID查询支持SQL语句:(alert_id:"alarm-5ce45495-09e8-4d58-xxxx-768134bf330c") AND (monitored_object:"3c514e84-6f1f-46ec-xxxx-05de6163f7fe") AND NOT condition_evaluate_result: "Skip" AND condition_evaluate_result:[* TO *] | SELECT count(*) as top50StatisticsTotalCount, count_if(condition_evaluate_result='ProcessError') as top50StatisticsFailureCount, count_if(notification_send_result!='NotSend') as top50NoticeTotalCount, count_if(notification_send_result='SendPartFail' or notification_send_result='SendFail') as top50NoticeFailureCount, alert_id, alert_name, monitored_object, topic_type, happen_threshold, alert_threshold, notify_template group by alert_id, alert_name, monitored_object,topic_type, happen_threshold, alert_threshold, notify_template order by top50StatisticsTotalCount desc limit 1 注意:
  • 透传该参数时,请勿修改除该参数外的其它参数
  • 仅当检索分析语句(Query)不包含SQL时有效,SQL获取后续结果参考SQL LIMIT语法 注意:
  • 仅当检索分析语句(Query)不包含SQL时有效
  • SQL结果排序方式参考SQL ORDER BY语法 false:代表使用老的检索结果返回方式,输出AnalysisResults和ColNames有效; 两种返回方式在编码格式上有少量区别,建议使用true。

Parameters:

  • From: —

    要查询的执行详情的起始时间,Unix时间戳,单位ms。

  • To: —

    要查询的执行详情的结束时间,Unix时间戳,单位ms。

  • Query: —

    查询过滤条件,例如:

  • Limit: —

    单次查询返回的执行详情条数,最大值为1000

  • Context: —

    透传上次接口返回的Context值,可获取后续更多日志,总计最多可获取1万条原始日志,过期时间1小时。

  • Sort: —

    原始日志是否按时间排序返回;可选值:asc(升序)、desc(降序),默认为 desc

  • UseNewAnalysis: —

    true:代表使用新的检索结果返回方式,输出参数AnalysisRecords和Columns有效;



11375
11376
11377
# File 'lib/v20201016/models.rb', line 11375

def Sort
  @Sort
end

#To ⇒ Object

  • 按告警策略ID查询:alert_id:"alarm-0745ec00-e605-xxxx-b50b-54afe61fc971"
  • 按监控对象ID查询:monitored_object:"823d8bfa-76a7-xxxx-8399-8cda74d4009b"
  • 按告警策略ID及监控对象ID查询:alert_id:"alarm-0745ec00-e605-xxxx-b50b-54afe61fc971" AND monitored_object:"823d8bfa-76a7-xxxx-8399-8cda74d4009b"
  • 按告警策略ID及监控对象ID查询支持SQL语句:(alert_id:"alarm-5ce45495-09e8-4d58-xxxx-768134bf330c") AND (monitored_object:"3c514e84-6f1f-46ec-xxxx-05de6163f7fe") AND NOT condition_evaluate_result: "Skip" AND condition_evaluate_result:[* TO *] | SELECT count(*) as top50StatisticsTotalCount, count_if(condition_evaluate_result='ProcessError') as top50StatisticsFailureCount, count_if(notification_send_result!='NotSend') as top50NoticeTotalCount, count_if(notification_send_result='SendPartFail' or notification_send_result='SendFail') as top50NoticeFailureCount, alert_id, alert_name, monitored_object, topic_type, happen_threshold, alert_threshold, notify_template group by alert_id, alert_name, monitored_object,topic_type, happen_threshold, alert_threshold, notify_template order by top50StatisticsTotalCount desc limit 1 注意:
  • 透传该参数时,请勿修改除该参数外的其它参数
  • 仅当检索分析语句(Query)不包含SQL时有效,SQL获取后续结果参考SQL LIMIT语法 注意:
  • 仅当检索分析语句(Query)不包含SQL时有效
  • SQL结果排序方式参考SQL ORDER BY语法 false:代表使用老的检索结果返回方式,输出AnalysisResults和ColNames有效; 两种返回方式在编码格式上有少量区别,建议使用true。

Parameters:

  • From: —

    要查询的执行详情的起始时间,Unix时间戳,单位ms。

  • To: —

    要查询的执行详情的结束时间,Unix时间戳,单位ms。

  • Query: —

    查询过滤条件,例如:

  • Limit: —

    单次查询返回的执行详情条数,最大值为1000

  • Context: —

    透传上次接口返回的Context值,可获取后续更多日志,总计最多可获取1万条原始日志,过期时间1小时。

  • Sort: —

    原始日志是否按时间排序返回;可选值:asc(升序)、desc(降序),默认为 desc

  • UseNewAnalysis: —

    true:代表使用新的检索结果返回方式,输出参数AnalysisRecords和Columns有效;



11375
11376
11377
# File 'lib/v20201016/models.rb', line 11375

def To
  @To
end

#UseNewAnalysis ⇒ Object

  • 按告警策略ID查询:alert_id:"alarm-0745ec00-e605-xxxx-b50b-54afe61fc971"
  • 按监控对象ID查询:monitored_object:"823d8bfa-76a7-xxxx-8399-8cda74d4009b"
  • 按告警策略ID及监控对象ID查询:alert_id:"alarm-0745ec00-e605-xxxx-b50b-54afe61fc971" AND monitored_object:"823d8bfa-76a7-xxxx-8399-8cda74d4009b"
  • 按告警策略ID及监控对象ID查询支持SQL语句:(alert_id:"alarm-5ce45495-09e8-4d58-xxxx-768134bf330c") AND (monitored_object:"3c514e84-6f1f-46ec-xxxx-05de6163f7fe") AND NOT condition_evaluate_result: "Skip" AND condition_evaluate_result:[* TO *] | SELECT count(*) as top50StatisticsTotalCount, count_if(condition_evaluate_result='ProcessError') as top50StatisticsFailureCount, count_if(notification_send_result!='NotSend') as top50NoticeTotalCount, count_if(notification_send_result='SendPartFail' or notification_send_result='SendFail') as top50NoticeFailureCount, alert_id, alert_name, monitored_object, topic_type, happen_threshold, alert_threshold, notify_template group by alert_id, alert_name, monitored_object,topic_type, happen_threshold, alert_threshold, notify_template order by top50StatisticsTotalCount desc limit 1 注意:
  • 透传该参数时,请勿修改除该参数外的其它参数
  • 仅当检索分析语句(Query)不包含SQL时有效,SQL获取后续结果参考SQL LIMIT语法 注意:
  • 仅当检索分析语句(Query)不包含SQL时有效
  • SQL结果排序方式参考SQL ORDER BY语法 false:代表使用老的检索结果返回方式,输出AnalysisResults和ColNames有效; 两种返回方式在编码格式上有少量区别,建议使用true。

Parameters:

  • From: —

    要查询的执行详情的起始时间,Unix时间戳,单位ms。

  • To: —

    要查询的执行详情的结束时间,Unix时间戳,单位ms。

  • Query: —

    查询过滤条件,例如:

  • Limit: —

    单次查询返回的执行详情条数,最大值为1000

  • Context: —

    透传上次接口返回的Context值,可获取后续更多日志,总计最多可获取1万条原始日志,过期时间1小时。

  • Sort: —

    原始日志是否按时间排序返回;可选值:asc(升序)、desc(降序),默认为 desc

  • UseNewAnalysis: —

    true:代表使用新的检索结果返回方式,输出参数AnalysisRecords和Columns有效;



11375
11376
11377
# File 'lib/v20201016/models.rb', line 11375

def UseNewAnalysis
  @UseNewAnalysis
end

Instance Method Details

#deserialize(params) ⇒ Object



11387
11388
11389
11390
11391
11392
11393
11394
11395
# File 'lib/v20201016/models.rb', line 11387

def deserialize(params)
  @From = params['From']
  @To = params['To']
  @Query = params['Query']
  @Limit = params['Limit']
  @Context = params['Context']
  @Sort = params['Sort']
  @UseNewAnalysis = params['UseNewAnalysis']
end