elastic

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ElasticsearchMetric

type ElasticsearchMetric struct {
	Enabled       bool `config:"enabled"`
	IsAgentMode   bool `config:"agent_mode"`
	ClusterHealth bool `config:"cluster_health"`

	ClusterStats bool `config:"cluster_stats"`
	NodeStats    bool `config:"node_stats"`

	IndexStats    bool `config:"index_stats"`
	AllIndexStats bool `config:"all_index_stats"`

	IndexPrimaryStats bool `config:"index_primary_stats"`
	IndexTotalStats   bool `config:"index_total_stats"`

	ClusterState bool   `config:"cluster_state"`
	NodeInfo     bool   `config:"node_info"`
	Interval     string `config:"interval"`
	// contains filtered or unexported fields
}

func New

func New(cfg *config.Config, saveEvent func(item *event.Event) error) (*ElasticsearchMetric, error)

func (*ElasticsearchMetric) Collect

func (m *ElasticsearchMetric) Collect() error

func (*ElasticsearchMetric) CollectClusterHealth

func (m *ElasticsearchMetric) CollectClusterHealth(k string, v *elastic.ElasticsearchMetadata) error

func (*ElasticsearchMetric) CollectClusterState

func (m *ElasticsearchMetric) CollectClusterState(k string, v *elastic.ElasticsearchMetadata) error

func (*ElasticsearchMetric) CollectNodeStats

func (m *ElasticsearchMetric) CollectNodeStats()

func (*ElasticsearchMetric) InitialCollectTask

func (m *ElasticsearchMetric) InitialCollectTask(k string, v *elastic.ElasticsearchMetadata) bool

func (*ElasticsearchMetric) RemoveAllCollectTasks

func (m *ElasticsearchMetric) RemoveAllCollectTasks()

RemoveAllCollectTasks remove all running collect tasks

func (*ElasticsearchMetric) RemoveTask

func (m *ElasticsearchMetric) RemoveTask(taskID string)

RemoveTask remove a running collect task by taskID

func (*ElasticsearchMetric) RemoveTasksByClusterID

func (m *ElasticsearchMetric) RemoveTasksByClusterID(clusterID string)

RemoveTasksByClusterID removes running collect tasks associated with a clusterID

func (*ElasticsearchMetric) SaveIndexStats

func (m *ElasticsearchMetric) SaveIndexStats(v *elastic.ElasticsearchMetadata, indexID, indexName string, primary, total elastic.IndexLevelStats, info *elastic.IndexInfo, shardInfo []elastic.CatShardResponse) error

func (*ElasticsearchMetric) SaveNodeStats

func (m *ElasticsearchMetric) SaveNodeStats(v *elastic.ElasticsearchMetadata, nodeID string, f interface{}, shardInfo interface{}) error

Jump to

Keyboard shortcuts

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