e2ethanos

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 36 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ContainerSharedDir = "/shared"
)
View Source
const (
	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

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

TODO(bwplotka): Run against multiple?

func NewAlertmanager

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

func NewCompactor

func NewCompactor(e e2e.Environment, name string, bucketConfig client.BucketConfig, relabelConfig []relabel.Config, extArgs ...string) (e2e.InstrumentedRunnable, error)

func NewIngestingReceiver added in v0.22.0

func NewIngestingReceiver(e e2e.Environment, name string) (e2e.InstrumentedRunnable, error)

NewIngestingReceiver creates a Thanos Receive instance that is only configured to ingest, not route to other receivers.

func NewMemcached added in v0.16.0

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

func NewMinio added in v0.24.0

func NewMinio(env e2e.Environment, name, bktName string) (e2e.InstrumentedRunnable, error)

NewMinio returns minio server, used as a local replacement for S3. TODO(@matej-g): This is a temporary workaround for https://github.com/efficientgo/e2e/issues/11; after this is addresses fixed all calls should be replaced with e2edb.NewMinio.

func NewPrometheus

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

func NewPrometheusWithSidecar

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

func NewPrometheusWithSidecarCustomImage added in v0.24.0

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

func NewQueryFrontend added in v0.15.0

func NewQueryFrontend(e e2e.Environment, name, downstreamURL string, cacheConfig queryfrontend.CacheProviderConfig) (e2e.InstrumentedRunnable, error)

func NewReverseProxy added in v0.24.0

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

func NewRoutingAndIngestingReceiverFromService added in v0.24.0

func NewRoutingAndIngestingReceiverFromService(service e2e.InstrumentedRunnableBuilder, sharedDir string, replicationFactor int, hashring ...receive.HashringConfig) (e2e.InstrumentedRunnable, error)

NewRoutingAndIngestingReceiverFromService creates a Thanos Receive instances from an unitiated service. It is configured both for ingesting samples and routing samples to other receivers.

func NewRoutingAndIngestingReceiverWithConfigWatcher added in v0.22.0

func NewRoutingAndIngestingReceiverWithConfigWatcher(service e2e.InstrumentedRunnableBuilder, sharedDir string, replicationFactor int, hashring ...receive.HashringConfig) (e2e.InstrumentedRunnable, error)

func NewRoutingReceiver added in v0.22.0

func NewRoutingReceiver(e e2e.Environment, name string, replicationFactor int, hashring ...receive.HashringConfig) (e2e.InstrumentedRunnable, error)

NewRoutingReceiver creates a Thanos Receive instance that is only configured to route to other receive instances. It has no local storage.

func NewS3Config added in v0.25.0

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

func NewService

func NewService(
	e e2e.Environment,
	name string,
	image string,
	command e2e.Command,
	readiness *e2e.HTTPReadinessProbe,
	http, grpc int,
	otherPorts ...Port,
) e2e.InstrumentedRunnable

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 NewStatelessRuler added in v0.24.0

func NewStatelessRuler(e e2e.Environment, name, ruleSubDir string, amCfg []alert.AlertmanagerConfig, queryCfg []httpconfig.Config, remoteWriteCfg []*config.RemoteWriteConfig) (e2e.InstrumentedRunnable, error)

func NewStoreGW

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

func NewTSDBRuler added in v0.24.0

func NewTSDBRuler(e e2e.Environment, name, ruleSubDir string, amCfg []alert.AlertmanagerConfig, queryCfg []httpconfig.Config) (e2e.InstrumentedRunnable, error)

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,
) (e2e.InstrumentedRunnable, error)

func NewUninitiatedReceiver added in v0.24.0

func NewUninitiatedReceiver(e e2e.Environment, name string) e2e.InstrumentedRunnableBuilder

NewUninitiatedReceiver returns a future receiver that can be initiated. It is useful for obtaining a receiver address for hashring before the receiver is started.

func RemoteWriteEndpoint

func RemoteWriteEndpoint(addr string) string

Types

type Port added in v0.24.0

type Port struct {
	Name      string
	PortNum   int
	IsMetrics bool
}

type QuerierBuilder added in v0.22.0

type QuerierBuilder struct {
	// contains filtered or unexported fields
}

func NewQuerierBuilder added in v0.22.0

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

func (*QuerierBuilder) Build added in v0.22.0

func (*QuerierBuilder) BuildUninitiated added in v0.24.0

func (q *QuerierBuilder) BuildUninitiated() e2e.InstrumentedRunnableBuilder

func (*QuerierBuilder) Initiate added in v0.24.0

func (q *QuerierBuilder) Initiate(service e2e.InstrumentedRunnableBuilder, storeAddresses ...string) (e2e.InstrumentedRunnable, error)

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) 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) 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) 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

Jump to

Keyboard shortcuts

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