beat

package
v0.0.0-...-be347a3 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ModuleName = "beat"

ModuleName is the name of this module.

Variables

View Source
var (
	// ErrClusterUUID is the error to be returned when the monitored beat is using the Elasticsearch output but hasn't
	// yet connected or is having trouble connecting to that Elasticsearch, so the cluster UUID cannot be
	// determined
	ErrClusterUUID = fmt.Errorf("monitored beat is using Elasticsearch output but cluster UUID cannot be determined")
)

Functions

func AssetBeat

func AssetBeat() string

AssetBeat returns asset data. This is the base64 encoded gzipped contents of ../metricbeat/module/beat.

func GetConfig

func GetConfig(metricset string, host string) map[string]interface{}

GetConfig for Metricbeat

func NewModule

func NewModule(base mb.BaseModule) (mb.Module, error)

NewModule creates a new module after performing validation.

Types

type Config

type Config struct {
	XPackEnabled bool `config:"xpack.enabled"`
}

Config defines the structure for the Beat module configuration options

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns the default configuration for the Beat module

type Info

type Info struct {
	UUID     string `json:"uuid"`
	Beat     string `json:"beat"`
	Name     string `json:"name"`
	Hostname string `json:"hostname"`
	Version  string `json:"version"`
}

Info construct contains the relevant data from the Beat's / endpoint

func GetInfo

func GetInfo(m *MetricSet) (*Info, error)

GetInfo returns the data for the Beat's / endpoint.

type MetricSet

type MetricSet struct {
	mb.BaseMetricSet
	*helper.HTTP
	XPackEnabled bool
}

MetricSet can be used to build other metricsets within the Beat module.

func NewMetricSet

func NewMetricSet(base mb.BaseMetricSet) (*MetricSet, error)

NewMetricSet creates a metricset that can be used to build other metricsets within the Beat module.

type State

type State struct {
	Monitoring struct {
		ClusterUUID string `json:"cluster_uuid"`
	} `json:"monitoring"`
	Output struct {
		Name string `json:"name"`
	} `json:"output"`
	Outputs struct {
		Elasticsearch struct {
			ClusterUUID string `json:"cluster_uuid"`
		} `json:"elasticsearch"`
	} `json:"outputs"`
}

State construct contains the relevant data from the Beat's /state endpoint

func GetState

func GetState(m *MetricSet) (*State, error)

GetState returns the data for the Beat's /state endpoint.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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