models

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2018 License: Apache-2.0 Imports: 0 Imported by: 12 modules, 20 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alarm

type Alarm struct {

	/* 统计方法:平均值=avg、最大值=max、最小值=min (Optional) */
	Calculation string `json:"calculation"`

	/* 通知的联系组,如 [“联系组1”,”联系组2”] (Optional) */
	ContactGroups []string `json:"contactGroups"`

	/* 通知的联系人,如 [“联系人1”,”联系人2”] (Optional) */
	ContactPersons []string `json:"contactPersons"`

	/* 创建时间 (Optional) */
	CreateTime string `json:"createTime"`

	/* 启用禁用 1启用,0禁用 (Optional) */
	Enabled int `json:"enabled"`

	/* 规则id (Optional) */
	Id string `json:"id"`

	/* 监控项 (Optional) */
	Metric string `json:"metric"`

	/* 规则id监控项名称 (Optional) */
	MetricName string `json:"metricName"`

	/* 通知周期 单位:小时 (Optional) */
	NoticePeriod int `json:"noticePeriod"`

	/* 报警的时间  , 查询正在报警规则时该字段有效 (Optional) */
	NoticeTime string `json:"noticeTime"`

	/* >=、>、<、<=、==、!= (Optional) */
	Operation string `json:"operation"`

	/* 统计周期(单位:分钟) (Optional) */
	Period int `json:"period"`

	/* 地域信息 (Optional) */
	Region string `json:"region"`

	/* 此规则所应用的资源id (Optional) */
	ResourceId string `json:"resourceId"`

	/* 报警规则对应的产品 (Optional) */
	ServiceCode string `json:"serviceCode"`

	/* 监控项状态:1正常,2告警,4数据不足 (Optional) */
	Status int `json:"status"`

	/* 监控项附属信息 (Optional) */
	Tag string `json:"tag"`

	/* 阈值 (Optional) */
	Threshold float64 `json:"threshold"`

	/* 连续多少次后报警 (Optional) */
	Times int `json:"times"`

	/* 报警值 , 查询正在报警规则时该字段有效 (Optional) */
	Value float64 `json:"value"`
}

type AlarmHistory

type AlarmHistory struct {

	/* 统计方法:平均值=avg、最大值=max、最小值=min (Optional) */
	Calculation string `json:"calculation"`

	/* 通知的联系组,如 [“联系组1”,”联系组2”] (Optional) */
	ContactGroups []string `json:"contactGroups"`

	/* 通知的联系人,如 [“联系人1”,”联系人2”] (Optional) */
	ContactPersons []string `json:"contactPersons"`

	/* 该规则是否已经被删除,1表示已经被删除,0表示未删除,被删除的规则,在使用查询规则的接口时,将不会被检索到 (Optional) */
	Deleted int `json:"deleted"`

	/* 启用禁用 1启用,0禁用 (Optional) */
	Enabled int `json:"enabled"`

	/* 规则id (Optional) */
	Id string `json:"id"`

	/* 监控项 (Optional) */
	Metric string `json:"metric"`

	/* 规则id监控项名称 (Optional) */
	MetricName string `json:"metricName"`

	/* 通知周期 单位:小时 (Optional) */
	NoticePeriod int `json:"noticePeriod"`

	/* 报警的时间 (Optional) */
	NoticeTime string `json:"noticeTime"`

	/* >=、>、<、<=、==、!= (Optional) */
	Operation string `json:"operation"`

	/* 统计周期(单位:分钟) (Optional) */
	Period int `json:"period"`

	/* 地域信息 (Optional) */
	Region string `json:"region"`

	/* 此规则所应用的资源id (Optional) */
	ResourceId string `json:"resourceId"`

	/* 报警规则对应的产品 (Optional) */
	ServiceCode string `json:"serviceCode"`

	/* 监控项附属信息 (Optional) */
	Tag string `json:"tag"`

	/* 阈值 (Optional) */
	Threshold float64 `json:"threshold"`

	/* 连续多少次后报警 (Optional) */
	Times int `json:"times"`

	/* 报警值 (Optional) */
	Value float64 `json:"value"`
}

