Skip to content

Commit

Permalink
Scrape both classic and native histograms in docker compose (#5361)
Browse files Browse the repository at this point in the history
  • Loading branch information
zenador authored Jun 27, 2023
1 parent 3ec5443 commit 9c983c8
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ scrape_configs:
target_label: 'container'
regex: '(.+?)(-\d+)?'
replacement: '${1}'
scrape_classic_histograms: true

remote_write:
- url: http://distributor-1:8000/api/v1/push
Expand All @@ -47,4 +48,3 @@ remote_write:
rule_files:
- '/etc/mixin/mimir-alerts.yaml'
- '/etc/mixin/mimir-rules.yaml'

5 changes: 2 additions & 3 deletions development/mimir-microservices-mode/docker-compose.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,11 @@ std.manifestYamlDoc({

prometheus:: {
prometheus: {
image: 'prom/prometheus:v2.40.6',
image: 'prom/prometheus:v2.45.0',
command: [
'--config.file=/etc/prometheus/prometheus.yaml',
'--enable-feature=exemplar-storage',
// This option enables native histogram support in prometheus, which is disabled by default since it doesn't scape classic histograms used by the recording rules and dashboards
// '--enable-feature=native-histograms',
'--enable-feature=native-histograms',
],
volumes: [
'./config:/etc/prometheus',
Expand Down
3 changes: 2 additions & 1 deletion development/mimir-microservices-mode/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@
"command":
- "--config.file=/etc/prometheus/prometheus.yaml"
- "--enable-feature=exemplar-storage"
"image": "prom/prometheus:v2.40.6"
- "--enable-feature=native-histograms"
"image": "prom/prometheus:v2.45.0"
"ports":
- "9090:9090"
"volumes":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ scrape_configs:
- targets: ['mimir-1:8001']
labels:
container: 'mimir-1'
scrape_classic_histograms: true
- job_name: mimir-2
static_configs:
- targets: ['mimir-2:8002']
labels:
container: 'mimir-2'
scrape_classic_histograms: true

remote_write:
- url: http://mimir-1:8001/api/v1/push
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ services:

prometheus:

image: prom/prometheus:v2.40.6
image: prom/prometheus:v2.45.0
command: ["--config.file=/etc/prometheus/prometheus.yaml", "--enable-feature=native-histograms"]
volumes:
- ./config:/etc/prometheus
Expand Down
2 changes: 2 additions & 0 deletions development/mimir-monolithic-mode/config/prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ scrape_configs:
- targets: ['mimir-1:8001']
labels:
container: 'mimir-1'
scrape_classic_histograms: true
- job_name: mimir-2
static_configs:
- targets: ['mimir-2:8002']
labels:
container: 'mimir-2'
scrape_classic_histograms: true

remote_write:
- url: http://mimir-1:8001/api/v1/push
Expand Down
2 changes: 1 addition & 1 deletion development/mimir-monolithic-mode/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
- .data-minio:/data:delegated

prometheus:
image: prom/prometheus:v2.40.6
image: prom/prometheus:v2.45.0
command: ["--config.file=/etc/prometheus/prometheus.yaml", "--enable-feature=native-histograms"]
volumes:
- ./config:/etc/prometheus
Expand Down

0 comments on commit 9c983c8

Please sign in to comment.