Documentation ¶
Index ¶
- Constants
- Variables
- type ChunkStore
- type Config
- type Ingester
- func (i *Ingester) Collect(ch chan<- prometheus.Metric)
- func (i *Ingester) Describe(ch chan<- *prometheus.Desc)
- func (i *Ingester) LabelValues(ctx context.Context, req *cortex.LabelValuesRequest) (*cortex.LabelValuesResponse, error)
- func (i *Ingester) MetricsForLabelMatchers(ctx context.Context, req *cortex.MetricsForLabelMatchersRequest) (*cortex.MetricsForLabelMatchersResponse, error)
- func (i *Ingester) Push(ctx context.Context, req *cortex.WriteRequest) (*cortex.WriteResponse, error)
- func (i *Ingester) Query(ctx context.Context, req *cortex.QueryRequest) (*cortex.QueryResponse, error)
- func (i *Ingester) ReadinessHandler(w http.ResponseWriter, r *http.Request)
- func (i *Ingester) Stop()
- func (i *Ingester) UserStats(ctx context.Context, req *cortex.UserStatsRequest) (*cortex.UserStatsResponse, error)
- type UserStatesConfig
Constants ¶
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 ¶
var ( // ErrOutOfOrderSample is returned if a sample has a timestamp before the latest // timestamp in the series it is appended to. ErrOutOfOrderSample = fmt.Errorf("sample timestamp out of order") // ErrDuplicateSampleForTimestamp is returned if a sample has the same // timestamp as the latest sample in the series it is appended to but a // different value. (Appending an identical sample is a no-op and does // not cause an error.) ErrDuplicateSampleForTimestamp = fmt.Errorf("sample with repeated timestamp but different value") )
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 { FlushCheckPeriod time.Duration MaxChunkIdle time.Duration MaxChunkAge time.Duration ConcurrentFlushes int ChunkEncoding string UserStatesConfig UserStatesConfig }
Config configures 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. Its like MemorySeriesStorage, but simpler.
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) LabelValues ¶
func (i *Ingester) LabelValues(ctx context.Context, req *cortex.LabelValuesRequest) (*cortex.LabelValuesResponse, error)
LabelValues returns all label values that are associated with a given label name.
func (*Ingester) MetricsForLabelMatchers ¶
func (i *Ingester) MetricsForLabelMatchers(ctx context.Context, req *cortex.MetricsForLabelMatchersRequest) (*cortex.MetricsForLabelMatchersResponse, error)
MetricsForLabelMatchers returns all the metrics which match a set of matchers.
func (*Ingester) Push ¶
func (i *Ingester) Push(ctx context.Context, req *cortex.WriteRequest) (*cortex.WriteResponse, error)
Push implements cortex.IngesterServer
func (*Ingester) Query ¶
func (i *Ingester) Query(ctx context.Context, req *cortex.QueryRequest) (*cortex.QueryResponse, error)
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) UserStats ¶
func (i *Ingester) UserStats(ctx context.Context, req *cortex.UserStatsRequest) (*cortex.UserStatsResponse, error)
UserStats returns ingestion statistics for the current user.