grok

package
v0.0.0-...-3667945 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	INT               = "int"
	TAG               = "tag"
	FLOAT             = "float"
	STRING            = "string"
	DURATION          = "duration"
	DROP              = "drop"
	EPOCH             = "EPOCH"
	EPOCH_NANO        = "EPOCH_NANO"
	GENERIC_TIMESTAMP = "GENERIC_TIMESTAMP"
)
View Source
const DEFAULT_PATTERNS = `` /* 3930-byte string literal not displayed */

DEFAULT_PATTERNS SHOULD BE KEPT IN-SYNC WITH patterns/influx-patterns

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct {
	Patterns []string

	CustomPatterns     string
	CustomPatternFiles []string
	Measurement        string

	// Timezone is an optional component to help render log dates to
	// your chosen zone.
	// Default: "" which renders UTC
	// Options are as follows:
	// 1. Local             -- interpret based on machine localtime
	// 2. "America/Chicago" -- Unix TZ values like those found in https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
	// 3. UTC               -- or blank/unspecified, will return timestamp in UTC
	Timezone string
	// contains filtered or unexported fields
}

Parser is the primary struct to handle and grok-patterns defined in the config toml

func (*Parser) Compile

func (p *Parser) Compile() error

Compile is a bound method to Parser which will process the options for our parser

func (*Parser) ParseLine

func (p *Parser) ParseLine(line string) (telegraf.Metric, error)

ParseLine is the primary function to process individual lines, returning the metrics

Jump to

Keyboard shortcuts

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