type CreateAlarmBody

type CreateAlarmBody struct {

	/* 幂等性校验参数,最长32位,值不变则返回值不会变  */
	ClientToken string `json:"clientToken"`

	/*   */
	CreateAlarmSpec CreateAlarmSpec `json:"createAlarmSpec"`
}

type CreateAlarmSpec

type CreateAlarmSpec struct {

	/* 统计方法,必须与定义的metric一致,可选值列表:avg,max,sum,min  */
	Calculation string `json:"calculation"`

	/* 报警规则通知的联系组,必须在控制台上已创建,例如" ['联系组1','联系组2']" (Optional) */
	ContactGroups []string `json:"contactGroups"`

	/* 报警规则通知的联系人,必须在控制台上已创建,例如 [“联系人1”,”联系人2”] (Optional) */
	ContactPersons []string `json:"contactPersons"`

	/* 取样频次 (Optional) */
	DownSample *string `json:"downSample"`

	/* 取值请查看 <a href="https://www.jdcloud.com/help/detail/2791/isCatalog/1">查询可用创建监控规则的指标列表]</a> 接口 的metric字段  */
	Metric string `json:"metric"`

	/* 通知周期 单位:小时 (Optional) */
	NoticePeriod *int `json:"noticePeriod"`

	/* 报警比较符,只能为以下几种<=,<,>,>=,==,!=  */
	Operation string `json:"operation"`

	/* 查询指标的周期,单位为分钟,目前支持的取值:2,5,15,30,60  */
	Period int `json:"period"`

	/* 报警规则对应实例列表,每次最多100个,例如"['resourceId1','resourceId2']"  */
	ResourceIds []string `json:"resourceIds"`

	/* 产品名称,取值请查看 <a href="https://www.jdcloud.com/help/detail/2791/isCatalog/1">查询可用创建监控规则的指标列表]</a> 接口 的serviceCode字段  */
	ServiceCode string `json:"serviceCode"`

	/* 报警阈值,目前只开放数值类型功能  */
	Threshold float64 `json:"threshold"`

	/* 连续探测几次都满足阈值条件时报警,可选值:1,2,3,5  */
	Times int `json:"times"`
}

type DataPoint

type DataPoint struct {

	/* 时间戳 (Optional) */
	Timestamp int64 `json:"timestamp"`

	/* 值 (Optional) */
	Value string `json:"value"`
}

type ErrorBody

type ErrorBody struct {

	/* 错误码 (Optional) */
	Code int `json:"code"`

	/* 错误信息 (Optional) */
	Message string `json:"message"`

	/* 错误状态 (Optional) */
	Status string `json:"status"`
}

type LastDownsampleRespItem added in v1.0.7

type LastDownsampleRespItem struct {

	/*  (Optional) */
	Metric string `json:"metric"`

	/*  (Optional) */
	Name string `json:"name"`

	/*  (Optional) */
	Value interface{} `json:"value"`
}

type Metric

type Metric struct {

	/* 指标的计算单位,比如bit/s、%、k等 (Optional) */
	CalculateUnit string `json:"calculateUnit"`

	/* 监控项英文标识 (Optional) */
	Metric string `json:"metric"`

	/* 监控项名称 (Optional) */
	MetricName string `json:"metricName"`
}

type MetricData

type MetricData struct {

	/*  (Optional) */
	Data []DataPoint `json:"data"`

	/*  (Optional) */
	Metric Metric `json:"metric"`
}

type MetricDataCm added in v1.0.7

