fluentbit

package
v0.0.0-...-b2113b7 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package fluentbit provides data structures to represent and generate fluentBit configuration.

Package fluentbit provides data structures to represent and generate fluentBit configuration.

Index

Constants

View Source
const (
	MainConfigFileName   = "fluent_bit_main.conf"
	ParserConfigFileName = "fluent_bit_parser.conf"
)
View Source
const (
	ParserNestLuaFunction = `parser_nest`

	// ParserNestLuaScriptContents is an incomplete Lua funtion that is completed when populated
	// with the parse_key (i.e. the key being parsed).
	ParserNestLuaScriptContents = `` /* 352-byte string literal not displayed */

	ParserMergeLuaFunction       = `parser_merge_record`
	ParserMergeLuaScriptContents = `` /* 1371-byte string literal not displayed */

)
View Source
const MetricsPort = 20202

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	// Kind is "INPUT", "FILTER", "PARSER", etc.
	Kind string
	// Config is a set of key-value configuration pairs
	Config map[string]string
	// OrderedConfig is used for configuration pairs where the
	// key can appear in the output fluent bit config multiple times
	// and/or the order of the configuration provided is important
	OrderedConfig [][2]string
}

func LuaFilterComponents

func LuaFilterComponents(tag, function, src string) []Component

LuaFilterComponents returns components that execute the Lua script given in src on records that match tag. TODO(ridwanmsharif): Replace this with in-config script when

fluent/fluent-bit#4634 is supported.

func MetricsInputComponent

func MetricsInputComponent() Component

func MetricsOutputComponent

func MetricsOutputComponent() Component

func ParseMultilineComponent

func ParseMultilineComponent(tag string, uid string, languageRules []string) []Component

ParseMultilineComponent constitutes the mulltiline_parser components.

func ParserComponentBase

func ParserComponentBase(TimeFormat string, TimeKey string, Types map[string]string, tag string, uid string) (Component, string)

The parser component is incomplete and needs (at a minimum) the "Format" key to be set.

func ParserFilterComponents

func ParserFilterComponents(tag string, field string, parserNames []string, preserveKey bool) []Component

func TranslationComponents

func TranslationComponents(tag, src, dest string, removeSrc bool, translations []struct{ SrcVal, DestVal string }) []Component

TranslationComponents translates SrcVal on key src to DestVal on key dest, if the dest key does not exist. If removeSrc is true, the original key is removed when translated.

type ModularConfig

type ModularConfig struct {
	Variables  map[string]string
	Components []Component
}

func (ModularConfig) Generate

func (c ModularConfig) Generate() (map[string]string, error)

type Service

type Service struct {
	// Allowed log levels are: error, warn, info, debug, and trace.
	LogLevel string
}

func (Service) Component

func (s Service) Component() Component

Directories

Path Synopsis
Package modify provides helpers for generating fluentbit configs
Package modify provides helpers for generating fluentbit configs

Jump to

Keyboard shortcuts

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