elasticsearch

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(flags *pflag.FlagSet)

AddFlags registers persistent flags.

Types

type Config

type Config struct {
	outputs.TLSConfig
	// Enabled determines whether ES output is enabled.
	Enabled bool `mapstructure:"enabled"`
	// Servers contains a comma separated list of Elasticsearch instances that comprise the cluster.
	Servers []string `mapstructure:"servers"`
	// Timeout specifies the connection timeout.
	Timeout time.Duration `mapstructure:"timeout"`
	// FlushPeriod specifies when to flush the bulk at the end of the given interval.
	FlushPeriod time.Duration `mapstructure:"flush-period"`
	// BulkWorkers represents the number of workers that commit docs to Elasticserach.
	BulkWorkers int `mapstructure:"bulk-workers"`
	// Healthcheck enables/disables nodes health checking.
	Healthcheck bool `mapstructure:"healthcheck"`
	// HealthCheckInterval specifies the interval for checking if the Elasticsearch nodes are available.
	HealthCheckInterval time.Duration `mapstructure:"healthcheck-interval"`
	// HealthCheckTimeout sets the timeout for periodic health checks.
	HealthCheckTimeout time.Duration `mapstructure:"healthcheck-timeout"`
	// Username is the user name for the basic HTTP authentication.
	Username string `mapstructure:"username"`
	// Password is the password for the basic HTTP authentication.
	Password string `mapstructure:"password"`
	// Sniff enables the discovery of all Elasticsearch nodes in the cluster. This avoids populating the list of available Elasticsearch nodes.
	Sniff bool `mapstructure:"sniff"`
	// TraceLog determines if the Elasticsearch trace log is enabled. Useful for troubleshooting.
	TraceLog bool `mapstructure:"tracelog"`
	// IndexName represents the target index for kernel events. It allows time specifiers to create indices per time frame.
	IndexName string `mapstructure:"index-name"`
	// TemplateName specifies the name of the index template.
	TemplateName string `mapstructure:"template-name"`
	// TemplateConfig contains the full JSON body of the index template.
	TemplateConfig string `mapstructure:"template-config"`
	// GzipCompression specifies if gzip compression is enabled.
	GzipCompression bool `mapstructure:"gzip-compression"`
}

Config contains the options for tweaking the output behaviour.

Jump to

Keyboard shortcuts

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