model

package
v0.0.97 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 AlarmCondition

type AlarmCondition struct {

	// 告警条件判断周期,单位为秒,支持的值为1,300,1200,3600,14400,86400。说明:当period设置为1时,表示以原始的指标数据判断告警。当alarm_type为(EVENT.SYS| EVENT.CUSTOM)时允许为0。
	Period int32 `json:"period"`

	// 聚合方式
	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 float32 `json:"value"`

	// 数据的单位,最大长度为32位。
	Unit *string `json:"unit,omitempty"`

	// 次数
	Count int32 `json:"count"`

	// 发送告警的周期,值可为0, 300, 600, 900, 1800, 3600, 10800, 21600, 43200, 86400;0表示只告警一次,300表示每5分钟告警一次,600表示每10分钟告警一次,900表示每15分钟告警一次,1800表示每30分钟告警一次,3600表示每1小时告警一次,10800表示每3小时告警一次,21600表示每6小时告警一次,43200表示每12小时告警一次,86400表示每1天告警一次。
	SuppressDuration *int32 `json:"suppress_duration,omitempty"`
}

告警触发条件

func (AlarmCondition) String

func (o AlarmCondition) 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,insufficient_data; ok为正常,alarm为告警,insufficient_data数据不足。
	Status *string `json:"status,omitempty"`

	// 告警历史的告警级别,值为1,2,3,4;1为紧急,2为重要,3为次要,4为提示。
	Level *int32 `json:"level,omitempty"`

	// 告警类型; 仅针对事件告警的参数,枚举类型:值为EVENT.SYS或者EVENT.CUSTOM
	Type *string `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\", \"notificationList\": [\"urn:smn:southchina:68438a86d98e427e907e0097b7e35d47:sd\"]  }  type取值: notification:通知。 autoscaling:弹性伸缩。 notificationList:告警状态发生变化时,被通知对象的列表。
	AlarmActions *[]SmnAction `json:"alarm_actions,omitempty"`

	// 告警恢复触发的动作。  结构如下:  {  \"type\": \"notification\", \"notificationList\": [\"urn:smn:southchina:68438a86d98e427e907e0097b7e35d47:sd\"]  } type取值:  notification:通知。  notificationList:告警状态发生变化时,被通知对象的列表。
	OkActions *[]SmnAction `json:"ok_actions,omitempty"`

	// 计算出该条告警历史的资源监控数据上报时间和监控数值。
	DataPoints *[]interface{} `json:"data_points,omitempty"`
}

告警历史详细信息

func (AlarmHistoryItemV2) String

func (o AlarmHistoryItemV2) 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"`
}

指标维度

func (Dimension) String

func (o Dimension) String() string

type ListAlarmHistoriesRequest

type ListAlarmHistoriesRequest struct {

	// 发送的实体的MIME类型。推荐用户默认使用application/json,如果API是对象、镜像上传等接口,媒体类型可按照流类型的不同进行确定。
	ContentType string `json:"Content-Type"`

	// 告警ID,以al开头,后跟22位由字母或数字组成的字符串
	AlarmId *string `json:"alarm_id,omitempty"`

	// 告警规则名称
	Name *string `json:"name,omitempty"`

	// 告警规则状态
	Status *string `json:"status,omitempty"`

	// 告警规则等级
	Level *int32 `json:"level,omitempty"`

	// 服务的命名空间
	Namespace *string `json:"namespace,omitempty"`

	// 告警资源ID,多维度情况使用逗号分隔
	ResourceId *string `json:"resource_id,omitempty"`

	// 通过时间筛选traces的起始时间(不包括传入时间) 例如:2022-02-10T10:05:46+08:00
	From *string `json:"from,omitempty"`

	// 通过时间筛选traces的终止时间(不包括传入时间) 例如: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

type Metric

type Metric struct {

	// 服务指标命名空间,格式为service.item;service和item必须是字符串,必须以字母开头,只能包含0-9/a-z/A-Z/_,字符总长度最短为3,最大为32。说明: 当alarm_type为(EVENT.SYS| EVENT.CUSTOM)时允许为空;如:弹性云服务器的命名空间为SYS.ECS,文档数据库的命名空间为SYS.DDS,各服务的命名空间可查看:“[服务命名空间](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)”。 minLength: 1 maxLength: 64
	MetricName *string `json:"metric_name,omitempty"`

	// 指标维度,目前最大可添加4个维度。
	Dimensions *[]Dimension `json:"dimensions,omitempty"`
}

指标信息

func (Metric) String

func (o Metric) String() string

type SmnAction

type SmnAction struct {

	// 通知类型
	Type SmnActionType `json:"type"`

	// 告警状态发生变化时,被通知对象的列表。通知对象ID最多可以配置5个。topicUrn可从SMN获取,具体操作请参考查询Topic列表。当type为notification时,notificationList列表不能为空;当type为autoscaling时,列表必须为[]。 说明:若alarm_action_enabled为true,对应的alarm_actions、insufficientdata_actions(该参数已废弃,建议无需配置)、ok_actions至少有一个不能为空。若alarm_actions、insufficientdata_actions(该参数已废弃,建议无需配置)、ok_actions同时存在时,notificationList值保持一致。
	NotificationList []string `json:"notification_list"`
}

func (SmnAction) String

func (o SmnAction) String() string

type SmnActionType

type SmnActionType struct {
	// contains filtered or unexported fields
}

func (SmnActionType) MarshalJSON

func (c SmnActionType) MarshalJSON() ([]byte, error)

func (*SmnActionType) UnmarshalJSON

func (c *SmnActionType) UnmarshalJSON(b []byte) error

func (SmnActionType) Value added in v0.0.90

func (c SmnActionType) Value() string

type SmnActionTypeEnum

type SmnActionTypeEnum struct {
	NOTIFICATION  SmnActionType
	AUTOSCALING   SmnActionType
	GROUPWATCH    SmnActionType
	ECS_RECOVERY  SmnActionType
	CONTACT       SmnActionType
	CONTACT_GROUP SmnActionType
}

func GetSmnActionTypeEnum

func GetSmnActionTypeEnum() SmnActionTypeEnum

type SmnUrn

type SmnUrn struct {
}

func (SmnUrn) String

func (o SmnUrn) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL