collector

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package collector includes all individual collectors to gather and export elasticsearch metrics.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoData = errors.New("collector returned no data")

ErrNoData indicates the collector found no data to collect, but had no other error.

Functions

func AggregateTasks

func AggregateTasks(t tasksResponse) aggregatedTaskStats

func IsNoDataError

func IsNoDataError(err error) bool

Types

type Blocks

type Blocks struct {
	ReadOnly string `json:"read_only_allow_delete"`
}

Blocks defines whether current index has read_only_allow_delete enabled

type ClusterHealth

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

ClusterHealth type defines the collector struct

func NewClusterHealth

func NewClusterHealth(logger *slog.Logger, client *http.Client, url *url.URL) *ClusterHealth

NewClusterHealth returns a new Collector exposing ClusterHealth stats.

func (*ClusterHealth) Collect

func (c *ClusterHealth) Collect(ch chan<- prometheus.Metric)

Collect collects ClusterHealth metrics.

func (*ClusterHealth) Describe

func (c *ClusterHealth) Describe(ch chan<- *prometheus.Desc)

Describe set Prometheus metrics descriptions.

type ClusterHealthResponse

type ClusterHealthResponse struct {
	ActivePrimaryShards     int64  `json:"active_primary_shards"`
	ActiveShards            int64  `json:"active_shards"`
	ClusterName             string `json:"cluster_name"`
	DelayedUnassignedShards int64  `json:"delayed_unassigned_shards"`
	InitializingShards      int64  `json:"initializing_shards"`
	NumberOfDataNodes       int64  `json:"number_of_data_nodes"`
	NumberOfInFlightFetch   int64  `json:"number_of_in_flight_fetch"`
	NumberOfNodes           int64  `json:"number_of_nodes"`
	NumberOfPendingTasks    int64  `json:"number_of_pending_tasks"`
	RelocatingShards        int64  `json:"relocating_shards"`
	Status                  string `json:"status"`
	TimedOut                bool   `json:"timed_out"`
	UnassignedShards        int64  `json:"unassigned_shards"`
}

ClusterHealthResponse is a representation of a Elasticsearch Cluster Health

type ClusterInfoCollector

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

func (*ClusterInfoCollector) Update

func (c *ClusterInfoCollector) Update(_ context.Context, ch chan<- prometheus.Metric) error

type ClusterInfoResponse

type ClusterInfoResponse struct {
	Name        string      `json:"name"`
	ClusterName string      `json:"cluster_name"`
	ClusterUUID string      `json:"cluster_uuid"`
	Version     VersionInfo `json:"version"`
	Tagline     string      `json:"tagline"`
}

ClusterInfoResponse is the cluster info retrievable from the / endpoint

type ClusterSettingsCollector

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

func (*ClusterSettingsCollector) Update

func (c *ClusterSettingsCollector) Update(ctx context.Context, ch chan<- prometheus.Metric) error

type Collector

type Collector interface {
	// Get new metrics and expose them via prometheus registry.
	Update(context.Context, chan<- prometheus.Metric) error
}

Collector is the interface a collector has to implement.

func NewClusterInfo

func NewClusterInfo(logger *slog.Logger, u *url.URL, hc *http.Client) (Collector, error)

func NewClusterSettings

func NewClusterSettings(logger *slog.Logger, u *url.URL, hc *http.Client) (Collector, error)

func NewDataStream

func NewDataStream(logger *slog.Logger, u *url.URL, hc *http.Client) (Collector, error)

NewDataStream defines DataStream Prometheus metrics

func NewHealthReport

func NewHealthReport(logger *slog.Logger, url *url.URL, client *http.Client) (Collector, error)

func NewILM

func NewILM(logger *slog.Logger, u *url.URL, hc *http.Client) (Collector, error)

func NewSLM

func NewSLM(logger *slog.Logger, u *url.URL, hc *http.Client) (Collector, error)

NewSLM defines SLM Prometheus metrics

func NewSnapshots

func NewSnapshots(logger *slog.Logger, u *url.URL, hc *http.Client) (Collector, error)

NewSnapshots defines Snapshots Prometheus metrics

func NewTaskCollector

func NewTaskCollector(logger *slog.Logger, u *url.URL, hc *http.Client) (Collector, error)

NewTaskCollector defines Task Prometheus metrics

type DataStream

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

DataStream Information Struct

func (*DataStream) Update

func (ds *DataStream) Update(ctx context.Context, ch chan<- prometheus.Metric) error

type DataStreamStatsDataStream

type DataStreamStatsDataStream struct {
	DataStream       string `json:"data_stream"`
	BackingIndices   int64  `json:"backing_indices"`
	StoreSizeBytes   int64  `json:"store_size_bytes"`
	MaximumTimestamp int64  `json:"maximum_timestamp"`
}

DataStreamStatsDataStream defines the structure of per data stream stats

type DataStreamStatsResponse

type DataStreamStatsResponse struct {
	Shards              DataStreamStatsShards       `json:"_shards"`
	DataStreamCount     int64                       `json:"data_stream_count"`
	BackingIndices      int64                       `json:"backing_indices"`
	TotalStoreSizeBytes int64                       `json:"total_store_size_bytes"`
	DataStreamStats     []DataStreamStatsDataStream `json:"data_streams"`
}

DataStreamStatsResponse is a representation of the Data Stream stats

type DataStreamStatsShards

type DataStreamStatsShards struct {
	Total      int64 `json:"total"`
	Successful int64 `json:"successful"`
	Failed     int64 `json:"failed"`
}

DataStreamStatsShards defines data stream stats shards information structure

type ElasticsearchCollector

type ElasticsearchCollector struct {
	Collectors map[string]Collector
	// contains filtered or unexported fields
}

func NewElasticsearchCollector

func NewElasticsearchCollector(logger *slog.Logger, filters []string, options ...Option) (*ElasticsearchCollector, error)

NewElasticsearchCollector creates a new ElasticsearchCollector

func (ElasticsearchCollector) Collect

