Files
cloudpods/pkg/apis/monitor/suggestsysalert.go
zhaoxiangchun 89640938f0 新加diskunused的监控
1.suggestsys_const.go 中定义规则和资源列表中涉及到一些常量
2.suggestsysalart.go 1)新增一些列来匹配重用过滤;2)
进行删除相关操作时,通过task处理;
3.driverconfig.go 中包含目前driver中可以共用的函数
4.suggestsysruledrivers.go 调整driver interface 涉及的函数
2020-04-16 16:37:46 +08:00

75 lines
2.0 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package monitor
import (
"time"
"yunion.io/x/onecloud/pkg/apis"
"yunion.io/x/onecloud/pkg/apis/compute"
)
type SuggestSysAlertListInput struct {
apis.VirtualResourceListInput
apis.EnabledResourceBaseListInput
compute.ManagedResourceListInput
//监控规则typeRule Type
Type string `json:"type"`
ResId string `json:"res_id"`
}
type SuggestSysAlertCreateInput struct {
apis.VirtualResourceCreateInput
Enabled *bool `json:"enabled"`
MonitorConfig *SSuggestSysAlertSetting `json:"monitor_config"`
//转换成ResId
ResID string `json:"res_id"`
Type string `json:"type"`
//Problem jsonutils.JSONObject `json:"problem"`
Suggest string `json:"suggest"`
Action string `json:"action"`
RuleAt time.Time `json:"rule_at"`
}
type SuggestSysAlertDetails struct {
apis.VirtualResourceDetails
compute.CloudregionResourceInfo
RuleName string `json:"rule_name"`
ResType string `json:"res_type"`
Suggest string `json:"suggest"`
Brand string `json:"brand"`
Account string `json:"account"`
}
type SuggestSysAlertUpdateInput struct {
apis.VirtualResourceBaseUpdateInput
Enabled *bool `json:"enabled"`
MonitorConfig *SSuggestSysAlertSetting `json:"monitor_config"`
//转换成ResId
ResID string `json:"res_id"`
Type string `json:"type"`
//Problem jsonutils.JSONObject `json:"problem"`
Suggest string `json:"suggest"`
Action string `json:"action"`
RuleAt time.Time `json:"rule_at"`
}