e2ethanos

package
v0.31.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: Apache-2.0 Imports: 31 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// FeatureExemplarStorage is a feature flag that enables exemplar storage on Prometheus.
	FeatureExemplarStorage = "exemplar-storage"
)
View Source
const LocalPrometheusTarget = "localhost:9090"

LocalPrometheusTarget is a constant to be used in the Prometheus config if you wish to enable Prometheus to scrape itself in a test.

Variables

View Source
var QueryUpWithoutInstance = func() string { return "sum(up) without (instance)" }

NOTE: by using aggregation all results are now unsorted.

Functions

func CleanScenario added in v0.14.0

func CleanScenario(t testing.TB, e *e2e.DockerEnvironment) func()

func DefaultAlertmanagerImage

func DefaultAlertmanagerImage() string

DefaultAlertmanagerImage sets default Alertmanager image used in e2e service.

func DefaultImage

func DefaultImage() string

DefaultImage returns the local docker image to use to run Thanos.

func DefaultPromConfig added in v0.26.0

func DefaultPromConfig(name string, replica int, remoteWriteEndpoint, ruleFile string, scrapeTargets ...string) string

DefaultPromConfig returns Prometheus config that sets Prometheus to: * expose 2 external labels, source and replica. * optionallly scrape self. This will produce up == 0 metric which we can assert on. * optionally remote write endpoint to write into.

func DefaultPrometheusImage

func DefaultPrometheusImage() string

DefaultPrometheusImage sets default Prometheus image used in e2e service.

func NewAlertmanager

func NewAlertmanager(e e2e.Environment, name string) *e2emon.InstrumentedRunnable

func NewAvalanche added in v0.28.0

func NewMemcached added in v0.16.0

func NewMemcached(e e2e.Environment, name string) *e2emon.InstrumentedRunnable

func NewPrometheus

func NewPrometheus(e e2e.Environment, name, promConfig, webConfig, promImage string, enableFeatures ...string) *e2emon.InstrumentedRunnable

func NewPrometheusWithJaegerTracingSidecarCustomImage added in v0.29.0

func NewPrometheusWithJaegerTracingSidecarCustomImage(e e2e.Environment, name, promConfig, webConfig,
	promImage, minTime, sidecarImage, jaegerConfig string, enableFeatures ...string) (
	*e2emon.InstrumentedRunnable, *e2emon.InstrumentedRunnable)

func NewPrometheusWithSidecar

func NewPrometheusWithSidecar(e e2e.Environment, name, promConfig, webConfig, promImage, minTime string, enableFeatures ...string) (*e2emon.InstrumentedRunnable, *e2emon.InstrumentedRunnable)

func NewPrometheusWithSidecarCustomImage added in v0.24.0

func NewPrometheusWithSidecarCustomImage(e e2e.Environment, name, promConfig, webConfig, promImage, minTime string, sidecarImage string, enableFeatures ...string) (*e2emon.InstrumentedRunnable, *e2emon.InstrumentedRunnable)

func NewQueryFrontend added in v0.15.0

func NewQueryFrontend(e e2e.Environment, name, downstreamURL string, config queryfrontend.Config, cacheConfig queryfrontend.CacheProviderConfig) *e2eobs.Observable

func NewRedis added in v0.30.0

func NewRedis(e e2e.Environment, name string) e2e.Runnable

func NewReverseProxy added in v0.24.0

func NewReverseProxy(e e2e.Environment, name, tenantID, target string) *e2emon.InstrumentedRunnable

func NewS3Config added in v0.25.0

func NewS3Config(bucket, endpoint, basePath string) s3.Config

func NewSingleHostReverseProxy added in v0.15.0

func NewSingleHostReverseProxy(target *url.URL, externalPrefix string) *httputil.ReverseProxy

NewSingleHostReverseProxy is almost same as httputil.NewSingleHostReverseProxy but it performs a url path rewrite.

func NewStoreGW

func NewStoreGW(e e2e.Environment, name string, bucketConfig client.BucketConfig, cacheConfig string, extArgs []string, relabelConfig ...relabel.Config) *e2emon.InstrumentedRunnable

func NewToolsBucketWeb added in v0.20.0

func NewToolsBucketWeb(
	e e2e.Environment,
	name string,
	bucketConfig client.BucketConfig,
	routePrefix,
	externalPrefix string,
	minTime string,
	maxTime string,
	relabelConfig string,
) *e2emon.InstrumentedRunnable