func (e ElasticsearchCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (ElasticsearchCollector) Describe

func (e ElasticsearchCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface.

type HealthReport

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

func (*HealthReport) Update

func (c *HealthReport) Update(ctx context.Context, ch chan<- prometheus.Metric) error

type HealthReportDataStreamLifecycle

type HealthReportDataStreamLifecycle struct {
	Status  string `json:"status"`
	Symptom string `json:"symptom"`
}

type HealthReportDisk

type HealthReportDisk struct {
	Status  string                  `json:"status"`
	Symptom string                  `json:"symptom"`
	Details HealthReportDiskDetails `json:"details"`
}

type HealthReportDiskDetails

type HealthReportDiskDetails struct {
	IndicesWithReadonlyBlock     int `json:"indices_with_readonly_block"`
	NodesWithEnoughDiskSpace     int `json:"nodes_with_enough_disk_space"`
	NodesWithUnknownDiskStatus   int `json:"nodes_with_unknown_disk_status"`
	NodesOverHighWatermark       int `json:"nodes_over_high_watermark"`
	NodesOverFloodStageWatermark int `json:"nodes_over_flood_stage_watermark"`
}

type HealthReportIlm

type HealthReportIlm struct {
	Status  string                 `json:"status"`
	Symptom string                 `json:"symptom"`
	Details HealthReportIlmDetails `json:"details"`
}

type HealthReportIlmDetails

type HealthReportIlmDetails struct {
	Policies          int    `json:"policies"`
	StagnatingIndices int    `json:"stagnating_indices"`
	IlmStatus         string `json:"ilm_status"`
}

type HealthReportIndicators

type HealthReportIndicators struct {
	MasterIsStable      HealthReportMasterIsStable      `json:"master_is_stable"`
	RepositoryIntegrity HealthReportRepositoryIntegrity `json:"repository_integrity"`
	Disk                HealthReportDisk                `json:"disk"`
	ShardsCapacity      HealthReportShardsCapacity      `json:"shards_capacity"`
	ShardsAvailability  HealthReportShardsAvailability  `json:"shards_availability"`
	DataStreamLifecycle HealthReportDataStreamLifecycle `json:"data_stream_lifecycle"`
	Slm                 HealthReportSlm                 `json:"slm"`
	Ilm                 HealthReportIlm                 `json:"ilm"`
}

type HealthReportMasterIsStable

type HealthReportMasterIsStable struct {
	Status  string                            `json:"status"`
	Symptom string                            `json:"symptom"`
	Details HealthReportMasterIsStableDetails `json:"details"`
}

type HealthReportMasterIsStableDetails

type HealthReportMasterIsStableDetails struct {
	CurrentMaster HealthReportMasterIsStableDetailsNode   `json:"current_master"`
	RecentMasters []HealthReportMasterIsStableDetailsNode `json:"recent_masters"`
}

type HealthReportMasterIsStableDetailsNode

type HealthReportMasterIsStableDetailsNode struct {
	NodeID string `json:"node_id"`
	Name   string `json:"name"`
}

type HealthReportRepositoriyIntegrityDetails

type HealthReportRepositoriyIntegrityDetails struct {
	TotalRepositories int `json:"total_repositories"`
}

type HealthReportRepositoryIntegrity

type HealthReportRepositoryIntegrity struct {
	Status  string                                  `json:"status"`
	Symptom string                                  `json:"symptom"`
	Details HealthReportRepositoriyIntegrityDetails `json:"details"`
}

type HealthReportResponse

type HealthReportResponse struct {
	ClusterName string                 `json:"cluster_name"`
	Status      string                 `json:"status"`
	Indicators  HealthReportIndicators `json:"indicators"`
}

type HealthReportShardsAvailability

type HealthReportShardsAvailability struct {
	Status  string                                `json:"status"`
	Symptom string                                `json:"symptom"`
	Details HealthReportShardsAvailabilityDetails `json:"details"`
}

type HealthReportShardsAvailabilityDetails

type HealthReportShardsAvailabilityDetails struct {
	RestartingReplicas    int `json:"restarting_replicas"`
	CreatingPrimaries     int `json:"creating_primaries"`
	InitializingReplicas  int `json:"initializing_replicas"`
	UnassignedReplicas    int `json:"unassigned_replicas"`
	StartedPrimaries      int `json:"started_primaries"`
	RestartingPrimaries   int `json:"restarting_primaries"`
	InitializingPrimaries int `json:"initializing_primaries"`
	CreatingReplicas      int `json:"creating_replicas"`
	StartedReplicas       int `json:"started_replicas"`
	UnassignedPrimaries   int `json:"unassigned_primaries"`
}

type HealthReportShardsCapacity

type HealthReportShardsCapacity struct {
	Status  string                            `json:"status"`
	Symptom string                            `json:"symptom"`
	Details HealthReportShardsCapacityDetails `json:"details"`
}

type HealthReportShardsCapacityDetails

type HealthReportShardsCapacityDetails struct {
	Data   HealthReportShardsCapacityDetailsMaxShards `json:"data"`
	Frozen HealthReportShardsCapacityDetailsMaxShards `json:"frozen"`
}

type HealthReportShardsCapacityDetailsMaxShards

type HealthReportShardsCapacityDetailsMaxShards struct {
	MaxShardsInCluster int `json:"max_shards_in_cluster"`
}

type HealthReportSlm

type HealthReportSlm struct {
	Status  string                 `json:"status"`
	Symptom string                 `json:"symptom"`
	Details HealthReportSlmDetails `json:"details"`
}

type HealthReportSlmDetails

type HealthReportSlmDetails struct {
	SlmStatus string `json:"slm_status"`
	Policies  int    `json:"policies"`
}

type ILM

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

func (*ILM) Update

func (i *ILM) Update(ctx context.Context, ch chan<- prometheus.Metric) error

type IlmIndexResponse

type IlmIndexResponse struct {
	Index          string  `json:"index"`
	Managed        bool    `json:"managed"`
	Phase          string  `json:"phase"`
	Action         string  `json:"action"`
	Step           string  `json:"step"`
	StepTimeMillis float64 `json:"step_time_millis"`
}

type IlmResponse

type IlmResponse struct {
	Indices map[string]IlmIndexResponse `json:"indices"`
}

type IlmStatusResponse

type IlmStatusResponse struct {
	OperationMode string `json:"operation_mode"`
}

type Index

type Index struct {
	Settings Settings `json:"settings"`
}

Index defines the struct of the tree for the settings of each index

type IndexInfo

type IndexInfo struct {
	Blocks           Blocks  `json:"blocks"`
	Mapping          Mapping `json:"mapping"`
	NumberOfReplicas string  `json:"number_of_replicas"`
	CreationDate     string  `json:"creation_date"`
}

IndexInfo defines the blocks of the current index

type IndexMapping

type IndexMapping struct {
	Mappings IndexMappings `json:"mappings"`
}

IndexMapping defines the struct of the tree for the mappings of each index

type IndexMappingField

type IndexMappingField struct {
	Type       *string                `json:"type"`
	Properties IndexMappingProperties `json:"properties"`
	Fields     IndexMappingFields     `json:"fields"`
}

IndexMappingField defines a single property of the current index field

type IndexMappingFields

type IndexMappingFields map[string]*IndexMappingField

IndexMappingFields defines all the fields of the current mapping

type IndexMappingProperties

type IndexMappingProperties map[string]*IndexMappingProperty

IndexMappingProperties defines all the properties of the current mapping

type IndexMappingProperty

type IndexMappingProperty struct {
	Type       *string                `json:"type"`
	Properties IndexMappingProperties `json:"properties"`
	Fields     IndexMappingFields     `json:"fields"`
}

IndexMappingProperty defines a single property of the current index properties

type IndexMappings

type IndexMappings struct {
	Properties IndexMappingProperties `json:"properties"`
}

IndexMappings defines all index mappings

type IndexStatsIndexCompletionResponse

type IndexStatsIndexCompletionResponse struct {
	SizeInBytes int64 `json:"size_in_bytes"`
}

IndexStatsIndexCompletionResponse defines index stats index completion information structure

type IndexStatsIndexDetailResponse

type IndexStatsIndexDetailResponse struct {
	Docs         IndexStatsIndexDocsResponse         `json:"docs"`
	Store        IndexStatsIndexStoreResponse        `json:"store"`
	Indexing     IndexStatsIndexIndexingResponse     `json:"indexing"`
	Get          IndexStatsIndexGetResponse          `json:"get"`
	Search       IndexStatsIndexSearchResponse       `json:"search"`
	Merges       IndexStatsIndexMergesResponse       `json:"merges"`
	Refresh      IndexStatsIndexRefreshResponse      `json:"refresh"`
	Flush        IndexStatsIndexFlushResponse        `json:"flush"`
	Warmer       IndexStatsIndexWarmerResponse       `json:"warmer"`
	QueryCache   IndexStatsIndexQueryCacheResponse   `json:"query_cache"`
	Fielddata    IndexStatsIndexFielddataResponse    `json:"fielddata"`
	Completion   IndexStatsIndexCompletionResponse   `json:"completion"`
	Segments     IndexStatsIndexSegmentsResponse     `json:"segments"`
	Translog     IndexStatsIndexTranslogResponse     `json:"translog"`
	RequestCache IndexStatsIndexRequestCacheResponse `json:"request_cache"`
	Recovery     IndexStatsIndexRecoveryResponse     `json:"recovery"`
}

IndexStatsIndexDetailResponse defines index stats index details information structure

type IndexStatsIndexDocsResponse

type IndexStatsIndexDocsResponse struct {
	Count   int64 `json:"count"`
	Deleted int64 `json:"deleted"`
}

IndexStatsIndexDocsResponse defines index stats index documents information structure

type IndexStatsIndexFielddataResponse

type IndexStatsIndexFielddataResponse struct {
	MemorySizeInBytes int64 `json:"memory_size_in_bytes"`
	Evictions         int64 `json:"evictions"`
}

IndexStatsIndexFielddataResponse defines index stats index fielddata information structure

type IndexStatsIndexFlushResponse

type IndexStatsIndexFlushResponse struct {
	Total             int64 `json:"total"`
	TotalTimeInMillis int64 `json:"total_time_in_millis"`
}

IndexStatsIndexFlushResponse defines index stats index flush information structure

type IndexStatsIndexGetResponse

type IndexStatsIndexGetResponse struct {
	Total               int64 `json:"total"`
	TimeInMillis        int64 `json:"time_in_millis"`
	ExistsTotal         int64 `json:"exists_total"`
	ExistsTimeInMillis  int64 `json:"exists_time_in_millis"`
	MissingTotal        int64 `json:"missing_total"`
	MissingTimeInMillis int64 `json:"missing_time_in_millis"`
	Current             int64 `json:"current"`
}

IndexStatsIndexGetResponse defines index stats index get information structure

type IndexStatsIndexIndexingResponse

type IndexStatsIndexIndexingResponse struct {
	IndexTotal           int64 `json:"index_total"`
	IndexTimeInMillis    int64 `json:"index_time_in_millis"`
	IndexCurrent         int64 `json:"index_current"`
	IndexFailed          int64 `json:"index_failed"`
	DeleteTotal          int64 `json:"delete_total"`
	DeleteTimeInMillis   int64 `json:"delete_time_in_millis"`
	DeleteCurrent        int64 `json:"delete_current"`
	NoopUpdateTotal      int64 `json:"noop_update_total"`
	IsThrottled          bool  `json:"is_throttled"`
	ThrottleTimeInMillis int64 `json:"throttle_time_in_millis"`
}

IndexStatsIndexIndexingResponse defines index stats index indexing information structure

type IndexStatsIndexMergesResponse

type IndexStatsIndexMergesResponse struct {
	Current                    int64 `json:"current"`
	CurrentDocs                int64 `json:"current_docs"`
	CurrentSizeInBytes         int64 `json:"current_size_in_bytes"`
	Total                      int64 `json:"total"`
	TotalTimeInMillis          int64 `json:"total_time_in_millis"`
	TotalDocs                  int64 `json:"total_docs"`
	TotalSizeInBytes           int64 `json:"total_size_in_bytes"`
	TotalStoppedTimeInMillis   int64 `json:"total_stopped_time_in_millis"`
	TotalThrottledTimeInMillis int64 `json:"total_throttled_time_in_millis"`
	TotalAutoThrottleInBytes   int64 `json:"total_auto_throttle_in_bytes"`
}

IndexStatsIndexMergesResponse defines index stats index merges information structure

type IndexStatsIndexQueryCacheResponse

type IndexStatsIndexQueryCacheResponse struct {
	MemorySizeInBytes int64 `json:"memory_size_in_bytes"`
	TotalCount        int64 `json:"total_count"`
	HitCount          int64 `json:"hit_count"`
	MissCount         int64 `json:"miss_count"`
	CacheSize         int64 `json:"cache_size"`
	CacheCount        int64 `json:"cache_count"`
	Evictions         int64 `json:"evictions"`
}

IndexStatsIndexQueryCacheResponse defines index stats index query cache information structure

type IndexStatsIndexRecoveryResponse

type IndexStatsIndexRecoveryResponse struct {
	CurrentAsSource      int64 `json:"current_as_source"`
	CurrentAsTarget      int64 `json:"current_as_target"`
	ThrottleTimeInMillis int64 `json:"throttle_time_in_millis"`
}

IndexStatsIndexRecoveryResponse defines index stats index recovery information structure

type IndexStatsIndexRefreshResponse

type IndexStatsIndexRefreshResponse struct {
	Total                     int64 `json:"total"`
	TotalTimeInMillis         int64 `json:"total_time_in_millis"`
	ExternalTotal             int64 `json:"external_total"`
	ExternalTotalTimeInMillis int64 `json:"external_total_time_in_millis"`
	Listeners                 int64 `json:"listeners"`
}

IndexStatsIndexRefreshResponse defines index stats index refresh information structure

type IndexStatsIndexRequestCacheResponse

type IndexStatsIndexRequestCacheResponse struct {
	MemorySizeInBytes int64 `json:"memory_size_in_bytes"`
	Evictions         int64 `json:"evictions"`
	HitCount          int64 `json:"hit_count"`
	MissCount         int64 `json:"miss_count"`
}

IndexStatsIndexRequestCacheResponse defines index stats index request cache information structure

type IndexStatsIndexResponse

type IndexStatsIndexResponse struct {
	Primaries IndexStatsIndexDetailResponse                    `json:"primaries"`
	Total     IndexStatsIndexDetailResponse                    `json:"total"`
	Shards    map[string][]IndexStatsIndexShardsDetailResponse `json:"shards"`
}

IndexStatsIndexResponse defines index stats index information structure

type IndexStatsIndexRoutingResponse

type IndexStatsIndexRoutingResponse struct {
	Node    string `json:"node"`
	Primary bool   `json:"primary"`
}

IndexStatsIndexRoutingResponse defines index stats index routing information structure

type IndexStatsIndexSearchResponse

type IndexStatsIndexSearchResponse struct {
	OpenContexts        int64 `json:"open_contexts"`
	QueryTotal          int64 `json:"query_total"`
	QueryTimeInMillis   int64 `json:"query_time_in_millis"`
	QueryCurrent        int64 `json:"query_current"`
	FetchTotal          int64 `json:"fetch_total"`
	FetchTimeInMillis   int64 `json:"fetch_time_in_millis"`
	FetchCurrent        int64 `json:"fetch_current"`
	ScrollTotal         int64 `json:"scroll_total"`
	ScrollTimeInMillis  int64 `json:"scroll_time_in_millis"`
	ScrollCurrent       int64 `json:"scroll_current"`
	SuggestTotal        int64 `json:"suggest_total"`
	SuggestTimeInMillis int64 `json:"suggest_time_in_millis"`
	SuggestCurrent      int64 `json:"suggest_current"`
}

IndexStatsIndexSearchResponse defines index stats index search information structure

type IndexStatsIndexSegmentsResponse

type IndexStatsIndexSegmentsResponse struct {
	Count                     int64 `json:"count"`
	MemoryInBytes             int64 `json:"memory_in_bytes"`
	TermsMemoryInBytes        int64 `json:"terms_memory_in_bytes"`
	StoredFieldsMemoryInBytes int64 `json:"stored_fields_memory_in_bytes"`
	TermVectorsMemoryInBytes  int64 `json:"term_vectors_memory_in_bytes"`
	NormsMemoryInBytes        int64 `json:"norms_memory_in_bytes"`
	PointsMemoryInBytes       int64 `json:"points_memory_in_bytes"`
	DocValuesMemoryInBytes    int64 `json:"doc_values_memory_in_bytes"`
	IndexWriterMemoryInBytes  int64 `json:"index_writer_memory_in_bytes"`
	VersionMapMemoryInBytes   int64 `json:"version_map_memory_in_bytes"`
	FixedBitSetMemoryInBytes  int64 `json:"fixed_bit_set_memory_in_bytes"`
	MaxUnsafeAutoIDTimestamp  int64 `json:"max_unsafe_auto_id_timestamp"`
}

IndexStatsIndexSegmentsResponse defines index stats index segments information structure

type IndexStatsIndexShardsDetailResponse

type IndexStatsIndexShardsDetailResponse struct {
	*IndexStatsIndexDetailResponse
	Routing IndexStatsIndexRoutingResponse `json:"routing"`
}

IndexStatsIndexShardsDetailResponse defines index stats index shard details information structure

type IndexStatsIndexStoreResponse

type IndexStatsIndexStoreResponse struct {
	SizeInBytes          int64 `json:"size_in_bytes"`
	ThrottleTimeInMillis int64 `json:"throttle_time_in_millis"`
}

IndexStatsIndexStoreResponse defines index stats index store information structure

type IndexStatsIndexTranslogResponse

type IndexStatsIndexTranslogResponse struct {
	Operations  int64 `json:"operations"`
	SizeInBytes int64 `json:"size_in_bytes"`
}

IndexStatsIndexTranslogResponse defines index stats index translog information structure

type IndexStatsIndexWarmerResponse

type IndexStatsIndexWarmerResponse struct {
	Current           int64 `json:"current"`
	Total             int64 `json:"total"`
	TotalTimeInMillis int64 `json:"total_time_in_millis"`
}

IndexStatsIndexWarmerResponse defines index stats index warmer information structure

type IndexStatsShardsResponse

type IndexStatsShardsResponse struct {
	Total      int64 `json:"total"`
	Successful int64 `json:"successful"`
	Failed     int64 `json:"failed"`
}

IndexStatsShardsResponse defines index stats shards information structure

type Indices

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

Indices information struct

func NewIndices

func NewIndices(logger *slog.Logger, client *http.Client, url *url.URL, shards bool, includeAliases bool) *Indices

NewIndices defines Indices Prometheus metrics

func (*Indices) ClusterLabelUpdates

func (i *Indices) ClusterLabelUpdates() *chan *clusterinfo.Response

ClusterLabelUpdates returns a pointer to a channel to receive cluster info updates. It implements the (not exported) clusterinfo.consumer interface

func (*Indices) Collect

func (i *Indices) Collect(ch chan<- prometheus.Metric)

Collect gets Indices metric values

func (*Indices) Describe

func (i *Indices) Describe(ch chan<- *prometheus.Desc)

Describe add Indices metrics descriptions

func (*Indices) String

func (i *Indices) String() string

String implements the stringer interface. It is part of the clusterinfo.consumer interface

type IndicesMappings

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

IndicesMappings information struct

func NewIndicesMappings

func NewIndicesMappings(logger *slog.Logger, client *http.Client, url *url.URL) *IndicesMappings

NewIndicesMappings defines Indices IndexMappings Prometheus metrics

func (*IndicesMappings) Collect

func (im *IndicesMappings) Collect(ch chan<- prometheus.Metric)

Collect gets all indices mappings metric values

func (*IndicesMappings) Describe

func (im *IndicesMappings) Describe(ch chan<- *prometheus.Desc)

Describe add Snapshots metrics descriptions

type IndicesMappingsResponse

type IndicesMappingsResponse map[string]IndexMapping

IndicesMappingsResponse is a representation of elasticsearch mappings for each index

type IndicesSettings

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

IndicesSettings information struct

func NewIndicesSettings

func NewIndicesSettings(logger *slog.Logger, client *http.Client, url *url.URL) *IndicesSettings

NewIndicesSettings defines Indices Settings Prometheus metrics

func (*IndicesSettings) Collect

func (cs *IndicesSettings) Collect(ch chan<- prometheus.Metric)

Collect gets all indices settings metric values

func (*IndicesSettings) Describe

func (cs *IndicesSettings) Describe(ch chan<- *prometheus.Desc)

Describe add Snapshots metrics descriptions

type IndicesSettingsResponse

type IndicesSettingsResponse map[string]Index

IndicesSettingsResponse is a representation of Elasticsearch Settings for each Index

type Mapping

type Mapping struct {
	TotalFields TotalFields `json:"total_fields"`
}

Mapping defines mapping settings

type NodeStatsBreakersResponse

type NodeStatsBreakersResponse struct {
	EstimatedSize int64   `json:"estimated_size_in_bytes"`
	LimitSize     int64   `json:"limit_size_in_bytes"`
	Overhead      float64 `json:"overhead"`
	Tripped       int64   `json:"tripped"`
}

NodeStatsBreakersResponse is a representation of a statistics about the field data circuit breaker

type NodeStatsFSDataResponse

type NodeStatsFSDataResponse struct {
	Path      string `json:"path"`
	Mount     string `json:"mount"`
	Device    string `json:"dev"`
	Total     int64  `json:"total_in_bytes"`
	Free      int64  `json:"free_in_bytes"`
	Available int64  `json:"available_in_bytes"`
}

NodeStatsFSDataResponse defines node stats filesystem data structure

type NodeStatsFSIOStatsDeviceResponse

type NodeStatsFSIOStatsDeviceResponse struct {
	DeviceName      string `json:"device_name"`
	Operations      int64  `json:"operations"`
	ReadOperations  int64  `json:"read_operations"`
	WriteOperations int64  `json:"write_operations"`
	ReadSize        int64  `json:"read_kilobytes"`
	WriteSize       int64  `json:"write_kilobytes"`
}

NodeStatsFSIOStatsDeviceResponse is a representation of a node stat filesystem device

type NodeStatsFSIOStatsResponse

type NodeStatsFSIOStatsResponse struct {
	Devices []NodeStatsFSIOStatsDeviceResponse `json:"devices"`
}

NodeStatsFSIOStatsResponse defines node stats filesystem device structure

type NodeStatsFSResponse

type NodeStatsFSResponse struct {
	Timestamp int64                      `json:"timestamp"`
	Data      []NodeStatsFSDataResponse  `json:"data"`
	IOStats   NodeStatsFSIOStatsResponse `json:"io_stats"`
}

NodeStatsFSResponse is a representation of a file system information, data path, free disk space, read/write stats

type NodeStatsHTTPResponse

type NodeStatsHTTPResponse struct {
	CurrentOpen int64 `json:"current_open"`
	TotalOpen   int64 `json:"total_open"`
}

NodeStatsHTTPResponse defines node stats HTTP connections structure

type NodeStatsIndexingPressureCurrentResponse

type NodeStatsIndexingPressureCurrentResponse struct {
	AllInBytes int64 `json:"all_in_bytes"`
}

NodeStatsIndexingPressureMemoryCurrentResponse is a representation of a elasticsearch indexing pressure current memory usage

type NodeStatsIndexingPressureResponse

type NodeStatsIndexingPressureResponse struct {
	Current      NodeStatsIndexingPressureCurrentResponse `json:"current"`
	LimitInBytes int64                                    `json:"limit_in_bytes"`
}

NodeStatsIndexingPressureResponse is a representation of a elasticsearch indexing pressure

type NodeStatsIndicesCacheResponse

type NodeStatsIndicesCacheResponse struct {
	Evictions  int64 `json:"evictions"`
	MemorySize int64 `json:"memory_size_in_bytes"`
	CacheCount int64 `json:"cache_count"`
	CacheSize  int64 `json:"cache_size"`
	HitCount   int64 `json:"hit_count"`
	MissCount  int64 `json:"miss_count"`
	TotalCount int64 `json:"total_count"`
}

NodeStatsIndicesCacheResponse defines node stats cache information structure for indices

type NodeStatsIndicesCompletionResponse

type NodeStatsIndicesCompletionResponse struct {
	Size int64 `json:"size_in_bytes"`
}

NodeStatsIndicesCompletionResponse defines node stats completion information structure for indices

type NodeStatsIndicesDocsResponse

type NodeStatsIndicesDocsResponse struct {
	Count   int64 `json:"count"`
	Deleted int64 `json:"deleted"`
}

NodeStatsIndicesDocsResponse defines node stats docs information structure for indices

type NodeStatsIndicesFlushResponse

type NodeStatsIndicesFlushResponse struct {
	Total int64 `json:"total"`
	Time  int64 `json:"total_time_in_millis"`
}

NodeStatsIndicesFlushResponse defines node stats flush information structure for indices

type NodeStatsIndicesGetResponse

type NodeStatsIndicesGetResponse struct {
	Total        int64 `json:"total"`
	Time         int64 `json:"time_in_millis"`
	ExistsTotal  int64 `json:"exists_total"`
	ExistsTime   int64 `json:"exists_time_in_millis"`
	MissingTotal int64 `json:"missing_total"`
	MissingTime  int64 `json:"missing_time_in_millis"`
	Current      int64 `json:"current"`
}

NodeStatsIndicesGetResponse defines node stats get information structure for indices

type NodeStatsIndicesIndexingResponse

type NodeStatsIndicesIndexingResponse struct {
	IndexTotal    int64 `json:"index_total"`
	IndexTime     int64 `json:"index_time_in_millis"`
	IndexCurrent  int64 `json:"index_current"`
	DeleteTotal   int64 `json:"delete_total"`
	DeleteTime    int64 `json:"delete_time_in_millis"`
	DeleteCurrent int64 `json:"delete_current"`
	IsThrottled   bool  `json:"is_throttled"`
	ThrottleTime  int64 `json:"throttle_time_in_millis"`
}

NodeStatsIndicesIndexingResponse defines node stats indexing information structure for indices

type NodeStatsIndicesMergesResponse

type NodeStatsIndicesMergesResponse struct {
	Current            int64 `json:"current"`
	CurrentDocs        int64 `json:"current_docs"`
	CurrentSize        int64 `json:"current_size_in_bytes"`
	Total              int64 `json:"total"`
	TotalDocs          int64 `json:"total_docs"`
	TotalSize          int64 `json:"total_size_in_bytes"`
	TotalTime          int64 `json:"total_time_in_millis"`
	TotalThrottledTime int64 `json:"total_throttled_time_in_millis"`
}

NodeStatsIndicesMergesResponse defines node stats merges information structure for indices

type NodeStatsIndicesRefreshResponse

type NodeStatsIndicesRefreshResponse struct {
	Total                     int64 `json:"total"`
	TotalTime                 int64 `json:"total_time_in_millis"`
	ExternalTotal             int64 `json:"external_total"`
	ExternalTotalTimeInMillis int64 `json:"external_total_time_in_millis"`
}

NodeStatsIndicesRefreshResponse defines node stats refresh information structure for indices

type NodeStatsIndicesResponse

NodeStatsIndicesResponse is a representation of a indices stats (size, document count, indexing and deletion times, search times, field cache size, merges and flushes)

type NodeStatsIndicesSearchResponse

type NodeStatsIndicesSearchResponse struct {
	OpenContext  int64 `json:"open_contexts"`
	QueryTotal   int64 `json:"query_total"`
	QueryTime    int64 `json:"query_time_in_millis"`
	QueryCurrent int64 `json:"query_current"`
	FetchTotal   int64 `json:"fetch_total"`
	FetchTime    int64 `json:"fetch_time_in_millis"`
	FetchCurrent int64 `json:"fetch_current"`
	SuggestTotal int64 `json:"suggest_total"`
	SuggestTime  int64 `json:"suggest_time_in_millis"`
	ScrollTotal  int64 `json:"scroll_total"`
	ScrollTime   int64 `json:"scroll_time_in_millis"`
}

NodeStatsIndicesSearchResponse defines node stats search information structure for indices

type NodeStatsIndicesSegmentsResponse

type NodeStatsIndicesSegmentsResponse struct {
	Count              int64 `json:"count"`
	Memory             int64 `json:"memory_in_bytes"`
	TermsMemory        int64 `json:"terms_memory_in_bytes"`
	IndexWriterMemory  int64 `json:"index_writer_memory_in_bytes"`
	NormsMemory        int64 `json:"norms_memory_in_bytes"`
	StoredFieldsMemory int64 `json:"stored_fields_memory_in_bytes"`
	FixedBitSet        int64 `json:"fixed_bit_set_memory_in_bytes"`
	DocValuesMemory    int64 `json:"doc_values_memory_in_bytes"`
	TermVectorsMemory  int64 `json:"term_vectors_memory_in_bytes"`
	PointsMemory       int64 `json:"points_memory_in_bytes"`
	VersionMapMemory   int64 `json:"version_map_memory_in_bytes"`
}

NodeStatsIndicesSegmentsResponse defines node stats segments information structure for indices

type NodeStatsIndicesStoreResponse

type NodeStatsIndicesStoreResponse struct {
	Size         int64 `json:"size_in_bytes"`
	ThrottleTime int64 `json:"throttle_time_in_millis"`
}

NodeStatsIndicesStoreResponse defines node stats store information structure for indices

type NodeStatsIndicesTranslogResponse

type NodeStatsIndicesTranslogResponse struct {
	Operations int64 `json:"operations"`
	Size       int64 `json:"size_in_bytes"`
}

NodeStatsIndicesTranslogResponse defines node stats translog information structure for indices

type NodeStatsIndicesWarmerResponse

type NodeStatsIndicesWarmerResponse struct {
	Total     int64 `json:"total"`
	TotalTime int64 `json:"total_time_in_millis"`
}

NodeStatsIndicesWarmerResponse defines node stats warmer information structure for indices

type NodeStatsJVMBufferPoolResponse

type NodeStatsJVMBufferPoolResponse struct {
	Count         int64 `json:"count"`
	TotalCapacity int64 `json:"total_capacity_in_bytes"`
	Used          int64 `json:"used_in_bytes"`
}

NodeStatsJVMBufferPoolResponse defines node stats JVM buffer pool information structure

type NodeStatsJVMGCCollectorResponse

type NodeStatsJVMGCCollectorResponse struct {
	CollectionCount int64 `json:"collection_count"`
	CollectionTime  int64 `json:"collection_time_in_millis"`
}

NodeStatsJVMGCCollectorResponse defines node stats JVM garbage collector collection information structure

type NodeStatsJVMGCResponse

type NodeStatsJVMGCResponse struct {
	Collectors map[string]NodeStatsJVMGCCollectorResponse `json:"collectors"`
}

NodeStatsJVMGCResponse defines node stats JVM garbage collector information structure

type NodeStatsJVMMemPoolResponse

type NodeStatsJVMMemPoolResponse struct {
	Used     int64 `json:"used_in_bytes"`
	Max      int64 `json:"max_in_bytes"`
	PeakUsed int64 `json:"peak_used_in_bytes"`
	PeakMax  int64 `json:"peak_max_in_bytes"`
}

NodeStatsJVMMemPoolResponse defines node stats JVM memory pool information structure

type NodeStatsJVMMemResponse

type NodeStatsJVMMemResponse struct {
	HeapCommitted    int64                                  `json:"heap_committed_in_bytes"`
	HeapUsed         int64                                  `json:"heap_used_in_bytes"`
	HeapMax          int64                                  `json:"heap_max_in_bytes"`
	NonHeapCommitted int64                                  `json:"non_heap_committed_in_bytes"`
	NonHeapUsed      int64                                  `json:"non_heap_used_in_bytes"`
	Pools            map[string]NodeStatsJVMMemPoolResponse `json:"pools"`
}

NodeStatsJVMMemResponse defines node stats JVM memory information structure

type NodeStatsJVMResponse

type NodeStatsJVMResponse struct {
	BufferPools map[string]NodeStatsJVMBufferPoolResponse `json:"buffer_pools"`
	GC          NodeStatsJVMGCResponse                    `json:"gc"`
	Mem         NodeStatsJVMMemResponse                   `json:"mem"`
	Uptime      int64                                     `json:"uptime_in_millis"`
}

NodeStatsJVMResponse is a representation of a JVM stats, memory pool information, garbage collection, buffer pools, number of loaded/unloaded classes

type NodeStatsNetworkResponse

type NodeStatsNetworkResponse struct {
	TCP NodeStatsTCPResponse `json:"tcp"`
}

NodeStatsNetworkResponse defines node stats network information structure

type NodeStatsNodeResponse

type NodeStatsNodeResponse struct {
	Name             string                                       `json:"name"`
	Host             string                                       `json:"host"`
	Timestamp        int64                                        `json:"timestamp"`
	TransportAddress string                                       `json:"transport_address"`
	Hostname         string                                       `json:"hostname"`
	Roles            []string                                     `json:"roles"`
	Attributes       map[string]string                            `json:"attributes"`
	Indices          NodeStatsIndicesResponse                     `json:"indices"`
	OS               NodeStatsOSResponse                          `json:"os"`
	Network          NodeStatsNetworkResponse                     `json:"network"`
	FS               NodeStatsFSResponse                          `json:"fs"`
	ThreadPool       map[string]NodeStatsThreadPoolPoolResponse   `json:"thread_pool"`
	JVM              NodeStatsJVMResponse                         `json:"jvm"`
	Breakers         map[string]NodeStatsBreakersResponse         `json:"breakers"`
	HTTP             map[string]interface{}                       `json:"http"`
	Transport        NodeStatsTransportResponse                   `json:"transport"`
	Process          NodeStatsProcessResponse                     `json:"process"`
	IndexingPressure map[string]NodeStatsIndexingPressureResponse `json:"indexing_pressure"`
}

NodeStatsNodeResponse defines node stats information structure for nodes

type NodeStatsOSCPULoadResponse

type NodeStatsOSCPULoadResponse struct {
	Load1  float64 `json:"1m"`
	Load5  float64 `json:"5m"`
	Load15 float64 `json:"15m"`
}

NodeStatsOSCPULoadResponse defines node stats operating system CPU load structure

type NodeStatsOSCPUResponse

type NodeStatsOSCPUResponse struct {
	LoadAvg NodeStatsOSCPULoadResponse `json:"load_average"`
	Percent int64                      `json:"percent"`
}

NodeStatsOSCPUResponse defines node stats operating system CPU usage structure

type NodeStatsOSMemResponse

type NodeStatsOSMemResponse struct {
	Free       int64 `json:"free_in_bytes"`
	Used       int64 `json:"used_in_bytes"`
	ActualFree int64 `json:"actual_free_in_bytes"`
	ActualUsed int64 `json:"actual_used_in_bytes"`
}

NodeStatsOSMemResponse defines node stats operating system memory usage structure

type NodeStatsOSResponse

type NodeStatsOSResponse struct {
	Timestamp int64 `json:"timestamp"`
	Uptime    int64 `json:"uptime_in_millis"`
	// LoadAvg was an array of per-cpu values pre-2.0, and is a string in 2.0
	// Leaving this here in case we want to implement parsing logic later
	LoadAvg json.RawMessage         `json:"load_average"`
	CPU     NodeStatsOSCPUResponse  `json:"cpu"`
	Mem     NodeStatsOSMemResponse  `json:"mem"`
	Swap    NodeStatsOSSwapResponse `json:"swap"`
}

NodeStatsOSResponse is a representation of a operating system stats, load average, mem, swap

type NodeStatsOSSwapResponse

type NodeStatsOSSwapResponse struct {
	Used int64 `json:"used_in_bytes"`
	Free int64 `json:"free_in_bytes"`
}

NodeStatsOSSwapResponse defines node stats operating system swap usage structure

type NodeStatsProcessCPUResponse

type NodeStatsProcessCPUResponse struct {
	Percent int64 `json:"percent"`
	Total   int64 `json:"total_in_millis"`
}

NodeStatsProcessCPUResponse defines node stats process CPU usage structure

type NodeStatsProcessMemResponse

type NodeStatsProcessMemResponse struct {
	Resident     int64 `json:"resident_in_bytes"`
	Share        int64 `json:"share_in_bytes"`
	TotalVirtual int64 `json:"total_virtual_in_bytes"`
}

NodeStatsProcessMemResponse defines node stats process memory usage structure

type NodeStatsProcessResponse

type NodeStatsProcessResponse struct {
	Timestamp int64                       `json:"timestamp"`
	OpenFD    int64                       `json:"open_file_descriptors"`
	MaxFD     int64                       `json:"max_file_descriptors"`
	CPU       NodeStatsProcessCPUResponse `json:"cpu"`
	Memory    NodeStatsProcessMemResponse `json:"mem"`
}

NodeStatsProcessResponse is a representation of a process statistics, memory consumption, cpu usage, open file descriptors

type NodeStatsTCPResponse

type NodeStatsTCPResponse struct {
	ActiveOpens  int64 `json:"active_opens"`
	PassiveOpens int64 `json:"passive_opens"`
	CurrEstab    int64 `json:"curr_estab"`
	InSegs       int64 `json:"in_segs"`
	OutSegs      int64 `json:"out_segs"`
	RetransSegs  int64 `json:"retrans_segs"`
	EstabResets  int64 `json:"estab_resets"`
	AttemptFails int64 `json:"attempt_fails"`
	InErrs       int64 `json:"in_errs"`
	OutRsts      int64 `json:"out_rsts"`
}

NodeStatsTCPResponse defines node stats TCP information structure

type NodeStatsThreadPoolPoolResponse

type NodeStatsThreadPoolPoolResponse struct {
	Threads   int64 `json:"threads"`
	Queue     int64 `json:"queue"`
	Active    int64 `json:"active"`
	Rejected  int64 `json:"rejected"`
	Largest   int64 `json:"largest"`
	Completed int64 `json:"completed"`
}

NodeStatsThreadPoolPoolResponse is a representation of a statistics about each thread pool, including current size, queue and rejected tasks

type NodeStatsTransportResponse

type NodeStatsTransportResponse struct {
	ServerOpen int64 `json:"server_open"`
	RxCount    int64 `json:"rx_count"`
	RxSize     int64 `json:"rx_size_in_bytes"`
	TxCount    int64 `json:"tx_count"`
	TxSize     int64 `json:"tx_size_in_bytes"`
}

NodeStatsTransportResponse is a representation of a transport statistics about sent and received bytes in cluster communication

type Nodes

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

Nodes information struct

func NewNodes

func NewNodes(logger *slog.Logger, client *http.Client, url *url.URL, all bool, node string) *Nodes

NewNodes defines Nodes Prometheus metrics

func (*Nodes) Collect

func (c *Nodes) Collect(ch chan<- prometheus.Metric)

Collect gets nodes metric values

func (*Nodes) Describe

func (c *Nodes) Describe(ch chan<- *prometheus.Desc)

Describe add metrics descriptions

type Option

type Option func(*ElasticsearchCollector) error

func WithElasticsearchURL

func WithElasticsearchURL(esURL *url.URL) Option

func WithHTTPClient

func WithHTTPClient(hc *http.Client) Option

type PolicyStats

type PolicyStats struct {
	Policy                   string `json:"policy"`
	SnapshotsTaken           int64  `json:"snapshots_taken"`
	SnapshotsFailed          int64  `json:"snapshots_failed"`
	SnapshotsDeleted         int64  `json:"snapshots_deleted"`
	SnapshotDeletionFailures int64  `json:"snapshot_deletion_failures"`
}

PolicyStats is a representation of SLM stats for specific policies

type SLM

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

SLM information struct

func (*SLM) Update

func (s *SLM) Update(ctx context.Context, ch chan<- prometheus.Metric) error

type SLMStatsResponse

type SLMStatsResponse struct {
	RetentionRuns                 int64         `json:"retention_runs"`
	RetentionFailed               int64         `json:"retention_failed"`
	RetentionTimedOut             int64         `json:"retention_timed_out"`
	RetentionDeletionTime         string        `json:"retention_deletion_time"`
	RetentionDeletionTimeMillis   int64         `json:"retention_deletion_time_millis"`
	TotalSnapshotsTaken           int64         `json:"total_snapshots_taken"`
	TotalSnapshotsFailed          int64         `json:"total_snapshots_failed"`
	TotalSnapshotsDeleted         int64         `json:"total_snapshots_deleted"`
	TotalSnapshotDeletionFailures int64         `json:"total_snapshot_deletion_failures"`
	PolicyStats                   []PolicyStats `json:"policy_stats"`
}

SLMStatsResponse is a representation of the SLM stats

type SLMStatusResponse

type SLMStatusResponse struct {
	OperationMode string `json:"operation_mode"`
}

SLMStatusResponse is a representation of the SLM status

type Settings

type Settings struct {
	IndexInfo IndexInfo `json:"index"`
}

Settings defines current index settings

type ShardResponse

type ShardResponse struct {
	Index string `json:"index"`
	Shard string `json:"shard"`
	State string `json:"state"`
	Node  string `json:"node"`
}

ShardResponse has shard's node and index info

type Shards

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

Shards information struct

func NewShards

func NewShards(logger *slog.Logger, client *http.Client, url *url.URL) *Shards

NewShards defines Shards Prometheus metrics

func (*Shards) ClusterLabelUpdates

func (s *Shards) ClusterLabelUpdates() *chan *clusterinfo.Response

ClusterLabelUpdates returns a pointer to a channel to receive cluster info updates. It implements the (not exported) clusterinfo.consumer interface

func (*Shards) Collect

func (s *Shards) Collect(ch chan<- prometheus.Metric)

Collect number of shards on each node

func (*Shards) Describe

func (s *Shards) Describe(ch chan<- *prometheus.Desc)

Describe Shards

func (*Shards) String

func (s *Shards) String() string

String implements the stringer interface. It is part of the clusterinfo.consumer interface

type SnapshotRepositoriesResponse

type SnapshotRepositoriesResponse map[string]struct {
	Type string `json:"type"`
}

SnapshotRepositoriesResponse is a representation snapshots repositories

type SnapshotStatDataResponse

type SnapshotStatDataResponse struct {
	Snapshot          string        `json:"snapshot"`
	UUID              string        `json:"uuid"`
	VersionID         int64         `json:"version_id"`
	Version           string        `json:"version"`
	Indices           []string      `json:"indices"`
	State             string        `json:"state"`
	StartTime         time.Time     `json:"start_time"`
	StartTimeInMillis int64         `json:"start_time_in_millis"`
	EndTime           time.Time     `json:"end_time"`
	EndTimeInMillis   int64         `json:"end_time_in_millis"`
	DurationInMillis  int64         `json:"duration_in_millis"`
	Failures          []interface{} `json:"failures"`
	Shards            struct {
		Total      int64 `json:"total"`
		Failed     int64 `json:"failed"`
		Successful int64 `json:"successful"`
	} `json:"shards"`
}

SnapshotStatDataResponse is a representation of the single snapshot stat

type SnapshotStatsResponse

type SnapshotStatsResponse struct {
	Snapshots []SnapshotStatDataResponse `json:"snapshots"`
}

SnapshotStatsResponse is a representation of the snapshots stats

type Snapshots

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

Snapshots information struct

func (*Snapshots) Update

func (c *Snapshots) Update(ctx context.Context, ch chan<- prometheus.Metric) error

type TaskCollector

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

Task Information Struct

func (*TaskCollector) Update

func (t *TaskCollector) Update(ctx context.Context, ch chan<- prometheus.Metric) error

type TotalFields

type TotalFields struct {
	Limit string `json:"limit"`
}

TotalFields defines the limit on the number of mapped fields

type VersionInfo

type VersionInfo struct {
	Number        semver.Version `json:"number"`
	BuildHash     string         `json:"build_hash"`
	BuildDate     string         `json:"build_date"`
	BuildSnapshot bool           `json:"build_snapshot"`
	LuceneVersion semver.Version `json:"lucene_version"`
}

VersionInfo is the version info retrievable from the / endpoint, embedded in ClusterInfoResponse

Jump to

Keyboard shortcuts

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