Documentation
¶
Index ¶
Constants ¶
View Source
const APIVersion = "2018-07-24"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClient ¶
func NewClient(credential *common.Credential, region string, clientProfile *profile.ClientProfile) (client *Client, err error)
func NewClientWithSecretId ¶
Deprecated
func (*Client) DescribeBaseMetrics ¶
func (c *Client) DescribeBaseMetrics(request *DescribeBaseMetricsRequest) (response *DescribeBaseMetricsResponse, err error)
获取基础指标详情
func (*Client) GetMonitorData ¶
func (c *Client) GetMonitorData(request *GetMonitorDataRequest) (response *GetMonitorDataResponse, err error)
获取云产品的监控数据。传入产品的命名空间、对象维度描述和监控指标即可获得相应的监控数据。 接口调用频率限制为:20次/秒,1200次/分钟。 若您需要调用的指标、对象较多,可能存在因限频出现拉取失败的情况,建议尽量将请求按时间维度均摊。
type DataPoint ¶
type DataPoint struct {
// 实例对象维度组合
Dimensions []*Dimension `json:"Dimensions,omitempty" name:"Dimensions" list`
// 时间戳数组,表示那些时间点有数据,缺失的时间戳,没有数据点,可以理解为掉点了
Timestamps []*float64 `json:"Timestamps,omitempty" name:"Timestamps" list`
// 监控值数组,该数组和Timestamps一一对应
Values []*float64 `json:"Values,omitempty" name:"Values" list`
}
type DescribeBaseMetricsRequest ¶
type DescribeBaseMetricsRequest struct {
*tchttp.BaseRequest
// 业务命名空间
Namespace *string `json:"Namespace,omitempty" name:"Namespace"`
// 指标名
MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
}
func NewDescribeBaseMetricsRequest ¶
func NewDescribeBaseMetricsRequest() (request *DescribeBaseMetricsRequest)
func (*DescribeBaseMetricsRequest) FromJsonString ¶
func (r *DescribeBaseMetricsRequest) FromJsonString(s string) error
func (*DescribeBaseMetricsRequest) ToJsonString ¶
func (r *DescribeBaseMetricsRequest) ToJsonString() string
type DescribeBaseMetricsResponse ¶
type DescribeBaseMetricsResponse struct {
*tchttp.BaseResponse
Response *struct {
// 查询得到的指标描述列表
MetricSet []*MetricSet `json:"MetricSet,omitempty" name:"MetricSet" list`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func NewDescribeBaseMetricsResponse ¶
func NewDescribeBaseMetricsResponse() (response *DescribeBaseMetricsResponse)
func (*DescribeBaseMetricsResponse) FromJsonString ¶
func (r *DescribeBaseMetricsResponse) FromJsonString(s string) error
func (*DescribeBaseMetricsResponse) ToJsonString ¶
func (r *DescribeBaseMetricsResponse) ToJsonString() string
type DimensionsDesc ¶
type DimensionsDesc struct {
// 维度名数组
Dimensions []*string `json:"Dimensions,omitempty" name:"Dimensions" list`
}
type GetMonitorDataRequest ¶
type GetMonitorDataRequest struct {
*tchttp.BaseRequest
// 命名空间,每个云产品会有一个命名空间
Namespace *string `json:"Namespace,omitempty" name:"Namespace"`
// 指标名称,各个云产品的详细指标说明请参阅各个产品[监控接口](https://cloud.tencent.com/document/product/248/30384)文档
MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
// 实例对象的维度组合
Instances []*Instance `json:"Instances,omitempty" name:"Instances" list`
// 监控统计周期。默认为取值为300,单位为s
Period *uint64 `json:"Period,omitempty" name:"Period"`
// 起始时间,如2018-09-22T19:51:23+08:00
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
// 结束时间,默认为当前时间。 EndTime不能小于EtartTime
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
}
func NewGetMonitorDataRequest ¶
func NewGetMonitorDataRequest() (request *GetMonitorDataRequest)
func (*GetMonitorDataRequest) FromJsonString ¶
func (r *GetMonitorDataRequest) FromJsonString(s string) error
func (*GetMonitorDataRequest) ToJsonString ¶
func (r *GetMonitorDataRequest) ToJsonString() string
type GetMonitorDataResponse ¶
type GetMonitorDataResponse struct {
*tchttp.BaseResponse
Response *struct {
// 统计周期
Period *uint64 `json:"Period,omitempty" name:"Period"`
// 指标名
MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
// 数据点数组
DataPoints []*DataPoint `json:"DataPoints,omitempty" name:"DataPoints" list`
// 开始时间
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
// 结束时间
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func NewGetMonitorDataResponse ¶
func NewGetMonitorDataResponse() (response *GetMonitorDataResponse)
func (*GetMonitorDataResponse) FromJsonString ¶
func (r *GetMonitorDataResponse) FromJsonString(s string) error
func (*GetMonitorDataResponse) ToJsonString ¶
func (r *GetMonitorDataResponse) ToJsonString() string
type Instance ¶
type Instance struct {
// 实例的维度组合
Dimensions []*Dimension `json:"Dimensions,omitempty" name:"Dimensions" list`
}
type MetricObjectMeaning ¶
type MetricSet ¶
type MetricSet struct {
// 命名空间,每个云产品会有一个命名空间
Namespace *string `json:"Namespace,omitempty" name:"Namespace"`
// 指标名称
MetricName *string `json:"MetricName,omitempty" name:"MetricName"`
// 指标使用的单位
Unit *string `json:"Unit,omitempty" name:"Unit"`
// 指标使用的单位
UnitCname *string `json:"UnitCname,omitempty" name:"UnitCname"`
// 指标支持的统计周期,单位是秒,如60、300
Period []*int64 `json:"Period,omitempty" name:"Period" list`
// 统计周期内指标方式
Periods []*PeriodsSt `json:"Periods,omitempty" name:"Periods" list`
// 统计指标含义解释
Meaning *MetricObjectMeaning `json:"Meaning,omitempty" name:"Meaning"`
// 维度描述信息
Dimensions []*DimensionsDesc `json:"Dimensions,omitempty" name:"Dimensions" list`
}
Click to show internal directories.
Click to hide internal directories.