Documentation
¶
Index ¶
Constants ¶
View Source
const (
COMMIT = "12f7b3b"
)
View Source
const (
VERSION = "0.0.8"
)
Variables ¶
View Source
var ( ConfigCronCnt = nproc.NewSCounterQps("ConfigCronCnt") ConfigLastTs = nproc.NewSCounterBase("ConfigLastTs") ConfigLastCnt = nproc.NewSCounterBase("ConfigLastCnt") CollectorCronCnt = nproc.NewSCounterQps("CollectorCronCnt") CollectorLastTs = nproc.NewSCounterBase("CollectorLastTs") CollectorLastCnt = nproc.NewSCounterBase("CollectorLastCnt") CollectorCnt = nproc.NewSCounterQps("CollectorCnt") JudgeCronCnt = nproc.NewSCounterQps("JudgeCronCnt") JudgeLastTs = nproc.NewSCounterBase("JudgeLastTs") SenderCronCnt = nproc.NewSCounterQps("SenderCronCnt") SenderLastTs = nproc.NewSCounterBase("SenderLastTs") SenderCnt = nproc.NewSCounterQps("SenderCnt") )
counter
View Source
var ( FloodRate = nproc.NewSCounterBase("FloodRate") Threshold = nproc.NewSCounterBase("Threshold") Blocking = nproc.NewSCounterBase("nodata.blocking") )
flood
View Source
var (
ConfigFile string
)
Functions ¶
func GetAllCounters ¶
func GetAllCounters() []interface{}
func ParseConfig ¶
func ParseConfig(cfg string)
Types ¶
type BlockConfig ¶
type BlockConfig struct {
Enabled bool `json:"enabled"`
Threshold int32 `json:"threshold"`
SetBlock bool `json:"setBlock"`
EnableGauss bool `json:"enableGauss"`
Hostname string `json:"hostname"`
FloodCounter string `json:"floodCounter"`
GaussFilter float64 `json:"gaussFilter"`
Gauss3SigmaMin float64 `json:"gauss3SigmaMin"`
Gauss3SigmaMax float64 `json:"gauss3SigmaMax"`
}
type CollectorConfig ¶
type GlobalConfig ¶
type GlobalConfig struct {
Debug bool `json:"debug"`
Http *HttpConfig `json:"http"`
Query *QueryConfig `json:"query"`
Config *NdConfig `json:"config"`
Collector *CollectorConfig `json:"collector"`
Sender *SenderConfig `json:"sender"`
}
func Config ¶
func Config() *GlobalConfig
type HttpConfig ¶
type QueryConfig ¶
type SenderConfig ¶
Click to show internal directories.
Click to hide internal directories.