type MetricDataCm struct {

	/* 命名空间 ,长度不超过255字节,只允许英文、数字、下划线_、点., [0-9][a-z] [A-Z] [. _ ],  其它会返回err  */
	Namespace string `json:"namespace"`

	/* 监控指标名称,长度不超过255字节,只允许英文、数字、下划线_、点.,  [0-9][a-z] [A-Z] [. _ ], 其它会返回err  */
	Metric string `json:"metric"`

	/* 数据维度,数据类型为map类型,支持最少一个,最多五个标签,总长度不大于255字节,只允许英文、数字、下划线_、点., [0-9][a-z] [A-Z] [. _ ],  其它会返回err  */
	Dimensions interface{} `json:"dimensions"`

	/* 上报数据点的时间戳,只支持10位,秒级时间戳,不能写入过去30天的时间  */
	Timestamp int64 `json:"timestamp"`

	/* 数据上报类型,1为原始值,2为聚合数据。当上报聚合数据时,建议为60s的周期时行上报、否则无法正常查询  */
	Type int `json:"type"`

	/* 指标值集合,数据类型必须为map类型,key为数据类型,value为数据值,当type=1时,key只能为”value”,上报的是原始值,当type=2时,K的值可以为"avg","sum","last","max","min","count",只支持以上类型,否则会报错,value内容为整型或浮点型数字,最大值为9223372036854775807,count只支持>=0的数  */
	Values interface{} `json:"values"`
}

type MetricDataList added in v1.0.7

type MetricDataList struct {

	/* 错误数据 (Optional) */
	ErrMetricData string `json:"errMetricData"`

	/* 错误数据描述 (Optional) */
	ErrDetail string `json:"errDetail"`
}

type MetricDetail

type MetricDetail struct {

	/* 指标的计算单位,比如bit/s、%、k等 (Optional) */
	CalculateUnit string `json:"calculateUnit"`

	/* 监控项英文标识 (Optional) */
	Metric string `json:"metric"`

	/* 监控项名称 (Optional) */
	MetricName string `json:"metricName"`

	/* 产品线标识 (Optional) */
	ServiceCode string `json:"serviceCode"`

	/* 取样频次 (Optional) */
	DownSample string `json:"downSample"`
}

type ServiceCodeMetrics

type ServiceCodeMetrics struct {

	/*  (Optional) */
	Metrics []MetricDetail `json:"metrics"`

	/*  (Optional) */
	ServiceCode string `json:"serviceCode"`
}

type TagFilter added in v1.0.7

type TagFilter struct {

	/* Tag键  */
	Key string `json:"key"`

	/* Tag值  */
	Values []string `json:"values"`
}

type Tags added in v1.0.2

type Tags struct {

	/* 标签名  */
	Name string `json:"name"`

	/* 标签值  */
	Value string `json:"value"`
}

type UpdateAlarmBody

type UpdateAlarmBody struct {

	/* 统计方法:平均值=avg、最大值=max、最小值=min、总和=sum  */
	Calculation string `json:"calculation"`

	/* 通知的联系组,如 [“联系组1”,”联系组2”] (Optional) */
	ContactGroups []string `json:"contactGroups"`

	/* 通知的联系人,如 [“联系人1”,”联系人2”] (Optional) */
	ContactPersons []string `json:"contactPersons"`

	/* 取样频次 (Optional) */
	DownSample string `json:"downSample"`

	/* 根据产品线查询可用监控项列表 接口 返回的Metric字段  */
	Metric string `json:"metric"`

	/* 通知周期 单位:小时 (Optional) */
	NoticePeriod int `json:"noticePeriod"`

	/* >=、>、<、<=、==、!=  */
	Operation string `json:"operation"`

	/* 统计周期(单位:分钟),可选值:2,5,15,30,60  */
	Period int `json:"period"`

	/* 产品名称  */
	ServiceCode string `json:"serviceCode"`

	/* 阈值  */
	Threshold float64 `json:"threshold"`

	/* 连续多少次后报警,可选值:1,2,3,5  */
	Times int `json:"times"`
}

Jump to

Keyboard shortcuts

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