Documentation ¶
Index ¶
- Constants
- func DisableSignalHandling(config *server.Config)
- func InheritCommonFlagValues(log log.Logger, fs *flag.FlagSet, common CommonConfig, ...) error
- func NewRuntimeManager(cfg *Config, name string, reg prometheus.Registerer, logger log.Logger) (*runtimeconfig.Manager, error)
- func NewServerService(serv *server.Server, servicesToWaitFor func() []services.Service) services.Service
- func ThanosTracerStreamInterceptor(srv interface{}, ss grpc.ServerStream, _ *grpc.StreamServerInfo, ...) error
- func ThanosTracerUnaryInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, ...) (interface{}, error)
- func UnmarshalCommonYAML(value *yaml.Node, inheriters ...CommonConfigInheriter) error
- type CommonConfig
- type CommonConfigInheritance
- type CommonConfigInheriter
- type Config
- type ConfigWithCommon
- type Mimir
Constants ¶
const ( ActivityTracker string = "activity-tracker" API string = "api" SanityCheck string = "sanity-check" IngesterRing string = "ingester-ring" IngesterPartitionRing string = "ingester-partitions-ring" RuntimeConfig string = "runtime-config" Overrides string = "overrides" OverridesExporter string = "overrides-exporter" Server string = "server" ActiveGroupsCleanupService string = "active-groups-cleanup-service" Distributor string = "distributor" DistributorService string = "distributor-service" Ingester string = "ingester" IngesterService string = "ingester-service" Flusher string = "flusher" Querier string = "querier" Queryable string = "queryable" StoreQueryable string = "store-queryable" QueryFrontend string = "query-frontend" QueryFrontendCodec string = "query-frontend-codec" QueryFrontendTripperware string = "query-frontend-tripperware" QueryFrontendTopicOffsetsReader string = "query-frontend-topic-offsets-reader" RulerStorage string = "ruler-storage" Ruler string = "ruler" AlertManager string = "alertmanager" Compactor string = "compactor" StoreGateway string = "store-gateway" MemberlistKV string = "memberlist-kv" QueryScheduler string = "query-scheduler" Vault string = "vault" TenantFederation string = "tenant-federation" UsageStats string = "usage-stats" BlockBuilder string = "block-builder" BlockBuilderScheduler string = "block-builder-scheduler" ContinuousTest string = "continuous-test" All string = "all" // Write Read and Backend are the targets used when using the read-write deployment mode. Write string = "write" Read string = "read" Backend string = "backend" )
The various modules that make up Mimir.
Variables ¶
This section is empty.
Functions ¶
func DisableSignalHandling ¶
DisableSignalHandling puts a dummy signal handler
func InheritCommonFlagValues ¶
func InheritCommonFlagValues(log log.Logger, fs *flag.FlagSet, common CommonConfig, inheriters ...CommonConfigInheriter) error
InheritCommonFlagValues will inherit the values of the provided common flags to all the inheriters.
func NewRuntimeManager ¶
func NewRuntimeManager(cfg *Config, name string, reg prometheus.Registerer, logger log.Logger) (*runtimeconfig.Manager, error)
NewRuntimeManager returns a runtimeconfig.Manager, a services.Service that must be explicitly started to perform any work. cfg is initialized as necessary, before being passed to runtimeconfig.New.
func NewServerService ¶
func NewServerService(serv *server.Server, servicesToWaitFor func() []services.Service) services.Service
NewServerService constructs service from Server component. servicesToWaitFor is called when server is stopping, and should return all services that need to terminate before server actually stops. N.B.: this function is NOT Mimir specific, please let's keep it that way. Passed server should not react on signals. Early return from Run function is considered to be an error.
func ThanosTracerStreamInterceptor ¶
func ThanosTracerStreamInterceptor(srv interface{}, ss grpc.ServerStream, _ *grpc.StreamServerInfo, handler grpc.StreamHandler) error
ThanosTracerStreamInterceptor injects the opentracing global tracer into the context in order to get it picked up by Thanos components.
func ThanosTracerUnaryInterceptor ¶
func ThanosTracerUnaryInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
ThanosTracerUnaryInterceptor injects the opentracing global tracer into the context in order to get it picked up by Thanos components.
func UnmarshalCommonYAML ¶
func UnmarshalCommonYAML(value *yaml.Node, inheriters ...CommonConfigInheriter) error
UnmarshalCommonYAML provides the implementation for UnmarshalYAML functions to unmarshal the CommonConfig. A list of CommonConfig inheriters can be provided
Types ¶
type CommonConfig ¶
type CommonConfig struct {
Storage bucket.StorageBackendConfig `yaml:"storage"`
}
func (*CommonConfig) RegisterFlags ¶
func (c *CommonConfig) RegisterFlags(f *flag.FlagSet)
RegisterFlags registers flag.
type CommonConfigInheritance ¶
type CommonConfigInheritance struct {
Storage map[string]*bucket.StorageBackendConfig
}
type CommonConfigInheriter ¶
type CommonConfigInheriter interface {
CommonConfigInheritance() CommonConfigInheritance
}
CommonConfigInheriter abstracts config that inherit common config values.
type Config ¶
type Config struct { Target flagext.StringSliceCSV `yaml:"target"` MultitenancyEnabled bool `yaml:"multitenancy_enabled"` NoAuthTenant string `yaml:"no_auth_tenant" category:"advanced"` ShutdownDelay time.Duration `yaml:"shutdown_delay" category:"advanced"` MaxSeparateMetricsGroupsPerUser int `yaml:"max_separate_metrics_groups_per_user" category:"experimental"` EnableGoRuntimeMetrics bool `yaml:"enable_go_runtime_metrics" category:"advanced"` PrintConfig bool `yaml:"-"` ApplicationName string `yaml:"-"` API api.Config `yaml:"api"` Server server.Config `yaml:"server"` Distributor distributor.Config `yaml:"distributor"` Querier querier.Config `yaml:"querier"` IngesterClient client.Config `yaml:"ingester_client"` Ingester ingester.Config `yaml:"ingester"` Flusher flusher.Config `yaml:"flusher"` LimitsConfig validation.Limits `yaml:"limits"` Worker querier_worker.Config `yaml:"frontend_worker"` Frontend frontend.CombinedFrontendConfig `yaml:"frontend"` IngestStorage ingest.Config `yaml:"ingest_storage"` BlockBuilder blockbuilder.Config `yaml:"block_builder" doc:"hidden"` BlockBuilderScheduler blockbuilderscheduler.Config `yaml:"block_builder_scheduler" doc:"hidden"` BlocksStorage tsdb.BlocksStorageConfig `yaml:"blocks_storage"` Compactor compactor.Config `yaml:"compactor"` StoreGateway storegateway.Config `yaml:"store_gateway"` TenantFederation tenantfederation.Config `yaml:"tenant_federation"` ActivityTracker activitytracker.Config `yaml:"activity_tracker"` Vault vault.Config `yaml:"vault"` Ruler ruler.Config `yaml:"ruler"` RulerStorage rulestore.Config `yaml:"ruler_storage"` Alertmanager alertmanager.MultitenantAlertmanagerConfig `yaml:"alertmanager"` AlertmanagerStorage alertstore.Config `yaml:"alertmanager_storage"` RuntimeConfig runtimeconfig.Config `yaml:"runtime_config"` MemberlistKV memberlist.KVConfig `yaml:"memberlist"` QueryScheduler scheduler.Config `yaml:"query_scheduler"` UsageStats usagestats.Config `yaml:"usage_stats"` ContinuousTest continuoustest.Config `yaml:"-"` OverridesExporter exporter.Config `yaml:"overrides_exporter"` Common CommonConfig `yaml:"common"` TimeseriesUnmarshalCachingOptimizationEnabled bool `yaml:"timeseries_unmarshal_caching_optimization_enabled" category:"experimental"` }
Config is the root config for Mimir.
func (*Config) CommonConfigInheritance ¶
func (c *Config) CommonConfigInheritance() CommonConfigInheritance
func (*Config) RegisterFlags ¶
RegisterFlags registers flags.
func (*Config) Validate ¶
Validate the mimir config and return an error if the validation doesn't pass
func (*Config) ValidateLimits ¶
func (c *Config) ValidateLimits(limits validation.Limits) error
ValidateLimits validates the runtime limits that can be set for each tenant against static configs
type ConfigWithCommon ¶
type ConfigWithCommon Config
ConfigWithCommon should be passed to yaml.Unmarshal to properly unmarshal Common values. We don't implement UnmarshalYAML on Config itself because that would disallow inlining it in other configs.
func (*ConfigWithCommon) UnmarshalYAML ¶
func (c *ConfigWithCommon) UnmarshalYAML(value *yaml.Node) error
type Mimir ¶
type Mimir struct { Cfg Config Registerer prometheus.Registerer // set during initialization ServiceMap map[string]services.Service ModuleManager *modules.Manager API *api.API Server *server.Server IngesterRing *ring.Ring IngesterPartitionRingWatcher *ring.PartitionRingWatcher IngesterPartitionInstanceRing *ring.PartitionInstanceRing TenantLimits validation.TenantLimits Overrides *validation.Overrides ActiveGroupsCleanup *util.ActiveGroupsCleanupService Distributor *distributor.Distributor Ingester *ingester.Ingester Flusher *flusher.Flusher FrontendV1 *frontendv1.Frontend RuntimeConfig *runtimeconfig.Manager QuerierQueryable prom_storage.SampleAndChunkQueryable ExemplarQueryable prom_storage.ExemplarQueryable AdditionalStorageQueryables []querier.TimeRangeQueryable MetadataSupplier querier.MetadataSupplier QuerierEngine promql.QueryEngine QueryFrontendTripperware querymiddleware.Tripperware QueryFrontendTopicOffsetsReader *ingest.TopicOffsetsReader QueryFrontendCodec querymiddleware.Codec Ruler *ruler.Ruler RulerStorage rulestore.RuleStore Alertmanager *alertmanager.MultitenantAlertmanager Compactor *compactor.MultitenantCompactor StoreGateway *storegateway.StoreGateway MemberlistKV *memberlist.KVInitService ActivityTracker *activitytracker.ActivityTracker Vault *vault.Vault UsageStatsReporter *usagestats.Reporter BlockBuilder *blockbuilder.BlockBuilder BlockBuilderScheduler *blockbuilderscheduler.BlockBuilderScheduler ContinuousTestManager *continuoustest.Manager BuildInfoHandler http.Handler }
Mimir is the root datastructure for Mimir.