func RemoteWriteEndpoint

func RemoteWriteEndpoint(addr string) string

Types

type AvalancheOptions added in v0.28.0

type AvalancheOptions struct {
	MetricCount    string
	SeriesCount    string
	MetricInterval string
	SeriesInterval string
	ValueInterval  string

	RemoteURL           string
	RemoteWriteInterval string
	RemoteBatchSize     string
	RemoteRequestCount  string

	TenantID string
}

type CompactorBuilder added in v0.27.0

type CompactorBuilder struct {
	e2e.Linkable
	// contains filtered or unexported fields
}

func NewCompactorBuilder added in v0.27.0

func NewCompactorBuilder(e e2e.Environment, name string) *CompactorBuilder

func (*CompactorBuilder) Init added in v0.27.0

func (c *CompactorBuilder) Init(bucketConfig client.BucketConfig, relabelConfig []relabel.Config, extArgs ...string) *e2emon.InstrumentedRunnable

type QuerierBuilder added in v0.22.0

type QuerierBuilder struct {
	e2e.Linkable
	// contains filtered or unexported fields
}

func NewQuerierBuilder added in v0.22.0

func NewQuerierBuilder(e e2e.Environment, name string, storeAddresses ...string) *QuerierBuilder

func (*QuerierBuilder) Init added in v0.27.0

func (*QuerierBuilder) WithDisablePartialResponses added in v0.29.0

func (q *QuerierBuilder) WithDisablePartialResponses(disable bool) *QuerierBuilder

func (*QuerierBuilder) WithEnabledFeatures added in v0.24.0

func (q *QuerierBuilder) WithEnabledFeatures(enableFeatures []string) *QuerierBuilder

func (*QuerierBuilder) WithEndpoints added in v0.24.0

func (q *QuerierBuilder) WithEndpoints(endpoints ...string) *QuerierBuilder

func (*QuerierBuilder) WithEngine added in v0.31.0

func (q *QuerierBuilder) WithEngine(engine string) *QuerierBuilder

func (*QuerierBuilder) WithExemplarAddresses added in v0.22.0

func (q *QuerierBuilder) WithExemplarAddresses(exemplarAddresses ...string) *QuerierBuilder

func (*QuerierBuilder) WithExternalPrefix added in v0.22.0

func (q *QuerierBuilder) WithExternalPrefix(externalPrefix string) *QuerierBuilder

func (*QuerierBuilder) WithFileSDStoreAddresses added in v0.22.0

func (q *QuerierBuilder) WithFileSDStoreAddresses(fileSDStoreAddresses ...string) *QuerierBuilder

func (*QuerierBuilder) WithImage added in v0.24.0

func (q *QuerierBuilder) WithImage(image string) *QuerierBuilder

func (*QuerierBuilder) WithMetadataAddresses added in v0.22.0

func (q *QuerierBuilder) WithMetadataAddresses(metadataAddresses ...string) *QuerierBuilder

func (*QuerierBuilder) WithProxyStrategy added in v0.29.0

func (q *QuerierBuilder) WithProxyStrategy(strategy string) *QuerierBuilder

func (*QuerierBuilder) WithQueryMode added in v0.31.0

func (q *QuerierBuilder) WithQueryMode(mode string) *QuerierBuilder

func (*QuerierBuilder) WithReplicaLabels added in v0.28.0

func (q *QuerierBuilder) WithReplicaLabels(labels ...string) *QuerierBuilder

WithReplicaLabels replaces default [replica] replica label configuration for the querier.

func (*QuerierBuilder) WithRoutePrefix added in v0.22.0

func (q *QuerierBuilder) WithRoutePrefix(routePrefix string) *QuerierBuilder

func (*QuerierBuilder) WithRuleAddresses added in v0.22.0

func (q *QuerierBuilder) WithRuleAddresses(ruleAddresses ...string) *QuerierBuilder

func (*QuerierBuilder) WithStoreAddresses added in v0.27.0

func (q *QuerierBuilder) WithStoreAddresses(storeAddresses ...string) *QuerierBuilder

func (*QuerierBuilder) WithStrictEndpoints added in v0.31.0

func (q *QuerierBuilder) WithStrictEndpoints(strictEndpoints ...string) *QuerierBuilder

