Documentation ¶
Index ¶
- Variables
- type Aliyun
- func (aliyun *Aliyun) GetClient(regionID string) (client *cms.Client, err error)
- func (aliyun *Aliyun) GetGroupList(params *GetGroupListParams) (groupList []*Group, err error)
- func (aliyun *Aliyun) GetGroupResources(params *GetGroupResourcesParams) (resources []*GroupResource, err error)
- func (aliyun *Aliyun) GetMetricList(params *GetMetricListParams) (response *cms.DescribeMetricListResponse, err error)
- func (aliyun *Aliyun) GetMetricReport(params *GetMetricReportParams) (resp *MetricReportResponse, err error)
- func (aliyun *Aliyun) GetMetricTop(params *GetMetricTopParams) (datapoints []Datapoint, err error)
- func (aliyun *Aliyun) GetMonitorNamespaces() (namespaces []*MonitorNamespace, err error)
- type CommonParams
- type Datapoint
- type Dimension
- type DimensionReport
- type GetGroupListParams
- type GetGroupResourcesParams
- type GetMetricListParams
- type GetMetricReportParams
- type GetMetricTopParams
- type Group
- type GroupResource
- type MetricReport
- type MetricReportResponse
- type MonitorNamespace
- type ReportDimension
- type SLBDimension
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultReportDimensions = map[string][]ReportDimension{
"ECS": {
{"CPU", "cpu_total"},
{"内存", "memory_usedutilization"},
{"连接数", "concurrentConnections"},
},
"RDS": {
{"CPU 使用率", "CpuUsage"},
{"内存使用率", "MemoryUsage"},
{"连接数使用率", "ConnectionUsage"},
},
"KVSTORE": {
{"CPU 使用率", "CpuUsage"},
{"内存使用率", "MemoryUsage"},
{"连接数使用率", "ConnectionUsage"},
},
"SLB": {
{"流入带宽", "TrafficRXNew"},
{"活跃连接数", "ActiveConnection"},
{"并发连接数", "MaxConnection"},
},
"CDN": {
{"宽带峰值", "BPS"},
{"下行流量", "InternetOut"},
{"QPS", "QPS"},
},
}
DefaultReportDimensions type
View Source
var RegionMap = map[string]string{
"cn-hangzhou": "华东 1 (杭州)",
"cn-shanghai": "华东 2 (上海)",
"cn-qingdao": "华北 1 (青岛)",
"cn-beijing": "华北 2 (北京)",
"cn-shenzhen": "华南 1 (深圳)",
"cn-zhangjiakou": "华北 3(张家口)",
"cn-hongkong": "香港",
}
RegionMap of aliyun
Functions ¶
This section is empty.
Types ¶
type Aliyun ¶
Aliyun instance
func (*Aliyun) GetGroupList ¶
func (aliyun *Aliyun) GetGroupList(params *GetGroupListParams) (groupList []*Group, err error)
GetGroupList func
func (*Aliyun) GetGroupResources ¶
func (aliyun *Aliyun) GetGroupResources(params *GetGroupResourcesParams) (resources []*GroupResource, err error)
GetGroupResources by id
func (*Aliyun) GetMetricList ¶
func (aliyun *Aliyun) GetMetricList(params *GetMetricListParams) (response *cms.DescribeMetricListResponse, err error)
GetMetricList data
func (*Aliyun) GetMetricReport ¶
func (aliyun *Aliyun) GetMetricReport(params *GetMetricReportParams) (resp *MetricReportResponse, err error)
GetMetricReport json
func (*Aliyun) GetMetricTop ¶
func (aliyun *Aliyun) GetMetricTop(params *GetMetricTopParams) (datapoints []Datapoint, err error)
GetMetricTop data
func (*Aliyun) GetMonitorNamespaces ¶
func (aliyun *Aliyun) GetMonitorNamespaces() (namespaces []*MonitorNamespace, err error)
GetMonitorNamespaces support
type CommonParams ¶
type CommonParams struct {
RegionID string `json:"RegionId"`
}
CommonParams type
type Datapoint ¶
type Datapoint struct { Timestamp int InstanceID string `json:"instanceId"` Minimum float64 Average float64 Maximum float64 }
Datapoint type
type DimensionReport ¶
type DimensionReport struct { ReportDimension Error string Max float64 Avg float64 }
DimensionReport of instance
type GetGroupListParams ¶
type GetGroupListParams struct { CommonParams Keyword string }
GetGroupListParams type
type GetGroupResourcesParams ¶
type GetGroupResourcesParams struct { CommonParams GroupID int `json:"GroupId"` Category string `` Keyword string `` }
GetGroupResourcesParams type
type GetMetricListParams ¶
type GetMetricListParams struct { CommonParams Dimensions string MetricName string Namespace string Period string StartTime string EndTime string Express string Length string }
GetMetricListParams type
type GetMetricReportParams ¶
type GetMetricReportParams struct { StartTime string `` EndTime string `` GroupID int `json:"GroupId"` // 应用分组的 ID }
GetMetricReportParams type
type GetMetricTopParams ¶
type GetMetricTopParams struct { GetMetricListParams Orderby string // Maximum Average }
GetMetricTopParams type
type GroupResource ¶
type GroupResource struct { Category string `` // 产品名称缩写 ID int `json:"Id"` // 资源ID InstanceID string `json:"InstanceId"` // 实例ID,实例的唯一标识 InstanceName string `` // 实例名称 RegionID string `json:"RegionId"` }
GroupResource type
type MetricReport ¶
type MetricReport struct { *GroupResource Dimensions []*DimensionReport Error string }
MetricReport type
type MetricReportResponse ¶
type MetricReportResponse struct { Errors []string Report map[string][]*MetricReport }
MetricReportResponse type
type MonitorNamespace ¶
MonitorNamespace type
type ReportDimension ¶
ReportDimension type
type SLBDimension ¶
SLBDimension type
Source Files ¶
Click to show internal directories.
Click to hide internal directories.