beats: github.com/elastic/beats/filebeat/fileset Index | Files

package fileset

import "github.com/elastic/beats/filebeat/fileset"

Index

Package Files

config.go factory.go fileset.go flags.go modules.go pipelines.go setup.go

type Factory Uses

type Factory struct {
    // contains filtered or unexported fields
}

Factory for modules

func NewFactory Uses

func NewFactory(outlet channel.Factory, registrar *registrar.Registrar, beatVersion string,
    pipelineLoaderFactory PipelineLoaderFactory, overwritePipelines bool, beatDone chan struct{}) *Factory

NewFactory instantiates a new Factory

func (*Factory) Create Uses

func (f *Factory) Create(p beat.Pipeline, c *common.Config, meta *common.MapStrPointer) (cfgfile.Runner, error)

Create creates a module based on a config

type Fileset Uses

type Fileset struct {
    // contains filtered or unexported fields
}

Fileset struct is the representation of a fileset.

func New Uses

func New(
    modulesPath string,
    name string,
    mcfg *ModuleConfig,
    fcfg *FilesetConfig) (*Fileset, error)

New allocates a new Fileset object with the given configuration.

func (*Fileset) GetMLConfigs Uses

func (fs *Fileset) GetMLConfigs() []mlimporter.MLConfig

GetMLConfigs returns the list of machine-learning configurations declared by this fileset.

func (*Fileset) GetPipelines Uses

func (fs *Fileset) GetPipelines(esVersion common.Version) (pipelines []pipeline, err error)

GetPipelines returns the JSON content of the Ingest Node pipeline that parses the logs.

func (*Fileset) GetRequiredProcessors Uses

func (fs *Fileset) GetRequiredProcessors() []ProcessorRequirement

GetRequiredProcessors returns the list of processors on which this fileset depends.

func (*Fileset) Read Uses

func (fs *Fileset) Read(beatVersion string) error

Read reads the manifest file and evaluates the variables.

func (*Fileset) String Uses

func (fs *Fileset) String() string

String returns the module and the name of the fileset.

type FilesetConfig Uses

type FilesetConfig struct {
    Enabled *bool                  `config:"enabled"`
    Var     map[string]interface{} `config:"var"`
    Input   map[string]interface{} `config:"input"`
}

FilesetConfig contains the configuration file options for a fileset

func NewFilesetConfig Uses

func NewFilesetConfig(cfg *common.Config) (*FilesetConfig, error)

NewFilesetConfig creates a new FilesetConfig from a common.Config.

type ModuleConfig Uses

type ModuleConfig struct {
    Module  string `config:"module"     validate:"required"`
    Enabled *bool  `config:"enabled"`

    // Filesets is inlined by code, see mcfgFromConfig
    Filesets map[string]*FilesetConfig
}

ModuleConfig contains the configuration file options for a module

type ModuleOverrides Uses

type ModuleOverrides map[string]map[string]*common.Config // module -> fileset -> Config

func (*ModuleOverrides) Get Uses

func (mo *ModuleOverrides) Get(module, fileset string) []*common.Config

Get returns an array of configuration overrides that should be merged in order.

type ModuleRegistry Uses

type ModuleRegistry struct {
    // contains filtered or unexported fields
}

func NewModuleRegistry Uses

func NewModuleRegistry(moduleConfigs []*common.Config, beatVersion string, init bool) (*ModuleRegistry, error)

NewModuleRegistry reads and loads the configured module into the registry.

func (*ModuleRegistry) Empty Uses

func (reg *ModuleRegistry) Empty() bool

func (*ModuleRegistry) GetInputConfigs Uses

func (reg *ModuleRegistry) GetInputConfigs() ([]*common.Config, error)

func (*ModuleRegistry) InfoString Uses

func (reg *ModuleRegistry) InfoString() string

InfoString returns the enabled modules and filesets in a single string, ready to be shown to the user

func (*ModuleRegistry) LoadML Uses

func (reg *ModuleRegistry) LoadML(esClient PipelineLoader) error

LoadML loads the machine-learning configurations into Elasticsearch, if X-Pack is available

func (*ModuleRegistry) LoadPipelines Uses

func (reg *ModuleRegistry) LoadPipelines(esClient PipelineLoader, overwrite bool) error

LoadPipelines loads the pipelines for each configured fileset.

func (*ModuleRegistry) ModuleFilesets Uses

func (reg *ModuleRegistry) ModuleFilesets(module string) ([]string, error)

ModuleFilesets return the list of available filesets for the given module it returns an empty list if the module doesn't exist

func (*ModuleRegistry) ModuleNames Uses

func (reg *ModuleRegistry) ModuleNames() []string

ModuleNames returns the names of modules in the ModuleRegistry.

func (*ModuleRegistry) SetupML Uses

func (reg *ModuleRegistry) SetupML(esClient PipelineLoader, kibanaClient *kibana.Client) error

SetupML sets up the machine-learning configurations into Elasticsearch using Kibana, if X-Pack is available

type MultiplePipelineUnsupportedError Uses

type MultiplePipelineUnsupportedError struct {
    // contains filtered or unexported fields
}

MultiplePipelineUnsupportedError is an error returned when a fileset uses multiple pipelines but is running against a version of Elasticsearch that doesn't support this feature.

func (MultiplePipelineUnsupportedError) Error Uses

func (m MultiplePipelineUnsupportedError) Error() string

type PipelineLoader Uses

type PipelineLoader interface {
    LoadJSON(path string, json map[string]interface{}) ([]byte, error)
    Request(method, path string, pipeline string, params map[string]string, body interface{}) (int, []byte, error)
    GetVersion() common.Version
}

PipelineLoader is a subset of the Elasticsearch client API capable of loading the pipelines.

type PipelineLoaderFactory Uses

type PipelineLoaderFactory func() (PipelineLoader, error)

PipelineLoaderFactory builds and returns a PipelineLoader

type ProcessorRequirement Uses

type ProcessorRequirement struct {
    Name   string `config:"name"`
    Plugin string `config:"plugin"`
}

ProcessorRequirement represents the declaration of a dependency to a particular Ingest Node processor / plugin.

type SetupCfgRunner Uses

type SetupCfgRunner struct {
    // contains filtered or unexported fields
}

SetupCfgRunner is for loading assets of modules.

func (*SetupCfgRunner) Start Uses

func (sr *SetupCfgRunner) Start()

Start loads module pipelines for configured modules.

func (*SetupCfgRunner) Stop Uses

func (sr *SetupCfgRunner) Stop()

Stopp of SetupCfgRunner.

func (*SetupCfgRunner) String Uses

func (sr *SetupCfgRunner) String() string

String returns information on the Runner

type SetupFactory Uses

type SetupFactory struct {
    // contains filtered or unexported fields
}

SetupFactory is for loading module assets when running setup subcommand.

func NewSetupFactory Uses

func NewSetupFactory(beatVersion string, pipelineLoaderFactory PipelineLoaderFactory) *SetupFactory

NewSetupFactory creates a SetupFactory

func (*SetupFactory) Create Uses

func (sf *SetupFactory) Create(_ beat.Pipeline, c *common.Config, _ *common.MapStrPointer) (cfgfile.Runner, error)

Create creates a new SetupCfgRunner to setup module configuration.

Package fileset imports 29 packages (graph) and is imported by 29 packages. Updated 2019-08-28. Refresh now. Tools for package owners.