ingester

package
v0.0.0-...-2371dfd Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2017 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// DefaultConcurrentFlush is the number of series to flush concurrently
	DefaultConcurrentFlush = 50
	// DefaultMaxSeriesPerUser is the maximum number of series allowed per user.
	DefaultMaxSeriesPerUser = 5000000
	// DefaultMaxSeriesPerMetric is the maximum number of series in one metric (of a single user).
	DefaultMaxSeriesPerMetric = 50000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChunkStore

type ChunkStore interface {
	Put(ctx context.Context, chunks []cortex_chunk.Chunk) error
}

ChunkStore is the interface we need to store chunks

type Config

type Config struct {
	RingConfig ring.Config

	// Config for the ingester lifecycle control
	ListenPort       *int
	NumTokens        int
	HeartbeatPeriod  time.Duration
	JoinAfter        time.Duration
	SearchPendingFor time.Duration
	ClaimOnRollout   bool

	// Config for chunk flushing
	FlushCheckPeriod  time.Duration
	MaxChunkIdle      time.Duration
	ConcurrentFlushes int
	ChunkEncoding     string

	KVClient ring.KVClient
	// contains filtered or unexported fields
}

Config for an Ingester.

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(f *flag.FlagSet)

RegisterFlags adds the flags required to config this to the given FlagSet

type Ingester

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

Ingester deals with "in flight" chunks. Its like MemorySeriesStorage, but simpler.

func New

func New(cfg Config, schemaCfg cortex_chunk.SchemaConfig, chunkStore ChunkStore) (*Ingester, error)

New constructs a new Ingester.

func (*Ingester) ChangeState

func (i *Ingester) ChangeState(state ring.IngesterState) error

ChangeState of the ingester, for use off of the loop() goroutine.

func (*Ingester) ClaimTokensFor

func (i *Ingester) ClaimTokensFor(ingesterID string) error

ClaimTokensFor takes all the tokens for the supplied ingester and assigns them to this ingester.

func (*Ingester) Collect

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

Collect implements prometheus.Collector.

func (*Ingester) Describe

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

Describe implements prometheus.Collector.

func (*Ingester) FlushHandler

func (i *Ingester) FlushHandler(w http.ResponseWriter, r *http.Request)

FlushHandler triggers a flush of all in memory chunks. Mainly used for local testing.

func (*Ingester) LabelValues

LabelValues returns all label values that are associated with a given label name.

func (*Ingester) MetricsForLabelMatchers

MetricsForLabelMatchers returns all the metrics which match a set of matchers.

func (*Ingester) Push

Push implements client.IngesterServer

func (*Ingester) Query

Query implements service.IngesterServer

func (*Ingester) ReadinessHandler

func (i *Ingester) ReadinessHandler(w http.ResponseWriter, r *http.Request)

ReadinessHandler is used to indicate to k8s when the ingesters are ready for the addition removal of another ingester. Returns 204 when the ingester is ready, 500 otherwise.

func (*Ingester) Shutdown

func (i *Ingester) Shutdown()

Shutdown stops the ingester. It will: - send chunks to another ingester, if it can. - otherwise, flush chunks to the chunk store. - remove config from Consul. - block until we've successfully shutdown.

func (*Ingester) TransferChunks

func (i *Ingester) TransferChunks(stream client.Ingester_TransferChunksServer) error

TransferChunks receives all the chunks from another ingester.

func (*Ingester) UserStats

UserStats returns ingestion statistics for the current user.

type UserStatesConfig

type UserStatesConfig struct {
	RateUpdatePeriod   time.Duration
	MaxSeriesPerUser   int
	MaxSeriesPerMetric int
}

UserStatesConfig configures userStates properties.

func (*UserStatesConfig) RegisterFlags

func (cfg *UserStatesConfig) RegisterFlags(f *flag.FlagSet)

RegisterFlags adds the flags required to config this to the given FlagSet

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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