replay

package
v0.0.0-...-39262cb Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: Apache-2.0 Imports: 8 Imported by: 1

README

File Input Plugin

The file plugin updates a list of files every interval and parses the contents using the selected input data format.

Files will always be read in their entirety, if you wish to tail/follow a file use the tail input plugin instead.

Configuration:
[[inputs.file]]
  ## Files to parse each interval.
  ## These accept standard unix glob matching rules, but with the addition of
  ## ** as a "super asterisk". ie:
  ##   /var/log/**.log     -> recursively find all .log files in /var/log
  ##   /var/log/*/*.log    -> find all .log files with a parent dir in /var/log
  ##   /var/log/apache.log -> only read the apache log file
  files = ["/var/log/apache/access.log"]

  ## Data format to consume.
  ## Each data format has its own unique set of configuration options, read
  ## more about them here:
  ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
  data_format = "influx"

  ## Name a tag containing the name of the file the data was parsed from.  Leave empty
  ## to disable.
  # file_tag = ""

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Replay

type Replay struct {
	Files      []string `toml:"files"`
	FileTag    string   `toml:"file_tag"`
	Iterations int      `toml:"iterations"`
	// contains filtered or unexported fields
}

func (*Replay) Description

func (r *Replay) Description() string

func (*Replay) Gather

func (r *Replay) Gather(_ telegraf.Accumulator) error

func (*Replay) Init

func (r *Replay) Init() error

func (*Replay) SampleConfig

func (r *Replay) SampleConfig() string

SampleConfig returns the default configuration of the Input

func (*Replay) SetParser

func (r *Replay) SetParser(p parsers.Parser)

func (*Replay) Start

func (r *Replay) Start(acc telegraf.Accumulator) error

func (*Replay) Stop

func (r *Replay) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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