Documentation ¶
Index ¶
- Variables
- type ChunkStore
- type Config
- type Ingester
- func (*Ingester) Check(ctx context.Context, req *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error)
- func (i *Ingester) CheckReady(ctx context.Context) error
- func (i *Ingester) Flush()
- func (i *Ingester) FlushHandler(w http.ResponseWriter, _ *http.Request)
- func (i *Ingester) GetChunkIDs(ctx context.Context, req *logproto.GetChunkIDsRequest) (*logproto.GetChunkIDsResponse, error)
- func (i *Ingester) Label(ctx context.Context, req *logproto.LabelRequest) (*logproto.LabelResponse, error)
- func (i *Ingester) Push(ctx context.Context, req *logproto.PushRequest) (*logproto.PushResponse, error)
- func (i *Ingester) Query(req *logproto.QueryRequest, queryServer logproto.Querier_QueryServer) error
- func (i *Ingester) QuerySample(req *logproto.SampleQueryRequest, ...) error
- func (i *Ingester) Series(ctx context.Context, req *logproto.SeriesRequest) (*logproto.SeriesResponse, error)
- func (i *Ingester) Tail(req *logproto.TailRequest, queryServer logproto.Querier_TailServer) error
- func (i *Ingester) TailersCount(ctx context.Context, in *logproto.TailersCountRequest) (*logproto.TailersCountResponse, error)
- func (i *Ingester) TransferChunks(stream logproto.Ingester_TransferChunksServer) error
- func (i *Ingester) TransferOut(ctx context.Context) error
- func (*Ingester) Watch(*grpc_health_v1.HealthCheckRequest, grpc_health_v1.Health_WatchServer) error
- type Limiter
- type RingCount
Constants ¶
This section is empty.
Variables ¶
var ErrReadOnly = errors.New("Ingester is shutting down")
ErrReadOnly is returned when the ingester is shutting down and a push was attempted.
var (
ErrStreamMissing = errors.New("Stream missing")
)
Errors returned on Query.
Functions ¶
This section is empty.
Types ¶
type ChunkStore ¶
type ChunkStore interface { Put(ctx context.Context, chunks []chunk.Chunk) error SelectLogs(ctx context.Context, req logql.SelectLogParams) (iter.EntryIterator, error) SelectSamples(ctx context.Context, req logql.SelectSampleParams) (iter.SampleIterator, error) GetChunkRefs(ctx context.Context, userID string, from, through model.Time, matchers ...*labels.Matcher) ([][]chunk.Chunk, []*chunk.Fetcher, error) GetSchemaConfigs() []chunk.PeriodConfig }
ChunkStore is the interface we need to store chunks.
type Config ¶
type Config struct { LifecyclerConfig ring.LifecyclerConfig `yaml:"lifecycler,omitempty"` // Config for transferring chunks. MaxTransferRetries int `yaml:"max_transfer_retries,omitempty"` ConcurrentFlushes int `yaml:"concurrent_flushes"` FlushCheckPeriod time.Duration `yaml:"flush_check_period"` FlushOpTimeout time.Duration `yaml:"flush_op_timeout"` RetainPeriod time.Duration `yaml:"chunk_retain_period"` MaxChunkIdle time.Duration `yaml:"chunk_idle_period"` BlockSize int `yaml:"chunk_block_size"` TargetChunkSize int `yaml:"chunk_target_size"` ChunkEncoding string `yaml:"chunk_encoding"` MaxChunkAge time.Duration `yaml:"max_chunk_age"` // Synchronization settings. Used to make sure that ingesters cut their chunks at the same moments. SyncPeriod time.Duration `yaml:"sync_period"` SyncMinUtilization float64 `yaml:"sync_min_utilization"` MaxReturnedErrors int `yaml:"max_returned_stream_errors"` QueryStore bool `yaml:"-"` QueryStoreMaxLookBackPeriod time.Duration `yaml:"query_store_max_look_back_period"` // contains filtered or unexported fields }
Config for an ingester.
func (*Config) RegisterFlags ¶
RegisterFlags registers the flags.
type Ingester ¶
Ingester builds chunks for incoming log streams.
func New ¶
func New(cfg Config, clientConfig client.Config, store ChunkStore, limits *validation.Overrides, registerer prometheus.Registerer) (*Ingester, error)
New makes a new Ingester.
func (*Ingester) Check ¶
func (*Ingester) Check(ctx context.Context, req *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error)
Check implements grpc_health_v1.HealthCheck.
func (*Ingester) CheckReady ¶
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) Flush ¶
func (i *Ingester) Flush()
Flush triggers a flush of all the chunks and closes the flush queues. Called from the Lifecycler as part of the ingester shutdown.
func (*Ingester) FlushHandler ¶
func (i *Ingester) FlushHandler(w http.ResponseWriter, _ *http.Request)
FlushHandler triggers a flush of all in memory chunks. Mainly used for local testing.
func (*Ingester) GetChunkIDs ¶
func (i *Ingester) GetChunkIDs(ctx context.Context, req *logproto.GetChunkIDsRequest) (*logproto.GetChunkIDsResponse, error)
GetChunkIDs is meant to be used only when using an async store like boltdb-shipper.
func (*Ingester) Label ¶
func (i *Ingester) Label(ctx context.Context, req *logproto.LabelRequest) (*logproto.LabelResponse, error)
Label returns the set of labels for the stream this ingester knows about.
func (*Ingester) Push ¶
func (i *Ingester) Push(ctx context.Context, req *logproto.PushRequest) (*logproto.PushResponse, error)
Push implements logproto.Pusher.
func (*Ingester) Query ¶
func (i *Ingester) Query(req *logproto.QueryRequest, queryServer logproto.Querier_QueryServer) error
Query the ingests for log streams matching a set of matchers.
func (*Ingester) QuerySample ¶
func (i *Ingester) QuerySample(req *logproto.SampleQueryRequest, queryServer logproto.Querier_QuerySampleServer) error
QuerySample the ingesters for series from logs matching a set of matchers.
func (*Ingester) Series ¶
func (i *Ingester) Series(ctx context.Context, req *logproto.SeriesRequest) (*logproto.SeriesResponse, error)
Series queries the ingester for log stream identifiers (label sets) matching a set of matchers
func (*Ingester) Tail ¶
func (i *Ingester) Tail(req *logproto.TailRequest, queryServer logproto.Querier_TailServer) error
Tail logs matching given query
func (*Ingester) TailersCount ¶
func (i *Ingester) TailersCount(ctx context.Context, in *logproto.TailersCountRequest) (*logproto.TailersCountResponse, error)
TailersCount returns count of active tail requests from a user
func (*Ingester) TransferChunks ¶
func (i *Ingester) TransferChunks(stream logproto.Ingester_TransferChunksServer) error
TransferChunks receives all chunks from another ingester. The Ingester must be in PENDING state or else the call will fail.
func (*Ingester) TransferOut ¶
TransferOut implements ring.Lifecycler.
func (*Ingester) Watch ¶
func (*Ingester) Watch(*grpc_health_v1.HealthCheckRequest, grpc_health_v1.Health_WatchServer) error
Watch implements grpc_health_v1.HealthCheck.
type Limiter ¶
type Limiter struct {
// contains filtered or unexported fields
}
Limiter implements primitives to get the maximum number of streams an ingester can handle for a specific tenant
func NewLimiter ¶
func NewLimiter(limits *validation.Overrides, ring RingCount, replicationFactor int) *Limiter
NewLimiter makes a new limiter