From 0585ec91f8493759c8f5138b07192dd561b3784d Mon Sep 17 00:00:00 2001 From: Tal Neiman <33829179+talIguaz@users.noreply.github.com> Date: Wed, 10 Apr 2019 14:31:45 +0300 Subject: [PATCH] use v3io aggregations by default (#34) * use v3io aggregations by default * add disableV3ioAggregations property documentation --- README.md | 4 ++++ cmd/prometheus/main.go | 4 ++-- config/config.go | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8bf15c7e2a7..a9830b59c35 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,10 @@ The Makefile provides several targets: * You will find a Travis CI configuration in `.travis.yml`. * See the [Community page](https://prometheus.io/community) for how to reach the Prometheus developers and users on various communication channels. +## V3IO integration +### Configuration Options + * `disableV3ioAggregations` - Prometheus uses v3io-tsdb builtin aggregations by default when possible. To disable this optimization set `disableV3ioAggregations: true` config in your `prometheus.yaml` file. + ## Contributing Refer to [CONTRIBUTING.md](https://github.com/prometheus/prometheus/blob/master/CONTRIBUTING.md) diff --git a/cmd/prometheus/main.go b/cmd/prometheus/main.go index 5d4101334bf..68f02dff3f0 100644 --- a/cmd/prometheus/main.go +++ b/cmd/prometheus/main.go @@ -447,8 +447,8 @@ func main() { }, // V3io related updates func(cfg *config.Config) error { - localStorage.SetUseV3ioAggregations(cfg.UseV3ioAggregations) - queryEngine.UseV3ioAggregations = cfg.UseV3ioAggregations + localStorage.SetUseV3ioAggregations(!cfg.DisableV3ioAggregations) + queryEngine.UseV3ioAggregations = !cfg.DisableV3ioAggregations return nil }, diff --git a/config/config.go b/config/config.go index a937f60764e..af94efcfcef 100644 --- a/config/config.go +++ b/config/config.go @@ -135,7 +135,7 @@ type Config struct { RemoteWriteConfigs []*RemoteWriteConfig `yaml:"remote_write,omitempty"` RemoteReadConfigs []*RemoteReadConfig `yaml:"remote_read,omitempty"` - UseV3ioAggregations bool `yaml:"useV3ioAggregations,omitempty"` + DisableV3ioAggregations bool `yaml:"disableV3ioAggregations,omitempty"` // original is the input from which the config was parsed. original string