Documentation ¶
Index ¶
- Constants
- Variables
- func DeepCopyStringMap(p map[string]string) map[string]string
- func GetCollects()
- func GetPatAndTimeFormat(tf string) (string, string)
- func GetPortCollects() map[int]*models.PortCollect
- func GetProcCollects() map[string]*models.ProcCollect
- func Init()
- func NewPortCollect(port, step int, tags string, modTime time.Time) *models.PortCollect
- func NewProcCollect(method, name, tags string, step int, modTime time.Time) *models.ProcCollect
- type Strategy
Constants ¶
View Source
const PATTERN_EXCLUDE_PARTITION = "```EXCLUDE```"
Variables ¶
View Source
var Collect models.Collect
Functions ¶
func GetCollects ¶
func GetCollects()
func GetPatAndTimeFormat ¶
func GetPortCollects ¶
func GetPortCollects() map[int]*models.PortCollect
func GetProcCollects ¶
func GetProcCollects() map[string]*models.ProcCollect
func NewPortCollect ¶
func NewProcCollect ¶
Types ¶
type Strategy ¶
type Strategy struct { ID int64 `json:"id"` Name string `json:"name"` //监控策略名 FilePath string `json:"file_path"` //文件路径 TimeFormat string `json:"time_format"` //时间格式 Pattern string `json:"pattern"` //表达式 Exclude string `json:"-"` MeasurementType string `json:"measurement_type"` Interval int64 `json:"interval"` //采集周期 Tags map[string]string `json:"tags"` Func string `json:"func"` //采集方式(max/min/avg/cnt) Degree int64 `json:"degree"` Unit string `json:"unit"` Comment string `json:"comment"` Creator string `json:"creator"` SrvUpdated string `json:"updated"` LocalUpdated int64 `json:"-"` TimeReg *regexp.Regexp `json:"-"` PatternReg *regexp.Regexp `json:"-"` ExcludeReg *regexp.Regexp `json:"-"` TagRegs map[string]*regexp.Regexp `json:"-"` ParseSucc bool `json:"parse_succ"` WhetherAttachOneLogLine int `json:"whether_attach_one_log_line"` }
func GetCollectFromFile ¶
func GetLogCollects ¶
func GetLogCollects() []*Strategy
func ToStrategy ¶
func ToStrategy(p *models.LogCollect) *Strategy
Click to show internal directories.
Click to hide internal directories.