Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into davidgrant/bb-obs
Browse files Browse the repository at this point in the history
  • Loading branch information
seizethedave committed Oct 16, 2024
2 parents 1fd4bb7 + e1d5ba0 commit 5a98e1d
Show file tree
Hide file tree
Showing 190 changed files with 23,536 additions and 14,181 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* `cortex_alertmanager_state_replication_failed_total`
* `cortex_alertmanager_alerts`
* `cortex_alertmanager_silences`
* [FEATURE] Querier: add experimental streaming PromQL engine, enabled with `-querier.query-engine=mimir`. #9367 #9368 #9398 #9399 #9403 #9417 #9418 #9419 #9420 #9482 #9504 #9505 #9507 #9518 #9531 #9532 #9533 #9553 #9558 #9588 #9589
* [FEATURE] Querier: add experimental streaming PromQL engine, enabled with `-querier.query-engine=mimir`. #9367 #9368 #9398 #9399 #9403 #9417 #9418 #9419 #9420 #9482 #9504 #9505 #9507 #9518 #9531 #9532 #9533 #9553 #9558 #9588 #9589 #9639
* [FEATURE] Query-frontend: added experimental configuration options `query-frontend.cache-errors` and `query-frontend.results-cache-ttl-for-errors` to allow non-transient responses to be cached. When set to `true` error responses from hitting limits or bad data are cached for a short TTL. #9028
* [FEATURE] gRPC: Support S2 compression. #9322
* `-alertmanager.alertmanager-client.grpc-compression=s2`
Expand All @@ -28,6 +28,7 @@
* [FEATURE] Alertmanager: limit added for maximum size of the Grafana configuration (`-alertmanager.max-config-size-bytes`). #9402
* [FEATURE] Ingester: Experimental support for ingesting out-of-order native histograms. This is disabled by default and can be enabled by setting `-ingester.ooo-native-histograms-ingestion-enabled` to `true`. #7175
* [FEATURE] Distributor: Added `-api.skip-label-count-validation-header-enabled` option to allow skipping label count validation on the HTTP write path based on `X-Mimir-SkipLabelCountValidation` header being `true` or not. #9576
* [FEATURE] Ruler: Add experimental support for caching the contents of rule groups. This is disabled by default and can be enabled by setting `-ruler-storage.cache.rule-group-enabled`. #9595
* [ENHANCEMENT] mimirtool: Adds bearer token support for mimirtool's analyze ruler/prometheus commands. #9587
* [ENHANCEMENT] Ruler: Support `exclude_alerts` parameter in `<prometheus-http-prefix>/api/v1/rules` endpoint. #9300
* [ENHANCEMENT] Distributor: add a metric to track tenants who are sending newlines in their label values called `cortex_distributor_label_values_with_newlines_total`. #9400
Expand Down Expand Up @@ -68,6 +69,7 @@

### Query-tee

* [CHANGE] Don't compare responses for cancelled requests. #9640
* [FEATURE] Added `-proxy.compare-skip-samples-before` to skip samples before the given time when comparing responses. The time can be in RFC3339 format (or) RFC3339 without the timezone and seconds (or) date only. #9515

