From 8c33353c625deffc4f1126405a2fe22d573aa51c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20P=C5=82otka?= Date: Wed, 28 Aug 2019 16:41:43 +0100 Subject: [PATCH 01/16] Added dockerhub images mirror for CI. (#1472) Signed-off-by: Bartek Plotka --- .circleci/config.yml | 6 ++++++ Makefile | 16 ++++++++-------- README.md | 5 +++-- go.sum | 1 + website/hugo.yaml | 2 ++ website/layouts/index.html | 11 ++++++++--- 6 files changed, 28 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f9922b4e02..47ee70c398 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -74,6 +74,9 @@ jobs: - run: ln -s .build/linux-amd64/thanos thanos - run: make docker - run: docker run thanos --help + # Upload to both dockerhub and quay.io. + - run: echo "${DOCKERHUB_PASSWORD}" | docker login -u="${DOCKERHUB_USERNAME}" --password-stdin + - run: make docker-push DOCKER_IMAGE_REPO=thanosio/thanos - run: echo "${QUAY_PASSWORD}" | docker login -u="${QUAY_USERNAME}" quay.io --password-stdin - run: make docker-push @@ -97,6 +100,9 @@ jobs: - run: ln -s .build/linux-amd64/thanos thanos - run: make docker - run: docker run thanos --help + # Upload to both dockerhub and quay.io. + - run: echo "${DOCKERHUB_PASSWORD}" | docker login -u="${DOCKERHUB_USERNAME}" --password-stdin + - run: make docker-push DOCKER_IMAGE_REPO=thanosio/thanos DOCKER_IMAGE_TAG=$CIRCLE_TAG - run: echo "${QUAY_PASSWORD}" | docker login -u="${QUAY_USERNAME}" quay.io --password-stdin - run: make docker-push DOCKER_IMAGE_TAG=$CIRCLE_TAG diff --git a/Makefile b/Makefile index 851f3a5af5..2de40f37dd 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ PREFIX ?= $(shell pwd) FILES_TO_FMT ?= $(shell find . -path ./vendor -prune -o -name '*.go' -print) -DOCKER_IMAGE_NAME ?= thanos +DOCKER_IMAGE_REPO ?= quay.io/thanos/thanos DOCKER_IMAGE_TAG ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD))-$(shell date +%Y-%m-%d)-$(shell git rev-parse --short HEAD) TMP_GOPATH ?= /tmp/thanos-go @@ -126,21 +126,21 @@ deps: # docker builds docker with no tag. .PHONY: docker docker: build - @echo ">> building docker image '${DOCKER_IMAGE_NAME}'" - @docker build -t "${DOCKER_IMAGE_NAME}" . + @echo ">> building docker image 'thanos'" + @docker build -t "thanos" . #docker-multi-stage builds docker image using multi-stage. .PHONY: docker-multi-stage docker-multi-stage: - @echo ">> building docker image '${DOCKER_IMAGE_NAME}' with Dockerfile.multi-stage" - @docker build -f Dockerfile.multi-stage -t "${DOCKER_IMAGE_NAME}" . + @echo ">> building docker image 'thanos' with Dockerfile.multi-stage" + @docker build -f Dockerfile.multi-stage -t "thanos" . -# docker-push pushes docker image build under `${DOCKER_IMAGE_NAME}` to quay.io/thanos/"$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" +# docker-push pushes docker image build under `thanos` to "$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_TAG)" .PHONY: docker-push docker-push: @echo ">> pushing image" - @docker tag "${DOCKER_IMAGE_NAME}" quay.io/thanos/"$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" - @docker push quay.io/thanos/"$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" + @docker tag "thanos" "$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_TAG)" + @docker push "$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_TAG)" # docs regenerates flags in docs for all thanos commands. .PHONY: docs diff --git a/README.md b/README.md index 39e79dce2d..1e966af711 100644 --- a/README.md +++ b/README.md @@ -62,10 +62,11 @@ The philosophy of Thanos and our community is borrowing much from UNIX philosoph ## Releases -Master should be stable and usable. Every commit to master builds docker image named `master--`. +Master should be stable and usable. Every commit to master builds docker image named `master--` in [quay.io/thanos/thanos](https://quay.io/repository/thanos/thanos) and [thanosio/thanos dockerhub (mirror)](https://hub.docker.com/r/thanosio/thanos) We also perform minor releases every 6 weeks. -During that, we build tarballs for major platforms and docker image ([available from Quay](https://quay.io/repository/thanos/thanos)). + +During that, we build tarballs for major platforms and release docker images. See [release process docs](docs/release-process.md) for details. diff --git a/go.sum b/go.sum index 18caffd34c..af3eafdf09 100644 --- a/go.sum +++ b/go.sum @@ -440,6 +440,7 @@ go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/automaxprocs v1.2.0 h1:+RUihKM+nmYUoB9w0D0Ov5TJ2PpFO2FgenTxMJiZBZA= go.uber.org/automaxprocs v1.2.0/go.mod h1:YfO3fm683kQpzETxlTGZhGIVmXAhaw3gxeBADbpZtnU= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181025213731-e84da0312774/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= diff --git a/website/hugo.yaml b/website/hugo.yaml index a27b032a7b..343a2fefd7 100644 --- a/website/hugo.yaml +++ b/website/hugo.yaml @@ -33,5 +33,7 @@ params: GithubProject: "thanos" QuayIoUser: "thanos" QuayIoRepository: "thanos" + DockerHubUser: "thanosio" + DockerHubRepository: "thanos" TwitterHandle: "ThanosMetrics" Description: "Highly available Prometheus setup with long term storage capabilities." diff --git a/website/layouts/index.html b/website/layouts/index.html index c163a55ba5..5dccddc412 100644 --- a/website/layouts/index.html +++ b/website/layouts/index.html @@ -16,17 +16,22 @@

Highly available Prometheus setup with long term storage capabi
  • - Download + Download
  • - Docker Images + Quay.io + +
  • +
  • + + DockerHub
  • - Github + Github
  • From c005f5ee894063f74e9265c1c07a43aa310acb07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20P=C5=82otka?= Date: Thu, 29 Aug 2019 11:40:32 +0100 Subject: [PATCH 02/16] Added autogenerated docs for tracing. (#1473) Fixes: https://github.com/thanos-io/thanos/issues/1266 Signed-off-by: Bartek Plotka --- cmd/thanos/flags.go | 8 +-- docs/components/bucket.md | 73 ++++++++++++------- docs/components/check.md | 12 ++-- docs/components/compact.md | 14 ++-- docs/components/query.md | 7 +- docs/components/rule.md | 14 ++-- docs/components/sidecar.md | 14 ++-- docs/components/store.md | 14 ++-- docs/storage.md | 87 ++++++++++++++-------- docs/tracing.md | 91 ++++++++++++++++++++++++ pkg/tracing/client/factory.go | 2 +- scripts/{bucketcfggen => cfggen}/main.go | 51 ++++++++----- scripts/genflagdocs.sh | 2 +- 13 files changed, 287 insertions(+), 102 deletions(-) create mode 100644 docs/tracing.md rename scripts/{bucketcfggen => cfggen}/main.go (56%) diff --git a/cmd/thanos/flags.go b/cmd/thanos/flags.go index 9ccfcc5031..27bcd2266f 100644 --- a/cmd/thanos/flags.go +++ b/cmd/thanos/flags.go @@ -95,11 +95,11 @@ func regCommonObjStoreFlags(cmd *kingpin.CmdClause, suffix string, required bool fileFlagName := fmt.Sprintf("objstore%s.config-file", suffix) contentFlagName := fmt.Sprintf("objstore%s.config", suffix) - help := fmt.Sprintf("Path to YAML file that contains object store%s configuration.", suffix) + help := fmt.Sprintf("Path to YAML file that contains object store%s configuration. See format details: https://thanos.io/storage.md/#configuration ", suffix) help = strings.Join(append([]string{help}, extraDesc...), " ") bucketConfFile := cmd.Flag(fileFlagName, help).PlaceHolder("").String() - help = fmt.Sprintf("Alternative to '%s' flag. Object store%s configuration in YAML.", fileFlagName, suffix) + help = fmt.Sprintf("Alternative to '%s' flag. Object store%s configuration in YAML. See format details: https://thanos.io/storage.md/#configuration ", fileFlagName, suffix) help = strings.Join(append([]string{help}, extraDesc...), " ") bucketConf := cmd.Flag(contentFlagName, help). PlaceHolder("").String() @@ -118,10 +118,10 @@ func regCommonTracingFlags(app *kingpin.Application) *pathOrContent { fileFlagName := fmt.Sprintf("tracing.config-file") contentFlagName := fmt.Sprintf("tracing.config") - help := fmt.Sprintf("Path to YAML file that contains tracing configuration.") + help := fmt.Sprintf("Path to YAML file that contains tracing configuration. See fomrat details: https://thanos.io/tracing.md/#configuration ") tracingConfFile := app.Flag(fileFlagName, help).PlaceHolder("").String() - help = fmt.Sprintf("Alternative to '%s' flag. Tracing configuration in YAML.", fileFlagName) + help = fmt.Sprintf("Alternative to '%s' flag. Tracing configuration in YAML. See format details: https://thanos.io/tracing.md/#configuration", fileFlagName) tracingConf := app.Flag(contentFlagName, help).PlaceHolder("").String() return &pathOrContent{ diff --git a/docs/components/bucket.md b/docs/components/bucket.md index 7b70f7974c..9414dd2f7a 100644 --- a/docs/components/bucket.md +++ b/docs/components/bucket.md @@ -44,16 +44,20 @@ Flags: --log.format=logfmt Log format to use. --tracing.config-file= Path to YAML file that contains tracing - configuration. + configuration. See fomrat details: + https://thanos.io/tracing.md/#configuration --tracing.config= Alternative to 'tracing.config-file' flag. Tracing - configuration in YAML. + configuration in YAML. See format details: + https://thanos.io/tracing.md/#configuration --objstore.config-file= Path to YAML file that contains object store - configuration. + configuration. See format details: + https://thanos.io/storage.md/#configuration --objstore.config= Alternative to 'objstore.config-file' flag. Object - store configuration in YAML. + store configuration in YAML. See format details: + https://thanos.io/storage.md/#configuration Subcommands: bucket verify [] @@ -99,16 +103,22 @@ Flags: --log.format=logfmt Log format to use. --tracing.config-file= Path to YAML file that contains tracing - configuration. + configuration. See fomrat details: + https://thanos.io/tracing.md/#configuration --tracing.config= Alternative to 'tracing.config-file' flag. - Tracing configuration in YAML. + Tracing configuration in YAML. See format + details: + https://thanos.io/tracing.md/#configuration --objstore.config-file= Path to YAML file that contains object store - configuration. + configuration. See format details: + https://thanos.io/storage.md/#configuration --objstore.config= Alternative to 'objstore.config-file' flag. - Object store configuration in YAML. + Object store configuration in YAML. See format + details: + https://thanos.io/storage.md/#configuration --listen="0.0.0.0:8080" HTTP host:port to listen on --refresh=30m Refresh interval to download metadata from remote storage @@ -141,24 +151,31 @@ Flags: --log.format=logfmt Log format to use. --tracing.config-file= Path to YAML file that contains tracing - configuration. + configuration. See fomrat details: + https://thanos.io/tracing.md/#configuration --tracing.config= Alternative to 'tracing.config-file' flag. Tracing - configuration in YAML. + configuration in YAML. See format details: + https://thanos.io/tracing.md/#configuration --objstore.config-file= Path to YAML file that contains object store - configuration. + configuration. See format details: + https://thanos.io/storage.md/#configuration --objstore.config= Alternative to 'objstore.config-file' flag. Object - store configuration in YAML. + store configuration in YAML. See format details: + https://thanos.io/storage.md/#configuration --objstore-backup.config-file= Path to YAML file that contains object store-backup - configuration. Used for repair logic to backup blocks - before removal. + configuration. See format details: + https://thanos.io/storage.md/#configuration Used for + repair logic to backup blocks before removal. --objstore-backup.config= Alternative to 'objstore-backup.config-file' flag. - Object store-backup configuration in YAML. Used for - repair logic to backup blocks before removal. + Object store-backup configuration in YAML. See format + details: https://thanos.io/storage.md/#configuration + Used for repair logic to backup blocks before + removal. -r, --repair Attempt to repair blocks for which issues were detected -i, --issues=index_issue... ... @@ -196,16 +213,20 @@ Flags: --log.format=logfmt Log format to use. --tracing.config-file= Path to YAML file that contains tracing - configuration. + configuration. See fomrat details: + https://thanos.io/tracing.md/#configuration --tracing.config= Alternative to 'tracing.config-file' flag. Tracing - configuration in YAML. + configuration in YAML. See format details: + https://thanos.io/tracing.md/#configuration --objstore.config-file= Path to YAML file that contains object store - configuration. + configuration. See format details: + https://thanos.io/storage.md/#configuration --objstore.config= Alternative to 'objstore.config-file' flag. Object - store configuration in YAML. + store configuration in YAML. See format details: + https://thanos.io/storage.md/#configuration -o, --output="" Optional format in which to print each block's information. Options are 'json', 'wide' or a custom template. @@ -235,16 +256,20 @@ Flags: --log.format=logfmt Log format to use. --tracing.config-file= Path to YAML file that contains tracing - configuration. + configuration. See fomrat details: + https://thanos.io/tracing.md/#configuration --tracing.config= Alternative to 'tracing.config-file' flag. Tracing - configuration in YAML. + configuration in YAML. See format details: + https://thanos.io/tracing.md/#configuration --objstore.config-file= Path to YAML file that contains object store - configuration. + configuration. See format details: + https://thanos.io/storage.md/#configuration --objstore.config= Alternative to 'objstore.config-file' flag. Object - store configuration in YAML. + store configuration in YAML. See format details: + https://thanos.io/storage.md/#configuration -l, --selector==\"\" ... Selects blocks based on label, e.g. '-l key1=\"value1\" -l key2=\"value2\"'. All key value diff --git a/docs/components/check.md b/docs/components/check.md index 0839f42414..f2b6af506b 100644 --- a/docs/components/check.md +++ b/docs/components/check.md @@ -25,10 +25,12 @@ Flags: --log.format=logfmt Log format to use. --tracing.config-file= Path to YAML file that contains tracing - configuration. + configuration. See fomrat details: + https://thanos.io/tracing.md/#configuration --tracing.config= Alternative to 'tracing.config-file' flag. Tracing - configuration in YAML. + configuration in YAML. See format details: + https://thanos.io/tracing.md/#configuration Subcommands: check rules ... @@ -67,10 +69,12 @@ Flags: --log.format=logfmt Log format to use. --tracing.config-file= Path to YAML file that contains tracing - configuration. + configuration. See fomrat details: + https://thanos.io/tracing.md/#configuration --tracing.config= Alternative to 'tracing.config-file' flag. Tracing - configuration in YAML. + configuration in YAML. See format details: + https://thanos.io/tracing.md/#configuration Args: The rule files to check. diff --git a/docs/components/compact.md b/docs/components/compact.md index 8b5917b30f..693877ac52 100644 --- a/docs/components/compact.md +++ b/docs/components/compact.md @@ -42,20 +42,26 @@ Flags: --log.format=logfmt Log format to use. --tracing.config-file= Path to YAML file that contains tracing - configuration. + configuration. See fomrat details: + https://thanos.io/tracing.md/#configuration --tracing.config= Alternative to 'tracing.config-file' flag. - Tracing configuration in YAML. + Tracing configuration in YAML. See format + details: + https://thanos.io/tracing.md/#configuration --http-address="0.0.0.0:10902" Listen host:port for HTTP endpoints. --data-dir="./data" Data directory in which to cache blocks and process compactions. --objstore.config-file= Path to YAML file that contains object store - configuration. + configuration. See format details: + https://thanos.io/storage.md/#configuration --objstore.config= Alternative to 'objstore.config-file' flag. - Object store configuration in YAML. + Object store configuration in YAML. See format + details: + https://thanos.io/storage.md/#configuration --consistency-delay=30m Minimum age of fresh (non-compacted) blocks before they are being processed. Malformed blocks older than the maximum of consistency-delay and diff --git a/docs/components/query.md b/docs/components/query.md index c6d7a86c89..d1e98cecbc 100644 --- a/docs/components/query.md +++ b/docs/components/query.md @@ -179,10 +179,13 @@ Flags: --log.format=logfmt Log format to use. --tracing.config-file= Path to YAML file that contains tracing - configuration. + configuration. See fomrat details: + https://thanos.io/tracing.md/#configuration --tracing.config= Alternative to 'tracing.config-file' flag. - Tracing configuration in YAML. + Tracing configuration in YAML. See format + details: + https://thanos.io/tracing.md/#configuration --http-address="0.0.0.0:10902" Listen host:port for HTTP endpoints. --grpc-address="0.0.0.0:10901" diff --git a/docs/components/rule.md b/docs/components/rule.md index 8c35ed3963..0f09c093ac 100644 --- a/docs/components/rule.md +++ b/docs/components/rule.md @@ -159,10 +159,13 @@ Flags: --log.format=logfmt Log format to use. --tracing.config-file= Path to YAML file that contains tracing - configuration. + configuration. See fomrat details: + https://thanos.io/tracing.md/#configuration --tracing.config= Alternative to 'tracing.config-file' flag. - Tracing configuration in YAML. + Tracing configuration in YAML. See format + details: + https://thanos.io/tracing.md/#configuration --http-address="0.0.0.0:10902" Listen host:port for HTTP endpoints. --grpc-address="0.0.0.0:10901" @@ -233,10 +236,13 @@ Flags: sub-path. --objstore.config-file= Path to YAML file that contains object store - configuration. + configuration. See format details: + https://thanos.io/storage.md/#configuration --objstore.config= Alternative to 'objstore.config-file' flag. - Object store configuration in YAML. + Object store configuration in YAML. See format + details: + https://thanos.io/storage.md/#configuration --query= ... Addresses of statically configured query API servers (repeatable). The scheme may be prefixed with 'dns+' or 'dnssrv+' to detect diff --git a/docs/components/sidecar.md b/docs/components/sidecar.md index b9ba6b80c7..1dc3798ee8 100644 --- a/docs/components/sidecar.md +++ b/docs/components/sidecar.md @@ -83,10 +83,13 @@ Flags: --log.format=logfmt Log format to use. --tracing.config-file= Path to YAML file that contains tracing - configuration. + configuration. See fomrat details: + https://thanos.io/tracing.md/#configuration --tracing.config= Alternative to 'tracing.config-file' flag. - Tracing configuration in YAML. + Tracing configuration in YAML. See format + details: + https://thanos.io/tracing.md/#configuration --http-address="0.0.0.0:10902" Listen host:port for HTTP endpoints. --grpc-address="0.0.0.0:10901" @@ -114,9 +117,12 @@ Flags: (repeated field). --objstore.config-file= Path to YAML file that contains object store - configuration. + configuration. See format details: + https://thanos.io/storage.md/#configuration --objstore.config= Alternative to 'objstore.config-file' flag. - Object store configuration in YAML. + Object store configuration in YAML. See format + details: + https://thanos.io/storage.md/#configuration ``` diff --git a/docs/components/store.md b/docs/components/store.md index 69c9db8de8..8520a22a58 100644 --- a/docs/components/store.md +++ b/docs/components/store.md @@ -42,10 +42,13 @@ Flags: --log.format=logfmt Log format to use. --tracing.config-file= Path to YAML file that contains tracing - configuration. + configuration. See fomrat details: + https://thanos.io/tracing.md/#configuration --tracing.config= Alternative to 'tracing.config-file' flag. - Tracing configuration in YAML. + Tracing configuration in YAML. See format + details: + https://thanos.io/tracing.md/#configuration --http-address="0.0.0.0:10902" Listen host:port for HTTP endpoints. --grpc-address="0.0.0.0:10901" @@ -75,10 +78,13 @@ Flags: Maximum number of concurrent Series calls. --objstore.config-file= Path to YAML file that contains object store - configuration. + configuration. See format details: + https://thanos.io/storage.md/#configuration --objstore.config= Alternative to 'objstore.config-file' flag. - Object store configuration in YAML. + Object store configuration in YAML. See format + details: + https://thanos.io/storage.md/#configuration --sync-block-duration=3m Repeat interval for syncing the blocks between local and remote view. --block-sync-concurrency=20 diff --git a/docs/storage.md b/docs/storage.md index eb48e08d64..ab3a3d37fb 100644 --- a/docs/storage.md +++ b/docs/storage.md @@ -11,19 +11,31 @@ Thanos supports any object stores that can be implemented against Thanos [objsto All clients are configured using `--objstore.config-file` to reference to the configuration file or `--objstore.config` to put yaml config directly. -## Implementations +## How to use `config` flags? -Current object storage client implementations: +You can either pass YAML file defined below in `--objstore.config-file` or pass the YAML content directly using `--objstore.config`. +We recommend the latter as it gives an explicit static view of configuration for each component. It also saves you the fuss of creating and managing additional file. -| Provider | Maturity | Auto-tested on CI | Maintainers | -|----------------------|-------------------|-----------|---------------| -| Google Cloud Storage | Stable (production usage) | yes | @bwplotka | -| AWS S3 | Stable (production usage) | yes | @bwplotka | -| Azure Storage Account | Stable (production usage) | yes | @vglafirov | -| OpenStack Swift | Beta (working PoCs, testing usage) | no | @sudhi-vm | -| Tencent COS | Beta (testing usage) | no | @jojohappy | +Don't be afraid of multiline flags! -NOTE: Currently Thanos requires strong consistency (write-read) for object store implementation. +In Kubernetes it is as easy as (on Thanos sidecar example):: + +```yaml + - args: + - sidecar + - | + --objstore.config=type: GCS + config: + bucket: + - --prometheus.url=http://localhost:9090 + - | + --tracing.config=type: STACKDRIVER + config: + service_name: "" + project_id: + sample_factor: 16 + - --tsdb.path=/prometheus-data +``` ## How to add a new client? @@ -33,17 +45,33 @@ NOTE: Currently Thanos requires strong consistency (write-read) for object store 4. Use created `NewTestBucket` in [ForeachStore method](/pkg/objstore/objtesting/foreach.go) to ensure we can run tests against new provider. (In PR) 5. RUN the [TestObjStoreAcceptanceTest](/pkg/objstore/objtesting/acceptance_e2e_test.go) against your provider to ensure it fits. Fix any found error until test passes. (In PR) 6. Add client implementation to the factory in [factory](/pkg/objstore/client/factory.go) code. (Using as small amount of flags as possible in every command) -7. Add client struct config to [bucketcfggen](/scripts/bucketcfggen/main.go) to allow config auto generation. +7. Add client struct config to [bucketcfggen](/scripts/cfggen/main.go) to allow config auto generation. At that point, anyone can use your provider by spec. -## AWS S3 configuration +## Configuration + +Current object storage client implementations: + +| Provider | Maturity | Auto-tested on CI | Maintainers | +|----------------------|-------------------|-----------|---------------| +| [Google Cloud Storage](#gcs) | Stable (production usage) | yes | @bwplotka | +| [AWS/S3](#s3) | Stable (production usage) | yes | @bwplotka | +| [Azure Storage Account](#azure) | Stable (production usage) | yes | @vglafirov | +| [OpenStack Swift](#openstack-swift) | Beta (working PoCs, testing usage) | no | @sudhi-vm | +| [Tencent COS](#tencent-cos) | Beta (testing usage) | no | @jojohappy | + +NOTE: Currently Thanos requires strong consistency (write-read) for object store implementation. + +### S3 Thanos uses the [minio client](https://github.com/minio/minio-go) library to upload Prometheus data into AWS S3. You can configure an S3 bucket as an object store with YAML, either by passing the configuration directly to the `--objstore.config` parameter, or (preferably) by passing the path to a configuration file to the `--objstore.config-file` option. -[embedmd]:# (flags/config_s3.txt yaml) +NOTE: Minio client was mainly for AWS S3, but it can be configured against other S3-compatible object storages e.g Ceph + +[embedmd]:# (flags/config_bucket_s3.txt yaml) ```yaml type: S3 config: @@ -85,7 +113,8 @@ For debug and testing purposes you can set * `trace.enable: true` to enable the minio client's verbose logging. Each request and response will be logged into the debug logger, so debug level logging must be enabled for this functionality. -### Credentials +#### Credentials + By default Thanos will try to retrieve credentials from the following sources: 1. From config file if BOTH `access_key` and `secret_key` are present. @@ -95,7 +124,7 @@ By default Thanos will try to retrieve credentials from the following sources: NOTE: Getting access key from config file and secret key from other method (and vice versa) is not supported. -### AWS Policies +#### AWS Policies Example working AWS IAM policy for user: @@ -163,13 +192,13 @@ With this policy you should be able to run set `THANOS_SKIP_GCS_TESTS=true` and Details about AWS policies: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html -## GCS Configuration +### GCS To configure Google Cloud Storage bucket as an object store you need to set `bucket` with GCS bucket name and configure Google Application credentials. For example: -[embedmd]:# (flags/config_gcs.txt yaml) +[embedmd]:# (flags/config_bucket_gcs.txt yaml) ```yaml type: GCS config: @@ -177,7 +206,7 @@ config: service_account: "" ``` -### Using GOOGLE_APPLICATION_CREDENTIALS +#### Using GOOGLE_APPLICATION_CREDENTIALS Application credentials are configured via JSON file and only the bucket needs to be specified, the client looks for: @@ -194,7 +223,7 @@ the client looks for: You can read more on how to get application credential json file in [https://cloud.google.com/docs/authentication/production](https://cloud.google.com/docs/authentication/production) -### Using inline a Service Account +#### Using inline a Service Account Another possibility is to inline the ServiceAccount into the Thanos configuration and only maintain one file. This feature was added, so that the Prometheus Operator only needs to take care of one secret file. @@ -218,7 +247,7 @@ config: } ``` -### GCS Policies +#### GCS Policies __Note:__ GCS Policies should be applied at the project level, not at the bucket level @@ -242,7 +271,7 @@ Then test that you can at least list objects in the bucket, eg: thanos bucket ls --objstore.config="${OBJSTORE_CONFIG}" ``` -## Azure Configuration +### Azure To use Azure Storage as Thanos object store, you need to precreate storage account from Azure portal or using Azure CLI. Follow the instructions from Azure Storage Documentation: [https://docs.microsoft.com/en-us/azure/storage/common/storage-quickstart-create-account](https://docs.microsoft.com/en-us/azure/storage/common/storage-quickstart-create-account?tabs=portal) @@ -250,7 +279,7 @@ To configure Azure Storage account as an object store you need to provide a path Config file format is the following: -[embedmd]:# (flags/config_azure.txt yaml) +[embedmd]:# (flags/config_bucket_azure.txt yaml) ```yaml type: AZURE config: @@ -261,15 +290,15 @@ config: max_retries: 0 ``` -### OpenStack Swift Configuration +### OpenStack Swift + Thanos uses [gophercloud](http://gophercloud.io/) client to upload Prometheus data into [OpenStack Swift](https://docs.openstack.org/swift/latest/). Below is an example configuration file for thanos to use OpenStack swift container as an object store. Note that if the `name` of a user, project or tenant is used one must also specify its domain by ID or name. Various examples for OpenStack authentication can be found in the [official documentation](https://developer.openstack.org/api-ref/identity/v3/index.html?expanded=password-authentication-with-scoped-authorization-detail#password-authentication-with-unscoped-authorization). - -[embedmd]:# (flags/config_swift.txt yaml) +[embedmd]:# (flags/config_bucket_swift.txt yaml) ```yaml type: SWIFT config: @@ -289,17 +318,13 @@ config: container_name: "" ``` -## Other minio supported S3 object storages - -Minio client used for AWS S3 can be potentially configured against other S3-compatible object storages. - -## Tencent COS Configuration +### Tencent COS To use Tencent COS as storage store, you should apply a Tencent Account to create an object storage bucket at first. Note that detailed from Tencent Cloud Documents: [https://cloud.tencent.com/document/product/436](https://cloud.tencent.com/document/product/436) To configure Tencent Account to use COS as storage store you need to set these parameters in yaml format stored in a file: -[embedmd]:# (flags/config_cos.txt $) +[embedmd]:# (flags/config_bucket_cos.txt $) ```$ type: COS config: diff --git a/docs/tracing.md b/docs/tracing.md new file mode 100644 index 0000000000..f8183574b2 --- /dev/null +++ b/docs/tracing.md @@ -0,0 +1,91 @@ +--- +title: Tracing +type: docs +menu: thanos +slug: /tracing.md +--- + +# Tracing + +Thanos supports different tracing backends that implements `opentracing.Tracer` interface. + +All clients are configured using `--tracing.config-file` to reference to the configuration file or `--tracing.config` to put yaml config directly. + +## How to use `config` flags? + +You can either pass YAML file defined below in `--tracing.config-file` or pass the YAML content directly using `--tracing.config`. +We recommend the latter as it gives an explicit static view of configuration for each component. It also saves you the fuss of creating and managing additional file. + +Don't be afraid of multiline flags! + +In Kubernetes it is as easy as (on Thanos sidecar example): + +```yaml + - args: + - sidecar + - | + --objstore.config=type: GCS + config: + bucket: + - --prometheus.url=http://localhost:9090 + - | + --tracing.config=type: STACKDRIVER + config: + service_name: "" + project_id: + sample_factor: 16 + - --tsdb.path=/prometheus-data +``` + +## How to add a new client? + +1. Create new directory under `pkg/tracing/` +2. Implement `opentracing.Tracer` interface +3. Add client implementation to the factory in [factory](/pkg/tracing/client/factory.go) code. (Using as small amount of flags as possible in every command) +4. Add client struct config to [cfggen](/scripts/cfggen/main.go) to allow config auto generation. + +At that point, anyone can use your provider by spec. + +## Configuration + +Current tracing supported backends: + +### Jaeger + +Client for https://github.com/jaegertracing/jaeger tracing. + +[embedmd]:# (flags/config_tracing_jaeger.txt yaml) +```yaml +type: JAEGER +config: + service_name: "" + disabled: false + rpc_metrics: false + tags: "" + sampler_type: "" + sampler_param: 0 + sampler_manager_host_port: "" + sampler_max_operations: 0 + sampler_refresh_interval: 0s + reporter_max_queue_size: 0 + reporter_flush_interval: 0s + reporter_log_spans: false + endpoint: "" + user: "" + password: "" + agent_host: "" + agent_port: 0 +``` + +### Stackdriver + +Client for https://cloud.google.com/trace/ tracing. + +[embedmd]:# (flags/config_tracing_stackdriver.txt yaml) +```yaml +type: STACKDRIVER +config: + service_name: "" + project_id: "" + sample_factor: 0 +``` diff --git a/pkg/tracing/client/factory.go b/pkg/tracing/client/factory.go index da9fec4a19..6d9bde30e3 100644 --- a/pkg/tracing/client/factory.go +++ b/pkg/tracing/client/factory.go @@ -25,7 +25,7 @@ const ( type TracingConfig struct { Type TracingProvider `yaml:"type"` - Config interface{} `yaml:"config,omitempty"` + Config interface{} `yaml:"config"` } func NewTracer(ctx context.Context, logger log.Logger, metrics *prometheus.Registry, confContentYaml []byte) (opentracing.Tracer, io.Closer, error) { diff --git a/scripts/bucketcfggen/main.go b/scripts/cfggen/main.go similarity index 56% rename from scripts/bucketcfggen/main.go rename to scripts/cfggen/main.go index 72fa0a361d..eed855f0de 100644 --- a/scripts/bucketcfggen/main.go +++ b/scripts/cfggen/main.go @@ -18,55 +18,68 @@ import ( "github.com/thanos-io/thanos/pkg/objstore/gcs" "github.com/thanos-io/thanos/pkg/objstore/s3" "github.com/thanos-io/thanos/pkg/objstore/swift" + trclient "github.com/thanos-io/thanos/pkg/tracing/client" + "github.com/thanos-io/thanos/pkg/tracing/jaeger" + "github.com/thanos-io/thanos/pkg/tracing/stackdriver" kingpin "gopkg.in/alecthomas/kingpin.v2" yaml "gopkg.in/yaml.v2" ) var ( - configs = map[client.ObjProvider]interface{}{ + bucketConfigs = map[client.ObjProvider]interface{}{ client.AZURE: azure.Config{}, client.GCS: gcs.Config{}, client.S3: s3.Config{}, client.SWIFT: swift.SwiftConfig{}, client.COS: cos.Config{}, } + tracingConfigs = map[trclient.TracingProvider]interface{}{ + trclient.JAEGER: jaeger.Config{}, + trclient.STACKDRIVER: stackdriver.Config{}, + } ) func main() { - app := kingpin.New(filepath.Base(os.Args[0]), "Thanos bucket configs examples generator.") + app := kingpin.New(filepath.Base(os.Args[0]), "Thanos config examples generator.") app.HelpFlag.Short('h') outputDir := app.Flag("output-dir", "Output directory for generated examples.").String() logger := log.NewLogfmtLogger(log.NewSyncWriter(os.Stderr)) - _, err := app.Parse(os.Args[1:]) - if err != nil { + if _, err := app.Parse(os.Args[1:]); err != nil { level.Error(logger).Log("err", err) os.Exit(1) } - for typ, config := range configs { - fullCfg := client.BucketConfig{Type: typ, Config: config} - - // We forbid omitempty option. This is for simplification for doc generation. - if err := checkForOmitEmptyTagOption(fullCfg); err != nil { - level.Error(logger).Log("type", typ, "err", err) - os.Exit(1) - } - - out, err := yaml.Marshal(fullCfg) - if err != nil { - level.Error(logger).Log("msg", "failed to marshal config", "type", typ, "err", err) + for typ, config := range bucketConfigs { + if err := generate(client.BucketConfig{Type: typ, Config: config}, "bucket_"+strings.ToLower(string(typ)), *outputDir); err != nil { + level.Error(logger).Log("msg", "failed to generate", "type", typ, "err", err) os.Exit(1) } + } - if err := ioutil.WriteFile(filepath.Join(*outputDir, fmt.Sprintf("config_%s.txt", strings.ToLower(string(typ)))), out, os.ModePerm); err != nil { - level.Error(logger).Log("msg", "failed to write", "type", typ, "err", err) + for typ, config := range tracingConfigs { + if err := generate(trclient.TracingConfig{Type: typ, Config: config}, "tracing_"+strings.ToLower(string(typ)), *outputDir); err != nil { + level.Error(logger).Log("msg", "failed to generate", "type", typ, "err", err) os.Exit(1) } } logger.Log("msg", "success") } +func generate(obj interface{}, typ string, outputDir string) error { + // We forbid omitempty option. This is for simplification for doc generation. + if err := checkForOmitEmptyTagOption(obj); err != nil { + return err + } + + out, err := yaml.Marshal(obj) + if err != nil { + return err + } + + return ioutil.WriteFile(filepath.Join(outputDir, fmt.Sprintf("config_%s.txt", typ)), out, os.ModePerm) +} + func checkForOmitEmptyTagOption(obj interface{}) error { return checkForOmitEmptyTagOptionRec(reflect.ValueOf(obj)) } @@ -87,7 +100,7 @@ func checkForOmitEmptyTagOptionRec(v reflect.Value) error { for _, opts := range tag.Options { if opts == "omitempty" { - return errors.Errorf("omitempty is forbidden for bucketConfig, but spotted on field '%s'", v.Type().Field(i).Name) + return errors.Errorf("omitempty is forbidden for config, but spotted on field '%s'", v.Type().Field(i).Name) } } diff --git a/scripts/genflagdocs.sh b/scripts/genflagdocs.sh index c4584d2a8e..549cc0a0b3 100755 --- a/scripts/genflagdocs.sh +++ b/scripts/genflagdocs.sh @@ -52,7 +52,7 @@ done # remove white noise sed -i 's/[ \t]*$//' docs/components/flags/*.txt -go run scripts/bucketcfggen/main.go --output-dir=docs/flags +go run scripts/cfggen/main.go --output-dir=docs/flags # Change dir so embedmd understand the local references made in our markdown doc. pushd "docs/components" > /dev/null From 7b60bfb7387647202bff4fa35c5091aa45173e0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20P=C5=82otka?= Date: Thu, 29 Aug 2019 12:09:14 +0100 Subject: [PATCH 03/16] Fixed stackdriver tracer. (#1475) Fixes: https://github.com/thanos-io/thanos/issues/1474 Signed-off-by: Bartek Plotka --- pkg/tracing/stackdriver/tracer.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/tracing/stackdriver/tracer.go b/pkg/tracing/stackdriver/tracer.go index d8d80b0f95..e8f10fe759 100644 --- a/pkg/tracing/stackdriver/tracer.go +++ b/pkg/tracing/stackdriver/tracer.go @@ -92,9 +92,9 @@ type compTraceWrapper struct { cl *trace.Client } -func (w *compTraceWrapper) PatchTraces(ctx context.Context, r *pb.PatchTracesRequest, opts ...gax.CallOption) error { +func (w *compTraceWrapper) PatchTraces(ctx context.Context, r *pb.PatchTracesRequest, _ ...gax.CallOption) error { // Opts are never used in `gcloudtracer.NewRecorder`. - return w.cl.PatchTraces(ctx, r, nil) + return w.cl.PatchTraces(ctx, r) } func (w *compTraceWrapper) Close() error { @@ -114,7 +114,7 @@ func newGCloudTracer(ctx context.Context, logger log.Logger, gcloudTraceProjectI &compTraceWrapper{cl: traceClient}, gcloudtracer.WithLogger(&gcloudRecorderLogger{logger: logger})) if err != nil { - return nil, traceClient, err + return nil, nil, err } shouldSample := func(traceID uint64) bool { From ba509f98f3a5ee47a41df657c53e882e14124b4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20P=C5=82otka?= Date: Thu, 29 Aug 2019 22:10:40 +0100 Subject: [PATCH 04/16] Pinned go-ieproxy for FreeBSD supportl; Added FreeBSD to promu.yaml (#1476) Signed-off-by: Bartek Plotka --- .promu.yml | 1 + go.mod | 1 + go.sum | 2 ++ 3 files changed, 4 insertions(+) diff --git a/.promu.yml b/.promu.yml index 097919ab68..0a516df08e 100644 --- a/.promu.yml +++ b/.promu.yml @@ -19,3 +19,4 @@ crossbuild: - darwin/amd64 - linux/arm64 - windows/amd64 + - freebsd/amd64 diff --git a/go.mod b/go.mod index 88022eb4d5..4603755221 100644 --- a/go.mod +++ b/go.mod @@ -20,6 +20,7 @@ require ( github.com/hashicorp/golang-lru v0.5.3 github.com/leanovate/gopter v0.2.4 github.com/lovoo/gcloud-opentracing v0.3.0 + github.com/mattn/go-ieproxy v0.0.0-20190805055040-f9202b1cfdeb // indirect; Pinned for FreeBSD support. github.com/mattn/go-runewidth v0.0.4 // indirect github.com/miekg/dns v1.1.15 github.com/minio/minio-go/v6 v6.0.27-0.20190529152532-de69c0e465ed diff --git a/go.sum b/go.sum index af3eafdf09..1104b4ceeb 100644 --- a/go.sum +++ b/go.sum @@ -298,6 +298,8 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149 h1:HfxbT6/JcvIljmERptWhwa8XzP7H3T+Z2N26gTsaDaA= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-ieproxy v0.0.0-20190805055040-f9202b1cfdeb h1:hXqqXzQtJbENrsb+rsIqkVqcg4FUJL0SQFGw08Dgivw= +github.com/mattn/go-ieproxy v0.0.0-20190805055040-f9202b1cfdeb/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= From c4fff05f19773aafd5e447b4ca65a5bedd6b891d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20P=C5=82otka?= Date: Mon, 2 Sep 2019 15:37:51 +0100 Subject: [PATCH 05/16] Baked required deps in docker image for CircleCI. (#1484) This should fix https://github.com/thanos-io/thanos/issues/1483 Also it should massively improve our CI time. Signed-off-by: Bartek Plotka --- .circleci/config.yml | 11 ++++------ .gitignore | 2 ++ Dockerfile.thanos-ci | 6 ++++++ Makefile | 49 ++++++++++++++++++++++++++++++++++---------- 4 files changed, 50 insertions(+), 18 deletions(-) create mode 100644 Dockerfile.thanos-ci diff --git a/.circleci/config.yml b/.circleci/config.yml index 47ee70c398..b1d34a15c2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,12 +3,11 @@ version: 2 jobs: test: docker: - # Available from https://hub.docker.com/r/circleci/golang/ - - image: circleci/golang:1.12.5 + # Build by Thanos make docker-ci + - image: quay.io/thanos/thanos-ci:v0.1.0 working_directory: /go/src/github.com/thanos-io/thanos environment: GO111MODULE: 'on' - GOBIN: "/go/bin" # Run garbage collection more aggresively to avoid getting OOMed during the lint phase (4GB limit). GOGC: "20" # By default Go uses GOMAXPROCS but a Circle CI executor has many @@ -60,11 +59,9 @@ jobs: publish_master: docker: - # Available from https://hub.docker.com/r/circleci/golang/ - - image: circleci/golang:1.12.5 + # Build by Thanos make docker-ci + - image: quay.io/thanos/thanos-ci:v0.1.0 working_directory: /go/src/github.com/thanos-io/thanos - environment: - GOBIN: "/go/bin" steps: - checkout - setup_remote_docker: diff --git a/.gitignore b/.gitignore index 6ba1763b5b..4e999979a2 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,5 @@ data/ website/public/ website/docs-pre-processed/ !website/data + +tmp/bin diff --git a/Dockerfile.thanos-ci b/Dockerfile.thanos-ci new file mode 100644 index 0000000000..cb8ce2a985 --- /dev/null +++ b/Dockerfile.thanos-ci @@ -0,0 +1,6 @@ +# Available from https://hub.docker.com/r/circleci/golang/ +FROM circleci/golang:1.12.5 + +ENV GOBIN=/go/bin + +COPY tmp/bin ${GOBIN} diff --git a/Makefile b/Makefile index 2de40f37dd..62913763a8 100644 --- a/Makefile +++ b/Makefile @@ -46,9 +46,13 @@ ME ?= $(shell whoami) # Limited prom version, because testing was not possible. This should fix it: https://github.com/thanos-io/thanos/issues/758 PROM_VERSIONS ?= v2.4.3 v2.5.0 v2.8.1 v2.9.2 +PROMS ?= $(GOBIN)/prometheus-v2.4.3 $(GOBIN)/prometheus-v2.5.0 $(GOBIN)/prometheus-v2.8.1 $(GOBIN)/prometheus-v2.9.2 ALERTMANAGER_VERSION ?= v0.15.2 +ALERTMANAGER ?= $(GOBIN)/alertmanager-$(ALERTMANAGER_VERSION) + MINIO_SERVER_VERSION ?= RELEASE.2018-10-06T00-15-16Z +MINIO_SERVER ?=$(GOBIN)/minio-$(MINIO_SERVER_VERSION) # fetch_go_bin_version downloads (go gets) the binary from specific version and installs it in $(GOBIN)/- # arguments: @@ -178,11 +182,17 @@ tarballs-release: $(PROMU) # test runs all Thanos golang tests against each supported version of Prometheus. .PHONY: test test: export GOCACHE= $(TMP_GOPATH)/gocache -test: check-git test-deps +test: export THANOS_TEST_MINIO_PATH= $(MINIO_SERVER) +test: export THANOS_TEST_PROMETHEUS_VERSIONS= $(PROM_VERSIONS) +test: export THANOS_TEST_ALERTMANAGER_PATH= $(ALERTMANAGER) +test: check-git install-deps + @echo ">> install thanos GOOPTS=${GOOPTS}" + # Thanos binary is required by e2e tests. + @go install github.com/thanos-io/thanos/cmd/thanos # Be careful on GOCACHE. Those tests are sometimes using built Thanos/Prometheus binaries directly. Don't cache those. @rm -rf ${GOCACHE} @echo ">> running all tests. Do export THANOS_SKIP_GCS_TESTS='true' or/and THANOS_SKIP_S3_AWS_TESTS='true' or/and THANOS_SKIP_AZURE_TESTS='true' and/or THANOS_SKIP_SWIFT_TESTS='true' and/or THANOS_SKIP_TENCENT_COS_TESTS='true' if you want to skip e2e tests against real store buckets" - THANOS_TEST_PROMETHEUS_VERSIONS="$(PROM_VERSIONS)" THANOS_TEST_ALERTMANAGER_PATH="alertmanager-$(ALERTMANAGER_VERSION)" go test $(shell go list ./... | grep -v /vendor/); + @go test $(shell go list ./... | grep -v /vendor/); .PHONY: test-only-gcs test-only-gcs: export THANOS_SKIP_S3_AWS_TESTS = true @@ -202,15 +212,23 @@ test-local: @echo ">> Skipping GCE tests" $(MAKE) test-only-gcs -# test-deps installs dependency for e2e tets. -# It installs current Thanos, supported versions of Prometheus and alertmanager to test against in e2e. -.PHONY: test-deps -test-deps: - @echo ">> install thanos GOOPTS=${GOOPTS}" - @go install github.com/thanos-io/thanos/cmd/thanos - $(foreach ver,$(PROM_VERSIONS),$(call fetch_go_bin_version,github.com/prometheus/prometheus/cmd/prometheus,$(ver))) - $(call fetch_go_bin_version,github.com/prometheus/alertmanager/cmd/alertmanager,$(ALERTMANAGER_VERSION)) - $(call fetch_go_bin_version,github.com/minio/minio,$(MINIO_SERVER_VERSION)) +# install-deps installs dependencies for e2e tetss. +# It installs supported versions of Prometheus and alertmanager to test against in e2e. +.PHONY: install-deps +install-deps: $(ALERTMANAGER) $(MINIO_SERVER) $(PROMS) + @echo ">>GOBIN=$(GOBIN)" + +.PHONY: docker-ci +# To be run by Thanos maintainer. +docker-ci: install-deps + # Copy all to tmp local dir as this is required by docker. + @rm -rf ./tmp/bin + @mkdir -p ./tmp/bin + @cp -r $(GOBIN)/* ./tmp/bin + @docker build -t thanos-ci -f Dockerfile.thanos-ci . + @echo ">> pushing thanos-ci image" + @docker tag "thanos-ci" "quay.io/thanos/thanos-ci:v0.1.0" + @docker push "quay.io/thanos/thanos-ci:v0.1.0" # tooling deps. TODO(bwplotka): Pin them all to certain version! .PHONY: check-git @@ -277,6 +295,15 @@ $(GOLANGCILINT): $(MISSPELL): $(call fetch_go_bin_version,github.com/client9/misspell/cmd/misspell,$(MISSPELL_VERSION)) +$(ALERTMANAGER): + $(call fetch_go_bin_version,github.com/prometheus/alertmanager/cmd/alertmanager,$(ALERTMANAGER_VERSION)) + +$(MINIO_SERVER): + $(call fetch_go_bin_version,github.com/minio/minio,$(MINIO_SERVER_VERSION)) + +$(PROMS): + $(foreach ver,$(PROM_VERSIONS),$(call fetch_go_bin_version,github.com/prometheus/prometheus/cmd/prometheus,$(ver))) + $(PROTOC): @mkdir -p $(TMP_GOPATH) @echo ">> fetching protoc@${PROTOC_VERSION}" From c6eaf68bec32aefd280318eaef6121d6ddb20d10 Mon Sep 17 00:00:00 2001 From: Dominic Green Date: Mon, 2 Sep 2019 16:09:36 +0100 Subject: [PATCH 06/16] update for 0.7.0 (#1486) Signed-off-by: Dominic Green --- CHANGELOG.md | 4 ++-- VERSION | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a76eceb96a..f45fb2e44a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,11 +11,11 @@ We use *breaking* word for marking changes that are not backward compatible (rel ## Unreleased -## v0.7.0-rc.0 - 2019.08.28 +## v0.7.0 - 2019.09.02 Accepted into CNCF: - Thanos moved to new repository -- Docker images moved to +- Docker images moved to and mirrored at - Slack moved to `#thanos`/`#thanos-dev` / `#thanos-prs` ### Added diff --git a/VERSION b/VERSION index 0374f38328..faef31a435 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.7.0-rc.0 +0.7.0 From f7a238fdfaa5221fe002360acaa06cb4a2e40152 Mon Sep 17 00:00:00 2001 From: Kemal Akkoyun Date: Tue, 3 Sep 2019 08:03:30 +0200 Subject: [PATCH 07/16] *: Initialize gRPC server metrics (#1478) * Initialize grpc server metrics Signed-off-by: Kemal Akkoyun * Ad change log Signed-off-by: Kemal Akkoyun * Refactor. Separate server initialization from server options Signed-off-by: Kemal Akkoyun --- CHANGELOG.md | 7 ++-- cmd/thanos/main.go | 77 +++++++++++++++++++++++-------------------- cmd/thanos/query.go | 7 ++-- cmd/thanos/receive.go | 6 ++-- cmd/thanos/rule.go | 6 ++-- cmd/thanos/sidecar.go | 6 ++-- cmd/thanos/store.go | 8 ++--- 7 files changed, 56 insertions(+), 61 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f45fb2e44a..655005269f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,9 +20,10 @@ Accepted into CNCF: ### Added +- [#1478](https://github.com/thanos-io/thanos/pull/1478) Thanos components now exposes gRPC server metrics as soon as server starts, to provide more reliable data for instrumentation. - [#1378](https://github.com/thanos-io/thanos/pull/1378) Thanos Receive now exposes `thanos_receive_config_hash`, `thanos_receive_config_last_reload_successful` and `thanos_receive_config_last_reload_success_timestamp_seconds` metrics to track latest configuration change -- [#1268](https://github.com/thanos-io/thanos/pull/1268) Thanos Sidecar added support for newest Prometheus streaming remote read added [here](https://github.com/prometheus/prometheus/pull/5703). This massively improves memory required by single - request for both Prometheus and sidecar. Single requests now should take constant amount of memory on sidecar, so resource consumption prediction is now straightforward. This will be used if you have Prometheus `2.13` or `2.12-master`. +- [#1268](https://github.com/thanos-io/thanos/pull/1268) Thanos Sidecar added support for newest Prometheus streaming remote read added [here](https://github.com/prometheus/prometheus/pull/5703). This massively improves memory required by single + request for both Prometheus and sidecar. Single requests now should take constant amount of memory on sidecar, so resource consumption prediction is now straightforward. This will be used if you have Prometheus `2.13` or `2.12-master`. - [#1358](https://github.com/thanos-io/thanos/pull/1358) Added `part_size` configuration option for HTTP multipart requests minimum part size for S3 storage type - [#1363](https://github.com/thanos-io/thanos/pull/1363) Thanos Receive now exposes `thanos_receive_hashring_nodes` and `thanos_receive_hashring_tenants` metrics to monitor status of hash-rings - [#1395](https://github.com/thanos-io/thanos/pull/1395) Thanos Sidecar added `/-/ready` and `/-/healthy` endpoints to Thanos sidecar. @@ -39,7 +40,7 @@ Accepted into CNCF: - [BUGFIX] prometheus_tsdb_compactions_failed_total is now incremented on any compaction failure. tsdb#613 - [BUGFIX] PromQL: Correctly display {__name__="a"}. - [#1338](https://github.com/thanos-io/thanos/pull/1338) Thanos Query still warns on store API duplicate, but allows a single one from duplicated set. This is gracefully warn about the problematic logic and not disrupt immediately. -- [#1385](https://github.com/thanos-io/thanos/pull/1385) Thanos Compact exposes flag to disable downsampling `downsampling.disable`. +- [#1385](https://github.com/thanos-io/thanos/pull/1385) Thanos Compact exposes flag to disable downsampling `downsampling.disable`. ### Fixed diff --git a/cmd/thanos/main.go b/cmd/thanos/main.go index 2e6f2bf413..b44a2c9fc0 100644 --- a/cmd/thanos/main.go +++ b/cmd/thanos/main.go @@ -33,6 +33,7 @@ import ( "github.com/prometheus/common/version" "github.com/thanos-io/thanos/pkg/prober" "github.com/thanos-io/thanos/pkg/runutil" + "github.com/thanos-io/thanos/pkg/store/storepb" "github.com/thanos-io/thanos/pkg/tracing" "github.com/thanos-io/thanos/pkg/tracing/client" "go.uber.org/automaxprocs/maxprocs" @@ -244,41 +245,8 @@ func registerMetrics(mux *http.ServeMux, g prometheus.Gatherer) { mux.Handle("/metrics", promhttp.HandlerFor(g, promhttp.HandlerOpts{})) } -// defaultGRPCServerOpts returns default gRPC server opts that includes: -// - request histogram -// - tracing -// - panic recovery with panic counter -func defaultGRPCServerOpts(logger log.Logger, reg *prometheus.Registry, tracer opentracing.Tracer, cert, key, clientCA string) ([]grpc.ServerOption, error) { - met := grpc_prometheus.NewServerMetrics() - met.EnableHandlingTimeHistogram( - grpc_prometheus.WithHistogramBuckets([]float64{ - 0.001, 0.01, 0.05, 0.1, 0.2, 0.4, 0.8, 1.6, 3.2, 6.4, - }), - ) - - panicsTotal := prometheus.NewCounter(prometheus.CounterOpts{ - Name: "thanos_grpc_req_panics_recovered_total", - Help: "Total number of gRPC requests recovered from internal panic.", - }) - grpcPanicRecoveryHandler := func(p interface{}) (err error) { - panicsTotal.Inc() - level.Error(logger).Log("msg", "recovered from panic", "panic", p, "stack", debug.Stack()) - return status.Errorf(codes.Internal, "%s", p) - } - reg.MustRegister(met, panicsTotal) - opts := []grpc.ServerOption{ - grpc.MaxSendMsgSize(math.MaxInt32), - grpc_middleware.WithUnaryServerChain( - met.UnaryServerInterceptor(), - tracing.UnaryServerInterceptor(tracer), - grpc_recovery.UnaryServerInterceptor(grpc_recovery.WithRecoveryHandler(grpcPanicRecoveryHandler)), - ), - grpc_middleware.WithStreamServerChain( - met.StreamServerInterceptor(), - tracing.StreamServerInterceptor(tracer), - grpc_recovery.StreamServerInterceptor(grpc_recovery.WithRecoveryHandler(grpcPanicRecoveryHandler)), - ), - } +func defaultGRPCServerOpts(logger log.Logger, cert, key, clientCA string) ([]grpc.ServerOption, error) { + opts := []grpc.ServerOption{} if key == "" && cert == "" { if clientCA != "" { @@ -325,6 +293,45 @@ func defaultGRPCServerOpts(logger log.Logger, reg *prometheus.Registry, tracer o return append(opts, grpc.Creds(credentials.NewTLS(tlsCfg))), nil } +func newStoreGRPCServer(logger log.Logger, reg *prometheus.Registry, tracer opentracing.Tracer, srv storepb.StoreServer, opts []grpc.ServerOption) *grpc.Server { + met := grpc_prometheus.NewServerMetrics() + met.EnableHandlingTimeHistogram( + grpc_prometheus.WithHistogramBuckets([]float64{ + 0.001, 0.01, 0.05, 0.1, 0.2, 0.4, 0.8, 1.6, 3.2, 6.4, + }), + ) + panicsTotal := prometheus.NewCounter(prometheus.CounterOpts{ + Name: "thanos_grpc_req_panics_recovered_total", + Help: "Total number of gRPC requests recovered from internal panic.", + }) + reg.MustRegister(met, panicsTotal) + + grpcPanicRecoveryHandler := func(p interface{}) (err error) { + panicsTotal.Inc() + level.Error(logger).Log("msg", "recovered from panic", "panic", p, "stack", debug.Stack()) + return status.Errorf(codes.Internal, "%s", p) + } + opts = append(opts, + grpc.MaxSendMsgSize(math.MaxInt32), + grpc_middleware.WithUnaryServerChain( + met.UnaryServerInterceptor(), + tracing.UnaryServerInterceptor(tracer), + grpc_recovery.UnaryServerInterceptor(grpc_recovery.WithRecoveryHandler(grpcPanicRecoveryHandler)), + ), + grpc_middleware.WithStreamServerChain( + met.StreamServerInterceptor(), + tracing.StreamServerInterceptor(tracer), + grpc_recovery.StreamServerInterceptor(grpc_recovery.WithRecoveryHandler(grpcPanicRecoveryHandler)), + ), + ) + + s := grpc.NewServer(opts...) + storepb.RegisterStoreServer(s, srv) + met.InitializeMetrics(s) + + return s +} + // TODO Remove once all components are migrated to the new defaultHTTPListener. // metricHTTPListenGroup is a run.Group that servers HTTP endpoint with only Prometheus metrics. func metricHTTPListenGroup(g *run.Group, logger log.Logger, reg *prometheus.Registry, httpBindAddr string) error { diff --git a/cmd/thanos/query.go b/cmd/thanos/query.go index 4577ac0b3a..0eb2ac0399 100644 --- a/cmd/thanos/query.go +++ b/cmd/thanos/query.go @@ -34,7 +34,6 @@ import ( v1 "github.com/thanos-io/thanos/pkg/query/api" "github.com/thanos-io/thanos/pkg/runutil" "github.com/thanos-io/thanos/pkg/store" - "github.com/thanos-io/thanos/pkg/store/storepb" "github.com/thanos-io/thanos/pkg/tracing" "github.com/thanos-io/thanos/pkg/ui" "google.golang.org/grpc" @@ -441,13 +440,11 @@ func runQuery( } logger := log.With(logger, "component", component.Query.String()) - opts, err := defaultGRPCServerOpts(logger, reg, tracer, srvCert, srvKey, srvClientCA) + opts, err := defaultGRPCServerOpts(logger, srvCert, srvKey, srvClientCA) if err != nil { return errors.Wrapf(err, "build gRPC server") } - - s := grpc.NewServer(opts...) - storepb.RegisterStoreServer(s, proxy) + s := newStoreGRPCServer(logger, reg, tracer, proxy, opts) g.Add(func() error { level.Info(logger).Log("msg", "Listening for StoreAPI gRPC", "address", grpcBindAddr) diff --git a/cmd/thanos/receive.go b/cmd/thanos/receive.go index 78c8c1bd1b..85cd5a0532 100644 --- a/cmd/thanos/receive.go +++ b/cmd/thanos/receive.go @@ -24,7 +24,6 @@ import ( "github.com/thanos-io/thanos/pkg/runutil" "github.com/thanos-io/thanos/pkg/shipper" "github.com/thanos-io/thanos/pkg/store" - "github.com/thanos-io/thanos/pkg/store/storepb" "google.golang.org/grpc" kingpin "gopkg.in/alecthomas/kingpin.v2" ) @@ -267,12 +266,11 @@ func runReceive( db := localStorage.Get() tsdbStore := store.NewTSDBStore(log.With(logger, "component", "thanos-tsdb-store"), reg, db, component.Receive, lset) - opts, err := defaultGRPCServerOpts(logger, reg, tracer, cert, key, clientCA) + opts, err := defaultGRPCServerOpts(logger, cert, key, clientCA) if err != nil { return errors.Wrap(err, "setup gRPC server") } - s = grpc.NewServer(opts...) - storepb.RegisterStoreServer(s, tsdbStore) + s := newStoreGRPCServer(logger, reg, tracer, tsdbStore, opts) level.Info(logger).Log("msg", "listening for StoreAPI gRPC", "address", grpcBindAddr) return errors.Wrap(s.Serve(l), "serve gRPC") diff --git a/cmd/thanos/rule.go b/cmd/thanos/rule.go index 6226ca4479..43ce9a0390 100644 --- a/cmd/thanos/rule.go +++ b/cmd/thanos/rule.go @@ -50,7 +50,6 @@ import ( "github.com/thanos-io/thanos/pkg/store/storepb" "github.com/thanos-io/thanos/pkg/tracing" "github.com/thanos-io/thanos/pkg/ui" - "google.golang.org/grpc" kingpin "gopkg.in/alecthomas/kingpin.v2" ) @@ -493,12 +492,11 @@ func runRule( store := store.NewTSDBStore(logger, reg, db, component.Rule, lset) - opts, err := defaultGRPCServerOpts(logger, reg, tracer, cert, key, clientCA) + opts, err := defaultGRPCServerOpts(logger, cert, key, clientCA) if err != nil { return errors.Wrap(err, "setup gRPC options") } - s := grpc.NewServer(opts...) - storepb.RegisterStoreServer(s, store) + s := newStoreGRPCServer(logger, reg, tracer, store, opts) g.Add(func() error { return errors.Wrap(s.Serve(l), "serve gRPC") diff --git a/cmd/thanos/sidecar.go b/cmd/thanos/sidecar.go index 3e4655c5d1..2a3c5afe9e 100644 --- a/cmd/thanos/sidecar.go +++ b/cmd/thanos/sidecar.go @@ -26,7 +26,6 @@ import ( "github.com/thanos-io/thanos/pkg/shipper" "github.com/thanos-io/thanos/pkg/store" "github.com/thanos-io/thanos/pkg/store/storepb" - "google.golang.org/grpc" "gopkg.in/alecthomas/kingpin.v2" ) @@ -220,12 +219,11 @@ func runSidecar( return errors.Wrap(err, "create Prometheus store") } - opts, err := defaultGRPCServerOpts(logger, reg, tracer, cert, key, clientCA) + opts, err := defaultGRPCServerOpts(logger, cert, key, clientCA) if err != nil { return errors.Wrap(err, "setup gRPC server") } - s := grpc.NewServer(opts...) - storepb.RegisterStoreServer(s, promStore) + s := newStoreGRPCServer(logger, reg, tracer, promStore, opts) g.Add(func() error { level.Info(logger).Log("msg", "Listening for StoreAPI gRPC", "address", grpcBindAddr) diff --git a/cmd/thanos/store.go b/cmd/thanos/store.go index 23a97b344a..c3f7ccb871 100644 --- a/cmd/thanos/store.go +++ b/cmd/thanos/store.go @@ -16,8 +16,6 @@ import ( "github.com/thanos-io/thanos/pkg/runutil" "github.com/thanos-io/thanos/pkg/store" storecache "github.com/thanos-io/thanos/pkg/store/cache" - "github.com/thanos-io/thanos/pkg/store/storepb" - "google.golang.org/grpc" kingpin "gopkg.in/alecthomas/kingpin.v2" ) @@ -187,13 +185,11 @@ func runStore( return errors.Wrap(err, "listen API address") } - opts, err := defaultGRPCServerOpts(logger, reg, tracer, cert, key, clientCA) + opts, err := defaultGRPCServerOpts(logger, cert, key, clientCA) if err != nil { return errors.Wrap(err, "grpc server options") } - - s := grpc.NewServer(opts...) - storepb.RegisterStoreServer(s, bs) + s := newStoreGRPCServer(logger, reg, tracer, bs, opts) g.Add(func() error { level.Info(logger).Log("msg", "Listening for StoreAPI gRPC", "address", grpcBindAddr) From e8bf6f5dcac9f6c8de8cff8c4218d6f319d0c51d Mon Sep 17 00:00:00 2001 From: Michael Dai Date: Wed, 4 Sep 2019 15:20:23 +0800 Subject: [PATCH 08/16] Fixed wrong query url for ruler (#1488) Signed-off-by: jojohappy --- pkg/ui/bindata.go | 142 +++++++++++++++++------------------ pkg/ui/templates/alerts.html | 2 +- pkg/ui/templates/rules.html | 2 +- 3 files changed, 73 insertions(+), 73 deletions(-) diff --git a/pkg/ui/bindata.go b/pkg/ui/bindata.go index 7249ab8430..3e586add99 100644 --- a/pkg/ui/bindata.go +++ b/pkg/ui/bindata.go @@ -160,12 +160,12 @@ func pkgUiTemplates_baseHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/templates/_base.html", size: 1478, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/templates/_base.html", size: 1478, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _pkgUiTemplatesAlertsHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x56\xcd\x8e\xdb\x36\x10\xbe\xef\x53\x0c\x94\x1c\x5a\xa0\xb2\xb0\xd8\xe4\x50\x9b\x56\xb1\xc8\xa5\x87\x24\x28\xb2\xe9\x5e\x17\x14\x39\xb6\x18\x73\x49\x81\xa4\xbd\x76\x59\xbd\x7b\x41\x52\xf2\xca\xb2\xd4\xa4\x40\x61\x40\x20\x87\xc3\x6f\xbe\xf9\xe1\x8c\xbd\xe7\xb8\x11\x0a\x21\xab\x91\xf2\xac\x6d\x6f\x00\x88\x14\x6a\x07\xee\xd4\xe0\x3a\x73\x78\x74\x05\xb3\x36\x03\x83\x72\x9d\x59\x77\x92\x68\x6b\x44\x97\x41\x6d\x70\xb3\xce\xbc\x87\x86\xba\xfa\x0f\x83\x1b\x71\x84\xb6\x2d\xac\xa3\x4e\xb0\x70\xa7\xa0\x12\x8d\xb3\x0b\x66\xed\x6f\x87\xb5\xf7\x50\xed\x85\xe4\x8f\x68\xac\xd0\x0a\xda\x36\x2b\x83\x31\xcb\x8c\x68\x1c\x58\xc3\xe6\xc1\xbe\x9d\xb1\xbe\xcd\x41\x91\x22\x01\x95\x37\xde\xa3\xe2\x6d\x7b\x73\xf3\xea\x1b\xd3\xca\xa1\x72\xc1\x3d\xc2\xc5\x01\x98\xa4\xd6\xae\xa3\x98\x0a\x85\x26\xdf\xc8\xbd\xe0\x89\x4f\x7d\x5b\xde\x47\x5b\xa4\xa8\x6f\xa3\x64\x70\xc3\xd6\xfa\x25\xa7\x4a\xe9\xc0\x4b\x2b\x1b\xaf\x00\x00\x11\xbd\xc6\x56\x9e\x9a\x5a\x30\xad\xe0\xbc\xca\xf7\x8a\xd5\xc8\x76\xc8\x03\x4d\xd1\x5d\x01\x20\xd5\xde\x39\xad\xba\x48\xa7\x4d\x36\x6b\x09\x9c\x70\x12\xd3\x01\x5c\x50\x78\x18\x49\x48\x91\xb0\x22\xf9\x82\x8b\x43\x5c\x38\x5a\x49\xec\xd1\xd3\x26\x7e\xf3\x4a\x1b\x8e\x06\x79\xb7\x65\x5a\x4a\xda\x58\xe4\x9d\x6f\xc4\x55\x9a\x9f\xd2\xda\xfb\xb7\x31\x0f\x0f\x8e\x3a\xfc\xaa\xbf\xe8\x97\x0f\x01\x0f\x96\x6b\x58\xdc\x4f\x1c\xc4\x72\x0a\xd7\x0c\x55\x5b\xec\x74\x84\xda\x7e\xd9\x4b\xec\x0f\x13\x2a\x73\xe2\x80\x29\xee\x09\x6d\x20\x38\x2b\x12\x67\x7a\x07\x22\x0d\x88\xdf\xdc\x7b\xa1\x38\x1e\x61\x9a\xdb\x22\x0a\xda\x36\x29\x3f\x85\x32\x47\x93\x9d\x93\x00\xc4\xf1\xf2\x35\x7d\x31\x5f\xac\xc6\x83\xd1\x2a\xe7\xfa\x45\xa5\x94\x01\xa9\x4a\xef\x17\x9f\xe9\x33\xb6\x2d\x29\xaa\x12\x7e\xf2\x5e\xa2\x82\x0b\xe6\xc1\x48\xdc\xfe\x4c\x0a\xc7\x7b\x13\xa4\x70\xa6\x9c\xf1\xe0\x89\xa3\xa3\x42\xda\x11\x9f\xf3\x26\x55\xdf\x70\x0f\x40\x1a\x83\x10\x1f\xe2\x3a\xe3\xc2\x36\x92\x9e\x96\x95\xd4\x6c\xb7\x82\x86\x72\x2e\xd4\x76\xf9\xeb\xe2\x7d\x73\x5c\xc1\x46\x2b\x97\x5b\xf1\x17\x2e\x6f\xef\xc2\x9e\x69\xa9\xcd\xf2\xcd\xdd\xdd\xdd\x0a\x5e\xb4\xe1\x79\x65\x90\xee\x96\xf1\x9b\x53\x29\x57\x50\x51\xb6\xdb\x1a\xbd\x57\x3c\xef\x94\x37\xef\xc3\x6f\x05\xa9\x4a\x96\xb7\xcd\x11\xac\x96\x82\xc3\x1b\xc6\x58\x2f\xce\x0d\xe5\x62\x6f\x97\xef\x9a\xe3\x2a\x83\x92\x30\xcd\x31\xc4\xeb\xf7\xaf\x9f\x3e\x3e\x28\xd1\x34\xe8\x06\x0f\x3b\x44\x30\x6a\x90\xa2\x31\x78\xe1\x6c\x31\xf2\xd6\x7b\xb1\x19\xc7\x78\xa8\xff\xa3\x45\x5d\xeb\x03\x9a\x6e\x6d\x9f\xbb\x52\x40\x89\xcf\xa8\x9c\x7d\x8a\xf2\x6c\x14\xe5\xd7\x4c\x8d\x4e\xc2\x59\x5d\x7e\xa4\x15\x4a\x4b\x0a\x57\x4f\x9d\xc6\x9a\x9b\x3b\x4c\xb5\x0d\x0f\x42\xb1\x59\x9d\x47\x2a\xf7\x13\x87\xc3\x5a\xea\x23\x94\xde\xd6\x7c\x90\xa2\x2f\xd7\x36\xf8\x58\x34\xc0\x92\xc1\xb9\x5f\xe0\xed\x21\xb0\x88\xef\x31\xb9\xbb\xf8\x44\x9b\x11\x76\x07\x67\x1b\xaa\xfa\x78\x55\x94\x6f\x11\xe2\x37\x6f\x8c\x78\xa6\xe6\x94\x95\xde\x27\xd4\xb6\x0d\x6d\x3e\x21\xb7\x6d\x46\x8a\x70\x73\x8a\x4a\x6a\xe2\x23\x33\xc5\x35\xed\xf8\x7e\x87\xe6\x2f\x5b\x43\xf7\xfe\xe1\x6f\x18\x76\x87\xd4\x1a\xda\x16\xc2\x80\xc1\x27\xa1\xb8\x60\xd4\x69\x03\x61\xde\xe5\xfb\xa6\x41\xc3\xa8\xc5\x40\xbb\xef\x1f\x1d\xd3\x39\x0a\xde\xf7\x3d\xcb\x2d\xfe\xfc\xfa\x21\xe8\xcf\x2a\x3e\x26\xe7\xaf\x35\xa6\xd2\x0b\x62\x03\x8b\xfb\xd7\xee\x3e\x91\x83\x50\xab\xa3\x86\xa0\xb4\xc2\xec\xb2\xd5\x4c\x8c\xad\x01\x42\x1d\xba\x43\xf0\x70\x9d\xbd\xcb\xca\xfb\xe1\x34\xf9\x7e\x11\xfe\x1f\x04\xf8\x05\x81\xab\x82\x20\x5c\xfe\xa7\x82\xfd\xf7\x88\xf5\x98\x6e\x50\x97\xa4\xe0\xee\xda\x44\xd0\x0a\x49\xeb\x2b\x96\x14\x7c\xf2\xe5\x4c\x95\x6b\x6c\x68\x57\xb4\x7f\x2c\xed\xd7\x78\xd7\x32\x52\xc4\xce\x75\xd9\x30\x2f\x95\xa6\x07\x91\xf7\x28\x2d\x0e\xe7\xea\xec\xfc\x01\xf8\xac\xd3\xd3\x11\x6a\x0b\x26\x0c\x6e\x48\x7f\xab\xf8\xf7\x8d\x9c\xa9\x90\xe2\xfc\x2f\xe2\x4c\xba\x6b\xf6\xbd\xda\x3f\x01\x00\x00\xff\xff\x90\x89\x38\x20\x8a\x0a\x00\x00") +var _pkgUiTemplatesAlertsHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x56\x5f\x6f\xdb\x36\x10\x7f\xcf\xa7\x38\xa8\x7d\xd8\x80\xc9\x42\x90\xf6\x61\x36\xad\x21\xe8\xcb\x1e\xd2\x62\x48\xd2\xbc\x06\x14\x79\xb6\x58\x33\xa4\x46\xd2\x8e\x3d\x4e\xdf\x7d\x20\x29\x39\xb2\x2d\xad\x1d\x30\x18\x10\xc8\xbb\xe3\xef\x7e\xf7\x87\x47\x7b\xcf\x71\x25\x14\x42\x56\x23\xe5\x59\xdb\x5e\x01\x10\x29\xd4\x06\xdc\xa1\xc1\x65\xe6\x70\xef\x0a\x66\x6d\x06\x06\xe5\x32\xb3\xee\x20\xd1\xd6\x88\x2e\x83\xda\xe0\x6a\x99\x79\x0f\x0d\x75\xf5\x1f\x06\x57\x62\x0f\x6d\x5b\x58\x47\x9d\x60\xe1\x4c\x41\x25\x1a\x67\x67\xcc\xda\xdf\x76\x4b\xef\xa1\xda\x0a\xc9\x9f\xd0\x58\xa1\x15\xb4\x6d\x56\x06\x67\x96\x19\xd1\x38\xb0\x86\x4d\x83\x7d\x3b\x62\x7d\x9b\x82\x22\x45\x02\x2a\xaf\xbc\x47\xc5\xdb\xf6\xea\xea\x2d\x36\xa6\x95\x43\xe5\x42\x78\x84\x8b\x1d\x30\x49\xad\x5d\x46\x31\x15\x0a\x4d\xbe\x92\x5b\xc1\x13\x9f\xfa\xba\xbc\x8d\xbe\x48\x51\x5f\x47\xc9\xe0\x84\xad\xf5\x6b\x4e\x95\xd2\x81\x97\x56\x36\x1e\x01\x00\x22\x7a\x8b\xb5\x3c\x34\xb5\x60\x5a\xc1\x71\x95\x6f\x15\xab\x91\x6d\x90\x07\x9a\xa2\x3b\x02\x40\xaa\xad\x73\x5a\x75\x99\x4e\x9b\x6c\xd2\x13\x38\xe1\x24\x26\x05\x9c\x50\x78\x38\x93\x90\x22\x61\x45\xf2\x05\x17\xbb\xb8\x70\xb4\x92\xd8\xa3\xa7\x4d\xfc\xe6\x95\x36\x1c\x0d\xf2\x6e\xcb\xb4\x94\xb4\xb1\xc8\xbb\xd8\x88\xab\x34\x3f\xa4\xb5\xf7\xef\x63\x1d\x1e\x1c\x75\xf8\xa8\xef\xf5\xeb\xa7\x80\x07\xf3\x25\xcc\x6e\x47\x14\xb1\x9d\xc2\x31\x43\xd5\x1a\x3b\x1b\xa1\xd6\xf7\x5b\x89\xbd\x32\xa1\x32\x27\x76\x98\xf2\x9e\xd0\x06\x82\xa3\x21\x71\xa6\x0f\x20\xd2\x80\xf8\xcd\xbd\x17\x8a\xe3\x1e\xc6\xb9\xcd\xa2\xa0\x6d\x93\xf1\x73\x68\x73\x34\xd9\xb1\x08\x40\x1c\x2f\xdf\xca\x17\xeb\xc5\x6a\xdc\x19\xad\x72\xae\x5f\x55\x2a\x19\x90\xaa\xf4\x7e\xf6\x85\xbe\x60\xdb\x92\xa2\x2a\xe1\x27\xef\x25\x2a\x38\x61\x1e\x9c\xc4\xed\xcf\xa4\x70\xbc\x77\x41\x0a\x67\xca\x89\x08\x9e\x39\x3a\x2a\xa4\x3d\xe3\x73\xdc\xa4\xee\x1b\xee\x01\x48\x63\x10\xe2\x45\x5c\x66\x5c\xd8\x46\xd2\xc3\xbc\x92\x9a\x6d\x16\xd0\x50\xce\x85\x5a\xcf\x7f\x9d\x7d\x6c\xf6\x0b\x58\x69\xe5\x72\x2b\xfe\xc2\xf9\xf5\x4d\xd8\x33\x2d\xb5\x99\xbf\xbb\xb9\xb9\x59\xc0\xab\x36\x3c\xaf\x0c\xd2\xcd\x3c\x7e\x73\x2a\xe5\x02\x2a\xca\x36\x6b\xa3\xb7\x8a\xe7\x9d\xf1\xea\x63\xf8\x2d\x20\x75\xc9\xfc\xba\xd9\x83\xd5\x52\x70\x78\xc7\x18\xeb\xc5\xb9\xa1\x5c\x6c\xed\xfc\x43\xb3\x5f\x64\x50\x12\xa6\x39\x86\x7c\xfd\xfe\xf8\xf9\xee\x41\x89\xa6\x41\x07\x7f\x6e\xd1\x1c\xbe\xde\xdf\x85\xfc\x45\x3d\x29\x1a\x83\x27\xa1\x16\x67\xb1\x7a\x2f\x56\xe7\x19\x1e\xda\xff\x68\x4b\xd7\x7a\x87\xa6\x5b\xdb\x97\xae\x11\x50\xe2\x0b\x2a\x67\x9f\xa3\x3c\x3b\xcb\xf1\x5b\x9d\xce\x34\x41\x57\x97\x77\xb4\x42\x69\x49\xe1\xea\x31\x6d\xec\xb8\x29\x65\xea\x6c\x78\x10\x8a\x4d\xda\x3c\x51\xb9\x1d\x51\x0e\x3b\xa9\xcf\x50\xba\x59\xd3\x49\x8a\xb1\x5c\xfa\xe0\xe7\xa2\x01\x96\x0c\xc1\xfd\x02\xef\x77\x81\x45\xbc\x8d\x29\xdc\xd9\x67\xda\x9c\x61\x77\x70\xb6\xa1\xaa\xcf\x57\x45\xf9\x1a\x21\x7e\xf3\xc6\x88\x17\x6a\x0e\x59\xe9\x7d\x42\x6d\xdb\x30\xe4\x13\x72\xdb\x66\xa4\x08\x27\xc7\xa8\xa4\x11\x7e\xe6\xa6\xb8\xa4\x1d\x6f\xef\xd0\xfd\xe9\x60\xe8\x6e\x3f\xfc\x0d\xc3\xd9\x90\x06\x43\xdb\x42\x78\x5e\xf0\x59\x28\x2e\x18\x75\xda\x40\x78\xed\xf2\x6d\xd3\xa0\x61\xd4\x62\xa0\xdd\x4f\x8f\x8e\xe9\x14\x05\xef\xfb\x89\xe5\x66\x5f\x1f\x3f\x05\xfb\x49\xc3\xa7\x14\xfc\xa5\xc5\x58\x79\x41\xac\x60\x76\xfb\x36\xdb\x47\x6a\x10\x7a\xf5\x6c\x1c\x28\xad\x30\x3b\x1d\x34\x23\x8f\xd6\x00\xa1\x0e\xb3\x21\x44\xb8\xcc\x3e\x64\xe5\xed\xf0\x2d\xf9\x7e\x13\xfe\x1f\x04\xf8\x09\x81\x8b\x86\x20\x5c\xfe\xa7\x86\xfd\xf7\x8c\xf5\x98\x6e\xd0\x97\xa4\xe0\xee\xd2\x45\xb0\x0a\x45\xeb\x3b\x96\x14\x7c\xf4\xe6\x8c\xb5\x6b\x1c\x68\x17\xb4\x7f\xac\xec\x97\x78\x97\x32\x52\xc4\xc9\x75\x3a\x30\x4f\x8d\xc6\x9f\x21\xef\x51\x5a\x1c\xbe\xaa\x93\xaf\x0f\xc0\x17\x9d\xae\x8e\x50\x6b\x30\xe1\xd9\x86\xf4\xa7\x8a\x7f\xdf\xc9\x91\x0a\x29\x8e\xff\x21\x8e\xa4\xbb\x61\xdf\x9b\xfd\x13\x00\x00\xff\xff\x4e\x7c\x2e\x8d\x88\x0a\x00\x00") func pkgUiTemplatesAlertsHtmlBytes() ([]byte, error) { return bindataRead( @@ -180,7 +180,7 @@ func pkgUiTemplatesAlertsHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/templates/alerts.html", size: 2698, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/templates/alerts.html", size: 2696, mode: os.FileMode(420), modTime: time.Unix(1567492419, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -200,7 +200,7 @@ func pkgUiTemplatesBucketHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/templates/bucket.html", size: 1281, mode: os.FileMode(436), modTime: time.Unix(1565769810, 0)} + info := bindataFileInfo{name: "pkg/ui/templates/bucket.html", size: 1281, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -220,7 +220,7 @@ func pkgUiTemplatesBucket_menuHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/templates/bucket_menu.html", size: 785, mode: os.FileMode(436), modTime: time.Unix(1565769810, 0)} + info := bindataFileInfo{name: "pkg/ui/templates/bucket_menu.html", size: 785, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -240,7 +240,7 @@ func pkgUiTemplatesGraphHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/templates/graph.html", size: 2298, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/templates/graph.html", size: 2298, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -260,7 +260,7 @@ func pkgUiTemplatesQuery_menuHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/templates/query_menu.html", size: 1364, mode: os.FileMode(436), modTime: time.Unix(1565769810, 0)} + info := bindataFileInfo{name: "pkg/ui/templates/query_menu.html", size: 1364, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -280,12 +280,12 @@ func pkgUiTemplatesRule_menuHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/templates/rule_menu.html", size: 961, mode: os.FileMode(436), modTime: time.Unix(1565769810, 0)} + info := bindataFileInfo{name: "pkg/ui/templates/rule_menu.html", size: 961, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _pkgUiTemplatesRulesHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x55\x5d\x6f\xd3\x30\x14\x7d\xef\xaf\xb8\x32\x3c\xc0\x43\x12\x18\x4f\x20\xa7\x68\x82\x69\x43\x1a\x13\xda\x26\x1e\x86\x60\x72\xe3\xdb\xc5\xc2\xb5\x23\xdb\x29\xdb\x8c\xff\x3b\xb2\xd3\x6e\xe9\x47\x56\x8a\x44\x1f\xa2\x5e\x27\xf7\x9e\x73\xbf\x8e\xbd\xe7\x38\x15\x0a\x81\xd4\xc8\x38\x09\x61\x44\xa5\x50\x3f\xc1\xdd\x35\x58\x12\x87\xb7\xae\xa8\xac\x25\x60\x50\x96\xc4\xba\x3b\x89\xb6\x46\x74\x04\x6a\x83\xd3\x92\x78\x0f\x0d\x73\xf5\x17\x83\x53\x71\x0b\x21\x14\xd6\x31\x27\xaa\xe8\x53\x98\x56\xa2\xcd\x2b\x6b\xdf\xcf\x4b\xef\x61\xd2\x0a\xc9\xbf\xa2\xb1\x42\x2b\x08\x81\x8c\x47\xde\xa3\xe2\x21\x8c\x46\x8f\x24\x2a\xad\x1c\x2a\x17\x79\x00\x50\x2e\xe6\x50\x49\x66\x6d\x99\x5e\x30\xa1\xd0\x64\x53\xd9\x0a\x4e\xc6\x23\x00\x00\x5a\x1f\x8c\xcf\x23\x0c\x2d\xea\x83\xc5\x91\x63\x13\x89\x4b\xb7\xce\x48\xcf\x6c\xa2\x0d\x47\x83\x4b\x5f\x00\xef\x0d\x53\x37\x08\x79\x0c\x71\x6c\x74\xdb\xd8\x84\xdb\xfd\xa8\x8b\x15\x19\x3f\xd8\xf1\xc4\xf4\xcd\x78\xc0\xa1\xd2\xd2\x36\x4c\x95\xe4\x0d\x19\x47\x3a\x94\x2d\x4a\xf3\xcc\x7b\x83\xe7\xd8\x48\x56\xe1\xa1\x94\x40\x5e\x7c\xfb\xc1\xb2\xfb\xc3\xec\xea\x55\xf6\xf6\xfb\x4b\x02\xe4\xf9\x6b\x02\xf9\x19\x9b\x61\x08\x04\x14\x9b\x61\xac\xe7\x1e\x3e\x63\xef\x17\x7f\x53\xfa\xb4\x70\x7c\x83\x5f\xe2\xe4\xbd\x98\x42\x7e\x8c\xee\x68\xce\x64\xcb\x9c\xd0\xea\x52\xcc\xd0\x3a\x36\x6b\xf2\x4f\xf6\x0a\x8d\x0e\xe1\x0c\xe7\x68\xbc\x47\x69\x31\x04\xef\xad\x50\x15\x0e\x39\x85\x00\xec\x46\x2f\xfa\xb7\x13\xbc\x6e\x67\x4c\x89\x7b\xfc\xd8\x9a\x14\x66\x2d\xea\xf2\x38\xbf\xc0\x4a\x2b\x6e\x07\x22\xd2\xa2\x5f\x7e\x5a\xac\xb5\x87\xba\x89\xe6\x77\x3b\xdb\x95\x46\xb8\x24\x53\xad\x5c\xf6\x0b\xc5\x4d\xed\xde\x4d\xb4\xe4\x24\x8d\xd1\xd6\x24\x86\x5d\x2e\x1c\x73\xfb\xfa\x1c\x19\xa3\xcd\x9e\x3e\xa7\xcc\x3a\x78\xac\xd7\xbe\x88\x0f\x8e\x10\xfb\xf7\x74\x59\xd7\x96\xa2\xbf\x0f\x43\xf3\xdf\x2d\x5a\x5c\xf6\xeb\x0a\xa5\x4c\x53\x79\x72\xf9\xf9\xf4\x42\x89\xa6\x41\xd7\xd3\x87\xd8\xd8\x6d\xd4\x17\x21\xa2\x74\x20\x59\x7d\x0d\x40\xe3\x76\x2d\x3f\x61\x12\x8d\x83\xf4\xcc\xbc\x87\xfc\x04\x99\x74\x35\xfc\x86\x08\xdf\x19\x97\xfa\x43\xfc\x16\x42\x80\x14\xf0\x5a\x28\x2e\x2a\xe6\xb4\x81\xa8\x66\x59\xdb\x34\x68\x2a\x66\x37\x91\x62\xee\x8b\x88\x2b\x69\x77\x55\x8a\x34\xd6\xa8\x3f\x95\x0c\xc6\x3e\xdb\x0d\x8c\x6e\x13\x63\x43\xd3\x20\x6c\xe2\x0c\x65\xcb\x63\x53\xcc\x7a\x4a\xa9\xd8\xbd\x68\xdb\x68\x46\xd0\x4e\x67\x77\x92\xdf\xce\xf6\x7f\xe9\xc6\x5f\xf0\xf9\x27\xed\xd8\x35\xdf\x7d\xf0\x25\xef\x9e\x8c\x98\x55\x0d\x59\x63\x75\xa6\xd3\xac\x59\xe8\x6e\x2c\x3e\x1a\x4a\xa1\x8f\xbb\x8a\x49\x8b\x9e\x54\xd1\x22\x5d\x4e\xd1\xa0\x05\x17\xf3\xc7\x5b\xf1\x4f\x00\x00\x00\xff\xff\x9f\x06\x54\xde\x9a\x07\x00\x00") +var _pkgUiTemplatesRulesHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x55\x5d\x6f\xd3\x30\x14\x7d\xef\xaf\xb8\x32\x3c\xc0\x43\x12\x18\x4f\x20\xa7\x68\x82\x69\x43\x1a\x13\xda\x06\x0f\x43\x30\xb9\xf1\xed\x62\xe1\xda\xc1\x76\xca\x3a\xe3\xff\x8e\xec\xb4\x5b\xfa\xb5\x52\x24\xfa\x10\xf5\x3a\x39\xf7\x9c\xfb\x69\xef\x39\x8e\x85\x42\x20\x35\x32\x4e\x42\x18\x50\x29\xd4\x0f\x70\xb3\x06\x4b\xe2\xf0\xd6\x15\x95\xb5\x04\x0c\xca\x92\x58\x37\x93\x68\x6b\x44\x47\xa0\x36\x38\x2e\x89\xf7\xd0\x30\x57\x7f\x32\x38\x16\xb7\x10\x42\x61\x1d\x73\xa2\x8a\x98\xc2\xb4\x12\x6d\x5e\x59\xfb\x76\x5a\x7a\x0f\xa3\x56\x48\xfe\x05\x8d\x15\x5a\x41\x08\x64\x38\xf0\x1e\x15\x0f\x61\x30\x78\x10\x51\x69\xe5\x50\xb9\xa8\x03\x80\x72\x31\x85\x4a\x32\x6b\xcb\xf4\x82\x09\x85\x26\x1b\xcb\x56\x70\x32\x1c\x00\x00\xd0\xfa\x60\x78\x1e\x69\x68\x51\x1f\xcc\x8f\x1c\x1b\x49\x5c\xc0\x3a\x23\x3d\xb3\x91\x36\x1c\x0d\x2e\xb0\x00\xde\x1b\xa6\x6e\x10\xf2\xe8\xe2\xd8\xe8\xb6\xb1\x89\xb7\xfb\x51\x17\x33\x32\xbc\xb7\xe3\x89\xe9\x9b\xf1\x80\x43\xa5\xa5\x6d\x98\x2a\xc9\x2b\x32\x8c\x72\x28\x9b\xa7\xe6\x89\xf7\x06\xcf\xb1\x91\xac\xc2\x43\x29\x81\x3c\xfb\xfa\x9d\x65\x77\x87\xd9\xd5\x8b\xec\xf5\xb7\xe7\x04\xc8\xd3\x97\x04\xf2\x33\x36\xc1\x10\x08\x28\x36\xc1\x98\xcf\x3d\x30\x43\xef\xe7\x7f\x53\xf8\xb4\x70\x7c\x4d\x5f\xd2\xe4\xbd\x18\x43\x7e\x8c\xee\x68\xca\x64\xcb\x9c\xd0\xea\x52\x4c\xd0\x3a\x36\x69\xf2\x0f\xf6\x0a\x8d\x0e\xe1\x0c\xa7\x68\xbc\x47\x69\x31\x04\xef\xad\x50\x15\x6e\x03\x85\x00\xec\x46\xcf\xeb\xb7\x93\xbc\x6e\x27\x4c\x89\x3b\x7c\xdf\x9a\xe4\x66\xc5\xeb\xe2\x38\xbf\xc0\x4a\x2b\x6e\xb7\x78\xa4\x45\x3f\xfd\xb4\x58\x29\x0f\x75\x23\xcd\x67\x3b\xcb\x95\x5a\xb8\x24\x63\xad\x5c\xf6\x0b\xc5\x4d\xed\xde\x8c\xb4\xe4\x24\xb5\xd1\xc6\x20\xb6\x43\x2e\x1c\x73\xfb\x62\x8e\x8c\xd1\x66\x4f\xcc\x29\xb3\x0e\x1e\xf2\xb5\x2f\xe3\x3d\x10\x62\xfd\x1e\x4f\xeb\xca\x50\xf4\xe7\x61\x5b\xff\x77\x83\x16\x87\xfd\xba\x42\x29\x53\x57\x9e\x5c\x7e\x3c\xbd\x50\xa2\x69\xd0\xc1\xcf\x16\xcd\xec\xf3\xf9\x69\x2c\xeb\x26\xe1\x73\x07\x71\x71\x20\x59\x7e\x0d\x40\xe3\x6c\x2d\x3e\x61\x12\x8d\x83\xf4\xcc\xbc\x87\xfc\x04\x99\x74\x35\xfc\x86\x48\xde\x19\x97\xfa\x5d\xfc\x16\x42\x80\xe4\xf0\x5a\x28\x2e\x2a\xe6\xb4\x81\xb8\xcb\xb2\xb6\x69\xd0\x54\xcc\xae\x33\xc5\xc8\xe7\x1e\x97\x82\xee\x72\x14\x65\xac\x48\x7f\x2c\x18\x8c\x55\xb6\x6b\x1c\xdd\x1c\xc6\x72\xa6\x36\x58\xe7\xd9\x16\x2d\x8f\x25\x31\xab\x21\xa5\x54\xf7\xbc\x6d\x92\x19\x49\xbb\x2d\xbb\x53\xfc\x66\xb5\xff\x6b\x6b\xfc\x85\x9e\x7f\xda\x1c\xbb\xba\xbb\x4f\xbe\xd0\xdd\x5b\x22\x66\x79\x83\xac\xa8\x3a\xd3\xa9\xd7\x2c\x74\xf7\x15\x1f\x6c\x0b\xa1\xcf\xbb\xcc\x49\x8b\xde\xa2\xa2\x45\xba\x9a\xa2\x41\x0b\x2e\xa6\x0f\x77\xe2\x9f\x00\x00\x00\xff\xff\xb5\xd1\x9f\xde\x98\x07\x00\x00") func pkgUiTemplatesRulesHtmlBytes() ([]byte, error) { return bindataRead( @@ -300,7 +300,7 @@ func pkgUiTemplatesRulesHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/templates/rules.html", size: 1946, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/templates/rules.html", size: 1944, mode: os.FileMode(420), modTime: time.Unix(1567492426, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -320,7 +320,7 @@ func pkgUiTemplatesStatusHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/templates/status.html", size: 1272, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/templates/status.html", size: 1272, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -340,7 +340,7 @@ func pkgUiTemplatesStoresHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/templates/stores.html", size: 2174, mode: os.FileMode(436), modTime: time.Unix(1562008846, 0)} + info := bindataFileInfo{name: "pkg/ui/templates/stores.html", size: 2174, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -360,7 +360,7 @@ func pkgUiStaticCssAlertsCss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/css/alerts.css", size: 401, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/css/alerts.css", size: 401, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -380,7 +380,7 @@ func pkgUiStaticCssGraphCss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/css/graph.css", size: 3844, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/css/graph.css", size: 3844, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -400,7 +400,7 @@ func pkgUiStaticCssPrometheusCss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/css/prometheus.css", size: 470, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/css/prometheus.css", size: 470, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -420,7 +420,7 @@ func pkgUiStaticCssRulesCss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/css/rules.css", size: 195, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/css/rules.css", size: 195, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -440,7 +440,7 @@ func pkgUiStaticImgAjaxLoaderGif() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/img/ajax-loader.gif", size: 847, mode: os.FileMode(436), modTime: time.Unix(1549196327, 0)} + info := bindataFileInfo{name: "pkg/ui/static/img/ajax-loader.gif", size: 847, mode: os.FileMode(420), modTime: time.Unix(1563780416, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -460,7 +460,7 @@ func pkgUiStaticImgFaviconIco() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/img/favicon.ico", size: 15886, mode: os.FileMode(436), modTime: time.Unix(1549196327, 0)} + info := bindataFileInfo{name: "pkg/ui/static/img/favicon.ico", size: 15886, mode: os.FileMode(420), modTime: time.Unix(1563780416, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -480,7 +480,7 @@ func pkgUiStaticJsAlertsJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/js/alerts.js", size: 1152, mode: os.FileMode(436), modTime: time.Unix(1549196327, 0)} + info := bindataFileInfo{name: "pkg/ui/static/js/alerts.js", size: 1152, mode: os.FileMode(420), modTime: time.Unix(1563780416, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -500,7 +500,7 @@ func pkgUiStaticJsBucketJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/js/bucket.js", size: 2834, mode: os.FileMode(436), modTime: time.Unix(1561750577, 0)} + info := bindataFileInfo{name: "pkg/ui/static/js/bucket.js", size: 2834, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -520,7 +520,7 @@ func pkgUiStaticJsGraphJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/js/graph.js", size: 37691, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/js/graph.js", size: 37691, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -540,7 +540,7 @@ func pkgUiStaticJsGraph_templateHandlebar() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/js/graph_template.handlebar", size: 9000, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/js/graph_template.handlebar", size: 9000, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -560,7 +560,7 @@ func pkgUiStaticVendorBootstrap413CssBootstrapGridCss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap-4.1.3/css/bootstrap-grid.css", size: 37644, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap-4.1.3/css/bootstrap-grid.css", size: 37644, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -580,7 +580,7 @@ func pkgUiStaticVendorBootstrap413CssBootstrapGridMinCss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap-4.1.3/css/bootstrap-grid.min.css", size: 28977, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap-4.1.3/css/bootstrap-grid.min.css", size: 28977, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -600,7 +600,7 @@ func pkgUiStaticVendorBootstrap413CssBootstrapRebootCss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap-4.1.3/css/bootstrap-reboot.css", size: 4896, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap-4.1.3/css/bootstrap-reboot.css", size: 4896, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -620,7 +620,7 @@ func pkgUiStaticVendorBootstrap413CssBootstrapRebootMinCss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap-4.1.3/css/bootstrap-reboot.min.css", size: 4019, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap-4.1.3/css/bootstrap-reboot.min.css", size: 4019, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -640,7 +640,7 @@ func pkgUiStaticVendorBootstrap413CssBootstrapMinCss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap-4.1.3/css/bootstrap.min.css", size: 140936, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap-4.1.3/css/bootstrap.min.css", size: 140936, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -660,7 +660,7 @@ func pkgUiStaticVendorBootstrap413JsBootstrapBundleJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap-4.1.3/js/bootstrap.bundle.js", size: 212345, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap-4.1.3/js/bootstrap.bundle.js", size: 212345, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -680,7 +680,7 @@ func pkgUiStaticVendorBootstrap413JsBootstrapBundleMinJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap-4.1.3/js/bootstrap.bundle.min.js", size: 70966, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap-4.1.3/js/bootstrap.bundle.min.js", size: 70966, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -700,7 +700,7 @@ func pkgUiStaticVendorBootstrap413JsBootstrapMinJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap-4.1.3/js/bootstrap.min.js", size: 51039, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap-4.1.3/js/bootstrap.min.js", size: 51039, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -720,7 +720,7 @@ func pkgUiStaticVendorBootstrap3TypeaheadBootstrap3TypeaheadMinJs() (*asset, err return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap3-typeahead/bootstrap3-typeahead.min.js", size: 11273, mode: os.FileMode(436), modTime: time.Unix(1565769832, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap3-typeahead/bootstrap3-typeahead.min.js", size: 11273, mode: os.FileMode(420), modTime: time.Unix(1566355526, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -740,7 +740,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsCssBootstrapGlyphiconsCss() (*asset, e return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/css/bootstrap-glyphicons.css", size: 14523, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/css/bootstrap-glyphicons.css", size: 14523, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -760,7 +760,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsCssBootstrapGlyphiconsMinCss() (*asset return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/css/bootstrap-glyphicons.min.css", size: 11830, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/css/bootstrap-glyphicons.min.css", size: 11830, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -780,7 +780,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsFontsFontawesomeFaBrands400Eot() (*ass return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-brands-400.eot", size: 98620, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-brands-400.eot", size: 98620, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -800,7 +800,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsFontsFontawesomeFaBrands400Svg() (*ass return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-brands-400.svg", size: 507478, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-brands-400.svg", size: 507478, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -820,7 +820,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsFontsFontawesomeFaBrands400Ttf() (*ass return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-brands-400.ttf", size: 98384, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-brands-400.ttf", size: 98384, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -840,7 +840,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsFontsFontawesomeFaBrands400Woff() (*as return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-brands-400.woff", size: 63712, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-brands-400.woff", size: 63712, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -860,7 +860,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsFontsFontawesomeFaBrands400Woff2() (*a return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-brands-400.woff2", size: 54420, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-brands-400.woff2", size: 54420, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -880,7 +880,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsFontsFontawesomeFaRegular400Eot() (*as return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-regular-400.eot", size: 31156, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-regular-400.eot", size: 31156, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -900,7 +900,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsFontsFontawesomeFaRegular400Svg() (*as return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-regular-400.svg", size: 107199, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-regular-400.svg", size: 107199, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -920,7 +920,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsFontsFontawesomeFaRegular400Ttf() (*as return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-regular-400.ttf", size: 30928, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-regular-400.ttf", size: 30928, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -940,7 +940,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsFontsFontawesomeFaRegular400Woff() (*a return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-regular-400.woff", size: 14712, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-regular-400.woff", size: 14712, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -960,7 +960,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsFontsFontawesomeFaRegular400Woff2() (* return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-regular-400.woff2", size: 12220, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-regular-400.woff2", size: 12220, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -980,7 +980,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsFontsFontawesomeFaSolid900Eot() (*asse return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-solid-900.eot", size: 102152, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-solid-900.eot", size: 102152, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1000,7 +1000,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsFontsFontawesomeFaSolid900Svg() (*asse return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-solid-900.svg", size: 378215, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-solid-900.svg", size: 378215, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1020,7 +1020,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsFontsFontawesomeFaSolid900Ttf() (*asse return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-solid-900.ttf", size: 101932, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-solid-900.ttf", size: 101932, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1040,7 +1040,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsFontsFontawesomeFaSolid900Woff() (*ass return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-solid-900.woff", size: 48704, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-solid-900.woff", size: 48704, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1060,7 +1060,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsFontsFontawesomeFaSolid900Woff2() (*as return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-solid-900.woff2", size: 38784, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/fontawesome/fa-solid-900.woff2", size: 38784, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1080,7 +1080,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsFontsGlyphiconsGlyphiconsHalflingsRegu return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/glyphicons/glyphicons-halflings-regular.eot", size: 20127, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/glyphicons/glyphicons-halflings-regular.eot", size: 20127, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1100,7 +1100,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsFontsGlyphiconsGlyphiconsHalflingsRegu return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/glyphicons/glyphicons-halflings-regular.svg", size: 108738, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/glyphicons/glyphicons-halflings-regular.svg", size: 108738, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1120,7 +1120,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsFontsGlyphiconsGlyphiconsHalflingsRegu return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/glyphicons/glyphicons-halflings-regular.ttf", size: 45404, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/glyphicons/glyphicons-halflings-regular.ttf", size: 45404, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1140,7 +1140,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsFontsGlyphiconsGlyphiconsHalflingsRegu return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/glyphicons/glyphicons-halflings-regular.woff", size: 23424, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/glyphicons/glyphicons-halflings-regular.woff", size: 23424, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1160,7 +1160,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsFontsGlyphiconsGlyphiconsHalflingsRegu return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/glyphicons/glyphicons-halflings-regular.woff2", size: 18028, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/fonts/glyphicons/glyphicons-halflings-regular.woff2", size: 18028, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1180,7 +1180,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsMapsGlyphiconsFontawesomeCss() (*asset return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/maps/glyphicons-fontawesome.css", size: 51062, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/maps/glyphicons-fontawesome.css", size: 51062, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1200,7 +1200,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsMapsGlyphiconsFontawesomeLess() (*asse return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/maps/glyphicons-fontawesome.less", size: 53867, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/maps/glyphicons-fontawesome.less", size: 53867, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1220,7 +1220,7 @@ func pkgUiStaticVendorBootstrap4GlyphiconsMapsGlyphiconsFontawesomeMinCss() (*as return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/maps/glyphicons-fontawesome.min.css", size: 42307, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/bootstrap4-glyphicons/maps/glyphicons-fontawesome.min.css", size: 42307, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1240,7 +1240,7 @@ func pkgUiStaticVendorEonasdanBootstrapDatetimepickerBootstrapDatetimepickerMinC return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/eonasdan-bootstrap-datetimepicker/bootstrap-datetimepicker.min.css", size: 7771, mode: os.FileMode(436), modTime: time.Unix(1549196327, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/eonasdan-bootstrap-datetimepicker/bootstrap-datetimepicker.min.css", size: 7771, mode: os.FileMode(420), modTime: time.Unix(1563780417, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1260,7 +1260,7 @@ func pkgUiStaticVendorEonasdanBootstrapDatetimepickerBootstrapDatetimepickerMinJ return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/eonasdan-bootstrap-datetimepicker/bootstrap-datetimepicker.min.js", size: 48881, mode: os.FileMode(436), modTime: time.Unix(1549196327, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/eonasdan-bootstrap-datetimepicker/bootstrap-datetimepicker.min.js", size: 48881, mode: os.FileMode(420), modTime: time.Unix(1563780417, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1280,7 +1280,7 @@ func pkgUiStaticVendorFuzzyFuzzyJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/fuzzy/fuzzy.js", size: 5669, mode: os.FileMode(436), modTime: time.Unix(1549196327, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/fuzzy/fuzzy.js", size: 5669, mode: os.FileMode(420), modTime: time.Unix(1563780417, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1300,7 +1300,7 @@ func pkgUiStaticVendorJsJquery331MinJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/js/jquery-3.3.1.min.js", size: 86927, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/js/jquery-3.3.1.min.js", size: 86927, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1320,7 +1320,7 @@ func pkgUiStaticVendorJsJqueryHotkeysJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/js/jquery.hotkeys.js", size: 4490, mode: os.FileMode(436), modTime: time.Unix(1549196327, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/js/jquery.hotkeys.js", size: 4490, mode: os.FileMode(420), modTime: time.Unix(1563780417, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1340,7 +1340,7 @@ func pkgUiStaticVendorJsJqueryMinJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/js/jquery.min.js", size: 86671, mode: os.FileMode(436), modTime: time.Unix(1549196327, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/js/jquery.min.js", size: 86671, mode: os.FileMode(420), modTime: time.Unix(1563780417, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1360,7 +1360,7 @@ func pkgUiStaticVendorJsJquerySelectionJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/js/jquery.selection.js", size: 12881, mode: os.FileMode(436), modTime: time.Unix(1549196327, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/js/jquery.selection.js", size: 12881, mode: os.FileMode(420), modTime: time.Unix(1563780417, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1380,7 +1380,7 @@ func pkgUiStaticVendorJsPopperMinJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/js/popper.min.js", size: 19236, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/js/popper.min.js", size: 19236, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1400,7 +1400,7 @@ func pkgUiStaticVendorMomentMomentTimezoneWithDataMinJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/moment/moment-timezone-with-data.min.js", size: 184495, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/moment/moment-timezone-with-data.min.js", size: 184495, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1420,7 +1420,7 @@ func pkgUiStaticVendorMomentMomentMinJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/moment/moment.min.js", size: 51825, mode: os.FileMode(436), modTime: time.Unix(1559739103, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/moment/moment.min.js", size: 51825, mode: os.FileMode(420), modTime: time.Unix(1565577418, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1440,7 +1440,7 @@ func pkgUiStaticVendorMustacheMustacheMinJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/mustache/mustache.min.js", size: 9528, mode: os.FileMode(436), modTime: time.Unix(1549196327, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/mustache/mustache.min.js", size: 9528, mode: os.FileMode(420), modTime: time.Unix(1563780417, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1460,7 +1460,7 @@ func pkgUiStaticVendorRickshawRickshawMinCss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/rickshaw/rickshaw.min.css", size: 6102, mode: os.FileMode(436), modTime: time.Unix(1549196327, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/rickshaw/rickshaw.min.css", size: 6102, mode: os.FileMode(420), modTime: time.Unix(1563780417, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1480,7 +1480,7 @@ func pkgUiStaticVendorRickshawRickshawMinJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/rickshaw/rickshaw.min.js", size: 76322, mode: os.FileMode(436), modTime: time.Unix(1549196327, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/rickshaw/rickshaw.min.js", size: 76322, mode: os.FileMode(420), modTime: time.Unix(1563780417, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1500,7 +1500,7 @@ func pkgUiStaticVendorRickshawVendorD3LayoutMinJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/rickshaw/vendor/d3.layout.min.js", size: 17514, mode: os.FileMode(436), modTime: time.Unix(1549196327, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/rickshaw/vendor/d3.layout.min.js", size: 17514, mode: os.FileMode(420), modTime: time.Unix(1563780417, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1520,7 +1520,7 @@ func pkgUiStaticVendorRickshawVendorD3V3Js() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "pkg/ui/static/vendor/rickshaw/vendor/d3.v3.js", size: 144718, mode: os.FileMode(436), modTime: time.Unix(1549196327, 0)} + info := bindataFileInfo{name: "pkg/ui/static/vendor/rickshaw/vendor/d3.v3.js", size: 144718, mode: os.FileMode(420), modTime: time.Unix(1563780417, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/pkg/ui/templates/alerts.html b/pkg/ui/templates/alerts.html index dc67c05c20..a7cfed48c3 100644 --- a/pkg/ui/templates/alerts.html +++ b/pkg/ui/templates/alerts.html @@ -21,7 +21,7 @@

    Alerts

    -
    {{.HTMLSnippet pathPrefix}}
    +
    {{.HTMLSnippet queryURL}}
    {{if $activeAlerts}} diff --git a/pkg/ui/templates/rules.html b/pkg/ui/templates/rules.html index 3a8236806f..41bb908357 100644 --- a/pkg/ui/templates/rules.html +++ b/pkg/ui/templates/rules.html @@ -24,7 +24,7 @@

    Rules

    {{range .Rules}} - +
    {{.HTMLSnippet pathPrefix}}{{.HTMLSnippet queryURL}} {{.Health}} From 733e9fa56f3c3d5345b63410170b1c41d1aa1fba Mon Sep 17 00:00:00 2001 From: Wei He Date: Wed, 4 Sep 2019 20:49:00 +0900 Subject: [PATCH 09/16] support Elastic APM for tracing (#1482) * support Elastic APM for tracing Signed-off-by: Wing924 * fix docs Signed-off-by: Wing924 * retry job Signed-off-by: Wing924 * format code Signed-off-by: Wing924 --- docs/tracing.md | 12 ++++++++ go.mod | 2 ++ go.sum | 24 +++++++++++++++ pkg/tracing/client/factory.go | 9 ++++-- pkg/tracing/elasticapm/elastic_apm.go | 43 +++++++++++++++++++++++++++ scripts/cfggen/main.go | 2 ++ 6 files changed, 89 insertions(+), 3 deletions(-) create mode 100644 pkg/tracing/elasticapm/elastic_apm.go diff --git a/docs/tracing.md b/docs/tracing.md index f8183574b2..cfc0542974 100644 --- a/docs/tracing.md +++ b/docs/tracing.md @@ -89,3 +89,15 @@ config: project_id: "" sample_factor: 0 ``` +### Elastic APM + +Client for https://www.elastic.co/products/apm tracing. + +[embedmd]:# (flags/config_tracing_elastic_apm.txt yaml) +```yaml +type: ELASTIC_APM +config: + service_name: "" + service_version: "" + service_environment: "" +``` diff --git a/go.mod b/go.mod index 4603755221..5853cf2619 100644 --- a/go.mod +++ b/go.mod @@ -39,6 +39,8 @@ require ( github.com/uber-go/atomic v1.4.0 // indirect github.com/uber/jaeger-client-go v2.16.0+incompatible github.com/uber/jaeger-lib v2.0.0+incompatible + go.elastic.co/apm v1.5.0 + go.elastic.co/apm/module/apmot v1.5.0 go.uber.org/atomic v1.4.0 // indirect go.uber.org/automaxprocs v1.2.0 golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 diff --git a/go.sum b/go.sum index 1104b4ceeb..cd1a85f28d 100644 --- a/go.sum +++ b/go.sum @@ -41,6 +41,8 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878 h1:EFSB7Zo9Eg91v7MJPVsifUysc/wPdN+NOnVe6bWbdBM= github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod h1:3AMJUQhVx52RsWOnlkpikZr01T/yAVN2gn0861vByNg= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.22.4 h1:Mcq67g9mZEBvBuj/x7mF9KCyw5M8/4I/cjQPkdCsq0I= @@ -75,6 +77,10 @@ github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZ github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elastic/go-sysinfo v1.0.1 h1:lzGPX2sIXaETeMXitXL2XZU8K4B7k7JBhIKWxdOdUt8= +github.com/elastic/go-sysinfo v1.0.1/go.mod h1:O/D5m1VpYLwGjCYzEt63g3Z1uO3jXfwyzzjiW90t8cY= +github.com/elastic/go-windows v1.0.0 h1:qLURgZFkkrYyTTkvYpsZIgf83AUsdIHfvlJaqaZ7aSY= +github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/evanphx/json-patch v0.0.0-20190203023257-5858425f7550/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M= @@ -260,8 +266,11 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/influxdata/influxdb v1.7.7/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/jessevdk/go-flags v0.0.0-20180331124232-1c38ed7ad0cc/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4= +github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7 h1:K//n/AqR5HjG3qxbrBCL4vJPW0MVFSs9CPK1OOJdRME= github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -386,6 +395,7 @@ github.com/prometheus/common v0.6.0 h1:kRhiuYSXR3+uv2IbVbZhUxK5zVD/2pp3Gd2PpvPkp github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3 h1:CTwfnzjQ+8dS6MhHHu4YswVAD99sL2wjPqP+VkURmKE= @@ -399,6 +409,8 @@ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samuel/go-zookeeper v0.0.0-20190810000440-0ceca61e4d75 h1:cA+Ubq9qEVIQhIWvP2kNuSZ2CmnfBJFSRq+kO1pu2cc= github.com/samuel/go-zookeeper v0.0.0-20190810000440-0ceca61e4d75/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/santhosh-tekuri/jsonschema v1.2.4 h1:hNhW8e7t+H1vgY+1QeEQpveR6D4+OwKPXCfD2aieJis= +github.com/santhosh-tekuri/jsonschema v1.2.4/go.mod h1:TEAUOeZSmIxTTuHatJzrvARHiuO9LYd+cIxzgEHCQI4= github.com/satori/go.uuid v0.0.0-20160603004225-b111a074d5ef/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= @@ -435,6 +447,14 @@ github.com/uber/jaeger-client-go v2.16.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMW github.com/uber/jaeger-lib v2.0.0+incompatible h1:iMSCV0rmXEogjNWPh2D0xk9YVKvrtGoHJNe9ebLu/pw= github.com/uber/jaeger-lib v2.0.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= +go.elastic.co/apm v1.5.0 h1:arba7i+CVc36Jptww3R1ttW+O10ydvnBtidyd85DLpg= +go.elastic.co/apm v1.5.0/go.mod h1:OdB9sPtM6Vt7oz3VXt7+KR96i9li74qrxBGHTQygFvk= +go.elastic.co/apm/module/apmhttp v1.5.0 h1:sxntP97oENyWWi+6GAwXUo05oEpkwbiarZLqrzLRA4o= +go.elastic.co/apm/module/apmhttp v1.5.0/go.mod h1:1FbmNuyD3ddauwzgVwFB0fqY6KbZt3JkV187tGCYYhY= +go.elastic.co/apm/module/apmot v1.5.0 h1:rPyHRI6Ooqjwny67au6e2eIxLZshqd7bJfAUpdgOw/4= +go.elastic.co/apm/module/apmot v1.5.0/go.mod h1:d2KYwhJParTpyw2WnTNy8geNlHKKFX+4oK3YLlsesWE= +go.elastic.co/fastjson v1.0.0 h1:ooXV/ABvf+tBul26jcVViPT3sBir0PvXgibYB1IQQzg= +go.elastic.co/fastjson v1.0.0/go.mod h1:PmeUOMMtLHQr9ZS9J9owrAVg0FkaZDRZJEFTTGHtchs= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.0.4/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -519,12 +539,14 @@ golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190425145619-16072639606e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -609,6 +631,8 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +howett.net/plist v0.0.0-20181124034731-591f970eefbb h1:jhnBjNi9UFpfpl8YZhA9CrOqpnJdvzuiHsl/dnxl11M= +howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= k8s.io/api v0.0.0-20190620084959-7cf5895f2711 h1:BblVYz/wE5WtBsD/Gvu54KyBUTJMflolzc5I2DTvh50= k8s.io/api v0.0.0-20190620084959-7cf5895f2711/go.mod h1:TBhBqb1AWbBQbW3XRusr7n7E4v2+5ZY8r8sAMnyFC5A= k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719 h1:uV4S5IB5g4Nvi+TBVNf3e9L4wrirlwYJ6w88jUQxTUw= diff --git a/pkg/tracing/client/factory.go b/pkg/tracing/client/factory.go index 6d9bde30e3..6f346a70b6 100644 --- a/pkg/tracing/client/factory.go +++ b/pkg/tracing/client/factory.go @@ -5,14 +5,14 @@ import ( "io" "strings" - "github.com/thanos-io/thanos/pkg/tracing/jaeger" - "github.com/thanos-io/thanos/pkg/tracing/stackdriver" - "github.com/go-kit/kit/log" "github.com/go-kit/kit/log/level" "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" + "github.com/thanos-io/thanos/pkg/tracing/elasticapm" + "github.com/thanos-io/thanos/pkg/tracing/jaeger" + "github.com/thanos-io/thanos/pkg/tracing/stackdriver" "gopkg.in/yaml.v2" ) @@ -21,6 +21,7 @@ type TracingProvider string const ( STACKDRIVER TracingProvider = "STACKDRIVER" JAEGER TracingProvider = "JAEGER" + ELASTIC_APM TracingProvider = "ELASTIC_APM" ) type TracingConfig struct { @@ -50,6 +51,8 @@ func NewTracer(ctx context.Context, logger log.Logger, metrics *prometheus.Regis return stackdriver.NewTracer(ctx, logger, config) case string(JAEGER): return jaeger.NewTracer(ctx, logger, metrics, config) + case string(ELASTIC_APM): + return elasticapm.NewTracer(config) default: return nil, nil, errors.Errorf("tracing with type %s is not supported", tracingConf.Type) } diff --git a/pkg/tracing/elasticapm/elastic_apm.go b/pkg/tracing/elasticapm/elastic_apm.go new file mode 100644 index 0000000000..ee618f81be --- /dev/null +++ b/pkg/tracing/elasticapm/elastic_apm.go @@ -0,0 +1,43 @@ +package elasticapm + +import ( + "io" + + "github.com/opentracing/opentracing-go" + "go.elastic.co/apm" + "go.elastic.co/apm/module/apmot" + "gopkg.in/yaml.v2" +) + +type Config struct { + ServiceName string `yaml:"service_name"` + ServiceVersion string `yaml:"service_version"` + ServiceEnvironment string `yaml:"service_environment"` +} + +func NewTracer(conf []byte) (opentracing.Tracer, io.Closer, error) { + config := Config{} + if err := yaml.Unmarshal(conf, &config); err != nil { + return nil, nil, err + } + tracer, err := apm.NewTracerOptions(apm.TracerOptions{ + ServiceName: config.ServiceName, + ServiceVersion: config.ServiceVersion, + ServiceEnvironment: config.ServiceEnvironment, + }) + if err != nil { + return nil, nil, err + } + return apmot.New(apmot.WithTracer(tracer)), tracerCloser{tracer}, nil +} + +type tracerCloser struct { + tracer *apm.Tracer +} + +func (t tracerCloser) Close() error { + if t.tracer != nil { + t.tracer.Close() + } + return nil +} diff --git a/scripts/cfggen/main.go b/scripts/cfggen/main.go index eed855f0de..8174f5d1a9 100644 --- a/scripts/cfggen/main.go +++ b/scripts/cfggen/main.go @@ -19,6 +19,7 @@ import ( "github.com/thanos-io/thanos/pkg/objstore/s3" "github.com/thanos-io/thanos/pkg/objstore/swift" trclient "github.com/thanos-io/thanos/pkg/tracing/client" + "github.com/thanos-io/thanos/pkg/tracing/elasticapm" "github.com/thanos-io/thanos/pkg/tracing/jaeger" "github.com/thanos-io/thanos/pkg/tracing/stackdriver" kingpin "gopkg.in/alecthomas/kingpin.v2" @@ -36,6 +37,7 @@ var ( tracingConfigs = map[trclient.TracingProvider]interface{}{ trclient.JAEGER: jaeger.Config{}, trclient.STACKDRIVER: stackdriver.Config{}, + trclient.ELASTIC_APM: elasticapm.Config{}, } ) From 8f7b128838f9a44487cfdeb6699ddc2ebe22307c Mon Sep 17 00:00:00 2001 From: Guy Templeton Date: Thu, 5 Sep 2019 16:30:44 +0100 Subject: [PATCH 10/16] [Docs] - Add line clarifying that Compact component is also responsible for downsampling (#1493) Signed-off-by: GuyTempleton --- docs/components/compact.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/components/compact.md b/docs/components/compact.md index 693877ac52..3df32c5ea2 100644 --- a/docs/components/compact.md +++ b/docs/components/compact.md @@ -9,6 +9,8 @@ menu: components The compactor component of Thanos applies the compaction procedure of the Prometheus 2.0 storage engine to block data stored in object storage. It is generally not semantically concurrency safe and must be deployed as a singleton against a bucket. +It is also responsible for downsampling of data - performing 5m downsampling after **40 hours** and 1h downsampling after **10 days**. + Example: ```bash From 66f073d68393aca3c42192a7d7dc84c18d74905b Mon Sep 17 00:00:00 2001 From: Martin Chodur Date: Fri, 6 Sep 2019 01:36:30 +0200 Subject: [PATCH 11/16] docs: added standardized port layout (#1495) * docs: added standardized port layout Signed-off-by: Martin Chodur * CR: reformuled port layout docs and adjusted the quickstart.sh script Signed-off-by: Martin Chodur * CR: fix quickstart link Signed-off-by: Martin Chodur --- docs/getting-started.md | 26 ++++++++++++++ scripts/quickstart.sh | 75 +++++++++++++++++++++++++++-------------- 2 files changed, 76 insertions(+), 25 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 8ef0047bda..3ce492c3d3 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -243,3 +243,29 @@ TBD Thanos also has a tutorial on deploying it to Kubernetes. We have a full page describing a standard deployment here. We also have example Grafana dashboards [here](/examples/grafana/monitoring.md) and some [alerts](/examples/alerts/alerts.md) to get you started. + +## Testing Thanos on Single Host + +We don't recommend running Thanos on a single node on production. +Thanos is designed and built to run as a distributed system. +Vanilla Prometheus might be totally enough for small setups. + +However, in case you want to play and run Thanos components +on a single node, we recommend following the port layout: + +| Component | Interface | Port | +| --------- | ----------------------- | ----- | +| Sidecar | gRPC | 10901 | +| Sidecar | HTTP | 10902 | +| Query | gRPC | 10903 | +| Query | HTTP | 10904 | +| Store | gRPC | 10905 | +| Store | HTTP | 10906 | +| Receive | gRPC (store API) | 10907 | +| Receive | HTTP (remote write API) | 10908 | +| Receive | HTTP | 10909 | +| Rule | gRPC | 10910 | +| Rule | HTTP | 10911 | +| Compact | HTTP | 10912 | + +You can see example one-node setup [here](/scripts/quickstart.sh) diff --git a/scripts/quickstart.sh b/scripts/quickstart.sh index c18f9ee1e6..2a1be6f010 100755 --- a/scripts/quickstart.sh +++ b/scripts/quickstart.sh @@ -5,16 +5,36 @@ trap 'kill 0' SIGTERM -MINIO_EXECUTABLE="minio" -MC_EXECUTABLE="mc" -PROMETHEUS_EXECUTABLE="./prometheus" -THANOS_EXECUTABLE="./thanos" +MINIO_EXECUTABLE=${MINIO_EXECUTABLE:-"minio"} +MC_EXECUTABLE=${MC_EXECUTABLE:-"mc"} +PROMETHEUS_EXECUTABLE=${PROMETHEUS_EXECUTABLE:-"./prometheus"} +THANOS_EXECUTABLE=${THANOS_EXECUTABLE:-"./thanos"} + +if [ ! $(command -v $PROMETHEUS_EXECUTABLE) ]; then + echo "Cannot find or execute Prometheus binary $PROMETHEUS_EXECUTABLE, you can override it by setting the PROMETHEUS_EXECUTABLE env variable" + exit 1 +fi + +if [ ! $(command -v $THANOS_EXECUTABLE) ]; then + echo "Cannot find or execute Thanos binary $THANOS_EXECUTABLE, you can override it by setting the THANOS_EXECUTABLE env variable" + exit 1 +fi # Start local object storage, if desired. # NOTE: If you would like to use an actual S3-compatible API with this setup # set the S3_* environment variables set in the Minio example. if [ -n "${MINIO_ENABLED}" ] then + if [ ! $(command -v $MINIO_EXECUTABLE) ]; then + echo "Cannot find or execute Minio binary $MINIO_EXECUTABLE, you can override it by setting the MINIO_EXECUTABLE env variable" + exit 1 + fi + + if [ ! $(command -v $MC_EXECUTABLE) ]; then + echo "Cannot find or execute Minio client binary $MC_EXECUTABLE, you can override it by setting the MC_EXECUTABLE env variable" + exit 1 + fi + export MINIO_ACCESS_KEY="THANOS" export MINIO_SECRET_KEY="ITSTHANOSTIME" export MINIO_ENDPOINT="127.0.0.1:9000" @@ -51,7 +71,7 @@ fi STORES="" # Start three Prometheus servers monitoring themselves. -for i in `seq 1 3` +for i in `seq 0 2` do rm -rf data/prom${i} mkdir -p data/prom${i}/ @@ -70,18 +90,23 @@ scrape_configs: scrape_interval: 5s static_configs: - targets: - - "localhost:1919${i}" + - "localhost:109${i}2" - job_name: thanos-store scrape_interval: 5s static_configs: - targets: - - "localhost:19791" + - "localhost:10906" +- job_name: thanos-receive + scrape_interval: 5s + static_configs: + - targets: + - "localhost:10909" - job_name: thanos-query scrape_interval: 5s static_configs: - targets: - - "localhost:19491" - - "localhost:19492" + - "localhost:10904" + - "localhost:10914" EOF ${PROMETHEUS_EXECUTABLE} \ @@ -105,17 +130,17 @@ OBJSTORECFG="--objstore.config-file data/bucket.yml" fi # Start one sidecar for each Prometheus server. -for i in `seq 1 3` +for i in `seq 0 2` do ${THANOS_EXECUTABLE} sidecar \ --debug.name sidecar-${i} \ - --grpc-address 0.0.0.0:1909${i} \ - --http-address 0.0.0.0:1919${i} \ + --grpc-address 0.0.0.0:109${i}1 \ + --http-address 0.0.0.0:109${i}2 \ --prometheus.url http://localhost:909${i} \ --tsdb.path data/prom${i} \ ${OBJSTORECFG} & - STORES="${STORES} --store 127.0.0.1:1909${i}" + STORES="${STORES} --store 127.0.0.1:109${i}1" sleep 0.25 done @@ -127,12 +152,12 @@ then ${THANOS_EXECUTABLE} store \ --debug.name store \ --log.level debug \ - --grpc-address 0.0.0.0:19691 \ - --http-address 0.0.0.0:19791 \ + --grpc-address 0.0.0.0:10905 \ + --http-address 0.0.0.0:10906 \ --data-dir data/store \ ${OBJSTORECFG} & - STORES="${STORES} --store 127.0.0.1:19691" + STORES="${STORES} --store 127.0.0.1:10905" fi sleep 0.5 @@ -143,11 +168,11 @@ then --debug.name receive \ --log.level debug \ --tsdb.path "./data/remote-write-receive-data" \ - --grpc-address 0.0.0.0:19891 \ - --http-address 0.0.0.0:18091 \ + --grpc-address 0.0.0.0:10907 \ + --http-address 0.0.0.0:10909 \ --labels "receive=\"true\"" \ ${OBJSTORECFG} \ - --remote-write.address 0.0.0.0:19291 & + --remote-write.address 0.0.0.0:10908 & mkdir -p "data/local-prometheus-data/" cat < data/local-prometheus-data/prometheus.yml @@ -161,24 +186,24 @@ scrape_configs: static_configs: - targets: ['localhost:9100'] remote_write: -- url: http://localhost:19291/api/v1/receive +- url: http://localhost:10908/api/v1/receive EOF ${PROMETHEUS_EXECUTABLE} \ --config.file data/local-prometheus-data/prometheus.yml \ --storage.tsdb.path "data/local-prometheus-data/" & - STORES="${STORES} --store 127.0.0.1:19891" + STORES="${STORES} --store 127.0.0.1:10907" fi sleep 0.5 -# Start to query nodes. -for i in `seq 1 2` +# Start two query nodes. +for i in `seq 0 1` do ${THANOS_EXECUTABLE} query \ --debug.name query-${i} \ - --grpc-address 0.0.0.0:1999${i} \ - --http-address 0.0.0.0:1949${i} \ + --grpc-address 0.0.0.0:109${i}3 \ + --http-address 0.0.0.0:109${i}4 \ --query.replica-label prometheus \ ${STORES} & done From 314922f5df3ebf9cca2e3ee5971994e503a3e375 Mon Sep 17 00:00:00 2001 From: Roman Lisagor Date: Fri, 6 Sep 2019 15:17:32 -0700 Subject: [PATCH 12/16] Added Untab as an adopter (#1500) Signed-off-by: Roman Lisagor --- website/data/adopters.yml | 3 +++ website/static/logos/untab.png | Bin 0 -> 9494 bytes 2 files changed, 3 insertions(+) create mode 100644 website/static/logos/untab.png diff --git a/website/data/adopters.yml b/website/data/adopters.yml index 69f4a5c716..b259011d8a 100644 --- a/website/data/adopters.yml +++ b/website/data/adopters.yml @@ -42,3 +42,6 @@ adopters: - name: XING url: https://www.xing.com/ logo: xing.png +- name: Untab + url: https://www.untab.io/ + logo: untab.png diff --git a/website/static/logos/untab.png b/website/static/logos/untab.png new file mode 100644 index 0000000000000000000000000000000000000000..148199e2a85a561bb4d9a2df33263958ba021060 GIT binary patch literal 9494 zcmc&)gD^7gr!EloM=n4Q}5&X9U0U22&FP&&^@=EW}HZYKhg(-pgACO8$F5=BTUM{sD)%>h=-Qw7HCid8 z>8_m3Eb-yhyZ`H!ZKS8x+)9VR*tsf30Izsw8bcH5)jFIEwijCPu zeJ>Ammc_DmdP;N{BlEM;yte+TW0354>(ltF;Y8#!zQ;BF%_D2FXizvA_(HJBceohH z(P;X~cPOgcON+||RZVNjm!S4GqGwig?*fNBACfEz6x@6pJ}n^S@gd9VqG%F zl7>yZBl1{h;M(x*fBg*--hr0S*rYsGH?R{7hMX$Cy!lT_aO+%fUi1wXV`-!cki%db z@$rRIGr?i4o}jv=B^!x5-k&+?w7d=G_^}e`%dflErUDt?PjC361*aPt*8cPub;>1m z2AQPw5Uuji=e~~leSXzn2zeR851FPmESsP?7cT9V2XbqzsWL`5IG;<3Xe)C~sFZp$ zzl`FGL#qbjQZ*Zq5RgXORfC|LTGCK1{Aey^oEtL7I$@>h^uh;oyZrWg#S0zl9byQv z3RX0OI(BW1UjwGkV~v~AlC*gJ-dmb%f-#8y0{b5crA%F=p5L+K|HK)Eyd`nm8pXpb z&hpNYyE9lhECG_fNz&l?OFg=Xx#|rF0G_&LC&vfL;e)#ysBBh>PzzVQxLgYlWi!-B zXMZOQb()N$(`BY>s#A#xrU$V0w-8DUeDJ~ZcHj->P{db0#ZnP*lP)HUdx{s7uq;$x zD{MvKcOli0`^XFZ*x!1#U22df7WQfh`*&#o;f>9vz&Kb3ar}uDV#i~va|I+WG~Bh(XaV@%hNr{JQ1uxiUBKd&p{dSbQE{7 zy`S$_^!K9%T4IX278wL;P$d?-QGH4gAy2UeOixro`q8O*ul#nvj4HHo)Ev;#ns_YO z{vSa4U}uIh%=AkW@O4c!>>1TaW<M-_1i7)l7=ZzJhx^*d&b{Jn%;G4aid>4JA|V z(GQhIq z6iL9W3=*4Y@-Gx*v*6fo~&$8li#d7@i@AIOPkZ zO-uBq-3ewqG`LbD3;GJ)*5r#py}`crcRw~q2=YV6Z1+`A#s;Jef*MhBn@&g2(RT(( zB$nC}WY-@en~JaF$l~H@B>RR_U&xE)2bD9s7UK7D&l(9xi)-4eq zh7j34uFGR%&-SOqXl>v-S>_LK)Clp}n(09U`0XeZ)6o_ePgr1+3rD7%i4+-pZfGI) zt!B8~u2N$Cj~XLyq}G!GBxOD$n~x7;hd_LkuC z@gNM0q?*xO1F9kCCph=!Tb!?Po!M8)bdWbc%p*Of08o1I|GR&`6#J>O)7(g33bsQ7 zpGY%OL>Cz6`mRDG5(*6MR#zpnox}U>fn;yIec3iJf;RJOx}C4}5RGnrwq5Vq)<%)X z%M^~14DzK0)=Kh}o*dk7C-2H}eg{hcIOC|022CnIVJ}N{%9uF#l)J7B=IuM}`c|?; z*NaHOQX6BjKilfH`ZipICiUrR;g5YmX^ zdDd+G=C5cxRzlvjtwn=2r#Re_hA22*zG^A_6%rU#$ z(z0`U@aP&^{UKxlp7KMJ8s`Viw=c2pxqm!Xt}x)|?s^I5R~k5HNN(!ISiET~TZ>m| zDLGTsU26Uk2#*QdT_|7QGJN|&K?!cB;E2KqSVD|5WCMPw4n9H0^qY)tWT3pf;c7ez za_(H4ZBa`=uMtn;cUNM_tB%7poK&vf)~5Ewkk>^B$_*U8VMW99&lZ6Tky zPz~)Mef`rq*e5>{jRsKgt*&d{(l)vi7()mf+!X@8 z>Ee3Tf1hFvK=u}2n64I}#f_bizPKHrx4e8LiPw=|4AdvHO_K;6km?pEHQI8rnY5dC z@J}7r;2&kp67s60ZdQ=;!tLlRg}DV-S8N4Dru&Z$OFC@S#ppUC##QCr&r=0NEYQB* z1{>Yx&I}?@(bZvuI9mM^IT?Bq8rSm+cen4H z5o!aG2UR!`5Efv!nD{~8xA)= z5Wr~=Oyte7bO?s)mfK1$(9NGctcH}Aw}{7MU@`g@LkQTsZFk{|cY z7Zc62LnoP5=}!cq zawCKBwTE?!Db(Fg?dL|}AxI08{s=XEEuN4+xxm(k{X0bPwOaUc`J1dQ2aZh-tk4!Nb$JmX9@_^$e(7VHU$NJ8TFsIqRW5(Sl~r=1r1T}k2+ZtgT|i;na{ zdwUh6prU30x8*$2p!Z3r_s*e7`NXF8o+jM4+{3SH5YQfnuA1dOKNE%}Q4$bx&g@S>s zlAUgKSU;B?Ts15N;tDW+ly@=y`EdJZi}&&tFhZnD_b47vb#g$^oQ>|x_)8%Td^1-N z1;!1XIJaDs0uMzF=MOkfeCOfia|u!;D78zZZ>BlGju;?bv>A{fUr^-|QK*tpf`ZZ( zuxPvGF>Ja8J1#jGNtxLU$Y}Tsd(Z=43#QRRaUSefOrG*rVqAICGFe&1$Y5vmiXyo3 z4urS9{!Knia|Mr^CAX>$vNj%Z${Jmh15_x+^Kv>kl?AT?5)aIsVm#8?#zruU!hh-p zk+%8Jw2elLmTYRpBeebV>(U=N`3^|2e_;ZnF*M*Ne4&p7Wuk(Od!2tt zlgW+nIIn;L=ti&687vh&CLAIwxHuR%TgaMngG!1h^AX#qC=$00#Y( zAR29u?R|rJ{Qx$L8JGQM(uPOXdp<)d9AmbD=i?*jlS-WZ;nA-DTEFq;i?JM|J|n8` z;zz#_D?MRwT2*#GXC{{g`J%?PEX*tlpR%-Dv4~}3eE&^UkP1(wjb6E|UUI4+D*vvD zn1ecU#^2_raT+Th|2^@TxR&AwOYI_0JG%Dq#uagEEwa(p`XL|~dip2gFY)(i_#Y=N zzque_DJ=(E+}H|sePA+{q2cM0O@e$izwlLcy`jNUQB}-{j%D9T8to6Fu z_RAog2r~@u2n-`}pO8V=j&*MsK-Og6^+#>;e9b-jv6$$Gq1FOLbg!dnDF0BaVar4p zGtF2>v!`R@d7dJyV}vSun1<<~t5bV{Z199+*mAnJ+%u_1R}6R6cn8iL6Ip@(B`k}# zy|OaTM3vqQpH<;%#IUY)8g`bGRFyE2ys50MzarA!<-fCdP|)kn7xvxLxzAyc7_Q14z_+x= zAV9rVy)WoEC3ZHrr%Cf?e#6*z?8=uE!YJujcK6L ziVFnr=DL7SN{?DrAC7dF8gHj6IHAxQjS0VUa?>CE<=I)l!orTQ-HTHmdKzg<0fQbVui%G&2O57)9kBB{7011z+3-P@llf!E>=VU^nv{1{^*D+tKj6yt zex-#6D&=!YdWIAhnwj3>Y&CJ-E_O%?j}r>Jx;hfukz4&5g+$z+r9CGAe?b|!!|NE> z3O8y&l7_-JgSOE@M5ILUvn7GF7qCK7yLga^L$`vmaaQ>?QBwKGJ7g}Xi5{z8KY3gR z87LnM*2?#f@0q&7r$DB&*1t^-NqIyDtt*Z}qk~11g%;e%68juOJ6UHv!CGo0mLZW+ zK#S&TFnY-?NkU(ZgzVD}!XFKlTw%iJg^t|2cPNNeG!hGlH*K;2P`KDJ=O$sys(qM= z_cX54VIf9PaA}?>w_dSBliga|J7h&q_CAl~5aY!T23fRS<2*4LrhSZ8K`=}yn)E!g zcu~|I_m1Q1(7<&ABf08OIF1|mKnw|SFY;v~>ray*Ah^SjmY@`8Xtw|waHtQzr`j`f zk%lrTmHjJo-;l4BAjGs-rn>Nr735KnQcg&6+fPFi20`8ee=kn>$hE>>DWq^9toPWX zc@@FdG+W$mIJ9ng5nra~D13on_~d7uoB*Am@#kS*D~?o>*uBDcn6OQ>&FvVH+WRA3 znt8ItcuxHAqkqjeDa5r5NRUAzlYg0iTFy>paoXi3VUt(KaptsdP zY9gUPi{*6EN>ggkZ+3>`AAa3C>&)w3HJo~_nQ}FWUYSP*utn{wQ+o+Ez0Z!2h+@pr?xFEJEj7Yi zq`3Zb?&`5;atM6i*M|}tGRk*K^Vc|i_g8tXtnb03sM_~uiqE%5;n5VIE?(;itRcls zR8@QlaN)R(kqO8~3qtkOGV+ZUh?EM9tDMkd9e@LoR6;W>O9Okcx2ETK7`@sN zI03F3od|g=J(enJymv6)4lsSKA1;&?c70Nt_;yz!(c+^V&bBeftiMdKcAn!bv(Jetfl25)!8fT@bjZ_&AZng z8bvKDNABuYS?}znus2vvK6cNg+}nAFk;N?#(btc@C?TtDGATORMog{->u=;0r-JV>g~SH{jR3JruFBPZ8pVSYpz5K9{uyeHAs_v&jptMiSu zQAloEjW+c+NbJQq8j>e#@C-9;kT8+rY`FOl(hS@?;N1ihRH(PD8HKmiy$3cDWx{2) z-$MF)5ZKZX@#j>HK_U8+?i5#UV99K)tM~VlRO)yx@{+>H&T|3A?-FsPLFRLZcxSii zSSMctOXiyr<}b>=%9>V>3dglowCxHGqGxlb8SVJc6B3W6?8fvbnM2S+XiOmJA4qL% zvV79Utg>Zc;z?0iH)AmM#^|H7Tmfjhjw$dbQZtKkjqdNq)JOZP5=Fb3MbP+ zPy4Jo?bD5e44kv@@9AxdR|g^OwUEJx5jP3}UN;V*j*&yDG0ai*i|=6Ksm(W^KfBv4 z{nOuj25aTRU(se`-rJJD9otVOVQ(zymELT(yIpf8zKx{(Q7TT@x5#uVmpxrXuEOH6 ztw`#{mkgvufur0RK`Dd>Cm8ZS9&arK5Ut$5%}_QreR{X4i9apR>LZEWPucHkYJHf1 zR#0>Ejri;O`uDtq{ghaua0YSQ{DnfQ$%IEqi7-L|iJhGp_VS}EOT4AxQ!emL%Jo`F zo!mC-c-DB?c38-5&wognPwiAVK19XIG=Mi(?wj_|n)45~Xx{sInH)pHj<0Yr=IU2M zO@BB#&P^w%$I&7N9}hENridCZ>JxwXamE+XfoVG)XbYE-gal0cBc`Z2nQbL|r9;JW zxv_f|@dy8vo}XpgXFqigJh6(Ey#@mPRld3QQYGBR^Wr4i17!y?-l)AOCc}r|V8+i4 z|GNHFNEv(GZxKeNs*ul$OcBedp}dXQ1#uZ*JX-)xZs?i@IIfdlFry;}6%(A7mG8|3 zLws-Co(A#4yaAnWO5Ex2R!!uK2pAJwhh&r92~KN*UD7z*}Ej@}6sInhED zQ^Ma0UT$b=U3ACrC>I~DaXhvJE4zAd~4qtpG*y>D4dt#B5*ophi& zP**FX6~V6I*G-jfEga~96l?z5EpQMhBz;E8a)Sm^_hrUUIi&$V)^Uhz3BN>AYyox_ zeU#FRW5kdDUV*Dj{t2cdrcTcjbk4Dno+4gdb(m>@^DH-;^ifs{o9J?fWBj(IMCEyq7M(yMillDLR=lvO?SYu0$# z4pIw$D?q`fxrE0VaB^MLHF1Ho& zxlrQcaq}t)F3n#&IhMN!Ikiz%AUxz(uKRS6gHlg0I7Tqe2>^*oZGY`xeZ+ZT&_K`x zCE1Jr(rx+J%1}0cvs3K`GgsmwH!*APq zBnP8PiYHb`<||J%~kGWB^p@EmGE~}1ciXH9rLvt&ldX!NaS%1MP+}7Zyx)>%62D5hdQnHAMMAd z((;^O>i|)mztH^DaEBQCj-0hM)*QplIQ4Od1byCrA?F41#W#2W?j&03!#p77{0|qW zAn)3li=GF*I&ypv62Ln1&c|XocOe+QlTdWOPw)x%tjV6*Ij~(=?k`mNY&$Q*BKGBL zfq~w_0m!RHxG+j4(_312N~Gn3ufM%Q?@-qF59p>wC*zfmot>MO&jo*n`?HV4Wwhsu z%Bc*T?PW%LvPk0Ul{8zhZ~F8vL(^))yoKMx3}S*LKJFPU{h8Ng&avFq4mYbh>LkkU zd8~J=-g3lo?Rp=4lpvYw^HA^mM28iyw6wahLPD(f?{nZ;Vu?b?(aKKv(JF4yMLw^R z<^h-3N)_t+7nzY>)W7DT#G5zsnKbU3@>yw@K$gPI;LG!8++HAa>@+B!d*1Cp(h*fm zZvVnsWgn%@h9xw;?6h-2@*qX@*h<{eeC-!A+hFc%V7>Z5MbEVNJ;(FsGpN3A#)$&V*8an4^zG7R@K@kgKl6k{aSIut^Sd}Q zCl5uM52-~tF=S9z_qo@P{hz9J{!MEvADT4U57{L4T-AO&+rR}gl=D}$J{hTadfN8Y zW}|wex}+_wjf`H;xY9>$?ZVxD?j$tyo$*RvqK{x{)$t}h7lb{Ysj`USt_&ygWwY7Z zvOLF_QUCnU8#T+2Lvg%sVl!w1^*>C@%`4#9tcW-V9FfZ(f9hP_`2rvR^>M##wtoCa zq_!Bq_SwCpfVpr&^FN0gP!Uk=K?U*8nM3z*+F@HrnR?^XO+f{0r0hnu2!GsbkNH)l zGvR#{C!|6{7^}sv;Tvne4;t>S+UyYvZ_B6Q3P?)t=p0_^w;&m%&VHh@$07WMYLlD!7Zn+x z#jjb(CuabdJ+Zu3Fy5Xay|GcT{PXdJMBJ=2oeBUzcKELrfNWT4RRWWJGF33X#698h zXG7_JoTLqeM0oQO$*1dztmC7@e~~(|y7Oc;)bMTNA%u-*N?24dv{&4G-)58SXf{I%(sNzk&5R8m9K? zQbB)DIRp@r&96rhwY;t^^zOCpiN7x-W8f^Hwpai4k}7f;FRZ9*^?D<9;U1V`mTz<7 zyo-G9C}7{QFs*;9)@NScT$8c-2>w{_6HI(UDK z29E9k&Ju?2iQ^;AH0N4w;h3z#&OXlB(u`hO2`i_QCgTG#{Ly+CU`GtyKT%scC<03801U)w6ILrhM$%x z%~=W=E?iy|Dg7!8U+`)1{qVSV8{aBueKo>8tUi~f4);PLI75F0Y>WyDL9Wv~b?q~; zRVh2DxvZ@JArFI3ck5el4}nL_iZ}r>1gf3imTAwVS1rfo9I)#h=MqY}2mNy&Gw#&w z8&~a+M(aWc!gtL$l*JYi9KXMz11Y(^UlQ|+DC Date: Sat, 7 Sep 2019 20:41:17 +0900 Subject: [PATCH 13/16] make label flag consistent in receive and rule (#1498) * make label flag consistent in receive and rule Signed-off-by: Wing924 * fix test Signed-off-by: Wing924 * fix quickstart Signed-off-by: Wing924 --- cmd/thanos/receive.go | 2 +- scripts/quickstart.sh | 2 +- test/e2e/spinup_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/thanos/receive.go b/cmd/thanos/receive.go index 85cd5a0532..8f3efb90c8 100644 --- a/cmd/thanos/receive.go +++ b/cmd/thanos/receive.go @@ -40,7 +40,7 @@ func registerReceive(m map[string]setupFunc, app *kingpin.Application, name stri dataDir := cmd.Flag("tsdb.path", "Data directory of TSDB."). Default("./data").String() - labelStrs := cmd.Flag("labels", "External labels to announce. This flag will be removed in the future when handling multiple tsdb instances is added.").PlaceHolder("key=\"value\"").Strings() + labelStrs := cmd.Flag("label", "External labels to announce. This flag will be removed in the future when handling multiple tsdb instances is added.").PlaceHolder("key=\"value\"").Strings() objStoreConfig := regCommonObjStoreFlags(cmd, "", false) diff --git a/scripts/quickstart.sh b/scripts/quickstart.sh index 2a1be6f010..faff7bcc76 100755 --- a/scripts/quickstart.sh +++ b/scripts/quickstart.sh @@ -170,7 +170,7 @@ then --tsdb.path "./data/remote-write-receive-data" \ --grpc-address 0.0.0.0:10907 \ --http-address 0.0.0.0:10909 \ - --labels "receive=\"true\"" \ + --label "receive=\"true\"" \ ${OBJSTORECFG} \ --remote-write.address 0.0.0.0:10908 & diff --git a/test/e2e/spinup_test.go b/test/e2e/spinup_test.go index f47729b1af..2089f64214 100644 --- a/test/e2e/spinup_test.go +++ b/test/e2e/spinup_test.go @@ -195,7 +195,7 @@ func receiver(http, grpc, metric address, replicationFactor int, hashring ...rec "--grpc-address", grpc.HostPort(), "--http-address", metric.HostPort(), "--remote-write.address", http.HostPort(), - "--labels", fmt.Sprintf(`receive="%s"`, http.Port), + "--label", fmt.Sprintf(`receive="%s"`, http.Port), "--tsdb.path", path.Join(receiveDir, "tsdb"), "--log.level", "debug", "--receive.replication-factor", strconv.Itoa(replicationFactor), From 8da7328b2ebb443134e394f67174af4f1562153f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20P=C5=82otka?= Date: Mon, 9 Sep 2019 15:15:04 +0200 Subject: [PATCH 14/16] docs: add katacoda scenario (#1481) Signed-off-by: Bartek Plotka Co-Authored-By: Adrien F --- README.md | 1 - docs/getting-started.md | 67 +++++-- tutorials/katacoda/README.md | 9 + .../katacoda/thanos-global-view/finish.md | 0 .../katacoda/thanos-global-view/index.json | 32 ---- .../katacoda/thanos-global-view/intro.md | 1 - .../katacoda/thanos-global-view/step1.md | 0 .../katacoda/thanos-global-view/step2.md | 0 .../katacoda/thanos-global-view/step3.md | 0 tutorials/katacoda/thanos-pathway.json | 37 ++++ .../thanos/1-globalview/courseBase.sh | 4 + .../katacoda/thanos/1-globalview/finish.md | 17 ++ .../katacoda/thanos/1-globalview/index.json | 54 ++++++ .../katacoda/thanos/1-globalview/intro.md | 18 ++ .../thanos/1-globalview/step1-answer.md | 18 ++ .../thanos/1-globalview/step1-verify.sh | 7 + .../katacoda/thanos/1-globalview/step1.md | 173 ++++++++++++++++++ .../thanos/1-globalview/step2-verify.sh | 11 ++ .../katacoda/thanos/1-globalview/step2.md | 163 +++++++++++++++++ .../thanos/1-globalview/step3-verify.sh | 13 ++ .../katacoda/thanos/1-globalview/step3.md | 124 +++++++++++++ tutorials/katacoda/thanos/2-lts/courseBase.sh | 2 + tutorials/katacoda/thanos/2-lts/index.json | 19 ++ tutorials/katacoda/thanos/2-lts/intro.md | 7 + .../thanos/3-meta-monitoring/courseBase.sh | 2 + .../thanos/3-meta-monitoring/index.json | 19 ++ .../thanos/3-meta-monitoring/intro.md | 7 + .../thanos/4-cross-cluster-comm/courseBase.sh | 2 + .../thanos/4-cross-cluster-comm/index.json | 19 ++ .../thanos/4-cross-cluster-comm/intro.md | 7 + .../thanos/5-remote-receiver/courseBase.sh | 2 + .../thanos/5-remote-receiver/index.json | 19 ++ .../thanos/5-remote-receiver/intro.md | 7 + .../katacoda/thanos/6-caching/courseBase.sh | 2 + .../katacoda/thanos/6-caching/index.json | 19 ++ tutorials/katacoda/thanos/6-caching/intro.md | 7 + 36 files changed, 835 insertions(+), 54 deletions(-) create mode 100644 tutorials/katacoda/README.md delete mode 100644 tutorials/katacoda/thanos-global-view/finish.md delete mode 100644 tutorials/katacoda/thanos-global-view/index.json delete mode 100644 tutorials/katacoda/thanos-global-view/intro.md delete mode 100644 tutorials/katacoda/thanos-global-view/step1.md delete mode 100644 tutorials/katacoda/thanos-global-view/step2.md delete mode 100644 tutorials/katacoda/thanos-global-view/step3.md create mode 100644 tutorials/katacoda/thanos-pathway.json create mode 100644 tutorials/katacoda/thanos/1-globalview/courseBase.sh create mode 100644 tutorials/katacoda/thanos/1-globalview/finish.md create mode 100644 tutorials/katacoda/thanos/1-globalview/index.json create mode 100644 tutorials/katacoda/thanos/1-globalview/intro.md create mode 100644 tutorials/katacoda/thanos/1-globalview/step1-answer.md create mode 100644 tutorials/katacoda/thanos/1-globalview/step1-verify.sh create mode 100644 tutorials/katacoda/thanos/1-globalview/step1.md create mode 100644 tutorials/katacoda/thanos/1-globalview/step2-verify.sh create mode 100644 tutorials/katacoda/thanos/1-globalview/step2.md create mode 100644 tutorials/katacoda/thanos/1-globalview/step3-verify.sh create mode 100644 tutorials/katacoda/thanos/1-globalview/step3.md create mode 100644 tutorials/katacoda/thanos/2-lts/courseBase.sh create mode 100644 tutorials/katacoda/thanos/2-lts/index.json create mode 100644 tutorials/katacoda/thanos/2-lts/intro.md create mode 100644 tutorials/katacoda/thanos/3-meta-monitoring/courseBase.sh create mode 100644 tutorials/katacoda/thanos/3-meta-monitoring/index.json create mode 100644 tutorials/katacoda/thanos/3-meta-monitoring/intro.md create mode 100644 tutorials/katacoda/thanos/4-cross-cluster-comm/courseBase.sh create mode 100644 tutorials/katacoda/thanos/4-cross-cluster-comm/index.json create mode 100644 tutorials/katacoda/thanos/4-cross-cluster-comm/intro.md create mode 100644 tutorials/katacoda/thanos/5-remote-receiver/courseBase.sh create mode 100644 tutorials/katacoda/thanos/5-remote-receiver/index.json create mode 100644 tutorials/katacoda/thanos/5-remote-receiver/intro.md create mode 100644 tutorials/katacoda/thanos/6-caching/courseBase.sh create mode 100644 tutorials/katacoda/thanos/6-caching/index.json create mode 100644 tutorials/katacoda/thanos/6-caching/intro.md diff --git a/README.md b/README.md index 1e966af711..50bea12953 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,6 @@ Concretely the aims of the project are: * [Design](https://thanos.io/design.md/) * [Prom Meetup Slides](https://www.slideshare.net/BartomiejPotka/thanos-global-durable-prometheus-monitoring) * [Introduction blog post](https://improbable.io/games/blog/thanos-prometheus-at-scale) -* [Benchmarks](https://github.com/thanos-io/thanos/tree/master/benchmark) * [Proposals](docs/proposals) * [Integrations](docs/integrations.md) diff --git a/docs/getting-started.md b/docs/getting-started.md index 3ce492c3d3..727480b531 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -13,42 +13,73 @@ Thanos provides a global query view, data backup, and historical data access as In this quick-start guide, we will configure Thanos and all components mentioned to work against an object storage cloud provider. Thanos is able to use [different storage providers](storage.md), with the ability to add more providers as necessary. -Thanos will work in cloud native environments as well as more traditional ones. Some users run Thanos in Kubernetes while others on bare metal. More deployments examples and stories will be described soon. +Thanos will work in cloud native environments as well as more traditional ones. Some users run Thanos in Kubernetes while others on bare metal. -## Architecture Overview +Thanos aims for simple deployment and maintenance model. The only dependencies are: -architecture overview - -## Requirements - -* One or more [Prometheus](https://prometheus.io) v2.2.1+ installations -* golang 1.12+ -* An object storage bucket (optional) +* One or more [Prometheus](https://prometheus.io) v2.2.1+ installations with persistent disk +* Optional object storage ## Get Thanos! You can find the latest Thanos release [here](https://github.com/thanos-io/thanos/releases). +Master should be stable and usable. Every commit to master builds docker image named `master--` in +[quay.io/thanos/thanos](https://quay.io/repository/thanos/thanos) and [thanosio/thanos dockerhub (mirror)](https://hub.docker.com/r/thanosio/thanos) + +We also perform minor releases every 6 weeks. + +During that, we build tarballs for major platforms and release docker images. + +See [release process docs](docs/release-process.md) for details. -If you want to build Thanos from source you would need a working installation of the Go [toolchain](https://github.com/golang/tools) (`GOPATH`, `PATH=${GOPATH}/bin:${PATH}`). +## Running Thanos + +For detailed, free in-browser interactive tutorial please visit our [Katacoda Thanos Course](https://katacoda.com/bwplotka/courses/thanos) + +## Building from source: + +Thanos is built purely in [Golang](https://golang.org/), thus allowing to run Thanos on various x64 operating systems. + +If you want to build Thanos from source you would need a working installation of the Go 1.12+ [toolchain](https://github.com/golang/tools) (`GOPATH`, `PATH=${GOPATH}/bin:${PATH}`). Thanos can be downloaded and built by running: ```bash -go get -d github.com/thanos-io/thanos/... -cd ${GOPATH}/src/github.com/thanos-io/thanos -make +go get github.com/thanos-io/thanos/cmd/thanos ``` The `thanos` binary should now be in your `$PATH` and is the only thing required to deploy any of its components. -## Prometheus +## Contributing + +Contributions are very welcome! See our [CONTRIBUTING.md](/CONTRIBUTING.md) for more information. + +## Community + +Thanos is an open source project and we value and welcome new contributors and members +of the community. Here are ways to get in touch with the community: + +* Slack: [#thanos](https://slack.cncf.io/) +* Issue Tracker: [GitHub Issues](https://github.com/thanos-io/thanos/issues) + +## Maintainers + +See [MAINTAINERS.md](/MAINTAINERS.md) + +## Quick Overview + +## Architecture + +architecture overview + +### Prometheus Thanos bases itself on vanilla [Prometheus](https://prometheus.io/) (v2.2.1+). To find out the Prometheus' versions Thanos is tested against, look at the value of the `PROM_VERSIONS` variable in the [Makefile](/Makefile). -## Components +### Components Following the [KISS](https://en.wikipedia.org/wiki/KISS_principle) and Unix philosophies, Thanos is made of a set of components with each filling a specific role. @@ -234,13 +265,9 @@ _NOTE: The compactor must be run as a **singleton** and must not run when manual In case of Prometheus with Thanos sidecar does not have enough retention, or if you want to have alerts or recording rules that requires global view, Thanos has just the component for that: the [Ruler](components/rule.md), which does rule and alert evaluation on top of a given Thanos Querier. -### Receiver - -TBD - ## Extras -Thanos also has a tutorial on deploying it to Kubernetes. We have a full page describing a standard deployment here. +See this [talk](https://fosdem.org/2019/schedule/event/thanos_transforming_prometheus_to_a_global_scale_in_a_seven_simple_steps/) to see quick example of running Thanos on Kubernetes. We also have example Grafana dashboards [here](/examples/grafana/monitoring.md) and some [alerts](/examples/alerts/alerts.md) to get you started. diff --git a/tutorials/katacoda/README.md b/tutorials/katacoda/README.md new file mode 100644 index 0000000000..8c124112ef --- /dev/null +++ b/tutorials/katacoda/README.md @@ -0,0 +1,9 @@ +# Katacoda tutorials + +Definitions of our courses for Katacoda. + +## Development. + +Find docs [here](https://katacoda.com/docs) + +Thanos repo is hooked to [this](https://katacoda.com/bwplotka) Katacoda account. \ No newline at end of file diff --git a/tutorials/katacoda/thanos-global-view/finish.md b/tutorials/katacoda/thanos-global-view/finish.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tutorials/katacoda/thanos-global-view/index.json b/tutorials/katacoda/thanos-global-view/index.json deleted file mode 100644 index ca944b3e31..0000000000 --- a/tutorials/katacoda/thanos-global-view/index.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "title": "Interactive Thanos Deployment for Global View and HA of Prometheus Servers", - "description": "...", - "details": { - "steps": [ - { - "title": "Step 1", - "text": "step1.md" - }, - { - "title": "Step 2", - "text": "step2.md" - }, - { - "title": "Step 3", - "text": "step3.md" - } - ], - "intro": { - "text": "intro.md" - }, - "finish": { - "text": "finish.md" - } - }, - "environment": { - "uilayout": "editor-terminal" - }, - "backend": { - "imageid": "docker" - } -} \ No newline at end of file diff --git a/tutorials/katacoda/thanos-global-view/intro.md b/tutorials/katacoda/thanos-global-view/intro.md deleted file mode 100644 index 2fd9f95700..0000000000 --- a/tutorials/katacoda/thanos-global-view/intro.md +++ /dev/null @@ -1 +0,0 @@ -TBD \ No newline at end of file diff --git a/tutorials/katacoda/thanos-global-view/step1.md b/tutorials/katacoda/thanos-global-view/step1.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tutorials/katacoda/thanos-global-view/step2.md b/tutorials/katacoda/thanos-global-view/step2.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tutorials/katacoda/thanos-global-view/step3.md b/tutorials/katacoda/thanos-global-view/step3.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tutorials/katacoda/thanos-pathway.json b/tutorials/katacoda/thanos-pathway.json new file mode 100644 index 0000000000..8ad2c1b641 --- /dev/null +++ b/tutorials/katacoda/thanos-pathway.json @@ -0,0 +1,37 @@ +{ + "title": "Learn Thanos", + "description": "Introduction to CNCF Thanos: Global, Scalable and Highly Available Prometheus setup.", + "icon": "fa-thanos", + "courses": [ + { + "course_id": "1-globalview", + "title": "Intro: Global View and seamless HA for Prometheus", + "description": "Learn how to easily transform Prometheus into centralized, highly available monitoring using Thanos." + }, + { + "course_id": "2-lts", + "title": "Intro: Downsampling and unlimited metric retention for Prometheus", + "description": "In progress. Stay Tuned!" + }, + { + "course_id": "3-meta-monitoring", + "title": "Intro: Global and meta alerts with Thanos", + "description": "In progress. Stay Tuned!" + }, + { + "course_id": "4-cross-cluster-comm", + "title": "Advanced: Connecting remote Prometheuses to Thanos using simple Envoy setup.", + "description": "In progress. Stay Tuned!" + }, + { + "course_id": "5-remote-receiver", + "title": "Advanced: Using Prometheus remote write to stream metrics to Thanos", + "description": "In progress. Stay Tuned!" + }, + { + "course_id": "6-caching", + "title": "Advanced: Query low tail latency with low cost: Introducing caching to Thanos", + "description": "In progress. Stay Tuned!" + } + ] +} \ No newline at end of file diff --git a/tutorials/katacoda/thanos/1-globalview/courseBase.sh b/tutorials/katacoda/thanos/1-globalview/courseBase.sh new file mode 100644 index 0000000000..ae69695eb2 --- /dev/null +++ b/tutorials/katacoda/thanos/1-globalview/courseBase.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +docker pull quay.io/thanos/prometheus:v2.12.0-rc.0-rr-streaming +docker pull quay.io/thanos/thanos:v0.7.0 \ No newline at end of file diff --git a/tutorials/katacoda/thanos/1-globalview/finish.md b/tutorials/katacoda/thanos/1-globalview/finish.md new file mode 100644 index 0000000000..e7e7989240 --- /dev/null +++ b/tutorials/katacoda/thanos/1-globalview/finish.md @@ -0,0 +1,17 @@ +# Summary + +Congratulations! 🎉🎉🎉 +You completed our very first Thanos tutorial. Let's summarize what we learned: + +* The most basic installation of Thanos with Sidecars and Querier allows global view for Prometheus queries. +* Querier operates on `StoreAPI` gRPC API. It does not know if it's Prometheus, OpenTSDB, another Querier or any other storage, as long as API is implemented. +* With Thanos you can (and it's recommended to do so!) run multi-replica Prometheus servers. Thanos Querier `--query.replica-label` flag controls this behaviour. +* Sidecar allows to dynamically reload configuration for Prometheus and recording & alerting rules in Prometheus. + +See next courses for other tutorials about different deployment models and more advanced features of Thanos! + +### Feedback + +Do you see any bug, typo in the tutorial or you have some feedback for us? + +let us know on https://github.com/thanos-io/thanos or #thanos slack channel linked on https://thanos.io \ No newline at end of file diff --git a/tutorials/katacoda/thanos/1-globalview/index.json b/tutorials/katacoda/thanos/1-globalview/index.json new file mode 100644 index 0000000000..2cf73afd51 --- /dev/null +++ b/tutorials/katacoda/thanos/1-globalview/index.json @@ -0,0 +1,54 @@ +{ + "title": "Intro: Global View and seemless HA for Prometheus", + "description": "Learn how to easily transform Prometheus into centralized, highly available monitoring using Thanos.", + "difficulty": "Beginner", + "time": "10-15 Minutes", + "details": { + "steps": [ + { + "title": "Initial Prometheus Setup", + "text": "step1.md", + "verify": "step1-verify.sh", + "answer": "step1-answer.md" + }, + { + "title": "Thanos Sidecars", + "text": "step2.md", + "verify": "step2-verify.sh" + }, + { + "title": "Thanos Querier", + "text": "step3.md", + "verify": "step3-verify.sh" + } + ], + "intro": { + "text": "intro.md", + "courseData": "courseBase.sh", + "credits": "https://thanos.io" + }, + "finish": { + "text": "finish.md", + "credits": "test" + } + }, + "files": [ + "prometheus0_eu1.yml", + "prometheus0_us1.yml", + "prometheus1_us1.yml" + ], + "environment": { + "uilayout": "editor-terminal", + "uisettings": "yaml", + "showdashboard": true, + "dashboards": [ + {"name": "Prometheus 0 EU1", "port": 9090}, + {"name": "Prometheus 0 US1", "port": 9091}, + {"name": "Prometheus 1 US1", "port": 9092}, + {"name": "Thanos Query", "port": 29090} + ] + }, + "backend": { + "imageid": "docker-direct" + } +} diff --git a/tutorials/katacoda/thanos/1-globalview/intro.md b/tutorials/katacoda/thanos/1-globalview/intro.md new file mode 100644 index 0000000000..e027554766 --- /dev/null +++ b/tutorials/katacoda/thanos/1-globalview/intro.md @@ -0,0 +1,18 @@ +Welcome to the Thanos introduction! + +[Thanos](https://thanos.io) is a set of components that can be composed into a highly available metric system with unlimited storage capacity. +It can be added seamlessly on top of existing Prometheus deployments. + +Thanos provides a global query view, data backup, and historical data access as its core features. +All three features can be run independently of each other. This allows you to have a subset of Thanos features ready for +immediate benefit or testing, while also making it flexible for gradual adoption in more complex environments. + +Thanos will work in cloud native environments like Kubernetes as well as more traditional ones. However, this course uses docker +containers which will allow us to use pre-built docker images available [here](https://quay.io/repository/thanos/thanos) + +This tutorial will take us from transforming vanilla Prometheus to basic Thanos deployment enabling: + +* Reliable querying multiple Prometheus instances from single [Prometheus API endpoint](https://prometheus.io/docs/prometheus/latest/querying/api/#expression-queries). +* Seamless handling of Highly Available Prometheus (multiple replicas) + +Let's jump in! 🤓 diff --git a/tutorials/katacoda/thanos/1-globalview/step1-answer.md b/tutorials/katacoda/thanos/1-globalview/step1-answer.md new file mode 100644 index 0000000000..42d0882712 --- /dev/null +++ b/tutorials/katacoda/thanos/1-globalview/step1-answer.md @@ -0,0 +1,18 @@ +## Answer + +**How many series (metrics) we collect overall on all Prometheus instances we have?** + +How to get this information? As you probably guess it's not straightforward. The current step would be: + +* Query Prometheus-0 EU1 for `prometheus_tsdb_head_series` +* Query Prometheus-0 US1 or Prometheus-1 US1 for `prometheus_tsdb_head_series` +Both holds the same data (number of series for each replica) so we just need to choose available one. +* Sum both results manually. + +As you can see this is not very convenient for both human as well as automation on top of metrics (e.g Alerting). + +The feature we are missing here is called **Global View** and it might be necessary once you scale out Prometheus to multiple instances. + +Great! We have now running 3 Prometheus instances. + +In the next steps we will learn how we can install Thanos on top of our initial Prometheus setup to solve problems shown in the challenge. diff --git a/tutorials/katacoda/thanos/1-globalview/step1-verify.sh b/tutorials/katacoda/thanos/1-globalview/step1-verify.sh new file mode 100644 index 0000000000..b0e6a33e1c --- /dev/null +++ b/tutorials/katacoda/thanos/1-globalview/step1-verify.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +curl -s 127.0.0.1:9090/metrics > /dev/null || exit 1 +curl -s 127.0.0.1:9091/metrics > /dev/null || exit 1 +curl -s 127.0.0.1:9092/metrics > /dev/null || exit 1 + +echo "\"done\"" \ No newline at end of file diff --git a/tutorials/katacoda/thanos/1-globalview/step1.md b/tutorials/katacoda/thanos/1-globalview/step1.md new file mode 100644 index 0000000000..2bf628ef07 --- /dev/null +++ b/tutorials/katacoda/thanos/1-globalview/step1.md @@ -0,0 +1,173 @@ +# Step 1 - Start initial Prometheus servers + +Thanos is meant to scale and extend vanilla Prometheus. This means that you can gradually, without disruption, deploy Thanos on top of your existing Prometheus setup. + +Let's start our tutorial by spinning up three Prometheus servers. Why three? +The real advantage of Thanos is when you need to scale out Prometheus from a single replica. Some reason for scale-out might be: + +* Adding functional sharding because of metrics high cardinality +* Need for high availability of Prometheus e.g: Rolling upgrades +* Aggregating queries from multiple clusters + +For this course, let's imagine the following situation: + +![initial-case](https://docs.google.com/drawings/d/e/2PACX-1vQ5n5dAJSJPRXWA9INOViJJy9Ci6TUwlCrDv7_TtV9vE41rFOpg26V3jQv9gf1NQjVWSFyauG5XgzOW/pub?w=1061&h=604) + +1. We have one Prometheus server in some `eu1` cluster. +2. We have 2 replica Prometheus servers in some `us1` cluster that scrapes the same targets. + +Let's start this initial Prometheus setup for now. + +## Prometheus Configuration Files + +Now, we will prepare configuration files for all Prometheus instances. + +Click `Copy To Editor` for each config to propagate the configs to each file. + +First, for the EU Prometheus server that scrapes itself: + +
    +global:
    +  scrape_interval: 15s
    +  evaluation_interval: 15s
    +  external_labels:
    +    cluster: eu1
    +    replica: 0
    +
    +scrape_configs:
    +  - job_name: 'prometheus'
    +    static_configs:
    +      - targets: ['127.0.0.1:9090']
    +
    + +For the second cluster we set two replicas: + +
    +global:
    +  scrape_interval: 15s
    +  evaluation_interval: 15s
    +  external_labels:
    +    cluster: us1
    +    replica: 0
    +
    +scrape_configs:
    +  - job_name: 'prometheus'
    +    static_configs:
    +      - targets: ['127.0.0.1:9091','127.0.0.1:9092']
    +
    + +
    +global:
    +  scrape_interval: 15s
    +  evaluation_interval: 15s
    +  external_labels:
    +    cluster: us1
    +    replica: 1
    +
    +scrape_configs:
    +  - job_name: 'prometheus'
    +    static_configs:
    +      - targets: ['127.0.0.1:9091','127.0.0.1:9092']
    +
    + +## Starting Prometheus Instances + +Let's now start three containers representing our three different Prometheus instances. + +Please note the extra flags we're passing to Prometheus: + +* `--web.enable-admin-api` allows Thanos Sidecar to get metadata from Prometheus like `external labels`. +* `--web.enable-lifecycle` allows Thanos Sidecar to reload Prometheus configuration and rule files if used. + +Execute following commands: + +### Prepare "persistent volumes" + +``` +mkdir -p prometheus0_eu1_data prometheus0_us1_data prometheus1_us1_data +```{{execute}} + +### Deploying "EU1" + +``` +docker run -d --net=host --rm \ + -v $(pwd)/prometheus0_eu1.yml:/etc/prometheus/prometheus.yml \ + -v $(pwd)/prometheus0_eu1_data:/prometheus \ + -u root \ + --name prometheus-0-eu1 \ + quay.io/thanos/prometheus:v2.12.0-rc.0-rr-streaming \ + --config.file=/etc/prometheus/prometheus.yml \ + --storage.tsdb.path=/prometheus \ + --web.listen-address=:9090 \ + --web.enable-lifecycle \ + --web.enable-admin-api && echo "Prometheus EU1 started!" +```{{execute}} + +NOTE: We are using the latest Prometheus image so we can take profit from the latest remote read protocol. + +### Deploying "US1" + +``` +docker run -d --net=host --rm \ + -v $(pwd)/prometheus0_us1.yml:/etc/prometheus/prometheus.yml \ + -v $(pwd)/prometheus0_us1_data:/prometheus \ + -u root \ + --name prometheus-0-us1 \ + quay.io/thanos/prometheus:v2.12.0-rc.0-rr-streaming \ + --config.file=/etc/prometheus/prometheus.yml \ + --storage.tsdb.path=/prometheus \ + --web.listen-address=:9091 \ + --web.enable-lifecycle \ + --web.enable-admin-api && echo "Prometheus 0 US1 started!" +```{{execute}} + +and + +``` +docker run -d --net=host --rm \ + -v $(pwd)/prometheus1_us1.yml:/etc/prometheus/prometheus.yml \ + -v $(pwd)/prometheus1_us1_data:/prometheus \ + -u root \ + --name prometheus-1-us1 \ + quay.io/thanos/prometheus:v2.12.0-rc.0-rr-streaming \ + --config.file=/etc/prometheus/prometheus.yml \ + --storage.tsdb.path=/prometheus \ + --web.listen-address=:9092 \ + --web.enable-lifecycle \ + --web.enable-admin-api && echo "Prometheus 1 US1 started!" +```{{execute}} + +## Setup Verification + +Once started you should be able to reach all of those Prometheus instances: + +* [Prometheus-0 EU1](https://[[HOST_SUBDOMAIN]]-9090-[[KATACODA_HOST]].environments.katacoda.com/) +* [Prometheus-1 US1](https://[[HOST_SUBDOMAIN]]-9091-[[KATACODA_HOST]].environments.katacoda.com/) +* [Prometheus-2 US1](https://[[HOST_SUBDOMAIN]]-9092-[[KATACODA_HOST]].environments.katacoda.com/) + +## Additional info + +Why would one need multiple Prometheus instances? + +* High Availability (multiple replicas) +* Scaling ingestion: Functional Sharding +* Multi cluster/environment architecture + +## Problem statement: Global view challenge + +Let's try to play with this setup a bit. You are free to query any metrics, however, let's try to fetch some certain information from +our multi-cluster setup: **How many series (metrics) we collect overall on all Prometheus instances we have?** + +Tip: Look for `prometheus_tsdb_head_series` metric. + +🕵️‍♂️ + +Try to get this information from the current setup! + +To see the answer to this question click SHOW SOLUTION below. + +## Next + +Great! We have now running 3 Prometheus instances. + +In the next steps, we will learn how we can install Thanos on top of our initial Prometheus setup to solve problems shown in the challenge. diff --git a/tutorials/katacoda/thanos/1-globalview/step2-verify.sh b/tutorials/katacoda/thanos/1-globalview/step2-verify.sh new file mode 100644 index 0000000000..f1d6a4d44b --- /dev/null +++ b/tutorials/katacoda/thanos/1-globalview/step2-verify.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +curl -s 127.0.0.1:9090/metrics > /dev/null || exit 1 +curl -s 127.0.0.1:9091/metrics > /dev/null || exit 1 +curl -s 127.0.0.1:9092/metrics > /dev/null || exit 1 + +curl -s 127.0.0.1:19090/metrics > /dev/null || exit 1 +curl -s 127.0.0.1:19091/metrics > /dev/null || exit 1 +curl -s 127.0.0.1:19092/metrics > /dev/null || exit 1 + +echo "\"done\"" \ No newline at end of file diff --git a/tutorials/katacoda/thanos/1-globalview/step2.md b/tutorials/katacoda/thanos/1-globalview/step2.md new file mode 100644 index 0000000000..7beef7ef7c --- /dev/null +++ b/tutorials/katacoda/thanos/1-globalview/step2.md @@ -0,0 +1,163 @@ +# Step 2 - Installing Thanos sidecar + +Let's take the setup from the previous step and seamlessly install Thanos to add Global View with HA handling feature. + +## Thanos Components + +Thanos is a single Go binary capable to run in different modes. Each mode represents a different +component and can be invoked in a single command. + +Let's take a look at all the Thanos commands: + +``` +docker run --rm quay.io/thanos/thanos:v0.7.0 --help +```{{execute}} + +You should see multiple commands that solves different purposes. + +In this step we will focus on `thanos sidecar`: + +``` + sidecar [] + sidecar for Prometheus server +``` + +## Sidecar + +Sidecar as the name suggests should be deployed together with Prometheus. Sidecar has multiple features: + +* It exposes Prometheus metrics as a common Thanos [StoreAPI](https://thanos.io/integrations.md/#storeapi). StoreAPI +is a generic gRPC API allowing Thanos components to fetch metrics from various systems and backends. +* It is essentially in further long term storage options described in [next]() courses. +* It is capable to watch for configuration and Prometheus rules (alerting or recording) and notify Prometheus for dynamic reloads: + * optionally substitute with environment variables + * optionally decompress if gzipp-ed + +You can read more about sidecar [here](https://thanos.io/components/sidecar.md/) + +## Installation + +To allow Thanos to efficiently query Prometheus data, let's install sidecar to each Prometheus instances we deployed in the previous step as shown below: + +![sidecar install](https://docs.google.com/drawings/d/e/2PACX-1vRHlEJd9OVH80hczxkqZKYDVXxwugX55VWKtLJhS6R7D3BbmkBW9qGyyD4JyLbAe9CK9EzvurWTagTR/pub?w=1058&h=330) + +For this setup the only configuration required for sidecar is the Prometheus API URL and access to the configuration file. +Former will allow us to access Prometheus metrics, the latter will allow sidecar to reload Prometheus configuration in runtime. + +Click snippets to add sidecars to each Prometheus instance. + +### Adding sidecar to "EU1" Prometheus + +``` +docker run -d --net=host --rm \ + -v $(pwd)/prometheus0_eu1.yml:/etc/prometheus/prometheus.yml \ + --name prometheus-0-sidecar-eu1 \ + -u root \ + quay.io/thanos/thanos:v0.7.0 \ + sidecar \ + --http-address 0.0.0.0:19090 \ + --grpc-address 0.0.0.0:19190 \ + --reloader.config-file /etc/prometheus/prometheus.yml \ + --prometheus.url http://127.0.0.1:9090 && echo "Started sidecar for Prometheus 0 EU1" +```{{execute}} + +### Adding sidecars to each replica of Prometheus in "US1" + +``` +docker run -d --net=host --rm \ + -v $(pwd)/prometheus0_us1.yml:/etc/prometheus/prometheus.yml \ + --name prometheus-0-sidecar-us1 \ + -u root \ + quay.io/thanos/thanos:v0.7.0 \ + sidecar \ + --http-address 0.0.0.0:19091 \ + --grpc-address 0.0.0.0:19191 \ + --reloader.config-file /etc/prometheus/prometheus.yml \ + --prometheus.url http://127.0.0.1:9091 && echo "Started sidecar for Prometheus 0 US1" +```{{execute}} + +``` +docker run -d --net=host --rm \ + -v $(pwd)/prometheus1_us1.yml:/etc/prometheus/prometheus.yml \ + --name prometheus-1-sidecar-us1 \ + -u root \ + quay.io/thanos/thanos:v0.7.0 \ + sidecar \ + --http-address 0.0.0.0:19092 \ + --grpc-address 0.0.0.0:19192 \ + --reloader.config-file /etc/prometheus/prometheus.yml \ + --prometheus.url http://127.0.0.1:9092 && echo "Started sidecar for Prometheus 1 US1" +```{{execute}} + +## Verification + +Now, to check if sidecars are running well, let's modify Prometheus scrape configuration to include our added sidecars. + +As always click `Copy To Editor` for each config to propagate the configs to each file. + +Note that only thanks to the sidecar, all those changes will be immediately reloaded and updated in Prometheus! + +
    +global:
    +  scrape_interval: 15s
    +  evaluation_interval: 15s
    +  external_labels:
    +    cluster: eu1
    +    replica: 0
    +
    +scrape_configs:
    +  - job_name: 'prometheus'
    +    static_configs:
    +      - targets: ['127.0.0.1:9090']
    +  - job_name: 'sidecar'
    +    static_configs:
    +      - targets: ['127.0.0.1:19090']
    +
    + +
    +global:
    +  scrape_interval: 15s
    +  evaluation_interval: 15s
    +  external_labels:
    +    cluster: us1
    +    replica: 0
    +
    +scrape_configs:
    +  - job_name: 'prometheus'
    +    static_configs:
    +      - targets: ['127.0.0.1:9091','127.0.0.1:9092']
    +  - job_name: 'sidecar'
    +    static_configs:
    +      - targets: ['127.0.0.1:19091','127.0.0.1:19092']
    +
    + +
    +global:
    +  scrape_interval: 15s
    +  evaluation_interval: 15s
    +  external_labels:
    +    cluster: us1
    +    replica: 1
    +
    +scrape_configs:
    +  - job_name: 'prometheus'
    +    static_configs:
    +      - targets: ['127.0.0.1:9091','127.0.0.1:9092']
    +  - job_name: 'sidecar'
    +    static_configs:
    +      - targets: ['127.0.0.1:19091','127.0.0.1:19092']
    +
    + +Now you should see new, updated configuration on each Prometheus. For example here in [Prometheus 0 EU1 /config](https://[[HOST_SUBDOMAIN]]-9090-[[KATACODA_HOST]].environments.katacoda.com/config). +In the same time [`up`](https://[[HOST_SUBDOMAIN]]-9090-[[KATACODA_HOST]].environments.katacoda.com/graph?g0.expr=up&g0.tab=1) should show `job=sidecar` metrics. + +Since now Prometheus has access to sidecar metrics we can query for [`thanos_sidecar_prometheus_up`](https://[[HOST_SUBDOMAIN]]-9090-[[KATACODA_HOST]].environments.katacoda.com/graph?g0.expr=thanos_sidecar_prometheus_up&g0.tab=1) +to check if sidecar has access to Prometheus. + +## Next + +Great! Now you should have setup deployed as in the presented image: + +![sidecar install](https://docs.google.com/drawings/d/e/2PACX-1vRHlEJd9OVH80hczxkqZKYDVXxwugX55VWKtLJhS6R7D3BbmkBW9qGyyD4JyLbAe9CK9EzvurWTagTR/pub?w=1058&h=330) + +In the next step, we will add a final component allowing us to fetch Prometheus metrics from a single endpoint. diff --git a/tutorials/katacoda/thanos/1-globalview/step3-verify.sh b/tutorials/katacoda/thanos/1-globalview/step3-verify.sh new file mode 100644 index 0000000000..511443a192 --- /dev/null +++ b/tutorials/katacoda/thanos/1-globalview/step3-verify.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +curl -s 127.0.0.1:9090/metrics > /dev/null || exit 1 +curl -s 127.0.0.1:9091/metrics > /dev/null || exit 1 +curl -s 127.0.0.1:9092/metrics > /dev/null || exit 1 + +curl -s 127.0.0.1:19090/metrics > /dev/null || exit 1 +curl -s 127.0.0.1:19091/metrics > /dev/null || exit 1 +curl -s 127.0.0.1:19092/metrics > /dev/null || exit 1 + +curl -s 127.0.0.1:29090/metrics > /dev/null || exit 1 + +echo "\"done\"" \ No newline at end of file diff --git a/tutorials/katacoda/thanos/1-globalview/step3.md b/tutorials/katacoda/thanos/1-globalview/step3.md new file mode 100644 index 0000000000..a3ccf8431e --- /dev/null +++ b/tutorials/katacoda/thanos/1-globalview/step3.md @@ -0,0 +1,124 @@ +# Step 3 - Adding Thanos Querier + +Thanks to the previous step we have three running Prometheus instances with a sidecar each. In this step we will install +Thanos Querier which will use sidecars and allow querying all metrics from the single place as presented below: + +![with querier](https://docs.google.com/drawings/d/e/2PACX-1vSB9gN82px0lxk9vN6wNw3eXr8Z0EVROW3xubsq7tgjbx_nXsoZ02ElzvxeDevyjGPWv-f9Gie0NeNz/pub?w=926&h=539) + +But before that, let's take a closer look at what the Querier component does: + +## Querier + +The Querier component (also called "Query") is essentially a vanilla PromQL Prometheus engine that fetches the data from any service +that implements Thanos [StoreAPI](https://thanos.io/integrations.md/#storeapi). This means that Querier exposes the Prometheus HTTP v1 API to query the data in a common PromQL language. +This allows compatibility with Grafana or other consumers of Prometheus' API. + +Additionally, Querier is capable of deduplicating StoreAPIs that are in the same HA group. We will see how it +looks in practice later on. + +You can read more about Thanos Querier [here](https://thanos.io/components/query.md/) + +## Deploying Thanos Querier + +Let' now start the Query component. As you remember [Thanos sidecar](https://thanos.io/components/query.md/) exposes `StoreAPI` +so we will make sure we point the Querier to the gRPC endpoints of all our three sidecars: + +Click below snippet to start the Querier. + +``` +docker run -d --net=host --rm \ + --name querier \ + quay.io/thanos/thanos:v0.7.0 \ + query \ + --http-address 0.0.0.0:29090 \ + --query.replica-label replica \ + --store 127.0.0.1:19190 \ + --store 127.0.0.1:19191 \ + --store 127.0.0.1:19192 && echo "Started Thanos Querier" +```{{execute}} + +## Setup verification + +Thanos Querier exposes very similar UI to the Prometheus, but on top of many `StoreAPIs you wish to connect to. + +To check if the Querier works as intended let's look on [Querier UI `Store` page](https://[[HOST_SUBDOMAIN]]-29090-[[KATACODA_HOST]].environments.katacoda.com/stores). + +This should list all our three sidecars, including their external labels. + +## Global view - Not challenging anymore? + +Now, let's get back to our challenge from step 1, so finding the answer to **How many series (metrics) we collect overall on all Prometheus instances we have?** + +With the querier this is now super simple. + +It's just enough to query Querier for `sum(prometheus_tsdb_head_series)` + +You should see the single value representing the number of series scraped in both clusters in the current mode. + +If we will query `prometheus_tsdb_head_series` we will see that we have complete info about all three Prometheus instances: + +``` +prometheus_tsdb_head_series{cluster="eu1",instance="127.0.0.1:9090",job="prometheus"} +prometheus_tsdb_head_series{cluster="us1",instance="127.0.0.1:9091",job="prometheus"} +prometheus_tsdb_head_series{cluster="us1",instance="127.0.0.1:9092",job="prometheus"} +``` + +## Handling of Highly Availabile Prometheus + +Now, as you rememmber we configured Prometheus 0 US1 and Prometheus 1 US1 to scrape the same things. We also connect Querier +to both, so how Querier knows what is an HA group? + +Try to query the same query as before: `sum(prometheus_tsdb_head_series)` + +Now turn off deduplication (`deduplication` button on Querier UI) and hit `Execute` again. Now you should see 5 results: + +``` +prometheus_tsdb_head_series{cluster="eu1",instance="127.0.0.1:9090",job="prometheus",replica="0"} +prometheus_tsdb_head_series{cluster="us1",instance="127.0.0.1:9091",job="prometheus",replica="0"} +prometheus_tsdb_head_series{cluster="us1",instance="127.0.0.1:9091",job="prometheus",replica="1"} +prometheus_tsdb_head_series{cluster="us1",instance="127.0.0.1:9092",job="prometheus",replica="0"} +prometheus_tsdb_head_series{cluster="us1",instance="127.0.0.1:9092",job="prometheus",replica="1"} +``` + +So how Thanos Querier knows how to deduplicate correctly? + +If we would look again into Querier configuration we can see that we also set `quey.replica-label` flag. +This is exactly the label Querier will try to deduplicate by for HA groups. This means that any metric with exactly +the same labels *except replica label* will be assumed as the metric from the same HA group, and deduplicated accordingly. + +If we would open `prometheus1_us1.yml` config file in the editor or if you go to Prometheus 1 US1 [/config](https://[[HOST_SUBDOMAIN]]-9090-[[KATACODA_HOST]].environments.katacoda.com/config). +you should see our external labels in `external_labels` YAML option: + +```yaml + external_labels: + cluster: us1 + replica: 1 +``` + +Now if we compare to `prometheus0_us1.yaml`: + +```yaml + external_labels: + cluster: us1 + replica: 0 +``` + +We can see that since those two replicas scrape the same targets, any metric will be produced twice. +Once by `replica=1, cluster=us1` Prometheus and once by `replica=0, cluster=us1` Prometheus. If we configure Querier to +deduplicate by `replica` we can transparently handle this High Available pair of Prometheus instances to the user. + +## Production deployment + +Normally Querier runs in some central global location (e.g next to Grafana) with remote access to all Prometheus-es (e.g via ingress, proxies vpn or peering) + +You can also stack (federate) Queriers on top of other Queries, as Query expose `StoreAPI` as well! + +More information about those advanced topics can be found in the next courses that will be added soon. + +## Next + +Awesome! Feel free to play around with the following setup: + +![with querier](https://docs.google.com/drawings/d/e/2PACX-1vSB9gN82px0lxk9vN6wNw3eXr8Z0EVROW3xubsq7tgjbx_nXsoZ02ElzvxeDevyjGPWv-f9Gie0NeNz/pub?w=926&h=539) + +Once done hit `Continue` for summary. diff --git a/tutorials/katacoda/thanos/2-lts/courseBase.sh b/tutorials/katacoda/thanos/2-lts/courseBase.sh new file mode 100644 index 0000000000..20d602bdd3 --- /dev/null +++ b/tutorials/katacoda/thanos/2-lts/courseBase.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash + diff --git a/tutorials/katacoda/thanos/2-lts/index.json b/tutorials/katacoda/thanos/2-lts/index.json new file mode 100644 index 0000000000..35d2f8f836 --- /dev/null +++ b/tutorials/katacoda/thanos/2-lts/index.json @@ -0,0 +1,19 @@ +{ + "title": "Intro: Downsampling and unlimited metric retention for Prometheus", + "description": "Learn how to extend you metric retention in a cheap way with Thanos.", + "details": { + "steps": [ + ], + "intro": { + "text": "intro.md", + "courseData": "courseBase.sh" + } + }, + "environment": { + "uilayout": "editor-terminal", + "uisettings": "yaml" + }, + "backend": { + "imageid": "docker-direct" + } +} diff --git a/tutorials/katacoda/thanos/2-lts/intro.md b/tutorials/katacoda/thanos/2-lts/intro.md new file mode 100644 index 0000000000..d9b7813299 --- /dev/null +++ b/tutorials/katacoda/thanos/2-lts/intro.md @@ -0,0 +1,7 @@ +# In progress + +🚧 This tutorial is in progress. 🚧 + +Do you want to see this soon or you want to help us? + +Let us know on https://github.com/thanos-io/thanos or #thanos slack channel linked on https://thanos.io \ No newline at end of file diff --git a/tutorials/katacoda/thanos/3-meta-monitoring/courseBase.sh b/tutorials/katacoda/thanos/3-meta-monitoring/courseBase.sh new file mode 100644 index 0000000000..20d602bdd3 --- /dev/null +++ b/tutorials/katacoda/thanos/3-meta-monitoring/courseBase.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash + diff --git a/tutorials/katacoda/thanos/3-meta-monitoring/index.json b/tutorials/katacoda/thanos/3-meta-monitoring/index.json new file mode 100644 index 0000000000..a130ca2b22 --- /dev/null +++ b/tutorials/katacoda/thanos/3-meta-monitoring/index.json @@ -0,0 +1,19 @@ +{ + "title": "Intro: Global and meta alerts with Thanos Ruler", + "description": "In progress. Stay Tuned!", + "details": { + "steps": [ + ], + "intro": { + "text": "intro.md", + "courseData": "courseBase.sh" + } + }, + "environment": { + "uilayout": "editor-terminal", + "uisettings": "yaml" + }, + "backend": { + "imageid": "docker-direct" + } +} \ No newline at end of file diff --git a/tutorials/katacoda/thanos/3-meta-monitoring/intro.md b/tutorials/katacoda/thanos/3-meta-monitoring/intro.md new file mode 100644 index 0000000000..d9b7813299 --- /dev/null +++ b/tutorials/katacoda/thanos/3-meta-monitoring/intro.md @@ -0,0 +1,7 @@ +# In progress + +🚧 This tutorial is in progress. 🚧 + +Do you want to see this soon or you want to help us? + +Let us know on https://github.com/thanos-io/thanos or #thanos slack channel linked on https://thanos.io \ No newline at end of file diff --git a/tutorials/katacoda/thanos/4-cross-cluster-comm/courseBase.sh b/tutorials/katacoda/thanos/4-cross-cluster-comm/courseBase.sh new file mode 100644 index 0000000000..20d602bdd3 --- /dev/null +++ b/tutorials/katacoda/thanos/4-cross-cluster-comm/courseBase.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash + diff --git a/tutorials/katacoda/thanos/4-cross-cluster-comm/index.json b/tutorials/katacoda/thanos/4-cross-cluster-comm/index.json new file mode 100644 index 0000000000..1490e4c3b6 --- /dev/null +++ b/tutorials/katacoda/thanos/4-cross-cluster-comm/index.json @@ -0,0 +1,19 @@ +{ + "title": "Advanced: Connecting remote Prometheuses to Thanos using simple Envoy setup.", + "description": "In progress. Stay Tuned!", + "details": { + "steps": [ + ], + "intro": { + "text": "intro.md", + "courseData": "courseBase.sh" + } + }, + "environment": { + "uilayout": "editor-terminal", + "uisettings": "yaml" + }, + "backend": { + "imageid": "docker-direct" + } +} \ No newline at end of file diff --git a/tutorials/katacoda/thanos/4-cross-cluster-comm/intro.md b/tutorials/katacoda/thanos/4-cross-cluster-comm/intro.md new file mode 100644 index 0000000000..d9b7813299 --- /dev/null +++ b/tutorials/katacoda/thanos/4-cross-cluster-comm/intro.md @@ -0,0 +1,7 @@ +# In progress + +🚧 This tutorial is in progress. 🚧 + +Do you want to see this soon or you want to help us? + +Let us know on https://github.com/thanos-io/thanos or #thanos slack channel linked on https://thanos.io \ No newline at end of file diff --git a/tutorials/katacoda/thanos/5-remote-receiver/courseBase.sh b/tutorials/katacoda/thanos/5-remote-receiver/courseBase.sh new file mode 100644 index 0000000000..20d602bdd3 --- /dev/null +++ b/tutorials/katacoda/thanos/5-remote-receiver/courseBase.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash + diff --git a/tutorials/katacoda/thanos/5-remote-receiver/index.json b/tutorials/katacoda/thanos/5-remote-receiver/index.json new file mode 100644 index 0000000000..7dd6423da4 --- /dev/null +++ b/tutorials/katacoda/thanos/5-remote-receiver/index.json @@ -0,0 +1,19 @@ +{ + "title": "Advanced: Using Prometheus remote write to stream metrics to Thanos", + "description": "In progress. Stay Tuned!", + "details": { + "steps": [ + ], + "intro": { + "text": "intro.md", + "courseData": "courseBase.sh" + } + }, + "environment": { + "uilayout": "editor-terminal", + "uisettings": "yaml" + }, + "backend": { + "imageid": "docker-direct" + } +} \ No newline at end of file diff --git a/tutorials/katacoda/thanos/5-remote-receiver/intro.md b/tutorials/katacoda/thanos/5-remote-receiver/intro.md new file mode 100644 index 0000000000..d9b7813299 --- /dev/null +++ b/tutorials/katacoda/thanos/5-remote-receiver/intro.md @@ -0,0 +1,7 @@ +# In progress + +🚧 This tutorial is in progress. 🚧 + +Do you want to see this soon or you want to help us? + +Let us know on https://github.com/thanos-io/thanos or #thanos slack channel linked on https://thanos.io \ No newline at end of file diff --git a/tutorials/katacoda/thanos/6-caching/courseBase.sh b/tutorials/katacoda/thanos/6-caching/courseBase.sh new file mode 100644 index 0000000000..20d602bdd3 --- /dev/null +++ b/tutorials/katacoda/thanos/6-caching/courseBase.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash + diff --git a/tutorials/katacoda/thanos/6-caching/index.json b/tutorials/katacoda/thanos/6-caching/index.json new file mode 100644 index 0000000000..e3b14517f2 --- /dev/null +++ b/tutorials/katacoda/thanos/6-caching/index.json @@ -0,0 +1,19 @@ +{ + "title": "Advanced: Query low tail latency with low cost: Introducing caching to Thanos", + "description": "In progress. Stay Tuned!", + "details": { + "steps": [ + ], + "intro": { + "text": "intro.md", + "courseData": "courseBase.sh" + } + }, + "environment": { + "uilayout": "editor-terminal", + "uisettings": "yaml" + }, + "backend": { + "imageid": "docker-direct" + } +} \ No newline at end of file diff --git a/tutorials/katacoda/thanos/6-caching/intro.md b/tutorials/katacoda/thanos/6-caching/intro.md new file mode 100644 index 0000000000..d9b7813299 --- /dev/null +++ b/tutorials/katacoda/thanos/6-caching/intro.md @@ -0,0 +1,7 @@ +# In progress + +🚧 This tutorial is in progress. 🚧 + +Do you want to see this soon or you want to help us? + +Let us know on https://github.com/thanos-io/thanos or #thanos slack channel linked on https://thanos.io \ No newline at end of file From 507195a73fbd2657d62dec5117421ed16974eebf Mon Sep 17 00:00:00 2001 From: Fawad Halim Date: Tue, 10 Sep 2019 02:59:19 -0500 Subject: [PATCH 15/16] Allow setting TSDB block duration for receive service (#1496) * Allow setting TSDB block duration Signed-off-by: Fawad Halim * PR feedback: corrected flag naming, made the flag hidden by default Signed-off-by: Fawad Halim * Enable WALCompression on Receive service Signed-off-by: Fawad Halim --- cmd/thanos/receive.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmd/thanos/receive.go b/cmd/thanos/receive.go index 8f3efb90c8..ed6115425c 100644 --- a/cmd/thanos/receive.go +++ b/cmd/thanos/receive.go @@ -60,6 +60,8 @@ func registerReceive(m map[string]setupFunc, app *kingpin.Application, name stri replicationFactor := cmd.Flag("receive.replication-factor", "How many times to replicate incoming write requests.").Default("1").Uint64() + tsdbBlockDuration := modelDuration(cmd.Flag("tsdb.block-duration", "Duration for local TSDB blocks").Default("2h").Hidden()) + m[name] = func(g *run.Group, logger log.Logger, reg *prometheus.Registry, tracer opentracing.Tracer, _ bool) error { lset, err := parseFlagLabels(*labelStrs) if err != nil { @@ -106,6 +108,7 @@ func registerReceive(m map[string]setupFunc, app *kingpin.Application, name stri *tenantHeader, *replicaHeader, *replicationFactor, + *tsdbBlockDuration, ) } } @@ -130,6 +133,7 @@ func runReceive( tenantHeader string, replicaHeader string, replicationFactor uint64, + tsdbBlockDuration model.Duration, ) error { logger = log.With(logger, "component", "receive") level.Warn(logger).Log("msg", "setting up receive; the Thanos receive component is EXPERIMENTAL, it may break significantly without notice") @@ -137,8 +141,9 @@ func runReceive( tsdbCfg := &tsdb.Options{ RetentionDuration: retention, NoLockfile: true, - MinBlockDuration: model.Duration(time.Hour * 2), - MaxBlockDuration: model.Duration(time.Hour * 2), + MinBlockDuration: tsdbBlockDuration, + MaxBlockDuration: tsdbBlockDuration, + WALCompression: true, } localStorage := &tsdb.ReadyStorage{} From 83583f1e6eceabdb8a8dac857fa2c9812ff720d1 Mon Sep 17 00:00:00 2001 From: Martin Chodur Date: Tue, 10 Sep 2019 14:26:17 +0200 Subject: [PATCH 16/16] fix docs: fixed getting started link to release process (#1506) Signed-off-by: Martin Chodur --- docs/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 727480b531..3ef426cc02 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -31,7 +31,7 @@ We also perform minor releases every 6 weeks. During that, we build tarballs for major platforms and release docker images. -See [release process docs](docs/release-process.md) for details. +See [release process docs](release-process.md) for details. ## Running Thanos