Documentation ¶
Index ¶
- type AlarmTemplate
- type BindAlarmTemplateRequest
- type BindAlarmTemplateResponse
- type DescribeResourceMetricRequest
- type DescribeResourceMetricResponse
- type GetAlarmTemplateListRequest
- type GetAlarmTemplateListResponse
- type GetMetricRequest
- type GetMetricResponse
- type GetResourceAlarmTemplateRequest
- type GetResourceAlarmTemplateResponse
- type MetricInfo
- type MetricItem
- type ResourceTemplateBound
- type UMonClient
- func (c *UMonClient) BindAlarmTemplate(req *BindAlarmTemplateRequest) (*BindAlarmTemplateResponse, error)
- func (c *UMonClient) DescribeResourceMetric(req *DescribeResourceMetricRequest) (*DescribeResourceMetricResponse, error)
- func (c *UMonClient) GetAlarmTemplateList(req *GetAlarmTemplateListRequest) (*GetAlarmTemplateListResponse, error)
- func (c *UMonClient) GetMetric(req *GetMetricRequest) (*GetMetricResponse, error)
- func (c *UMonClient) GetResourceAlarmTemplate(req *GetResourceAlarmTemplateRequest) (*GetResourceAlarmTemplateResponse, error)
- func (c *UMonClient) NewBindAlarmTemplateRequest() *BindAlarmTemplateRequest
- func (c *UMonClient) NewDescribeResourceMetricRequest() *DescribeResourceMetricRequest
- func (c *UMonClient) NewGetAlarmTemplateListRequest() *GetAlarmTemplateListRequest
- func (c *UMonClient) NewGetMetricRequest() *GetMetricRequest
- func (c *UMonClient) NewGetResourceAlarmTemplateRequest() *GetResourceAlarmTemplateRequest
- func (c *UMonClient) NewUnbindAlarmTemplateRequest() *UnbindAlarmTemplateRequest
- func (c *UMonClient) UnbindAlarmTemplate(req *UnbindAlarmTemplateRequest) (*UnbindAlarmTemplateResponse, error)
- type UnbindAlarmTemplateRequest
- type UnbindAlarmTemplateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlarmTemplate ¶ added in v0.8.0
type AlarmTemplate struct { // 是否为默认模板 IsDefault string // 告警模板id AlarmTemplateId int // 告警模板名称 AlarmTemplateName string // 备注 Remark string // 资源类型 ResourceType string // 绑定的资源数量 BoundResourceCount int }
AlarmTemplate - 单个告警模板信息
this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn for detail.
type BindAlarmTemplateRequest ¶ added in v0.8.0
type BindAlarmTemplateRequest struct { request.CommonBase // 告警模板id,调用GetAlarmTemplateList获取 AlarmTemplateId *string `required:"true"` // 资源类型,同DescribeResourceMetric支持的类型,请参考DescribeResourceMetric中的可选资源类型 ResourceType *string `required:"true"` // 短资源id列表 ResourceId []string `required:"true"` }
BindAlarmTemplateRequest is request schema for BindAlarmTemplate action
type BindAlarmTemplateResponse ¶ added in v0.8.0
type BindAlarmTemplateResponse struct {
response.CommonBase
}
BindAlarmTemplateResponse is response schema for BindAlarmTemplate action
type DescribeResourceMetricRequest ¶
type DescribeResourceMetricRequest struct { request.CommonBase // 资源类型 ResourceType *string `required:"true"` }
DescribeResourceMetricRequest is request schema for DescribeResourceMetric action
type DescribeResourceMetricResponse ¶
type DescribeResourceMetricResponse struct { response.CommonBase // 指标信息集合 DataSet []MetricInfo }
DescribeResourceMetricResponse is response schema for DescribeResourceMetric action
type GetAlarmTemplateListRequest ¶ added in v0.8.0
type GetAlarmTemplateListRequest struct { request.CommonBase // 返回数据长度,默认为20 Limit *int `required:"false"` // 列表起始位置偏移量,默认为0 Offset *int `required:"false"` }
GetAlarmTemplateListRequest is request schema for GetAlarmTemplateList action
type GetAlarmTemplateListResponse ¶ added in v0.8.0
type GetAlarmTemplateListResponse struct { response.CommonBase // 总数量 TotalCount int // 告警模板列表 DataSet []AlarmTemplate }
GetAlarmTemplateListResponse is response schema for GetAlarmTemplateList action
type GetMetricRequest ¶
type GetMetricRequest struct { request.CommonBase // 资源类型 ResourceType *string `required:"true"` // 指标名称(不同ResourceType对应不同的MetricName) MetricName []string `required:"true"` // 资源Id(目前除sharebandwidth可以不传入ResourceId外,其他资源必须传入,sharebandwidth不传入会默认使用获取到的第一个资源Id) ResourceId *string `required:"false"` // 拉取最近多少秒的监控数据,默认1小时,即3600;最大1个月 TimeRange *int `required:"false"` // 起始时间unixtimestamp,若传入TimeRange,此项忽略 BeginTime *int `required:"false"` // 结束时间unixtimestamp,若传入TimeRange,此项忽略;若只传入BeginTime,此项默认为当前时间 EndTime *int `required:"false"` }
GetMetricRequest is request schema for GetMetric action
type GetMetricResponse ¶
type GetMetricResponse struct { response.CommonBase DataSets map[string][]MetricItem }
GetMetricResponse is response schema for GetMetric action
type GetResourceAlarmTemplateRequest ¶ added in v0.8.0
type GetResourceAlarmTemplateRequest struct { request.CommonBase // 资源类型(与DescribeResourceMetric中一致) ResourceType *string `required:"true"` // 资源id列表 ResourceId []string `required:"true"` }
GetResourceAlarmTemplateRequest is request schema for GetResourceAlarmTemplate action
type GetResourceAlarmTemplateResponse ¶ added in v0.8.0
type GetResourceAlarmTemplateResponse struct { response.CommonBase // 请见ResourceTemplateBound DataSet []ResourceTemplateBound }
GetResourceAlarmTemplateResponse is response schema for GetResourceAlarmTemplate action
type MetricInfo ¶
type MetricInfo struct { // 指标名称 MetricName string // 单位 Unit string // 仅限内部使用 ConversionFactor int // 数据类型 Type string // 指标组名称,相同指标组前端可合并一张图显示 MetricGroup string // 是否支持告警 SupportAlarm string // 告警设置范围 AlarmRange interface{} // Backend Bug: backend use dynamic type, object or string // 仅限内部使用 Frequency int // 比较参数,可选GE,LE CompareOption []string }
MetricInfo - GetMetricInfo-监控项信息
this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn for detail.
type MetricItem ¶
type MetricItem struct { Value interface{} Timestamp int }
MetricItem - GetMetricInfo-监控项信息
this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn for detail.
type ResourceTemplateBound ¶ added in v0.8.0
type ResourceTemplateBound struct { // 是否绑定了告警模板,Yes:是;No:否。若为No,不展示AlarmTemplateId、AlarmTemplateName、Remark HasAlarmTemlate string // 资源id ResourceId string // 告警模板id AlarmTemplateId int // 告警模板名称 AlarmTemplateName string // 是否默认模板,Yes:是;No:否 IsDefault string // 模板备注 Remark string }
ResourceTemplateBound - 资源告警模板绑定关系
this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn for detail.
type UMonClient ¶
UMonClient is the client of UMon
func NewClient ¶
func NewClient(config *ucloud.Config, credential *auth.Credential) *UMonClient
NewClient will return a instance of UMonClient
func (*UMonClient) BindAlarmTemplate ¶ added in v0.8.0
func (c *UMonClient) BindAlarmTemplate(req *BindAlarmTemplateRequest) (*BindAlarmTemplateResponse, error)
BindAlarmTemplate - 绑定告警模板
func (*UMonClient) DescribeResourceMetric ¶
func (c *UMonClient) DescribeResourceMetric(req *DescribeResourceMetricRequest) (*DescribeResourceMetricResponse, error)
DescribeResourceMetric - 获取资源支持监控指标信息
func (*UMonClient) GetAlarmTemplateList ¶ added in v0.8.0
func (c *UMonClient) GetAlarmTemplateList(req *GetAlarmTemplateListRequest) (*GetAlarmTemplateListResponse, error)
GetAlarmTemplateList - 获取告警模板列表
func (*UMonClient) GetMetric ¶
func (c *UMonClient) GetMetric(req *GetMetricRequest) (*GetMetricResponse, error)
GetMetric - 获取监控数据
func (*UMonClient) GetResourceAlarmTemplate ¶ added in v0.8.0
func (c *UMonClient) GetResourceAlarmTemplate(req *GetResourceAlarmTemplateRequest) (*GetResourceAlarmTemplateResponse, error)
GetResourceAlarmTemplate - 获取资源绑定的告警模板
func (*UMonClient) NewBindAlarmTemplateRequest ¶ added in v0.8.0
func (c *UMonClient) NewBindAlarmTemplateRequest() *BindAlarmTemplateRequest
NewBindAlarmTemplateRequest will create request of BindAlarmTemplate action.
func (*UMonClient) NewDescribeResourceMetricRequest ¶
func (c *UMonClient) NewDescribeResourceMetricRequest() *DescribeResourceMetricRequest
NewDescribeResourceMetricRequest will create request of DescribeResourceMetric action.
func (*UMonClient) NewGetAlarmTemplateListRequest ¶ added in v0.8.0
func (c *UMonClient) NewGetAlarmTemplateListRequest() *GetAlarmTemplateListRequest
NewGetAlarmTemplateListRequest will create request of GetAlarmTemplateList action.
func (*UMonClient) NewGetMetricRequest ¶
func (c *UMonClient) NewGetMetricRequest() *GetMetricRequest
NewGetMetricRequest will create request of GetMetric action.
func (*UMonClient) NewGetResourceAlarmTemplateRequest ¶ added in v0.8.0
func (c *UMonClient) NewGetResourceAlarmTemplateRequest() *GetResourceAlarmTemplateRequest
NewGetResourceAlarmTemplateRequest will create request of GetResourceAlarmTemplate action.
func (*UMonClient) NewUnbindAlarmTemplateRequest ¶ added in v0.8.0
func (c *UMonClient) NewUnbindAlarmTemplateRequest() *UnbindAlarmTemplateRequest
NewUnbindAlarmTemplateRequest will create request of UnbindAlarmTemplate action.
func (*UMonClient) UnbindAlarmTemplate ¶ added in v0.8.0
func (c *UMonClient) UnbindAlarmTemplate(req *UnbindAlarmTemplateRequest) (*UnbindAlarmTemplateResponse, error)
UnbindAlarmTemplate - 解绑告警模板
type UnbindAlarmTemplateRequest ¶ added in v0.8.0
type UnbindAlarmTemplateRequest struct { request.CommonBase // 资源类型,同DescribeResourceMetric支持的类型,请参考DescribeResourceMetric中的可选资源类型 ResourceType *string `required:"true"` // 资源id ResourceId []string `required:"true"` }
UnbindAlarmTemplateRequest is request schema for UnbindAlarmTemplate action
type UnbindAlarmTemplateResponse ¶ added in v0.8.0
type UnbindAlarmTemplateResponse struct {
response.CommonBase
}
UnbindAlarmTemplateResponse is response schema for UnbindAlarmTemplate action