parsers

package
v0.0.0-...-676318b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package parsers provides an interface for different log parsing engines.

Each module in here takes care of a specific log type, providing any necessary or relevant smarts for that style of logs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtRegexp

type ExtRegexp struct {
	*regexp.Regexp
}

ExtRegexp is a Regexp with one additional method to make it easier to work with named groups

func (*ExtRegexp) FindStringSubmatchMap

func (r *ExtRegexp) FindStringSubmatchMap(s string) (string, map[string]string)

FindStringSubmatchMap behaves the same as FindStringSubmatch except instead of a list of matches with the names separate, it returns the full match and a map of named submatches

type LineParser

type LineParser interface {
	ParseLine(line string) (map[string]interface{}, error)
}

type Parser

type Parser interface {
	// Init does any initialization necessary for the module
	Init(options interface{}) error
	// ProcessLines consumes log lines from the lines channel and sends log events
	// to the send channel. prefixRegex, if not nil, will be stripped from the
	// line prior to parsing. Any named groups will be added to the event.
	ProcessLines(lines <-chan string, send chan<- event.Event, prefixRegex *ExtRegexp)
}

Directories

Path Synopsis
Package arangodb is a parser for ArangoDB logs
Package arangodb is a parser for ArangoDB logs
Package htjson (honeytail-json, renamed to not conflict with the json module) parses logs that are one json blob per line.
Package htjson (honeytail-json, renamed to not conflict with the json module) parses logs that are one json blob per line.
Package keyval parses logs whose format is many key=val pairs
Package keyval parses logs whose format is many key=val pairs
Package mongodb is a parser for mongodb logs
Package mongodb is a parser for mongodb logs
Package mysql parses the mysql slow query log
Package mysql parses the mysql slow query log
Package mysqlaudit consumes mysql audit logs
Package mysqlaudit consumes mysql audit logs
Package nginx consumes nginx logs
Package nginx consumes nginx logs
Package postgresql contains code for parsing PostgreSQL slow query logs.
Package postgresql contains code for parsing PostgreSQL slow query logs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL