Documentation ¶
Index ¶
- type AddAlarmRuleResourcesRequest
- type AddAlarmRuleResourcesResponse
- type AdditionalInfo
- type AgentDimension
- type AgentDimensionName
- type AgentDimensionNameEnum
- type AlarmCondition
- type AlarmConditionPeriod
- type AlarmConditionPeriodEnum
- type AlarmConditionSuppressDuration
- type AlarmConditionSuppressDurationEnum
- type AlarmDescription
- type AlarmEnabled
- type AlarmHistoryItemV2
- type AlarmHistoryItemV2Level
- type AlarmHistoryItemV2LevelEnum
- type AlarmHistoryItemV2Status
- type AlarmHistoryItemV2StatusEnum
- type AlarmHistoryItemV2Type
- type AlarmHistoryItemV2TypeEnum
- type AlarmId
- type AlarmName
- type AlarmTemplateId
- type AlarmType
- type BatchDeleteAlarmRulesRequest
- type BatchDeleteAlarmRulesResponse
- type BatchDeleteAlarmsRequestBody
- type BatchEnableAlarmRulesRequest
- type BatchEnableAlarmRulesResponse
- type BatchEnableAlarmsRequestBody
- type ComparisonOperator
- type Count
- type CreateAlarmRulesRequest
- type CreateAlarmRulesResponse
- type DataPointInfo
- type DeleteAlarmRuleResourcesRequest
- type DeleteAlarmRuleResourcesResponse
- type Dimension
- type EnterpriseProjectId
- type Filter
- type Level
- type ListAgentDimensionInfoRequest
- type ListAgentDimensionInfoRequestDimName
- type ListAgentDimensionInfoRequestDimNameEnum
- type ListAgentDimensionInfoResponse
- type ListAlarmHistoriesRequest
- type ListAlarmHistoriesResponse
- type ListAlarmResponseAlarms
- type ListAlarmRulePoliciesRequest
- type ListAlarmRulePoliciesResponse
- type ListAlarmRuleResourcesRequest
- type ListAlarmRuleResourcesResponse
- type ListAlarmRulesRequest
- type ListAlarmRulesResponse
- type Metric
- type MetricDimension
- type MetricName
- type Namespace
- type Notification
- type NotificationBeginTime
- type NotificationEnabled
- type NotificationEndTime
- type PoliciesReqV2
- type Policy
- type PostAlarmsReqV2
- type ResourceGroupId
- type ResourcesInListResp
- type ResourcesReqV2
- type SmnUrn
- type Unit
- type UpdateAlarmRulePoliciesRequest
- type UpdateAlarmRulePoliciesResponse
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddAlarmRuleResourcesRequest ¶ added in v0.0.99
type AddAlarmRuleResourcesRequest struct { // 发送的实体的MIME类型。默认使用application/json; charset=UTF-8。 ContentType string `json:"Content-Type"` // Alarm实例ID AlarmId string `json:"alarm_id"` Body *ResourcesReqV2 `json:"body,omitempty"` }
Request Object
func (AddAlarmRuleResourcesRequest) String ¶ added in v0.0.99
func (o AddAlarmRuleResourcesRequest) String() string
type AddAlarmRuleResourcesResponse ¶ added in v0.0.99
type AddAlarmRuleResourcesResponse struct {
HttpStatusCode int `json:"-"`
}
Response Object
func (AddAlarmRuleResourcesResponse) String ¶ added in v0.0.99
func (o AddAlarmRuleResourcesResponse) String() string
type AdditionalInfo ¶
type AdditionalInfo struct { // 该条告警记录对应的资源ID;如:22d98f6c-16d2-4c2d-b424-50e79d82838f。 ResourceId *string `json:"resource_id,omitempty"` // 该条告警记录对应的资源名称;如:ECS-Test01。 ResourceName *string `json:"resource_name,omitempty"` // 该条告警记录对应的事件监控ID,资源所产生的事件;如:ev16031292300990kKN8p17J。 EventId *string `json:"event_id,omitempty"` }
告警记录额外字段,仅针对事件监控告警场景所产生的告警记录信息。
func (AdditionalInfo) String ¶
func (o AdditionalInfo) String() string
type AgentDimension ¶ added in v0.0.99
type AgentDimension struct { // 维度名称,枚举类型,类型有: mount_point:挂载点, disk:磁盘, proc:进程, gpu:显卡, raid: RAID控制器 Name *AgentDimensionName `json:"name,omitempty"` // 维度值,32位字符串,如:2e84018fc8b4484b94e89aae212fe615 Value *string `json:"value,omitempty"` // 实际维度信息,字符串,如:vda。 OriginValue *string `json:"origin_value,omitempty"` }
func (AgentDimension) String ¶ added in v0.0.99
func (o AgentDimension) String() string
type AgentDimensionName ¶ added in v0.0.99
type AgentDimensionName struct {
// contains filtered or unexported fields
}
func (AgentDimensionName) MarshalJSON ¶ added in v0.0.99
func (c AgentDimensionName) MarshalJSON() ([]byte, error)
func (*AgentDimensionName) UnmarshalJSON ¶ added in v0.0.99
func (c *AgentDimensionName) UnmarshalJSON(b []byte) error
func (AgentDimensionName) Value ¶ added in v0.0.99
func (c AgentDimensionName) Value() string
type AgentDimensionNameEnum ¶ added in v0.0.99
type AgentDimensionNameEnum struct { MOUNT_POINT AgentDimensionName DISK AgentDimensionName PROC AgentDimensionName GPU AgentDimensionName RAID AgentDimensionName }
func GetAgentDimensionNameEnum ¶ added in v0.0.99
func GetAgentDimensionNameEnum() AgentDimensionNameEnum
type AlarmCondition ¶
type AlarmCondition struct { // 指标周期,单位是秒; 0是默认值,例如事件类告警该字段就用0即可; 1代表指标的原始周期,比如RDS监控指标原始周期是60s,表示该RDS指标按60s周期为一个数据点参与告警计算;如想了解各个云服务的指标原始周期可以参考[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html), 300代表指标按5分钟聚合周期为一个数据点参与告警计算。 Period AlarmConditionPeriod `json:"period"` // 聚合方式, 支持的值为(average|min|max|sum) Filter string `json:"filter"` // 阈值符号 ComparisonOperator string `json:"comparison_operator"` // 告警阈值,取值范围[0, Number.MAX_VALUE],Number.MAX_VALUE值为1.7976931348623157e+108。具体阈值取值请参见附录中各服务监控指标中取值范围,如支持监控的服务列表中ECS的CPU使用率cpu_util取值范围可配置80。 Value float64 `json:"value"` // 数据的单位,最大长度为32位。 Unit *string `json:"unit,omitempty"` // 次数 Count int32 `json:"count"` // 告警抑制时间,单位为秒,对应页面上创建告警规则时告警策略最后一个字段,该字段主要为解决告警频繁的问题,0代表不抑制,满足条件即告警;300代表满足告警触发条件后每5分钟告警一次; SuppressDuration *AlarmConditionSuppressDuration `json:"suppress_duration,omitempty"` }
告警触发条件
func (AlarmCondition) String ¶
func (o AlarmCondition) String() string
type AlarmConditionPeriod ¶ added in v0.0.99
type AlarmConditionPeriod struct {
// contains filtered or unexported fields
}
func (AlarmConditionPeriod) MarshalJSON ¶ added in v0.0.99
func (c AlarmConditionPeriod) MarshalJSON() ([]byte, error)
func (*AlarmConditionPeriod) UnmarshalJSON ¶ added in v0.0.99
func (c *AlarmConditionPeriod) UnmarshalJSON(b []byte) error
func (AlarmConditionPeriod) Value ¶ added in v0.0.99
func (c AlarmConditionPeriod) Value() int32
type AlarmConditionPeriodEnum ¶ added in v0.0.99
type AlarmConditionPeriodEnum struct { E_0 AlarmConditionPeriod E_1 AlarmConditionPeriod E_300 AlarmConditionPeriod E_1200 AlarmConditionPeriod E_3600 AlarmConditionPeriod E_14400 AlarmConditionPeriod E_86400 AlarmConditionPeriod }
func GetAlarmConditionPeriodEnum ¶ added in v0.0.99
func GetAlarmConditionPeriodEnum() AlarmConditionPeriodEnum
type AlarmConditionSuppressDuration ¶ added in v0.0.99
type AlarmConditionSuppressDuration struct {
// contains filtered or unexported fields
}
func (AlarmConditionSuppressDuration) MarshalJSON ¶ added in v0.0.99
func (c AlarmConditionSuppressDuration) MarshalJSON() ([]byte, error)
func (*AlarmConditionSuppressDuration) UnmarshalJSON ¶ added in v0.0.99
func (c *AlarmConditionSuppressDuration) UnmarshalJSON(b []byte) error
func (AlarmConditionSuppressDuration) Value ¶ added in v0.0.99
func (c AlarmConditionSuppressDuration) Value() int32
type AlarmConditionSuppressDurationEnum ¶ added in v0.0.99
type AlarmConditionSuppressDurationEnum struct { E_0 AlarmConditionSuppressDuration E_300 AlarmConditionSuppressDuration E_600 AlarmConditionSuppressDuration E_900 AlarmConditionSuppressDuration E_1800 AlarmConditionSuppressDuration E_3600 AlarmConditionSuppressDuration E_10800 AlarmConditionSuppressDuration E_21600 AlarmConditionSuppressDuration E_43200 AlarmConditionSuppressDuration }
func GetAlarmConditionSuppressDurationEnum ¶ added in v0.0.99
func GetAlarmConditionSuppressDurationEnum() AlarmConditionSuppressDurationEnum
type AlarmDescription ¶ added in v0.0.99
type AlarmDescription struct { }
告警描述,长度0-256
func (AlarmDescription) String ¶ added in v0.0.99
func (o AlarmDescription) String() string
type AlarmEnabled ¶ added in v0.0.99
type AlarmEnabled struct { }
告警开关
func (AlarmEnabled) String ¶ added in v0.0.99
func (o AlarmEnabled) String() string
type AlarmHistoryItemV2 ¶
type AlarmHistoryItemV2 struct { // 告警记录ID RecordId *string `json:"record_id,omitempty"` // 告警规则的ID,如:al1603131199286dzxpqK3Ez。 AlarmId *string `json:"alarm_id,omitempty"` // 告警规则的名称,如:alarm-test01。 Name *string `json:"name,omitempty"` // 告警记录的状态,取值为ok,alarm,invalid; ok为正常,alarm为告警,invalid为已失效。 Status *AlarmHistoryItemV2Status `json:"status,omitempty"` // 告警记录的告警级别,值为1,2,3,4;1为紧急,2为重要,3为次要,4为提示。 Level *AlarmHistoryItemV2Level `json:"level,omitempty"` // 告警类型; 仅针对事件告警的参数,枚举类型:值为EVENT.SYS或者EVENT.CUSTOM Type *AlarmHistoryItemV2Type `json:"type,omitempty"` // 是否发送通知,值为true或者false。 ActionEnabled *bool `json:"action_enabled,omitempty"` // 产生时间,UTC时间 BeginTime *sdktime.SdkTime `json:"begin_time,omitempty"` // 结束时间,UTC时间 EndTime *sdktime.SdkTime `json:"end_time,omitempty"` Metric *Metric `json:"metric,omitempty"` Condition *AlarmCondition `json:"condition,omitempty"` AdditionalInfo *AdditionalInfo `json:"additional_info,omitempty"` // 告警触发的动作。 结构如下: { \"type\": \"notification\", \"notification_list\": [\"urn:smn:southchina:68438a86d98e427e907e0097b7e35d47:sd\"] } type取值: notification:通知。 autoscaling:弹性伸缩。 notification_list:告警状态发生变化时,被通知对象的列表。 AlarmActions *[]Notification `json:"alarm_actions,omitempty"` // 告警恢复触发的动作。 结构如下: { \"type\": \"notification\", \"notification_list\": [\"urn:smn:southchina:68438a86d98e427e907e0097b7e35d47:sd\"] } type取值: notification:通知。 notification_list:告警状态发生变化时,被通知对象的列表。 OkActions *[]Notification `json:"ok_actions,omitempty"` // 计算出该条告警记录的资源监控数据上报时间和监控数值。 Datapoints *[]DataPointInfo `json:"datapoints,omitempty"` }
告警记录详细信息
func (AlarmHistoryItemV2) String ¶
func (o AlarmHistoryItemV2) String() string
type AlarmHistoryItemV2Level ¶ added in v0.0.99
type AlarmHistoryItemV2Level struct {
// contains filtered or unexported fields
}
func (AlarmHistoryItemV2Level) MarshalJSON ¶ added in v0.0.99
func (c AlarmHistoryItemV2Level) MarshalJSON() ([]byte, error)
func (*AlarmHistoryItemV2Level) UnmarshalJSON ¶ added in v0.0.99
func (c *AlarmHistoryItemV2Level) UnmarshalJSON(b []byte) error
func (AlarmHistoryItemV2Level) Value ¶ added in v0.0.99
func (c AlarmHistoryItemV2Level) Value() int32
type AlarmHistoryItemV2LevelEnum ¶ added in v0.0.99
type AlarmHistoryItemV2LevelEnum struct { E_1 AlarmHistoryItemV2Level E_2 AlarmHistoryItemV2Level E_3 AlarmHistoryItemV2Level E_4 AlarmHistoryItemV2Level }
func GetAlarmHistoryItemV2LevelEnum ¶ added in v0.0.99
func GetAlarmHistoryItemV2LevelEnum() AlarmHistoryItemV2LevelEnum
type AlarmHistoryItemV2Status ¶ added in v0.0.99
type AlarmHistoryItemV2Status struct {
// contains filtered or unexported fields
}
func (AlarmHistoryItemV2Status) MarshalJSON ¶ added in v0.0.99
func (c AlarmHistoryItemV2Status) MarshalJSON() ([]byte, error)
func (*AlarmHistoryItemV2Status) UnmarshalJSON ¶ added in v0.0.99
func (c *AlarmHistoryItemV2Status) UnmarshalJSON(b []byte) error
func (AlarmHistoryItemV2Status) Value ¶ added in v0.0.99
func (c AlarmHistoryItemV2Status) Value() string
type AlarmHistoryItemV2StatusEnum ¶ added in v0.0.99
type AlarmHistoryItemV2StatusEnum struct { OK AlarmHistoryItemV2Status ALARM AlarmHistoryItemV2Status INVALID AlarmHistoryItemV2Status }
func GetAlarmHistoryItemV2StatusEnum ¶ added in v0.0.99
func GetAlarmHistoryItemV2StatusEnum() AlarmHistoryItemV2StatusEnum
type AlarmHistoryItemV2Type ¶ added in v0.0.99
type AlarmHistoryItemV2Type struct {
// contains filtered or unexported fields
}
func (AlarmHistoryItemV2Type) MarshalJSON ¶ added in v0.0.99
func (c AlarmHistoryItemV2Type) MarshalJSON() ([]byte, error)
func (*AlarmHistoryItemV2Type) UnmarshalJSON ¶ added in v0.0.99
func (c *AlarmHistoryItemV2Type) UnmarshalJSON(b []byte) error
func (AlarmHistoryItemV2Type) Value ¶ added in v0.0.99
func (c AlarmHistoryItemV2Type) Value() string
type AlarmHistoryItemV2TypeEnum ¶ added in v0.0.99
type AlarmHistoryItemV2TypeEnum struct { EVENT_SYS AlarmHistoryItemV2Type EVENT_CUSTOM AlarmHistoryItemV2Type }
func GetAlarmHistoryItemV2TypeEnum ¶ added in v0.0.99
func GetAlarmHistoryItemV2TypeEnum() AlarmHistoryItemV2TypeEnum
type AlarmTemplateId ¶ added in v0.0.99
type AlarmTemplateId struct { }
告警规则关联告警模板ID,如果传了,告警规则关联的策略会和告警模板策略联动变化
func (AlarmTemplateId) String ¶ added in v0.0.99
func (o AlarmTemplateId) String() string
type BatchDeleteAlarmRulesRequest ¶ added in v0.0.99
type BatchDeleteAlarmRulesRequest struct { // 发送的实体的MIME类型。默认使用application/json; charset=UTF-8。 ContentType string `json:"Content-Type"` Body *BatchDeleteAlarmsRequestBody `json:"body,omitempty"` }
Request Object
func (BatchDeleteAlarmRulesRequest) String ¶ added in v0.0.99
func (o BatchDeleteAlarmRulesRequest) String() string
type BatchDeleteAlarmRulesResponse ¶ added in v0.0.99
type BatchDeleteAlarmRulesResponse struct { // 成功删除的告警规则ID列表 AlarmIds *[]string `json:"alarm_ids,omitempty"` HttpStatusCode int `json:"-"` }
Response Object
func (BatchDeleteAlarmRulesResponse) String ¶ added in v0.0.99
func (o BatchDeleteAlarmRulesResponse) String() string
type BatchDeleteAlarmsRequestBody ¶ added in v0.0.99
type BatchDeleteAlarmsRequestBody struct { // 需要批量删除的告警规则的ID列表 AlarmIds []string `json:"alarm_ids"` }
func (BatchDeleteAlarmsRequestBody) String ¶ added in v0.0.99
func (o BatchDeleteAlarmsRequestBody) String() string
type BatchEnableAlarmRulesRequest ¶ added in v0.0.99
type BatchEnableAlarmRulesRequest struct { // 发送的实体的MIME类型。默认使用application/json; charset=UTF-8。 ContentType string `json:"Content-Type"` Body *BatchEnableAlarmsRequestBody `json:"body,omitempty"` }
Request Object
func (BatchEnableAlarmRulesRequest) String ¶ added in v0.0.99
func (o BatchEnableAlarmRulesRequest) String() string
type BatchEnableAlarmRulesResponse ¶ added in v0.0.99
type BatchEnableAlarmRulesResponse struct { // 成功启停的告警规则ID列表 AlarmIds *[]string `json:"alarm_ids,omitempty"` HttpStatusCode int `json:"-"` }
Response Object
func (BatchEnableAlarmRulesResponse) String ¶ added in v0.0.99
func (o BatchEnableAlarmRulesResponse) String() string
type BatchEnableAlarmsRequestBody ¶ added in v0.0.99
type BatchEnableAlarmsRequestBody struct { // 需要批量启停的告警规则的ID列表 AlarmIds []string `json:"alarm_ids"` // 告警开关 AlarmEnabled bool `json:"alarm_enabled"` }
func (BatchEnableAlarmsRequestBody) String ¶ added in v0.0.99
func (o BatchEnableAlarmsRequestBody) String() string
type ComparisonOperator ¶ added in v0.0.99
type ComparisonOperator struct { }
阈值符号, 支持的值为(>|<|>=|<=|=|><)
func (ComparisonOperator) String ¶ added in v0.0.99
func (o ComparisonOperator) String() string
type CreateAlarmRulesRequest ¶ added in v0.0.99
type CreateAlarmRulesRequest struct { // 发送的实体的MIME类型。默认使用application/json; charset=UTF-8。 ContentType string `json:"Content-Type"` Body *PostAlarmsReqV2 `json:"body,omitempty"` }
Request Object
func (CreateAlarmRulesRequest) String ¶ added in v0.0.99
func (o CreateAlarmRulesRequest) String() string
type CreateAlarmRulesResponse ¶ added in v0.0.99
type CreateAlarmRulesResponse struct { // 告警规则id,以al开头,包含22个数字或字母 AlarmId *string `json:"alarm_id,omitempty"` HttpStatusCode int `json:"-"` }
Response Object
func (CreateAlarmRulesResponse) String ¶ added in v0.0.99
func (o CreateAlarmRulesResponse) String() string
type DataPointInfo ¶ added in v0.0.99
type DataPointInfo struct { // 计算出该条告警记录的资源监控数据上报的UTC时间 Time *string `json:"time,omitempty"` // 计算出该条告警记录的资源监控数据在该时间点的监控数值,如:7.019。 Value *float64 `json:"value,omitempty"` }
func (DataPointInfo) String ¶ added in v0.0.99
func (o DataPointInfo) String() string
type DeleteAlarmRuleResourcesRequest ¶ added in v0.0.99
type DeleteAlarmRuleResourcesRequest struct { // 发送的实体的MIME类型。默认使用application/json; charset=UTF-8。 ContentType string `json:"Content-Type"` // Alarm实例ID AlarmId string `json:"alarm_id"` Body *ResourcesReqV2 `json:"body,omitempty"` }
Request Object
func (DeleteAlarmRuleResourcesRequest) String ¶ added in v0.0.99
func (o DeleteAlarmRuleResourcesRequest) String() string
type DeleteAlarmRuleResourcesResponse ¶ added in v0.0.99
type DeleteAlarmRuleResourcesResponse struct {
HttpStatusCode int `json:"-"`
}
Response Object
func (DeleteAlarmRuleResourcesResponse) String ¶ added in v0.0.99
func (o DeleteAlarmRuleResourcesResponse) String() string
type Dimension ¶
type Dimension struct { // 资源维度,如:弹性云服务器,则维度为instance_id;目前最大支持4个维度,各服务资源的指标维度名称可查看:“[服务指标维度](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。 Name string `json:"name"` // 资源维度值,为资源的实例ID,如:4270ff17-aba3-4138-89fa-820594c39755。 Value *string `json:"value,omitempty"` }
指标维度
type EnterpriseProjectId ¶ added in v0.0.99
type EnterpriseProjectId struct { }
企业项目ID
func (EnterpriseProjectId) String ¶ added in v0.0.99
func (o EnterpriseProjectId) String() string
type ListAgentDimensionInfoRequest ¶ added in v0.0.99
type ListAgentDimensionInfoRequest struct { // 发送的实体的MIME类型。默认使用application/json; charset=UTF-8。 ContentType string `json:"Content-Type"` // 资源ID,如:4270ff17-aba3-4138-89fa-820594c39755。 InstanceId string `json:"instance_id"` // 维度名称,枚举类型,类型有: mount_point:挂载点, disk:磁盘, proc:进程, gpu:显卡, raid: RAID控制器, DimName ListAgentDimensionInfoRequestDimName `json:"dim_name"` // 维度值,32位字符串,如:2e84018fc8b4484b94e89aae212fe615。 DimValue *string `json:"dim_value,omitempty"` // 分页偏移量 Offset *int32 `json:"offset,omitempty"` // 分页大小 Limit *int32 `json:"limit,omitempty"` }
Request Object
func (ListAgentDimensionInfoRequest) String ¶ added in v0.0.99
func (o ListAgentDimensionInfoRequest) String() string
type ListAgentDimensionInfoRequestDimName ¶ added in v0.0.99
type ListAgentDimensionInfoRequestDimName struct {
// contains filtered or unexported fields
}
func (ListAgentDimensionInfoRequestDimName) MarshalJSON ¶ added in v0.0.99
func (c ListAgentDimensionInfoRequestDimName) MarshalJSON() ([]byte, error)
func (*ListAgentDimensionInfoRequestDimName) UnmarshalJSON ¶ added in v0.0.99
func (c *ListAgentDimensionInfoRequestDimName) UnmarshalJSON(b []byte) error
func (ListAgentDimensionInfoRequestDimName) Value ¶ added in v0.0.99
func (c ListAgentDimensionInfoRequestDimName) Value() string
type ListAgentDimensionInfoRequestDimNameEnum ¶ added in v0.0.99
type ListAgentDimensionInfoRequestDimNameEnum struct { MOUNT_POINT ListAgentDimensionInfoRequestDimName DISK ListAgentDimensionInfoRequestDimName PROC ListAgentDimensionInfoRequestDimName GPU ListAgentDimensionInfoRequestDimName RAID ListAgentDimensionInfoRequestDimName }
func GetListAgentDimensionInfoRequestDimNameEnum ¶ added in v0.0.99
func GetListAgentDimensionInfoRequestDimNameEnum() ListAgentDimensionInfoRequestDimNameEnum
type ListAgentDimensionInfoResponse ¶ added in v0.0.99
type ListAgentDimensionInfoResponse struct { // 维度信息 Dimensions *[]AgentDimension `json:"dimensions,omitempty"` // 维度信息总数 Count *int32 `json:"count,omitempty"` HttpStatusCode int `json:"-"` }
Response Object
func (ListAgentDimensionInfoResponse) String ¶ added in v0.0.99
func (o ListAgentDimensionInfoResponse) String() string
type ListAlarmHistoriesRequest ¶
type ListAlarmHistoriesRequest struct { // 发送的实体的MIME类型。默认使用application/json; charset=UTF-8。 ContentType string `json:"Content-Type"` // 告警ID,以al开头,后跟22位由字母或数字组成的字符串 AlarmId *string `json:"alarm_id,omitempty"` // 告警规则名称 Name *string `json:"name,omitempty"` // 告警规则状态, ok为正常,alarm为告警,invalid为已失效 Status *string `json:"status,omitempty"` // 告警级别, 1为紧急,2为重要,3为次要,4为提示 Level *int32 `json:"level,omitempty"` // 查询服务的命名空间,各服务命名空间请参考[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html) Namespace *string `json:"namespace,omitempty"` // 告警资源ID,多维度情况按字母升序排列并使用逗号分隔 ResourceId *string `json:"resource_id,omitempty"` // 查询告警记录的起始时间,例如:2022-02-10T10:05:46+08:00 From *string `json:"from,omitempty"` // 查询告警记录的截止时间,例如:2022-02-10T10:05:47+08:00 To *string `json:"to,omitempty"` // 分页偏移量 Offset *int32 `json:"offset,omitempty"` // 分页大小 Limit *int32 `json:"limit,omitempty"` }
Request Object
func (ListAlarmHistoriesRequest) String ¶
func (o ListAlarmHistoriesRequest) String() string
type ListAlarmHistoriesResponse ¶
type ListAlarmHistoriesResponse struct { // alarmHistories列表 AlarmHistories *[]AlarmHistoryItemV2 `json:"alarm_histories,omitempty"` // 告警记录列表总数 Count *int32 `json:"count,omitempty"` HttpStatusCode int `json:"-"` }
Response Object
func (ListAlarmHistoriesResponse) String ¶
func (o ListAlarmHistoriesResponse) String() string
type ListAlarmResponseAlarms ¶ added in v0.0.99
type ListAlarmResponseAlarms struct { // 告警规则id,以al开头,包含22个数字或字母 AlarmId *string `json:"alarm_id,omitempty"` // 告警名称, 只能包含0-9/a-z/A-Z/_/-或汉字,长度1-128 Name *string `json:"name,omitempty"` // 告警描述,长度0-256 Description *string `json:"description,omitempty"` // 查询服务的命名空间,各服务命名空间请参考[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html) Namespace *string `json:"namespace,omitempty"` // 告警策略 Policies *[]Policy `json:"policies,omitempty"` // 资源列表,关联资源需要使用查询告警规则资源接口获取 Resources *[]ResourcesInListResp `json:"resources,omitempty"` // 告警规则类型 Type *string `json:"type,omitempty"` // 告警开关 Enabled *bool `json:"enabled,omitempty"` // 是否开启告警通知 NotificationEnabled *bool `json:"notification_enabled,omitempty"` // 告警触发的动作 AlarmNotifications *[]Notification `json:"alarm_notifications,omitempty"` // 告警恢复触发的动作 OkNotifications *[]Notification `json:"ok_notifications,omitempty"` // 告警通知开启时间 NotificationBeginTime *string `json:"notification_begin_time,omitempty"` // 告警通知关闭时间 NotificationEndTime *string `json:"notification_end_time,omitempty"` // 企业项目ID EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"` // 告警规则关联告警模板ID,如果传了,告警规则关联的策略会和告警模板策略联动变化 AlarmTemplateId *string `json:"alarm_template_id,omitempty"` }
func (ListAlarmResponseAlarms) String ¶ added in v0.0.99
func (o ListAlarmResponseAlarms) String() string
type ListAlarmRulePoliciesRequest ¶ added in v0.0.99
type ListAlarmRulePoliciesRequest struct { // 发送的实体的MIME类型。默认使用application/json; charset=UTF-8。 ContentType string `json:"Content-Type"` // 告警规则ID AlarmId string `json:"alarm_id"` // 分页偏移量 Offset *int32 `json:"offset,omitempty"` // 分页大小 Limit *int32 `json:"limit,omitempty"` }
Request Object
func (ListAlarmRulePoliciesRequest) String ¶ added in v0.0.99
func (o ListAlarmRulePoliciesRequest) String() string
type ListAlarmRulePoliciesResponse ¶ added in v0.0.99
type ListAlarmRulePoliciesResponse struct { // 策略信息 Policies *[]Policy `json:"policies,omitempty"` // 指定告警规则对应的策略总数 Count *int32 `json:"count,omitempty"` HttpStatusCode int `json:"-"` }
Response Object
func (ListAlarmRulePoliciesResponse) String ¶ added in v0.0.99
func (o ListAlarmRulePoliciesResponse) String() string
type ListAlarmRuleResourcesRequest ¶ added in v0.0.99
type ListAlarmRuleResourcesRequest struct { // 发送的实体的MIME类型。默认使用application/json; charset=UTF-8。 ContentType string `json:"Content-Type"` // Alarm实例ID AlarmId string `json:"alarm_id"` // 分页偏移量 Offset *int32 `json:"offset,omitempty"` // 分页大小 Limit *int32 `json:"limit,omitempty"` }
Request Object
func (ListAlarmRuleResourcesRequest) String ¶ added in v0.0.99
func (o ListAlarmRuleResourcesRequest) String() string
type ListAlarmRuleResourcesResponse ¶ added in v0.0.99
type ListAlarmRuleResourcesResponse struct { // 资源信息 Resources *[][]Dimension `json:"resources,omitempty"` // 资源总数 Count *int32 `json:"count,omitempty"` HttpStatusCode int `json:"-"` }
Response Object
func (ListAlarmRuleResourcesResponse) String ¶ added in v0.0.99
func (o ListAlarmRuleResourcesResponse) String() string
type ListAlarmRulesRequest ¶ added in v0.0.99
type ListAlarmRulesRequest struct { // 发送的实体的MIME类型。默认使用application/json; charset=UTF-8。 ContentType string `json:"Content-Type"` // 告警规则ID AlarmId *string `json:"alarm_id,omitempty"` // 告警名称, 只能包含0-9/a-z/A-Z/_/-或汉字,长度1-128 Name *string `json:"name,omitempty"` // 查询服务的命名空间,各服务命名空间请参考[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html) Namespace *string `json:"namespace,omitempty"` // 告警资源ID,多维度情况按字母升序排列并使用逗号分隔 ResourceId *string `json:"resource_id,omitempty"` // 企业项目ID EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"` // 分页偏移量 Offset *int32 `json:"offset,omitempty"` // 分页大小 Limit *int32 `json:"limit,omitempty"` }
Request Object
func (ListAlarmRulesRequest) String ¶ added in v0.0.99
func (o ListAlarmRulesRequest) String() string
type ListAlarmRulesResponse ¶ added in v0.0.99
type ListAlarmRulesResponse struct { // 告警规则列表 Alarms *[]ListAlarmResponseAlarms `json:"alarms,omitempty"` // 告警规则总数 Count *int32 `json:"count,omitempty"` HttpStatusCode int `json:"-"` }
Response Object
func (ListAlarmRulesResponse) String ¶ added in v0.0.99
func (o ListAlarmRulesResponse) String() string
type Metric ¶
type Metric struct { // 查询服务的命名空间,各服务命名空间请参考[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html) Namespace *string `json:"namespace,omitempty"` // 资源的监控指标名称,必须以字母开头,只能包含0-9/a-z/A-Z/_,字符长度最短为1,最大为64;如:弹性云服务器中的监控指标cpu_util,表示弹性服务器的CPU使用率;文档数据库中的指标mongo001_command_ps,表示command执行频率;各服务的指标名称可查看:“[服务指标名称](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。 MetricName *string `json:"metric_name,omitempty"` // 指标维度,目前最大可添加4个维度。 Dimensions *[]Dimension `json:"dimensions,omitempty"` }
指标信息
type MetricDimension ¶ added in v0.0.79
type MetricDimension struct { // 指标维度名称 Name string `json:"name"` // 指标维度值 Value *string `json:"value,omitempty"` }
指标维度
func (MetricDimension) String ¶ added in v0.0.79
func (o MetricDimension) String() string
type MetricName ¶ added in v0.0.99
type MetricName struct { }
资源的监控指标名称,必须以字母开头,只能包含0-9/a-z/A-Z/_,字符长度最短为1,最大为64;如:弹性云服务器中的监控指标cpu_util,表示弹性服务器的CPU使用率;文档数据库中的指标mongo001_command_ps,表示command执行频率;各服务的指标名称可查看:“[服务指标名称](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
func (MetricName) String ¶ added in v0.0.99
func (o MetricName) String() string
type Namespace ¶ added in v0.0.79
type Namespace struct { }
查询服务的命名空间,各服务命名空间请参考[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)
type Notification ¶ added in v0.0.99
type Notification struct { // 通知类型, notification代表通过SMN通知 Type string `json:"type"` // 告警状态发生变化时,被通知对象的列表。topicUrn可从SMN获取,具体操作请参考查询Topic列表。当type为notification时,notification_list列表不能为空。 说明:若alarm_action_enabled为true,对应的alarm_actions、ok_actions至少有一个不能为空。若alarm_actions、ok_actions同时存在时,notification_list值保持一致。 NotificationList []string `json:"notification_list"` }
func (Notification) String ¶ added in v0.0.99
func (o Notification) String() string
type NotificationBeginTime ¶ added in v0.0.99
type NotificationBeginTime struct { }
告警通知开启时间
func (NotificationBeginTime) String ¶ added in v0.0.99
func (o NotificationBeginTime) String() string
type NotificationEnabled ¶ added in v0.0.99
type NotificationEnabled struct { }
是否开启告警通知
func (NotificationEnabled) String ¶ added in v0.0.99
func (o NotificationEnabled) String() string
type NotificationEndTime ¶ added in v0.0.99
type NotificationEndTime struct { }
告警通知关闭时间
func (NotificationEndTime) String ¶ added in v0.0.99
func (o NotificationEndTime) String() string
type PoliciesReqV2 ¶ added in v0.0.99
type PoliciesReqV2 struct { // 策略信息 Policies []Policy `json:"policies"` }
func (PoliciesReqV2) String ¶ added in v0.0.99
func (o PoliciesReqV2) String() string
type Policy ¶ added in v0.0.79
type Policy struct { // 资源的监控指标名称,必须以字母开头,只能包含0-9/a-z/A-Z/_,字符长度最短为1,最大为64;如:弹性云服务器中的监控指标cpu_util,表示弹性服务器的CPU使用率;文档数据库中的指标mongo001_command_ps,表示command执行频率;各服务的指标名称可查看:“[服务指标名称](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。 MetricName string `json:"metric_name"` // 指标周期,单位是秒; 0是默认值,例如事件类告警该字段就用0即可; 1代表指标的原始周期,比如RDS监控指标原始周期是60s,表示该RDS指标按60s周期为一个数据点参与告警计算;如想了解各个云服务的指标原始周期可以参考[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html), 300代表指标按5分钟聚合周期为一个数据点参与告警计算。 Period int32 `json:"period"` // 聚合方式, 支持的值为(average|min|max|sum) Filter string `json:"filter"` // 阈值符号, 支持的值为(>|<|>=|<=|=|><) ComparisonOperator string `json:"comparison_operator"` // 阈值 Value float64 `json:"value"` // 单位 Unit *string `json:"unit,omitempty"` // 次数 Count int32 `json:"count"` // 告警抑制时间,单位为秒,对应页面上创建告警规则时告警策略最后一个字段,该字段主要为解决告警频繁的问题,0代表不抑制,满足条件即告警;300代表满足告警触发条件后每5分钟告警一次; SuppressDuration *int32 `json:"suppress_duration,omitempty"` // 告警级别, 1为紧急,2为重要,3为次要,4为提示 Level *int32 `json:"level,omitempty"` }
type PostAlarmsReqV2 ¶ added in v0.0.79
type PostAlarmsReqV2 struct { // 告警名称, 只能包含0-9/a-z/A-Z/_/-或汉字,长度1-128 Name string `json:"name"` // 告警描述,长度0-256 Description *string `json:"description,omitempty"` // 查询服务的命名空间,各服务命名空间请参考[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html) Namespace string `json:"namespace"` // 资源分组ID,监控范围为资源分组时必传 ResourceGroupId *string `json:"resource_group_id,omitempty"` // 资源列表,监控范围为指定资源时必传 Resources [][]Dimension `json:"resources"` // 告警策略 Policies []Policy `json:"policies"` // 告警规则类型 Type string `json:"type"` // 告警触发的动作 AlarmNotifications *[]Notification `json:"alarm_notifications,omitempty"` // 告警恢复触发的动作 OkNotifications *[]Notification `json:"ok_notifications,omitempty"` // 告警通知开启时间 NotificationBeginTime *string `json:"notification_begin_time,omitempty"` // 告警通知关闭时间 NotificationEndTime *string `json:"notification_end_time,omitempty"` // 企业项目ID EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"` // 告警开关 Enabled bool `json:"enabled"` // 是否开启告警通知 NotificationEnabled bool `json:"notification_enabled"` // 告警规则关联告警模板ID,如果传了,告警规则关联的策略会和告警模板策略联动变化 AlarmTemplateId *string `json:"alarm_template_id,omitempty"` }
func (PostAlarmsReqV2) String ¶ added in v0.0.79
func (o PostAlarmsReqV2) String() string
type ResourceGroupId ¶ added in v0.0.99
type ResourceGroupId struct { }
资源分组ID,监控范围为资源分组时必传
func (ResourceGroupId) String ¶ added in v0.0.99
func (o ResourceGroupId) String() string
type ResourcesInListResp ¶ added in v0.0.79
type ResourcesInListResp struct { // 资源分组ID,监控范围为资源分组时存在该值 ResourceGroupId *string `json:"resource_group_id,omitempty"` // 资源分组名称,监控范围为资源分组时存在该值 ResourceGroupName *string `json:"resource_group_name,omitempty"` // 维度信息 Dimensions *[]MetricDimension `json:"dimensions,omitempty"` }
func (ResourcesInListResp) String ¶ added in v0.0.79
func (o ResourcesInListResp) String() string
type ResourcesReqV2 ¶ added in v0.0.79
type ResourcesReqV2 struct { // 资源信息 Resources [][]Dimension `json:"resources"` }
func (ResourcesReqV2) String ¶ added in v0.0.79
func (o ResourcesReqV2) String() string
type UpdateAlarmRulePoliciesRequest ¶ added in v0.0.99
type UpdateAlarmRulePoliciesRequest struct { // 发送的实体的MIME类型。默认使用application/json; charset=UTF-8。 ContentType string `json:"Content-Type"` // Alarm实例ID AlarmId string `json:"alarm_id"` Body *PoliciesReqV2 `json:"body,omitempty"` }
Request Object
func (UpdateAlarmRulePoliciesRequest) String ¶ added in v0.0.99
func (o UpdateAlarmRulePoliciesRequest) String() string
type UpdateAlarmRulePoliciesResponse ¶ added in v0.0.99
type UpdateAlarmRulePoliciesResponse struct { // 策略信息 Policies *[]Policy `json:"policies,omitempty"` HttpStatusCode int `json:"-"` }
Response Object
func (UpdateAlarmRulePoliciesResponse) String ¶ added in v0.0.99
func (o UpdateAlarmRulePoliciesResponse) String() string
Source Files ¶
- model_add_alarm_rule_resources_request.go
- model_add_alarm_rule_resources_response.go
- model_additional_info.go
- model_agent_dimension.go
- model_alarm_condition.go
- model_alarm_description.go
- model_alarm_enabled.go
- model_alarm_history_item_v2.go
- model_alarm_id.go
- model_alarm_name.go
- model_alarm_template_id.go
- model_alarm_type.go
- model_batch_delete_alarm_rules_request.go
- model_batch_delete_alarm_rules_response.go
- model_batch_delete_alarms_request_body.go
- model_batch_enable_alarm_rules_request.go
- model_batch_enable_alarm_rules_response.go
- model_batch_enable_alarms_request_body.go
- model_comparison_operator.go
- model_count.go
- model_create_alarm_rules_request.go
- model_create_alarm_rules_response.go
- model_data_point_info.go
- model_delete_alarm_rule_resources_request.go
- model_delete_alarm_rule_resources_response.go
- model_dimension.go
- model_enterprise_project_id.go
- model_filter.go
- model_level.go
- model_list_agent_dimension_info_request.go
- model_list_agent_dimension_info_response.go
- model_list_alarm_histories_request.go
- model_list_alarm_histories_response.go
- model_list_alarm_response_alarms.go
- model_list_alarm_rule_policies_request.go
- model_list_alarm_rule_policies_response.go
- model_list_alarm_rule_resources_request.go
- model_list_alarm_rule_resources_response.go
- model_list_alarm_rules_request.go
- model_list_alarm_rules_response.go
- model_metric.go
- model_metric_dimension.go
- model_metric_name.go
- model_namespace.go
- model_notification.go
- model_notification_begin_time.go
- model_notification_enabled.go
- model_notification_end_time.go
- model_policies_req_v2.go
- model_policy.go
- model_post_alarms_req_v2.go
- model_resource_group_id.go
- model_resources_in_list_resp.go
- model_resources_req_v2.go
- model_smn_urn.go
- model_unit.go
- model_update_alarm_rule_policies_request.go
- model_update_alarm_rule_policies_response.go
- model_value.go