elastic

package
v0.0.0-...-d505a48 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run()

Types

type ElasticConnector

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

ElasticConnector handles the state

func (*ElasticConnector) CollectMetrics

CollectMetrics retrieves metric data

func (*ElasticConnector) ListSuggestions

func (connector *ElasticConnector) ListSuggestions(view string, name string) []string

ListSuggestions provides suggestions by view

func (*ElasticConnector) LoadConfig

func (connector *ElasticConnector) LoadConfig(config ExtConfig) error

LoadConfig updates state

type ElasticView

type ElasticView string

ElasticView describes flow

const (
	StoredQueries ElasticView = "storedQueries"
)

Define flows

type ExtConfig

type ExtConfig struct {
	Kibana                Kibana              `json:"kibana"`
	Servers               []string            `json:"servers"`
	CustomTimeFilter      clients.KTimeFilter `json:"timefilter"`
	OverrideTimeFilter    bool                `json:"override"`
	FilterHostsWithLucene string              `json:"filterHostsWithLucene"`
	HostNameField         string              `json:"hostNameLabelPath"`
	HostGroupField        string              `json:"hostGroupLabelPath"`
	GroupNameByUser       bool                `json:"hostGroupNameByUser"`
	CheckInterval         time.Duration       `json:"checkIntervalMinutes"`
	AppType               string
	AgentID               string
	GWConnections         config.GWConnections
	Ownership             transit.HostOwnershipType
	Views                 map[string]map[string]transit.MetricDefinition
}

ExtConfig defines the MonitorConnection extensions configuration extended with general configuration fields

func (*ExtConfig) UnmarshalJSON

func (cfg *ExtConfig) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Kibana

type Kibana struct {
	ServerName string `json:"serverName"`
	Username   string `json:"userName"`
	Password   string `json:"password"`
}

Kibana defines the connection props

type MonitoringState

type MonitoringState struct {
	Metrics    map[string]transit.MetricDefinition
	Hosts      map[string]monitoringHost
	HostGroups map[string]map[string]struct{}
}

MonitoringState describes state

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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