Documentation ¶
Index ¶
Constants ¶
View Source
const ModuleName = "elastic"
ModuleName is the name used in config file
Variables ¶
View Source
var (
ErrorCreateClientFailed1 = errutil.NewFactory("create elastic client failed: %q")
)
errors
Functions ¶
func InitHandler ¶
InitHandler initialize the output plugin
Types ¶
type OutputConfig ¶
type OutputConfig struct { config.OutputConfig URL string `json:"url"` // elastic API entrypoint Index string `json:"index"` // index name to log DocumentType string `json:"document_type"` // type name to log DocumentID string `json:"document_id"` // id to log, used if you want to control id format Sniff bool `json:"sniff"` // find all nodes of your cluster, https://github.com/olivere/elastic/wiki/Sniffing // BulkActions specifies when to flush based on the number of actions // currently added. Defaults to 1000 and can be set to -1 to be disabled. BulkActions int `json:"bulk_actions,omitempty"` // BulkSize specifies when to flush based on the size (in bytes) of the actions // currently added. Defaults to 5 MB and can be set to -1 to be disabled. BulkSize int `json:"bulk_size,omitempty"` // BulkFlushInterval specifies when to flush at the end of the given interval. // Defaults to 30 seconds. If you want the bulk processor to // operate completely asynchronously, set both BulkActions and BulkSize to // -1 and set the FlushInterval to a meaningful interval. BulkFlushInterval time.Duration `json:"bulk_flush_interval"` // contains filtered or unexported fields }
OutputConfig holds the configuration json fields and internal objects
func DefaultOutputConfig ¶
func DefaultOutputConfig() OutputConfig
DefaultOutputConfig returns an OutputConfig struct with default values
Click to show internal directories.
Click to hide internal directories.