Versions in this module Expand all Collapse all v1 v1.5.5 May 18, 2020 Changes in this version + func ParseLine(dataPipeline <-chan ParseInfo, resultChan chan ParseResult, wg *sync.WaitGroup, ...) + func ParseLineDataSlice(dataPipeline <-chan ParseInfo, resultChan chan ParseResult, wg *sync.WaitGroup, ...) + func RegisterConstructor(typ string, c Constructor) + type Constructor func(conf.MapConf) (Parser, error) + type ParseInfo struct + Index int + Line string + type ParseResult struct + Data Data + Datas []Data + Err error + Index int + Line string + type ParseResultSlice []ParseResult + func (slice ParseResultSlice) Len() int + func (slice ParseResultSlice) Less(i, j int) bool + func (slice ParseResultSlice) Swap(i, j int) + type Parser interface + Name func() string + Parse func(lines []string) (datas []Data, err error) + type Registry struct + func NewRegistry() *Registry + func (ps *Registry) NewLogParser(conf conf.MapConf) (p Parser, err error) + func (ps *Registry) RegisterParser(parserType string, constructor func(conf.MapConf) (Parser, error)) error + type ServerParser interface + ServerConfig func() map[string]interface{} v1.4.7 Apr 17, 2018 Changes in this version + const DATE + const DEFAULT_PATTERNS + const DROP + const EMPTY_STRING + const FLOAT + const KEY_CODE + const KEY_DURATION + const KEY_ERROR + const KEY_LOG_TIME + const KEY_METHOD + const KEY_RESP_LEN + const KEY_SRC_IP + const KEY_TOPIC + const KEY_WARN + const KeyAutoRename + const KeyCSVAllowMore + const KeyCSVAllowMoreStartNum + const KeyCSVAllowNoMatch + const KeyCSVIgnoreInvalidField + const KeyCSVLabels + const KeyCSVSchema + const KeyCSVSplitter + const KeyDisableRecordErrData + const KeyGrokCustomPatternFiles + const KeyGrokCustomPatterns + const KeyGrokMode + const KeyGrokPatterns + const KeyLabels + const KeyLogHeaders + const KeyParserName + const KeyParserType + const KeyQiniulogPrefix + const KeyRFCType + const KeyRaw + const KeyTimeZoneOffset + const KeyTimestamp + const LONG + const LogHeadDate + const LogHeadFile + const LogHeadLevel + const LogHeadLog + const LogHeadPrefix + const LogHeadReqid + const LogHeadTime + const MaxGrokMultiLineBuffer + const MaxParserSchemaErrOutput + const ModeMulti + const NginxConfPath + const NginxFormatRegex + const NginxLogFormat + const NginxSchema + const PandoraParseFlushSignal + const SECOND_PER_5MIN + const SECOND_PER_DAY + const STRING + const TypeCSV + const TypeEmpty + const TypeGrok + const TypeInnerMysql + const TypeInnerSQL + const TypeJson + const TypeKafkaRest + const TypeLogv1 + const TypeMysqlLog + const TypeNginx + const TypeRaw + const TypeSyslog + var CompliedPatterns map[string]*regexp.Regexp + var HeaderPattern = map[string]string + var ModeKeyOptions = map[string][]Option + var ModeUsages = []KeyValue + var OptionDisableRecordErrData = Option + var OptionLabels = Option + var OptionParserName = Option + var OptionTimezoneOffset = Option + var SampleLogs = map[string]string + func ConvertWebParserConfig(conf conf.MapConf) conf.MapConf + func DetectType(data []byte) (detected int) + func Time1Day(t int64) string + func Time1DayInt(t int64) int64 + func Time5Min(t int64) string + func Time5MinInt(t int64) int64 + type Automatic struct + func (f *Automatic) GetParser(line []byte) SysLogParser + func (f *Automatic) IsNewLine(data []byte) bool + type CsvParser struct + func (p *CsvParser) Name() string + func (p *CsvParser) Parse(lines []string) ([]Data, error) + func (p *CsvParser) Rename(datas []Data) []Data + func (p *CsvParser) Type() string + type CsvType string + const TypeDate + const TypeFloat + const TypeJsonMap + const TypeLong + const TypeString + type EmptyParser struct + func (p *EmptyParser) Name() string + func (p *EmptyParser) Parse(lines []string) (datas []Data, err error) + type Flushable interface + Flush func() (Data, error) + type Format interface + GetParser func([]byte) SysLogParser + IsNewLine func(data []byte) bool + func GetFormt(format string) Format + type GrokParser struct + CustomPatternFiles []string + CustomPatterns string + Patterns []string + func (gp *GrokParser) Name() string + func (gp *GrokParser) Parse(lines []string) ([]Data, error) + func (gp *GrokParser) Type() string + type JsonParser struct + func (im *JsonParser) Name() string + func (im *JsonParser) Parse(lines []string) ([]Data, error) + func (im *JsonParser) Type() string + type KafaRestlogParser struct + func (krp *KafaRestlogParser) Name() string + func (krp *KafaRestlogParser) Parse(lines []string) ([]Data, error) + func (krp *KafaRestlogParser) ParseCode(fields []string) int + func (krp *KafaRestlogParser) ParseDuration(fields []string) int + func (krp *KafaRestlogParser) ParseIp(fields []string) string + func (krp *KafaRestlogParser) ParseLogTime(fields []string) int64 + func (krp *KafaRestlogParser) ParseMethod(fields []string) string + func (krp *KafaRestlogParser) ParseRespCL(fields []string) int + func (krp *KafaRestlogParser) ParseTopic(fields []string) string + func (krp *KafaRestlogParser) Type() string + type Label struct + Name string + Value string + func GetLabels(labelList []string, nameMap map[string]struct{}) (labels []Label) + type LogParser interface + Name func() string + Parse func(lines []string) (datas []Data, err error) + func NewCsvParser(c conf.MapConf) (LogParser, error) + func NewEmptyParser(c conf.MapConf) (LogParser, error) + func NewGrokParser(c conf.MapConf) (LogParser, error) + func NewJsonParser(c conf.MapConf) (LogParser, error) + func NewKafaRestlogParser(c conf.MapConf) (LogParser, error) + func NewMysqllogParser(c conf.MapConf) (LogParser, error) + func NewNginxParser(c conf.MapConf) (LogParser, error) + func NewQiniulogParser(c conf.MapConf) (LogParser, error) + func NewRawlogParser(c conf.MapConf) (LogParser, error) + func NewSyslogParser(c conf.MapConf) (LogParser, error) + type LogParts map[string]interface + type MysqllogParser struct + func (p *MysqllogParser) Flush() (data Data, err error) + func (p *MysqllogParser) Name() string + func (p *MysqllogParser) Parse(lines []string) ([]Data, error) + func (p *MysqllogParser) Type() string + type NginxParser struct + func NewNginxAccParser(c conf.MapConf) (p *NginxParser, err error) + func (p *NginxParser) Name() string + func (p *NginxParser) Parse(lines []string) ([]Data, error) + func (p *NginxParser) Type() string + type ParserRegistry struct + func NewParserRegistry() *ParserRegistry + func (ps *ParserRegistry) NewLogParser(conf conf.MapConf) (p LogParser, err error) + func (ps *ParserRegistry) RegisterParser(parserType string, constructor func(conf.MapConf) (LogParser, error)) error + type ParserType interface + Type func() string + type QiniulogParser struct + func (p *QiniulogParser) GetParser(head string) (func(string) (string, string, error), error) + func (p *QiniulogParser) Name() string + func (p *QiniulogParser) Parse(lines []string) ([]Data, error) + func (p *QiniulogParser) Type() string + type RFC3164 struct + func (f *RFC3164) GetParser(line []byte) SysLogParser + func (f *RFC3164) IsNewLine(data []byte) bool + type RFC5424 struct + func (f *RFC5424) GetParser(line []byte) SysLogParser + func (f *RFC5424) IsNewLine(data []byte) bool + type RFC6587 struct + func (f *RFC6587) GetParser(line []byte) SysLogParser + func (f *RFC6587) IsNewLine(data []byte) bool + type RawlogParser struct + func (p *RawlogParser) Name() string + func (p *RawlogParser) Parse(lines []string) ([]Data, error) + func (p *RawlogParser) Type() string + type SysLogParser interface + Dump func() LogParts + Location func(*time.Location) + Parse func() error + type SyslogParser struct + func (p *SyslogParser) Flush() (data Data, err error) + func (p *SyslogParser) Name() string + func (p *SyslogParser) Parse(lines []string) ([]Data, error) + func (p *SyslogParser) Type() string