Documentation ¶
Index ¶
- type ChunkStore
- type Config
- type Ingester
- func (i *Ingester) AllUserStats(ctx old_ctx.Context, req *client.UserStatsRequest) (*client.UsersStatsResponse, error)
- func (i *Ingester) Check(ctx old_ctx.Context, req *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error)
- func (i *Ingester) Flush()
- func (i *Ingester) FlushHandler(w http.ResponseWriter, r *http.Request)
- func (i *Ingester) LabelNames(ctx old_ctx.Context, req *client.LabelNamesRequest) (*client.LabelNamesResponse, error)
- func (i *Ingester) LabelValues(ctx old_ctx.Context, req *client.LabelValuesRequest) (*client.LabelValuesResponse, error)
- func (i *Ingester) MetricsForLabelMatchers(ctx old_ctx.Context, req *client.MetricsForLabelMatchersRequest) (*client.MetricsForLabelMatchersResponse, error)
- func (i *Ingester) Push(ctx old_ctx.Context, req *client.WriteRequest) (*client.WriteResponse, error)
- func (i *Ingester) Query(ctx old_ctx.Context, req *client.QueryRequest) (*client.QueryResponse, error)
- func (i *Ingester) QueryStream(req *client.QueryRequest, stream client.Ingester_QueryStreamServer) error
- func (i *Ingester) ReadinessHandler(w http.ResponseWriter, r *http.Request)
- func (i *Ingester) Shutdown()
- func (i *Ingester) StopIncomingRequests()
- func (i *Ingester) TransferChunks(stream client.Ingester_TransferChunksServer) error
- func (i *Ingester) TransferOut(ctx context.Context) error
- func (i *Ingester) UserStats(ctx old_ctx.Context, req *client.UserStatsRequest) (*client.UserStatsResponse, error)
- func (i *Ingester) Watch(in *grpc_health_v1.HealthCheckRequest, ...) error
Constants ¶
This section is empty.
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 { LifecyclerConfig ring.LifecyclerConfig `yaml:"lifecycler,omitempty"` // Config for transferring chunks. MaxTransferRetries int `yaml:"max_transfer_retries,omitempty"` // Config for chunk flushing. FlushCheckPeriod time.Duration RetainPeriod time.Duration MaxChunkIdle time.Duration FlushOpTimeout time.Duration MaxChunkAge time.Duration ChunkAgeJitter time.Duration ConcurrentFlushes int SpreadFlushes bool MinChunkLength int RateUpdatePeriod time.Duration // contains filtered or unexported fields }
Config for an Ingester.
func (*Config) RegisterFlags ¶
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. Based on Prometheus 1.x MemorySeriesStorage.
func New ¶
func New(cfg Config, clientConfig client.Config, limits *validation.Overrides, chunkStore ChunkStore, registerer prometheus.Registerer) (*Ingester, error)
New constructs a new Ingester.
func (*Ingester) AllUserStats ¶
func (i *Ingester) AllUserStats(ctx old_ctx.Context, req *client.UserStatsRequest) (*client.UsersStatsResponse, error)
AllUserStats returns ingestion statistics for all users known to this ingester.
func (*Ingester) Check ¶
func (i *Ingester) Check(ctx old_ctx.Context, req *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error)
Check implements the grpc healthcheck
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, r *http.Request)
FlushHandler triggers a flush of all in memory chunks. Mainly used for local testing.
func (*Ingester) LabelNames ¶
func (i *Ingester) LabelNames(ctx old_ctx.Context, req *client.LabelNamesRequest) (*client.LabelNamesResponse, error)
LabelNames return all the label names.
func (*Ingester) LabelValues ¶
func (i *Ingester) LabelValues(ctx old_ctx.Context, req *client.LabelValuesRequest) (*client.LabelValuesResponse, error)
LabelValues returns all label values that are associated with a given label name.
func (*Ingester) MetricsForLabelMatchers ¶
func (i *Ingester) MetricsForLabelMatchers(ctx old_ctx.Context, req *client.MetricsForLabelMatchersRequest) (*client.MetricsForLabelMatchersResponse, error)
MetricsForLabelMatchers returns all the metrics which match a set of matchers.
func (*Ingester) Push ¶
func (i *Ingester) Push(ctx old_ctx.Context, req *client.WriteRequest) (*client.WriteResponse, error)
Push implements client.IngesterServer
func (*Ingester) Query ¶
func (i *Ingester) Query(ctx old_ctx.Context, req *client.QueryRequest) (*client.QueryResponse, error)
Query implements service.IngesterServer
func (*Ingester) QueryStream ¶
func (i *Ingester) QueryStream(req *client.QueryRequest, stream client.Ingester_QueryStreamServer) error
QueryStream 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 beings the process to stop this ingester.
func (*Ingester) StopIncomingRequests ¶
func (i *Ingester) StopIncomingRequests()
StopIncomingRequests is called during the shutdown process.
func (*Ingester) TransferChunks ¶
func (i *Ingester) TransferChunks(stream client.Ingester_TransferChunksServer) error
TransferChunks receives all the chunks from another ingester.
func (*Ingester) TransferOut ¶
TransferOut finds an ingester in PENDING state and transfers our chunks to it. Called as part of the ingester shutdown process.
func (*Ingester) UserStats ¶
func (i *Ingester) UserStats(ctx old_ctx.Context, req *client.UserStatsRequest) (*client.UserStatsResponse, error)
UserStats returns ingestion statistics for the current user.
func (*Ingester) Watch ¶
func (i *Ingester) Watch(in *grpc_health_v1.HealthCheckRequest, stream grpc_health_v1.Health_WatchServer) error
Watch implements the grpc healthcheck.