Skip to content

Instantly share code, notes, and snippets.

@SIMULATAN
Created March 15, 2023 11:11
Show Gist options
  • Save SIMULATAN/35d921e3cf63946483968716832bd82d to your computer and use it in GitHub Desktop.
Save SIMULATAN/35d921e3cf63946483968716832bd82d to your computer and use it in GitHub Desktop.
version: "3.9"
services:
mimir:
image: grafana/mimir:2.6.0
networks:
- prometheus
volumes:
- tsdb:/tsdb:rw
command:
- '--config.file=/etc/mimir/config.yml'
- '--config.expand-env'
# the stack name is "monitoring"
- '--memberlist.join=dns+tasks.monitoring_mimir:7946'
configs:
- source: mimir
target: /etc/mimir/config.yml
mode: 0644
ports:
- target: 9009
published: 9009
protocol: tcp
deploy:
mode: replicated
replicas: 2
# neither vip nor dnsrr works, the dns query works in both cases just fine anyway
endpoint_mode: vip
networks:
prometheus:
name: prometheus
# I tried this with both replication over multiple physical hosts and replication on that single machine, neither works
# driver: overlay
attachable: true
multitenancy_enabled: false
common:
storage:
backend: s3
s3:
endpoint: my-domain.com
secret_access_key: key
access_key_id: key
blocks_storage:
storage_prefix: blocks
s3:
bucket_name: prometheus
alertmanager_storage:
storage_prefix: alertmanager
s3:
bucket_name: prometheus
ruler_storage:
storage_prefix: ruler
s3:
bucket_name: prometheus
compactor:
data_dir: /tmp/mimir/compactor
sharding_ring:
instance_addr: 127.0.0.1
kvstore:
store: memberlist
distributor:
ring:
instance_addr: 127.0.0.1
kvstore:
store: memberlist
ingester:
ring:
instance_addr: 127.0.0.1
kvstore:
store: memberlist
replication_factor: 2
server:
http_listen_port: 9009
log_level: info
store_gateway:
sharding_ring:
instance_addr: 127.0.0.1
replication_factor: 2
memberlist:
max_join_backoff: 1m
max_join_retries: 5
min_join_backoff: 1s
frontend:
parallelize_shardable_queries: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment