Files
cloudpods/pkg/mcclient/modules/mod_commonalert.go
T
zhaoxiangchun 444ff1901d bugfix: commonalert
1.报警消息中取消返回sql信息
2.commonalert 中支持top bottom 结构influxdb 查询
2020-10-19 23:05:27 +08:00

32 lines
633 B
Go

package modules
import (
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
)
var (
CommonAlertManager *SCommonAlertManager
)
type SCommonAlertManager struct {
*modulebase.ResourceManager
}
func init() {
CommonAlertManager = NewCommonAlertManager()
for _, m := range []modulebase.IBaseManager{
CommonAlertManager,
} {
registerCompute(m)
}
}
func NewCommonAlertManager() *SCommonAlertManager {
man := NewMonitorV2Manager("commonalert", "commonalerts",
[]string{"id", "name", "enabled", "level", "alert_type", "period", "recipients", "channel"},
[]string{})
return &SCommonAlertManager{
ResourceManager: &man,
}
}