func (*QuerierBuilder) WithTargetAddresses added in v0.22.0

func (q *QuerierBuilder) WithTargetAddresses(targetAddresses ...string) *QuerierBuilder

func (*QuerierBuilder) WithTracingConfig added in v0.22.0

func (q *QuerierBuilder) WithTracingConfig(tracingConfig string) *QuerierBuilder

type ReceiveBuilder added in v0.27.0

type ReceiveBuilder struct {
	e2e.Linkable
	// contains filtered or unexported fields
}

func NewReceiveBuilder added in v0.27.0

func NewReceiveBuilder(e e2e.Environment, name string) *ReceiveBuilder

func (*ReceiveBuilder) Init added in v0.27.0

Init creates a Thanos Receive instance. If ingestion is enabled it will be configured for ingesting samples. If routing is configured (i.e. hashring configuration is provided) it routes samples to other receivers. If none, it errors out.

func (*ReceiveBuilder) WithExemplarsInMemStorage added in v0.27.0

func (r *ReceiveBuilder) WithExemplarsInMemStorage(maxExemplars int) *ReceiveBuilder

func (*ReceiveBuilder) WithImage added in v0.27.0

func (r *ReceiveBuilder) WithImage(image string) *ReceiveBuilder

func (*ReceiveBuilder) WithIngestionEnabled added in v0.27.0

func (r *ReceiveBuilder) WithIngestionEnabled() *ReceiveBuilder

func (*ReceiveBuilder) WithNativeHistograms added in v0.31.0

func (r *ReceiveBuilder) WithNativeHistograms() *ReceiveBuilder

func (*ReceiveBuilder) WithRelabelConfigs added in v0.27.0

func (r *ReceiveBuilder) WithRelabelConfigs(relabelConfigs []*relabel.Config) *ReceiveBuilder

func (*ReceiveBuilder) WithRouting added in v0.27.0

func (r *ReceiveBuilder) WithRouting(replication int, hashringConfigs ...receive.HashringConfig) *ReceiveBuilder

func (*ReceiveBuilder) WithValidationEnabled added in v0.28.0

func (r *ReceiveBuilder) WithValidationEnabled(limit int, metaMonitoring string, query ...string) *ReceiveBuilder

type RulerBuilder added in v0.27.0

type RulerBuilder struct {
	e2e.Linkable
	// contains filtered or unexported fields
}

func NewRulerBuilder added in v0.27.0

func NewRulerBuilder(e e2e.Environment, name string) *RulerBuilder

NewRulerBuilder is a Ruler future that allows extra configuration before initialization.

func (*RulerBuilder) InitStateless added in v0.27.0

func (r *RulerBuilder) InitStateless(internalRuleDir string, queryCfg []httpconfig.Config, remoteWriteCfg []*config.RemoteWriteConfig) *e2emon.InstrumentedRunnable

func (*RulerBuilder) InitTSDB added in v0.27.0

func (r *RulerBuilder) InitTSDB(internalRuleDir string, queryCfg []httpconfig.Config) *e2emon.InstrumentedRunnable

func (*RulerBuilder) WithAlertManagerConfig added in v0.27.0

func (r *RulerBuilder) WithAlertManagerConfig(amCfg []alert.AlertmanagerConfig) *RulerBuilder

func (*RulerBuilder) WithEvalInterval added in v0.28.0

func (r *RulerBuilder) WithEvalInterval(evalInterval string) *RulerBuilder

func (*RulerBuilder) WithForGracePeriod added in v0.30.0

func (r *RulerBuilder) WithForGracePeriod(forGracePeriod string) *RulerBuilder

func (*RulerBuilder) WithImage added in v0.27.0

func (r *RulerBuilder) WithImage(image string) *RulerBuilder

func (*RulerBuilder) WithReplicaLabel added in v0.27.0

func (r *RulerBuilder) WithReplicaLabel(replicaLabel string) *RulerBuilder

func (*RulerBuilder) WithResendDelay added in v0.28.0

func (r *RulerBuilder) WithResendDelay(resendDelay string) *RulerBuilder

func (*RulerBuilder) WithRestoreIgnoredLabels added in v0.30.0

func (r *RulerBuilder) WithRestoreIgnoredLabels(labels ...string) *RulerBuilder

Jump to

Keyboard shortcuts

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