public class GetAlarmLogRequest extends AbstractModel
header, skipSign
Constructor and Description |
---|
GetAlarmLogRequest() |
GetAlarmLogRequest(GetAlarmLogRequest source)
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
|
Modifier and Type | Method and Description |
---|---|
String |
getContext()
Get 透传上次接口返回的Context值,可获取后续更多日志,总计最多可获取1万条原始日志,过期时间1小时。
注意:
透传该参数时,请勿修改除该参数外的其它参数
仅当检索分析语句(Query)不包含SQL时有效,SQL获取后续结果参考SQL LIMIT语法
|
Long |
getFrom()
Get 要查询的执行详情的起始时间,Unix时间戳,单位ms。
|
Long |
getLimit()
Get 单次查询返回的执行详情条数,最大值为1000
|
String |
getQuery()
Get 查询过滤条件,例如:
- 按告警策略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`
|
String |
getSort()
Get 原始日志是否按时间排序返回;可选值:asc(升序)、desc(降序),默认为 desc
注意:
仅当检索分析语句(Query)不包含SQL时有效
SQL结果排序方式参考SQL ORDER BY语法
|
Long |
getTo()
Get 要查询的执行详情的结束时间,Unix时间戳,单位ms。
|
Boolean |
getUseNewAnalysis()
Get true:代表使用新的检索结果返回方式,输出参数AnalysisRecords和Columns有效;
false:代表使用老的检索结果返回方式,输出AnalysisResults和ColNames有效;
两种返回方式在编码格式上有少量区别,建议使用true。
|
void |
setContext(String Context)
Set 透传上次接口返回的Context值,可获取后续更多日志,总计最多可获取1万条原始日志,过期时间1小时。
注意:
透传该参数时,请勿修改除该参数外的其它参数
仅当检索分析语句(Query)不包含SQL时有效,SQL获取后续结果参考SQL LIMIT语法
|
void |
setFrom(Long From)
Set 要查询的执行详情的起始时间,Unix时间戳,单位ms。
|
void |
setLimit(Long Limit)
Set 单次查询返回的执行详情条数,最大值为1000
|
void |
setQuery(String Query)
Set 查询过滤条件,例如:
- 按告警策略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`
|
void |
setSort(String Sort)
Set 原始日志是否按时间排序返回;可选值:asc(升序)、desc(降序),默认为 desc
注意:
仅当检索分析语句(Query)不包含SQL时有效
SQL结果排序方式参考SQL ORDER BY语法
|
void |
setTo(Long To)
Set 要查询的执行详情的结束时间,Unix时间戳,单位ms。
|
void |
setUseNewAnalysis(Boolean UseNewAnalysis)
Set true:代表使用新的检索结果返回方式,输出参数AnalysisRecords和Columns有效;
false:代表使用老的检索结果返回方式,输出AnalysisResults和ColNames有效;
两种返回方式在编码格式上有少量区别,建议使用true。
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, isStream, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonString
public GetAlarmLogRequest()
public GetAlarmLogRequest(GetAlarmLogRequest source)
public Long getFrom()
public void setFrom(Long From)
From
- 要查询的执行详情的起始时间,Unix时间戳,单位ms。public Long getTo()
public void setTo(Long To)
To
- 要查询的执行详情的结束时间,Unix时间戳,单位ms。public String getQuery()
public void setQuery(String Query)
Query
- 查询过滤条件,例如:
- 按告警策略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`public Long getLimit()
public void setLimit(Long Limit)
Limit
- 单次查询返回的执行详情条数,最大值为1000public String getContext()
public void setContext(String Context)
Context
- 透传上次接口返回的Context值,可获取后续更多日志,总计最多可获取1万条原始日志,过期时间1小时。
注意:
透传该参数时,请勿修改除该参数外的其它参数
仅当检索分析语句(Query)不包含SQL时有效,SQL获取后续结果参考SQL LIMIT语法public String getSort()
public void setSort(String Sort)
Sort
- 原始日志是否按时间排序返回;可选值:asc(升序)、desc(降序),默认为 desc
注意:
仅当检索分析语句(Query)不包含SQL时有效
SQL结果排序方式参考SQL ORDER BY语法public Boolean getUseNewAnalysis()
public void setUseNewAnalysis(Boolean UseNewAnalysis)
UseNewAnalysis
- true:代表使用新的检索结果返回方式,输出参数AnalysisRecords和Columns有效;
false:代表使用老的检索结果返回方式,输出AnalysisResults和ColNames有效;
两种返回方式在编码格式上有少量区别,建议使用true。Copyright © 2024. All rights reserved.