Documentation ¶
Index ¶
Constants ¶
View Source
const (
VERSION = "0.2.0"
)
Variables ¶
View Source
var (
DetectedItemMap = &DetectedItemSafeMap{M: make(map[string][]*DetectedItem)}
)
Functions ¶
Types ¶
type AlarmConfig ¶
type AlarmConfig struct { Enable bool `json:"enable"` Batch int `json:"batch"` Replicas int `json:"replicas"` ConnTimeout int `json:"connTimeout"` CallTimeout int `json:"callTimeout"` MaxConns int `json:"maxConns"` MaxIdle int `json:"maxIdle"` SleepTime int `json:"sleepTime"` Cluster map[string]string `json:"cluster"` }
type CheckResult ¶
type CheckResult struct { Sid int64 `json:"sid"` Domain string `json:"domain"` Target string `json:"target"` Creator string `json:"creator"` Tag string `json:"tag"` RespCode string `json:"resp_code"` RespTime int `json:"resp_time"` Status int64 `json:"status"` PushTime int64 `json:"push_time"` Ip string `json:"ip"` }
agent上报的数据结构
type DetectedItem ¶
type DetectedItem struct { Sid int64 `json:"sid"` Domain string `json:"domain"` Target string `json:"target"` Ip string `json:"ip"` Keywords string `json:"keywords"` Timeout int `json:"timeout"` Creator string `json:"creator"` Data string `json:"data"` Tag string `json:"tag"` ExpectCode string `json:"expect_code"` Idc string `json:"idc"` }
下发给agent的数据结构
type DetectedItemSafeMap ¶
type DetectedItemSafeMap struct { sync.RWMutex M map[string][]*DetectedItem }
func (*DetectedItemSafeMap) Get ¶
func (this *DetectedItemSafeMap) Get(key string) ([]*DetectedItem, bool)
func (*DetectedItemSafeMap) Set ¶
func (this *DetectedItemSafeMap) Set(detectedItemMap map[string][]*DetectedItem)
type FalconConfig ¶
type GlobalConfig ¶
type GlobalConfig struct { Debug bool `json:"debug"` Admins []string `json:"admins"` Salt string `json:"salt"` Past int `json:"past"` //查看最近几分钟内的报警历史和绘图,默认为30分钟 Http *HttpConfig `json:"http"` Rpc *RpcConfig `json:"rpc"` Ldap *LdapConfig `json:"ldap"` Log *LogConfig `json:"log"` Mysql *MysqlConfig `json:"mysql"` Alarm *AlarmConfig `json:"alarm"` Falcon *FalconConfig `json:"falcon"` InternalDns *InternalDnsConfig `json:"internalDns"` MonitorMap map[string][]string `json:"monitorMap"` }
var (
Config *GlobalConfig
)
type HttpConfig ¶
type InternalDnsConfig ¶
type LdapConfig ¶
type MysqlConfig ¶
Click to show internal directories.
Click to hide internal directories.