Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

query: Disable downsampling by default. #407

Merged
merged 2 commits into from
Jul 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cmd/thanos/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ func registerQuery(m map[string]setupFunc, app *kingpin.Application, name string
stores := cmd.Flag("store", "Addresses of statically configured store API servers (repeatable).").
PlaceHolder("<store>").Strings()

enableAutodownsampling := cmd.Flag("query.auto-downsampling", "Enable automatic adjustment (step / 5) to what source of data should be used in store gateways if no max_source_resolution param is specified. ").
Default("false").Bool()

m[name] = func(g *run.Group, logger log.Logger, reg *prometheus.Registry, tracer opentracing.Tracer, _ bool) error {
peer, err := newPeerFn(logger, reg, true, *httpAdvertiseAddr, true)
if err != nil {
Expand Down Expand Up @@ -87,6 +90,7 @@ func registerQuery(m map[string]setupFunc, app *kingpin.Application, name string
peer,
selectorLset,
*stores,
*enableAutodownsampling,
)
}
}
Expand Down Expand Up @@ -141,6 +145,7 @@ func runQuery(
peer *cluster.Peer,
selectorLset labels.Labels,
storeAddrs []string,
enableAutodownsampling bool,
) error {
var staticSpecs []query.StoreSpec
for _, addr := range storeAddrs {
Expand Down Expand Up @@ -208,7 +213,7 @@ func runQuery(
router := route.New()
ui.New(logger, nil).Register(router)

api := v1.NewAPI(logger, reg, engine, queryableCreator)
api := v1.NewAPI(logger, reg, engine, queryableCreator, enableAutodownsampling)
api.Register(router.WithPrefix("/api/v1"), tracer, logger)

mux := http.NewServeMux()
Expand Down
10 changes: 7 additions & 3 deletions docs/components/bucket.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,12 @@ Flags:
detected
-i, --issues=index_issue... ...
Issues to verify (and optionally repair).
Possible values: [index_issue overlapped_blocks
duplicated_compaction]
Possible values: [overlapped_blocks
duplicated_compaction index_issue]
--id-whitelist=ID-WHITELIST ...
Block IDs to verify (and optionally repair) only.
If none is specified, all blocks will be
verified. Repeated field

```

Expand All @@ -130,7 +134,7 @@ $ thanos bucket ls -o json --gcs.bucket example-bucket
```txt
usage: thanos bucket ls [<flags>]

lqist all blocks in the bucket
list all blocks in the bucket

Flags:
-h, --help Show context-sensitive help (also try --help-long
Expand Down
2 changes: 1 addition & 1 deletion docs/components/compact.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ On-disk data is safe to delete between restarts and should be the first attempt
```$
usage: thanos compact [<flags>]

continously compacts blocks in an object store bucket
continuously compacts blocks in an object store bucket

Flags:
-h, --help Show context-sensitive help (also try --help-long
Expand Down
51 changes: 36 additions & 15 deletions docs/components/query.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,28 @@ Flags:
If 0 no trace will be sent periodically, unless
forced by baggage item. See
`pkg/tracing/tracing.go` for details.
--grpc-address="0.0.0.0:10901"
Listen ip:port address for gRPC endpoints
(StoreAPI). Make sure this address is routable
from other components if you use gossip,
'grpc-advertise-address' is empty and you
require cross-node connection.
--grpc-advertise-address=GRPC-ADVERTISE-ADDRESS
Explicit (external) host:port address to
advertise for gRPC StoreAPI in gossip cluster.
If empty, 'grpc-address' will be used.
--http-address="0.0.0.0:10902"
Listen host:port for HTTP endpoints.
--grpc-address="0.0.0.0:10901"
Listen host:port for gRPC endpoints.
--query.timeout=2m Maximum time to process query by query node.
--query.max-concurrent=20 Maximum number of queries processed
concurrently by query node.
--query.replica-label=QUERY.REPLICA-LABEL
Label to treat as a replica indicator along
which data is deduplicated. Still you will be
able to query without deduplication using
'dedup=false' parameter.
--cluster.peers=CLUSTER.PEERS ...
Initial peers to join the cluster. It can be
either <ip:port>, or <domain:port>.
--cluster.address="0.0.0.0:10900"
Listen address for cluster.
Listen ip:port address for gossip cluster.
--cluster.advertise-address=CLUSTER.ADVERTISE-ADDRESS
Explicit address to advertise in cluster.
Explicit (external) ip:port address to
advertise for gossip in gossip cluster. Used
internally for membership only
--cluster.peers=CLUSTER.PEERS ...
Initial peers to join the cluster. It can be
either <ip:port>, or <domain:port>. A lookup
resolution is done only at the startup.
--cluster.gossip-interval=5s
Interval between sending gossip messages. By
lowering this value (more frequent) gossip
Expand All @@ -77,10 +80,28 @@ Flags:
interval lower (more frequent) will increase
convergence speeds across larger clusters at
the expense of increased bandwidth usage.
--cluster.refresh-interval=1m0s
Interval for membership to refresh
cluster.peers state, 0 disables refresh.
--http-advertise-address=HTTP-ADVERTISE-ADDRESS
Explicit (external) host:port address to
advertise for HTTP QueryAPI in gossip cluster.
If empty, 'http-address' will be used.
--query.timeout=2m Maximum time to process query by query node.
--query.max-concurrent=20 Maximum number of queries processed
concurrently by query node.
--query.replica-label=QUERY.REPLICA-LABEL
Label to treat as a replica indicator along
which data is deduplicated. Still you will be
able to query without deduplication using
'dedup=false' parameter.
--selector-label=<name>="<value>" ...
Query selector labels that will be exposed in
info endpoint (repeated).
--store=<store> ... Addresses of statically configured store API
servers (repeatable).
--query.auto-downsampling Enable automatic adjustment (step / 5) to what
source of data should be used in store gateways
if no max_source_resolution param is specified.

```
61 changes: 39 additions & 22 deletions docs/components/rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,47 @@ Flags:
0 no trace will be sent periodically, unless
forced by baggage item. See
`pkg/tracing/tracing.go` for details.
--grpc-address="0.0.0.0:10901"
Listen ip:port address for gRPC endpoints
(StoreAPI). Make sure this address is routable
from other components if you use gossip,
'grpc-advertise-address' is empty and you
require cross-node connection.
--grpc-advertise-address=GRPC-ADVERTISE-ADDRESS
Explicit (external) host:port address to
advertise for gRPC StoreAPI in gossip cluster.
If empty, 'grpc-address' will be used.
--http-address="0.0.0.0:10902"
Listen host:port for HTTP endpoints.
--cluster.address="0.0.0.0:10900"
Listen ip:port address for gossip cluster.
--cluster.advertise-address=CLUSTER.ADVERTISE-ADDRESS
Explicit (external) ip:port address to advertise
for gossip in gossip cluster. Used internally
for membership only
--cluster.peers=CLUSTER.PEERS ...
Initial peers to join the cluster. It can be
either <ip:port>, or <domain:port>. A lookup
resolution is done only at the startup.
--cluster.gossip-interval=5s
Interval between sending gossip messages. By
lowering this value (more frequent) gossip
messages are propagated across the cluster more
quickly at the expense of increased bandwidth.
--cluster.pushpull-interval=5s
Interval for gossip state syncs. Setting this
interval lower (more frequent) will increase
convergence speeds across larger clusters at the
expense of increased bandwidth usage.
--cluster.refresh-interval=1m0s
Interval for membership to refresh cluster.peers
state, 0 disables refresh.
--label=<name>="<value>" ...
Labels to be applied to all generated metrics
(repeated).
--data-dir="data/" data directory
--rule-file=rules/ ... Rule files that should be used by rule manager.
Can be in glob format (repeated).
--http-address="0.0.0.0:10902"
Listen host:port for HTTP endpoints.
--grpc-address="0.0.0.0:10901"
Listen host:port for gRPC endpoints.
--eval-interval=30s The default evaluation interval to use.
--tsdb.block-duration=2h Block duration for TSDB block.
--tsdb.retention=48h Block retention time on local disk.
Expand All @@ -67,6 +98,9 @@ Flags:
--gcs.bucket=<bucket> Google Cloud Storage bucket name for stored
blocks. If empty, ruler won't store any block
inside Google Cloud Storage.
--alert.query-url=ALERT.QUERY-URL
The external Thanos Query URL that would be set
in all alerts 'Source' field
--s3.bucket=<bucket> S3-Compatible API bucket name for stored blocks.
--s3.endpoint=<api-url> S3-Compatible API endpoint for stored blocks.
--s3.access-key=<key> Access key for an S3-Compatible API.
Expand All @@ -75,22 +109,5 @@ Flags:
--s3.signature-version2 Whether to use S3 Signature Version 2; otherwise
Signature Version 4 will be used.
--s3.encrypt-sse Whether to use Server Side Encryption
--cluster.peers=CLUSTER.PEERS ...
Initial peers to join the cluster. It can be
either <ip:port>, or <domain:port>.
--cluster.address="0.0.0.0:10900"
Listen address for cluster.
--cluster.gossip-interval=5s
Interval between sending gossip messages. By
lowering this value (more frequent) gossip
messages are propagated across the cluster more
quickly at the expense of increased bandwidth.
--cluster.pushpull-interval=5s
Interval for gossip state syncs. Setting this
interval lower (more frequent) will increase
convergence speeds across larger clusters at the
expense of increased bandwidth usage.
--cluster.advertise-address=CLUSTER.ADVERTISE-ADDRESS
Explicit address to advertise in cluster.
--alert.query-url The external Thanos Query URL that would be set in all alerts 'Source' field

```
52 changes: 33 additions & 19 deletions docs/components/sidecar.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,40 @@ Flags:
forced by baggage item. See
`pkg/tracing/tracing.go` for details.
--grpc-address="0.0.0.0:10901"
Listen address for gRPC endpoints.
Listen ip:port address for gRPC endpoints
(StoreAPI). Make sure this address is routable
from other components if you use gossip,
'grpc-advertise-address' is empty and you
require cross-node connection.
--grpc-advertise-address=GRPC-ADVERTISE-ADDRESS
Explicit (external) host:port address to
advertise for gRPC StoreAPI in gossip cluster.
If empty, 'grpc-address' will be used.
--http-address="0.0.0.0:10902"
Listen address for HTTP endpoints.
Listen host:port for HTTP endpoints.
--cluster.address="0.0.0.0:10900"
Listen ip:port address for gossip cluster.
--cluster.advertise-address=CLUSTER.ADVERTISE-ADDRESS
Explicit (external) ip:port address to
advertise for gossip in gossip cluster. Used
internally for membership only
--cluster.peers=CLUSTER.PEERS ...
Initial peers to join the cluster. It can be
either <ip:port>, or <domain:port>. A lookup
resolution is done only at the startup.
--cluster.gossip-interval=5s
Interval between sending gossip messages. By
lowering this value (more frequent) gossip
messages are propagated across the cluster more
quickly at the expense of increased bandwidth.
--cluster.pushpull-interval=5s
Interval for gossip state syncs. Setting this
interval lower (more frequent) will increase
convergence speeds across larger clusters at
the expense of increased bandwidth usage.
--cluster.refresh-interval=1m0s
Interval for membership to refresh
cluster.peers state, 0 disables refresh.
--prometheus.url=http://localhost:9090
URL at which to reach Prometheus's API.
--tsdb.path="./data" Data directory of TSDB.
Expand All @@ -61,23 +92,6 @@ Flags:
--s3.signature-version2 Whether to use S3 Signature Version 2;
otherwise Signature Version 4 will be used.
--s3.encrypt-sse Whether to use Server Side Encryption
--cluster.peers=CLUSTER.PEERS ...
Initial peers to join the cluster. It can be
either <ip:port>, or <domain:port>.
--cluster.address="0.0.0.0:10900"
Listen address for cluster.
--cluster.advertise-address=CLUSTER.ADVERTISE-ADDRESS
Explicit address to advertise in cluster.
--cluster.gossip-interval=5s
Interval between sending gossip messages. By
lowering this value (more frequent) gossip
messages are propagated across the cluster more
quickly at the expense of increased bandwidth.
--cluster.pushpull-interval=5s
Interval for gossip state syncs. Setting this
interval lower (more frequent) will increase
convergence speeds across larger clusters at
the expense of increased bandwidth usage.
--reloader.config-file="" Config file watched by the reloader.
--reloader.config-envsubst-file=""
Output file for environment variable
Expand Down
Loading