### Documentation
Expand Down
11 changes: 11 additions & 0 deletions cmd/mimir/config-descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -13669,6 +13669,17 @@
"required": false,
"desc": "",
"blockEntries": [
{
"kind": "field",
"name": "rule_group_enabled",
"required": false,
"desc": "Enabling caching of rule group contents if a cache backend is configured.",
"fieldValue": null,
"fieldDefaultValue": false,
"fieldFlag": "ruler-storage.cache.rule-group-enabled",
"fieldType": "boolean",
"fieldCategory": "experimental"
},
{
"kind": "field",
"name": "backend",
Expand Down
2 changes: 2 additions & 0 deletions cmd/mimir/help-all.txt.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2497,6 +2497,8 @@ Usage of ./cmd/mimir/mimir:
[deprecated] Username to use when connecting to Redis.
-ruler-storage.cache.redis.write-timeout duration
[deprecated] Client write timeout. (default 3s)
-ruler-storage.cache.rule-group-enabled
[experimental] Enabling caching of rule group contents if a cache backend is configured.
-ruler-storage.filesystem.dir string
Local filesystem storage directory. (default "ruler")
-ruler-storage.gcs.bucket-name string
Expand Down
20 changes: 10 additions & 10 deletions development/mimir-monolithic-mode/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ services:
image: consul:1.15 # latest tag not supported
command: [ "agent", "-dev" ,"-client=0.0.0.0", "-log-level=info" ]
ports:
- 8500:8500
- 8510:8500

minio:
image: minio/minio
command: [ "server", "--console-address", ":9001", "/data" ]
command: [ "server", "--console-address", ":9101", "/data" ]
environment:
- MINIO_ROOT_USER=mimir
- MINIO_ROOT_PASSWORD=supersecret
ports:
- 9000:9000
- 9001:9001
- 9100:9100
- 9101:9101
volumes:
- .data-minio:/data:delegated

Expand All @@ -26,7 +26,7 @@ services:
volumes:
- ./config:/etc/prometheus
ports:
- 9090:9090
- 9190:9090

grafana:
environment:
Expand All @@ -48,7 +48,7 @@ services:
volumes:
- ./config:/etc/agent-config
ports:
- 9091:9091
- 9191:9091

grafana-alloy:
profiles:
Expand All @@ -63,15 +63,15 @@ services:
jaeger:
image: jaegertracing/all-in-one
ports:
- 16686:16686
- 16681:16686
- "14268"

mimir-1:
build:
context: .
dockerfile: dev.dockerfile
image: mimir
command: ["sh", "-c", "sleep 3 && exec ./mimir -config.file=./config/mimir.yaml -target=all -server.http-listen-port=8001 -server.grpc-listen-port=9001"]
command: ["sh", "-c", "sleep 3 && exec ./mimir -config.file=./config/mimir.yaml -target=all -server.http-listen-port=8001 -server.grpc-listen-port=9101"]
depends_on:
- consul
- minio
Expand All @@ -83,7 +83,7 @@ services:
- JAEGER_SAMPLER_PARAM=1
- JAEGER_REPORTER_MAX_QUEUE_SIZE=1000
ports:
- 8001:8001
- 8101:8001
volumes:
- ./config:/mimir/config
- .data-mimir-1:/data:delegated
Expand All @@ -105,7 +105,7 @@ services:
- JAEGER_SAMPLER_PARAM=1
- JAEGER_REPORTER_MAX_QUEUE_SIZE=1000
ports:
- 8002:8002
- 8102:8002
volumes:
- ./config:/mimir/config
- .data-mimir-2:/data:delegated
Expand Down
14 changes: 7 additions & 7 deletions development/mimir-read-write-mode/docker-compose.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,19 @@ std.manifestYamlDoc({
'QUERY_FRONTEND_HOST=mimir-read-1:8080',
'COMPACTOR_HOST=mimir-backend-1:8080',
],
ports: ['8080:8080'],
ports: ['8780:8080'],
volumes: ['../common/config:/etc/nginx/templates'],
},
},

minio:: {
minio: {
image: 'minio/minio',
command: ['server', '--console-address', ':9001', '/data'],
command: ['server', '--console-address', ':9701', '/data'],
environment: ['MINIO_ROOT_USER=mimir', 'MINIO_ROOT_PASSWORD=supersecret'],
ports: [
'9000:9000',
'9001:9001',
'9700:9700',
'9701:9701',
],
volumes: ['.data-minio:/data:delegated'],
},
Expand Down Expand Up @@ -116,7 +116,7 @@ std.manifestYamlDoc({
image: 'grafana/agent:v0.37.3',
command: ['-config.file=/etc/agent-config/grafana-agent.yaml', '-metrics.wal-directory=/tmp', '-server.http.address=127.0.0.1:9091'],
volumes: ['./config:/etc/agent-config'],
ports: ['9091:9091'],
ports: ['9791:9091'],
},
},

Expand All @@ -131,7 +131,7 @@ std.manifestYamlDoc({
volumes: [
'./config:/etc/prometheus',
],
ports: ['9090:9090'],
ports: ['9790:9090'],
},
},

Expand Down Expand Up @@ -168,7 +168,7 @@ std.manifestYamlDoc({
],
hostname: options.name,
// Only publish HTTP port, but not gRPC one.
ports: ['%d:8080' % options.publishedHttpPort],
ports: ['%d:8080' % (options.publishedHttpPort + 700)],
depends_on: options.dependsOn,
volumes: ['./config:/mimir/config', './activity:/activity'] + options.extraVolumes,
},
Expand Down
26 changes: 13 additions & 13 deletions development/mimir-read-write-mode/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- "-server.http.address=127.0.0.1:9091"
"image": "grafana/agent:v0.37.3"
"ports":
- "9091:9091"
- "9791:9091"
"volumes":
- "./config:/etc/agent-config"
"memcached":
Expand All @@ -35,7 +35,7 @@
"hostname": "mimir-backend-1"
"image": "mimir"
"ports":
- "8006:8080"
- "8706:8080"
"volumes":
- "./config:/mimir/config"
- "./activity:/activity"
Expand All @@ -54,7 +54,7 @@
"hostname": "mimir-backend-2"
"image": "mimir"
"ports":
- "8007:8080"
- "8707:8080"
"volumes":
- "./config:/mimir/config"
- "./activity:/activity"
Expand All @@ -73,7 +73,7 @@
"hostname": "mimir-read-1"
"image": "mimir"
"ports":
- "8004:8080"
- "8704:8080"
"volumes":
- "./config:/mimir/config"
- "./activity:/activity"
Expand All @@ -92,7 +92,7 @@
"hostname": "mimir-read-2"
"image": "mimir"
"ports":
- "8005:8080"
- "8705:8080"
"volumes":
- "./config:/mimir/config"
- "./activity:/activity"
Expand All @@ -111,7 +111,7 @@
"hostname": "mimir-write-1"
"image": "mimir"
"ports":
- "8001:8080"
- "8701:8080"
"volumes":
- "./config:/mimir/config"
- "./activity:/activity"
Expand All @@ -131,7 +131,7 @@
"hostname": "mimir-write-2"
"image": "mimir"
"ports":
- "8002:8080"
- "8702:8080"
"volumes":
- "./config:/mimir/config"
- "./activity:/activity"
Expand All @@ -151,7 +151,7 @@
"hostname": "mimir-write-3"
"image": "mimir"
"ports":
- "8003:8080"
- "8703:8080"
"volumes":
- "./config:/mimir/config"
- "./activity:/activity"
Expand All @@ -160,15 +160,15 @@
"command":
- "server"
- "--console-address"
- ":9001"
- ":9701"
- "/data"
"environment":
- "MINIO_ROOT_USER=mimir"
- "MINIO_ROOT_PASSWORD=supersecret"
"image": "minio/minio"
"ports":
- "9000:9000"
- "9001:9001"
- "9700:9700"
- "9701:9701"
"volumes":
- ".data-minio:/data:delegated"
"nginx":
Expand All @@ -182,7 +182,7 @@
"hostname": "nginx"
"image": "nginxinc/nginx-unprivileged:1.22-alpine"
"ports":
- "8080:8080"
- "8780:8080"
"volumes":
- "../common/config:/etc/nginx/templates"
"prometheus":
Expand All @@ -192,6 +192,6 @@
- "--enable-feature=native-histograms"
"image": "prom/prometheus:v2.53.0"
"ports":
- "9090:9090"
- "9790:9090"
"volumes":
- "./config:/etc/prometheus"
2 changes: 2 additions & 0 deletions docs/sources/mimir/configure/about-versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ The following features are currently experimental:
- Allow control over rule sync intervals.
- `ruler.outbound-sync-queue-poll-interval`
- `ruler.inbound-sync-queue-poll-interval`
- Cache rule group contents.
- `-ruler-storage.cache.rule-group-enabled`
- Distributor
- Metrics relabeling
- `-distributor.metric-relabeling-enabled`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2166,6 +2166,11 @@ local:
[directory: <string> | default = ""]
cache:
# (experimental) Enabling caching of rule group contents if a cache backend is
# configured.
# CLI flag: -ruler-storage.cache.rule-group-enabled
[rule_group_enabled: <boolean> | default = false]
# Backend for ruler storage cache, if not empty. The cache is supported for
# any storage backend except "local". Supported values: memcached, redis.
# CLI flag: -ruler-storage.cache.backend
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/mimir/manage/mimir-runbooks/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ How to **investigate**:

- Check the number of endpoints matching the `gossip-ring` service:
```
kubectl --namespace <namespace> get endpoints gossip-ring
kubectl --namespace <namespace> get endpoints gossip-ring -ojson | jq '.subsets[].addresses | length'
```
- If the number of endpoints is 1000 then it means you reached the Kubernetes limit, the endpoints get truncated and
you could be hit by [this bug](https://github.com/kubernetes/kubernetes/issues/127370). Having more than 1000 pods
Expand Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ require (
github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b
github.com/pkg/errors v0.9.1
github.com/prometheus/alertmanager v0.27.0
github.com/prometheus/client_golang v1.20.4
github.com/prometheus/client_golang v1.20.5
github.com/prometheus/client_model v0.6.1
github.com/prometheus/common v0.59.1
github.com/prometheus/prometheus v1.99.0
Expand Down Expand Up @@ -73,7 +73,7 @@ require (
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
github.com/okzk/sdnotify v0.0.0-20240725214427-1c1fdd37c5ac
github.com/prometheus/procfs v0.15.1
github.com/shirou/gopsutil/v4 v4.24.8
github.com/shirou/gopsutil/v4 v4.24.9
github.com/thanos-io/objstore v0.0.0-20241010161353-f90c89a0ef90
github.com/twmb/franz-go v1.17.1
github.com/twmb/franz-go/pkg/kadm v1.13.0
Expand All @@ -89,7 +89,7 @@ require (
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c
golang.org/x/term v0.25.0
google.golang.org/api v0.196.0
google.golang.org/protobuf v1.34.2
google.golang.org/protobuf v1.35.1
sigs.k8s.io/kustomize/kyaml v0.16.0
)

Expand All @@ -105,6 +105,7 @@ require (
github.com/Masterminds/sprig/v3 v3.2.1 // indirect
github.com/at-wat/mqtt-go v0.19.4 // indirect
github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 // indirect
github.com/ebitengine/purego v0.8.0 // indirect
github.com/go-ini/ini v1.67.0 // indirect
github.com/go-jose/go-jose/v4 v4.0.1 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
Expand All @@ -127,7 +128,6 @@ require (
github.com/pires/go-proxyproto v0.7.0 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/shopspring/decimal v1.2.0 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
Expand Down Expand Up @@ -226,7 +226,7 @@ require (
github.com/josharian/intern v1.0.0 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/julienschmidt/httprouter v1.3.0 // indirect
github.com/klauspost/compress v1.17.10
github.com/klauspost/compress v1.17.11
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
Expand Down Expand Up @@ -275,14 +275,14 @@ require (
golang.org/x/tools v0.26.0 // indirect
google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)

// Using a fork of Prometheus with Mimir-specific changes.
replace github.com/prometheus/prometheus => github.com/grafana/mimir-prometheus v0.0.0-20241015102654-eaa7eae2d877
replace github.com/prometheus/prometheus => github.com/grafana/mimir-prometheus v0.0.0-20241016140351-5e9a771537ba

// Replace memberlist with our fork which includes some fixes that haven't been
// merged upstream yet:
Expand Down
Loading

0 comments on commit 5a98e1d

Please sign in to comment.