优化忽略规则配置和 Agent 获取 IP

This commit is contained in:
naiba
2021-06-21 21:30:42 +08:00
parent c4f36d17d5
commit 4b0c0ad288
20 changed files with 370 additions and 291 deletions

View File

@@ -15,6 +15,11 @@ const (
TaskTypeCommand
)
const (
MonitorCoverAll = iota
MonitorCoverIgnoreAll
)
type Monitor struct {
Common
Name string
@@ -22,8 +27,8 @@ type Monitor struct {
Target string
SkipServersRaw string
Notify bool
SkipServers map[uint64]bool `gorm:"-" json:"-"`
Cover uint8
SkipServers map[uint64]bool `gorm:"-" json:"-"`
}
func (m *Monitor) PB() *pb.Task {