From 059c9825bf20ff1a1e8ea05ea82625574e929272 Mon Sep 17 00:00:00 2001 From: Weifeng Wang Date: Tue, 2 Apr 2024 11:10:18 +0800 Subject: [PATCH] move mimirtool to mimir.yaml Signed-off-by: Weifeng Wang move inbucket to grafana.yaml Signed-off-by: Weifeng Wang Update pyroscope.yaml Update compose.yaml add .gitignore Signed-off-by: Weifeng Wang --- compose.yaml | 2 -- .../common/compose-include/grafana.yaml | 27 ++++++++++++--- .../common/compose-include/inbucket.yaml | 21 ------------ .../common/compose-include/mimir.yaml | 16 +++++++++ .../common/compose-include/mimirtool.yaml | 17 ---------- .../common/compose-include/pyroscope.yaml | 4 +++ docker-compose/common/config/.env | 3 +- .../common/config/grafana/grafana.ini | 4 --- .../microservices-mode/logs/.gitignore | 7 ++++ .../microservices-mode/logs/compose.yaml | 3 +- .../microservices-mode/metrics/.gitignore | 7 ++++ .../microservices-mode/metrics/compose.yaml | 17 +++++++++- .../microservices-mode/profiles/.gitignore | 7 ++++ .../microservices-mode/profiles/compose.yaml | 3 +- .../microservices-mode/traces/.gitignore | 7 ++++ .../microservices-mode/traces/compose.yaml | 3 +- .../monolithic-mode/all-in-one/.gitignore | 7 ++++ .../monolithic-mode/all-in-one/compose.yaml | 34 +++++++++++++++---- .../all-in-one/mimirtool.override.yaml | 10 ------ .../monolithic-mode/logs/.gitignore | 7 ++++ .../monolithic-mode/logs/compose.yaml | 3 +- .../monolithic-mode/metrics/.gitignore | 7 ++++ .../monolithic-mode/metrics/compose.yaml | 26 +------------- .../monolithic-mode/profiles/.gitignore | 7 ++++ .../monolithic-mode/profiles/compose.yaml | 3 +- .../monolithic-mode/traces/.gitignore | 7 ++++ .../monolithic-mode/traces/compose.yaml | 3 +- .../read-write-mode/logs/.gitignore | 7 ++++ .../read-write-mode/logs/compose.yaml | 3 +- .../read-write-mode/metrics/.gitignore | 7 ++++ .../read-write-mode/metrics/compose.yaml | 17 +++++++++- 31 files changed, 189 insertions(+), 107 deletions(-) delete mode 100644 docker-compose/common/compose-include/inbucket.yaml delete mode 100644 docker-compose/common/compose-include/mimirtool.yaml create mode 100644 docker-compose/microservices-mode/logs/.gitignore create mode 100644 docker-compose/microservices-mode/metrics/.gitignore create mode 100644 docker-compose/microservices-mode/profiles/.gitignore create mode 100644 docker-compose/microservices-mode/traces/.gitignore create mode 100644 docker-compose/monolithic-mode/all-in-one/.gitignore delete mode 100644 docker-compose/monolithic-mode/all-in-one/mimirtool.override.yaml create mode 100644 docker-compose/monolithic-mode/logs/.gitignore create mode 100644 docker-compose/monolithic-mode/metrics/.gitignore create mode 100644 docker-compose/monolithic-mode/profiles/.gitignore create mode 100644 docker-compose/monolithic-mode/traces/.gitignore create mode 100644 docker-compose/read-write-mode/logs/.gitignore create mode 100644 docker-compose/read-write-mode/metrics/.gitignore diff --git a/compose.yaml b/compose.yaml index 7ed4d3f9..1bd6d128 100644 --- a/compose.yaml +++ b/compose.yaml @@ -16,8 +16,6 @@ version: '3.9' include: - path: ./docker-compose/common/compose-include/minio.yaml - path: ./docker-compose/common/compose-include/memcached.yaml - - path: ./docker-compose/common/compose-include/inbucket.yaml - - path: ./docker-compose/common/compose-include/mimirtool.yaml # Grafana LGTMP Stack Components - path: ./docker-compose/common/compose-include/loki.yaml - path: ./docker-compose/common/compose-include/grafana-agent.yaml diff --git a/docker-compose/common/compose-include/grafana.yaml b/docker-compose/common/compose-include/grafana.yaml index a283ba55..bdce69dc 100644 --- a/docker-compose/common/compose-include/grafana.yaml +++ b/docker-compose/common/compose-include/grafana.yaml @@ -1,10 +1,22 @@ -# Note: -# include is available in Docker Compose version 2.20 and later, and Docker Desktop version 4.22 and later. -include: - - path: ./inbucket.yaml - services: + # Inbucket is an email testing service; it will accept email for any email + # address and make it available to view without a password + # + # https://inbucket.org/packages/docker.html + # https://github.com/inbucket/inbucket/blob/main/doc/config.md + inbucket: + labels: + metrics.agent.grafana.com/scrape: false + image: ${INBUCKET_IMAGE:-inbucket/inbucket:3.0.4} + ports: + - 2500 # SMTP + - "39000:9000" # HTTP + - 1100 # POP3 + volumes: + - inbucket_data:/storage + - inbucket_data:/config + grafana: labels: logs.agent.grafana.com/log-format: logfmt @@ -21,5 +33,10 @@ services: - ../../../monitoring-mixins/memcached-mixin/deploy/dashboards_out:/var/lib/grafana/dashboards/memcached-mixin environment: GF_FEATURE_TOGGLES_ENABLE: traceqlEditor tracesEmbeddedFlameGraph traceqlSearch correlations metricsSummary traceToMetrics traceToProfiles + GF_SMTP_ENABLED: true + GF_SMTP_HOST: inbucket:2500 ports: - "3000:3000" + +volumes: + inbucket_data: diff --git a/docker-compose/common/compose-include/inbucket.yaml b/docker-compose/common/compose-include/inbucket.yaml deleted file mode 100644 index 0b2b2b1c..00000000 --- a/docker-compose/common/compose-include/inbucket.yaml +++ /dev/null @@ -1,21 +0,0 @@ - -# Inbucket is an email testing service; it will accept email for any email -# address and make it available to view without a password -# -# https://inbucket.org/packages/docker.html -# https://github.com/inbucket/inbucket/blob/main/doc/config.md -services: - inbucket: - labels: - metrics.agent.grafana.com/scrape: false - image: inbucket/inbucket:latest - ports: - - 2500 # SMTP - - "39000:9000" # HTTP - - 1100 # POP3 - volumes: - - inbucket_data:/storage - - inbucket_data:/config - -volumes: - inbucket_data: diff --git a/docker-compose/common/compose-include/mimir.yaml b/docker-compose/common/compose-include/mimir.yaml index 35c9ac9b..dda4aac0 100644 --- a/docker-compose/common/compose-include/mimir.yaml +++ b/docker-compose/common/compose-include/mimir.yaml @@ -23,3 +23,19 @@ services: default: aliases: - mimir-memberlist + + mimirtool: + labels: + metrics.agent.grafana.com/scrape: false + image: ${MIMIRTOOL_IMAGE:-docker.io/grafana/mimirtool:2.11.0} + volumes: + - ../../../monitoring-mixins/crontab:/etc/crontabs/root + - ../../../monitoring-mixins/agent-flow-mixin/deploy/agent-flow-mixin-alerts.yaml:/rules/agent-flow-mixin-alerts.yaml + - ../../../monitoring-mixins/memcached-mixin/deploy/memcached-mixin-alerts.yaml:/rules/memcached-mixin-alerts.yaml + - ../../../monitoring-mixins/mimir-mixin/deploy/mimir-mixin-rules.yaml:/rules/mimir-mixin-rules.yaml + - ../../../monitoring-mixins/mimir-mixin/deploy/mimir-mixin-alerts.yaml:/rules/mimir-mixin-alerts.yaml + environment: + - MIMIR_ADDRESS=http://gateway:8080 + - MIMIR_TENANT_ID=anonymous + entrypoint: crond -f + restart: always diff --git a/docker-compose/common/compose-include/mimirtool.yaml b/docker-compose/common/compose-include/mimirtool.yaml deleted file mode 100644 index d11c35ed..00000000 --- a/docker-compose/common/compose-include/mimirtool.yaml +++ /dev/null @@ -1,17 +0,0 @@ -services: - mimirtool: - # https://github.com/qclaogui/codelab-monitoring/blob/main/docker-compose/common/config/agent-flow/modules/docker/README.md - labels: - metrics.agent.grafana.com/scrape: false - image: ${MIMIRTOOL_IMAGE:-docker.io/grafana/mimirtool:2.11.0} - volumes: - - ../../../monitoring-mixins/crontab:/etc/crontabs/root - - ../../../monitoring-mixins/agent-flow-mixin/deploy/agent-flow-mixin-alerts.yaml:/rules/agent-flow-mixin-alerts.yaml - - ../../../monitoring-mixins/memcached-mixin/deploy/memcached-mixin-alerts.yaml:/rules/memcached-mixin-alerts.yaml - - ../../../monitoring-mixins/mimir-mixin/deploy/mimir-mixin-rules.yaml:/rules/mimir-mixin-rules.yaml - - ../../../monitoring-mixins/mimir-mixin/deploy/mimir-mixin-alerts.yaml:/rules/mimir-mixin-alerts.yaml - environment: - - MIMIR_ADDRESS=http://gateway:8080 - - MIMIR_TENANT_ID=anonymous - entrypoint: crond -f - restart: always diff --git a/docker-compose/common/compose-include/pyroscope.yaml b/docker-compose/common/compose-include/pyroscope.yaml index d6f78276..01b88b76 100644 --- a/docker-compose/common/compose-include/pyroscope.yaml +++ b/docker-compose/common/compose-include/pyroscope.yaml @@ -7,6 +7,7 @@ services: container_name: pyroscope volumes: - ../config/pyroscope:/etc/pyroscope + - pyroscope_data:/data command: - -config.file=/etc/pyroscope/monolithic-mode-profiles.yaml - -target=all @@ -20,3 +21,6 @@ services: # expose 34040 port so we can directly access pyroscope inside container ports: - "34040:4040" + +volumes: + pyroscope_data: diff --git a/docker-compose/common/config/.env b/docker-compose/common/config/.env index ab450f0d..4a323773 100644 --- a/docker-compose/common/config/.env +++ b/docker-compose/common/config/.env @@ -8,4 +8,5 @@ PYROSCOPE_IMAGE=grafana/pyroscope:1.5.0 NGINX_IMAGE=nginxinc/nginx-unprivileged:1.25-alpine MINIO_IMAGE=minio/minio:RELEASE.2024-03-15T01-07-19Z MEMCACHED_IMAGE=memcached:1.6.24-alpine -MEMCACHED_EXPORTER_IMAGE=prom/memcached-exporter:v0.14.2 \ No newline at end of file +MEMCACHED_EXPORTER_IMAGE=prom/memcached-exporter:v0.14.2 +INBUCKET_IMAGE=inbucket/inbucket:3.0.4 \ No newline at end of file diff --git a/docker-compose/common/config/grafana/grafana.ini b/docker-compose/common/config/grafana/grafana.ini index 47585993..7c84cb6d 100644 --- a/docker-compose/common/config/grafana/grafana.ini +++ b/docker-compose/common/config/grafana/grafana.ini @@ -30,7 +30,3 @@ disable_total_stats = false [dashboards] ;default_home_dashboard_path = /usr/share/grafana/public/dashboards/home.json default_home_dashboard_path = /var/lib/grafana/dashboards/minio-dashboard.json - -[smtp] -enabled = true -host = inbucket:2500 \ No newline at end of file diff --git a/docker-compose/microservices-mode/logs/.gitignore b/docker-compose/microservices-mode/logs/.gitignore new file mode 100644 index 00000000..45f9470b --- /dev/null +++ b/docker-compose/microservices-mode/logs/.gitignore @@ -0,0 +1,7 @@ +* +!.gitignore +!compose.yaml +!grafana.override.yaml +!grafana-agent.override.yaml +!mimirtool.override.yaml +!README.md \ No newline at end of file diff --git a/docker-compose/microservices-mode/logs/compose.yaml b/docker-compose/microservices-mode/logs/compose.yaml index 16e03a35..e6804df4 100644 --- a/docker-compose/microservices-mode/logs/compose.yaml +++ b/docker-compose/microservices-mode/logs/compose.yaml @@ -10,9 +10,8 @@ version: '3.9' include: - path: ../../common/compose-include/minio.yaml - path: ../../common/compose-include/memcached.yaml - - path: ../../common/compose-include/mimir.yaml - path: - - ../../common/compose-include/mimirtool.yaml + - ../../common/compose-include/mimir.yaml - ./mimirtool.override.yaml - path: - ../../common/compose-include/grafana.yaml diff --git a/docker-compose/microservices-mode/metrics/.gitignore b/docker-compose/microservices-mode/metrics/.gitignore new file mode 100644 index 00000000..45f9470b --- /dev/null +++ b/docker-compose/microservices-mode/metrics/.gitignore @@ -0,0 +1,7 @@ +* +!.gitignore +!compose.yaml +!grafana.override.yaml +!grafana-agent.override.yaml +!mimirtool.override.yaml +!README.md \ No newline at end of file diff --git a/docker-compose/microservices-mode/metrics/compose.yaml b/docker-compose/microservices-mode/metrics/compose.yaml index c862bc15..1c462206 100644 --- a/docker-compose/microservices-mode/metrics/compose.yaml +++ b/docker-compose/microservices-mode/metrics/compose.yaml @@ -9,7 +9,6 @@ version: '3.9' include: - path: ../../common/compose-include/minio.yaml - path: ../../common/compose-include/memcached.yaml - - path: ../../common/compose-include/mimirtool.yaml - path: ../../common/compose-include/grafana-agent.yaml - path: ../../common/compose-include/grafana.yaml @@ -206,3 +205,19 @@ services: default: aliases: - mimir-memberlist + + mimirtool: + labels: + metrics.agent.grafana.com/scrape: false + image: ${MIMIRTOOL_IMAGE:-docker.io/grafana/mimirtool:2.11.0} + volumes: + - ../../../monitoring-mixins/crontab:/etc/crontabs/root + - ../../../monitoring-mixins/agent-flow-mixin/deploy/agent-flow-mixin-alerts.yaml:/rules/agent-flow-mixin-alerts.yaml + - ../../../monitoring-mixins/memcached-mixin/deploy/memcached-mixin-alerts.yaml:/rules/memcached-mixin-alerts.yaml + - ../../../monitoring-mixins/mimir-mixin/deploy/mimir-mixin-rules.yaml:/rules/mimir-mixin-rules.yaml + - ../../../monitoring-mixins/mimir-mixin/deploy/mimir-mixin-alerts.yaml:/rules/mimir-mixin-alerts.yaml + environment: + - MIMIR_ADDRESS=http://gateway:8080 + - MIMIR_TENANT_ID=anonymous + entrypoint: crond -f + restart: always diff --git a/docker-compose/microservices-mode/profiles/.gitignore b/docker-compose/microservices-mode/profiles/.gitignore new file mode 100644 index 00000000..45f9470b --- /dev/null +++ b/docker-compose/microservices-mode/profiles/.gitignore @@ -0,0 +1,7 @@ +* +!.gitignore +!compose.yaml +!grafana.override.yaml +!grafana-agent.override.yaml +!mimirtool.override.yaml +!README.md \ No newline at end of file diff --git a/docker-compose/microservices-mode/profiles/compose.yaml b/docker-compose/microservices-mode/profiles/compose.yaml index d2f92199..0e2e2cee 100644 --- a/docker-compose/microservices-mode/profiles/compose.yaml +++ b/docker-compose/microservices-mode/profiles/compose.yaml @@ -10,9 +10,8 @@ version: '3.9' include: - path: ../../common/compose-include/minio.yaml - path: ../../common/compose-include/memcached.yaml - - path: ../../common/compose-include/mimir.yaml - path: - - ../../common/compose-include/mimirtool.yaml + - ../../common/compose-include/mimir.yaml - ./mimirtool.override.yaml - path: - ../../common/compose-include/grafana.yaml diff --git a/docker-compose/microservices-mode/traces/.gitignore b/docker-compose/microservices-mode/traces/.gitignore new file mode 100644 index 00000000..45f9470b --- /dev/null +++ b/docker-compose/microservices-mode/traces/.gitignore @@ -0,0 +1,7 @@ +* +!.gitignore +!compose.yaml +!grafana.override.yaml +!grafana-agent.override.yaml +!mimirtool.override.yaml +!README.md \ No newline at end of file diff --git a/docker-compose/microservices-mode/traces/compose.yaml b/docker-compose/microservices-mode/traces/compose.yaml index 10c3839e..544d710f 100644 --- a/docker-compose/microservices-mode/traces/compose.yaml +++ b/docker-compose/microservices-mode/traces/compose.yaml @@ -10,10 +10,9 @@ version: '3.9' include: - path: ../../common/compose-include/minio.yaml - path: ../../common/compose-include/memcached.yaml - - path: ../../common/compose-include/mimir.yaml - path: ../../common/compose-include/loki.yaml - path: - - ../../common/compose-include/mimirtool.yaml + - ../../common/compose-include/mimir.yaml - ./mimirtool.override.yaml - path: - ../../common/compose-include/grafana.yaml diff --git a/docker-compose/monolithic-mode/all-in-one/.gitignore b/docker-compose/monolithic-mode/all-in-one/.gitignore new file mode 100644 index 00000000..45f9470b --- /dev/null +++ b/docker-compose/monolithic-mode/all-in-one/.gitignore @@ -0,0 +1,7 @@ +* +!.gitignore +!compose.yaml +!grafana.override.yaml +!grafana-agent.override.yaml +!mimirtool.override.yaml +!README.md \ No newline at end of file diff --git a/docker-compose/monolithic-mode/all-in-one/compose.yaml b/docker-compose/monolithic-mode/all-in-one/compose.yaml index aabeafe9..5f202a2b 100644 --- a/docker-compose/monolithic-mode/all-in-one/compose.yaml +++ b/docker-compose/monolithic-mode/all-in-one/compose.yaml @@ -10,10 +10,6 @@ version: '3.9' include: - path: ../../common/compose-include/minio.yaml - path: ../../common/compose-include/memcached.yaml - - path: ../../common/compose-include/inbucket.yaml - - path: - - ../../common/compose-include/mimirtool.yaml - - ./mimirtool.override.yaml - path: - ../../common/compose-include/grafana.yaml - ./grafana.override.yaml @@ -177,6 +173,28 @@ services: aliases: - mimir-memberlist + mimirtool: + # https://github.com/qclaogui/codelab-monitoring/blob/main/docker-compose/common/config/agent-flow/modules/docker/README.md + labels: + metrics.agent.grafana.com/scrape: false + image: ${MIMIRTOOL_IMAGE:-docker.io/grafana/mimirtool:2.11.0} + volumes: + - ../../../monitoring-mixins/crontab:/etc/crontabs/root + - ../../../monitoring-mixins/agent-flow-mixin/deploy/agent-flow-mixin-alerts.yaml:/rules/agent-flow-mixin-alerts.yaml + - ../../../monitoring-mixins/memcached-mixin/deploy/memcached-mixin-alerts.yaml:/rules/memcached-mixin-alerts.yaml + - ../../../monitoring-mixins/mimir-mixin/deploy/mimir-mixin-rules.yaml:/rules/mimir-mixin-rules.yaml + - ../../../monitoring-mixins/mimir-mixin/deploy/mimir-mixin-alerts.yaml:/rules/mimir-mixin-alerts.yaml + - ../../../monitoring-mixins/loki-mixin/deploy/loki-mixin-rules.yaml:/rules/loki-mixin-rules.yaml + - ../../../monitoring-mixins/loki-mixin/deploy/loki-mixin-alerts.yaml:/rules/loki-mixin-alerts.yaml + - ../../../monitoring-mixins/pyroscope-mixin/deploy/pyroscope-mixin-rules.yaml:/rules/pyroscope-mixin-rules.yaml + - ../../../monitoring-mixins/tempo-mixin/deploy/tempo-mixin-rules.yaml:/rules/tempo-mixin-rules.yaml + - ../../../monitoring-mixins/tempo-mixin/deploy/tempo-mixin-alerts.yaml:/rules/tempo-mixin-alerts.yaml + environment: + - MIMIR_ADDRESS=http://gateway:8080 + - MIMIR_TENANT_ID=anonymous + entrypoint: crond -f + restart: always + pyroscope: labels: - logs.agent.grafana.com/log-format=logfmt @@ -186,9 +204,10 @@ services: image: ${PYROSCOPE_IMAGE:-docker.io/grafana/pyroscope:1.5.0} container_name: pyroscope volumes: - - ../../common/config/pyroscope/monolithic-mode-profiles.yaml:/etc/config.yaml + - ../../common/config/pyroscope:/etc/pyroscope + - pyroscope_data:/data command: - - -config.file=/etc/config.yaml + - -config.file=/etc/pyroscope/monolithic-mode-profiles.yaml - -config.expand-env=true environment: <<: *jaeger-environment @@ -201,3 +220,6 @@ services: # expose 34040 port so we can directly access pyroscope inside container ports: - "34040:4040" + +volumes: + pyroscope_data: diff --git a/docker-compose/monolithic-mode/all-in-one/mimirtool.override.yaml b/docker-compose/monolithic-mode/all-in-one/mimirtool.override.yaml deleted file mode 100644 index 09ee4c1b..00000000 --- a/docker-compose/monolithic-mode/all-in-one/mimirtool.override.yaml +++ /dev/null @@ -1,10 +0,0 @@ - -services: - # override included service mimirtool for rules and alerts pre-provisioning - mimirtool: - volumes: - - ../../../monitoring-mixins/loki-mixin/deploy/loki-mixin-rules.yaml:/rules/loki-mixin-rules.yaml - - ../../../monitoring-mixins/loki-mixin/deploy/loki-mixin-alerts.yaml:/rules/loki-mixin-alerts.yaml - - ../../../monitoring-mixins/pyroscope-mixin/deploy/pyroscope-mixin-rules.yaml:/rules/pyroscope-mixin-rules.yaml - - ../../../monitoring-mixins/tempo-mixin/deploy/tempo-mixin-rules.yaml:/rules/tempo-mixin-rules.yaml - - ../../../monitoring-mixins/tempo-mixin/deploy/tempo-mixin-alerts.yaml:/rules/tempo-mixin-alerts.yaml diff --git a/docker-compose/monolithic-mode/logs/.gitignore b/docker-compose/monolithic-mode/logs/.gitignore new file mode 100644 index 00000000..45f9470b --- /dev/null +++ b/docker-compose/monolithic-mode/logs/.gitignore @@ -0,0 +1,7 @@ +* +!.gitignore +!compose.yaml +!grafana.override.yaml +!grafana-agent.override.yaml +!mimirtool.override.yaml +!README.md \ No newline at end of file diff --git a/docker-compose/monolithic-mode/logs/compose.yaml b/docker-compose/monolithic-mode/logs/compose.yaml index b8c5fd49..af591595 100644 --- a/docker-compose/monolithic-mode/logs/compose.yaml +++ b/docker-compose/monolithic-mode/logs/compose.yaml @@ -10,9 +10,8 @@ version: '3.9' include: - path: ../../common/compose-include/minio.yaml - path: ../../common/compose-include/memcached.yaml - - path: ../../common/compose-include/mimir.yaml - path: - - ../../common/compose-include/mimirtool.yaml + - ../../common/compose-include/mimir.yaml - ./mimirtool.override.yaml - path: - ../../common/compose-include/grafana.yaml diff --git a/docker-compose/monolithic-mode/metrics/.gitignore b/docker-compose/monolithic-mode/metrics/.gitignore new file mode 100644 index 00000000..45f9470b --- /dev/null +++ b/docker-compose/monolithic-mode/metrics/.gitignore @@ -0,0 +1,7 @@ +* +!.gitignore +!compose.yaml +!grafana.override.yaml +!grafana-agent.override.yaml +!mimirtool.override.yaml +!README.md \ No newline at end of file diff --git a/docker-compose/monolithic-mode/metrics/compose.yaml b/docker-compose/monolithic-mode/metrics/compose.yaml index a8fca990..a4150219 100644 --- a/docker-compose/monolithic-mode/metrics/compose.yaml +++ b/docker-compose/monolithic-mode/metrics/compose.yaml @@ -10,7 +10,7 @@ version: '3.9' include: - path: ../../common/compose-include/minio.yaml - path: ../../common/compose-include/memcached.yaml - - path: ../../common/compose-include/mimirtool.yaml + - path: ../../common/compose-include/mimir.yaml - path: ../../common/compose-include/grafana.yaml services: @@ -70,27 +70,3 @@ services: interval: 10s timeout: 5s retries: 5 - - mimir: - depends_on: - minio: - condition: service_healthy - image: ${MIMIR_IMAGE:-docker.io/grafana/mimir:2.11.0} - volumes: - - ../../common/config/mimir:/etc/mimir - command: - - -config.file=/etc/mimir/monolithic-mode-metrics.yaml - - -target=all - - -config.expand-env=true - healthcheck: - test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:8080/ready || exit 1" ] - interval: 10s - timeout: 5s - retries: 5 - # expose 38080 port so we can directly access mimir inside container - ports: - - "38080:8080" - networks: - default: - aliases: - - mimir-memberlist diff --git a/docker-compose/monolithic-mode/profiles/.gitignore b/docker-compose/monolithic-mode/profiles/.gitignore new file mode 100644 index 00000000..45f9470b --- /dev/null +++ b/docker-compose/monolithic-mode/profiles/.gitignore @@ -0,0 +1,7 @@ +* +!.gitignore +!compose.yaml +!grafana.override.yaml +!grafana-agent.override.yaml +!mimirtool.override.yaml +!README.md \ No newline at end of file diff --git a/docker-compose/monolithic-mode/profiles/compose.yaml b/docker-compose/monolithic-mode/profiles/compose.yaml index d4f961b4..4a6aaa7e 100644 --- a/docker-compose/monolithic-mode/profiles/compose.yaml +++ b/docker-compose/monolithic-mode/profiles/compose.yaml @@ -10,9 +10,8 @@ version: '3.9' include: - path: ../../common/compose-include/minio.yaml - path: ../../common/compose-include/memcached.yaml - - path: ../../common/compose-include/mimir.yaml - path: - - ../../common/compose-include/mimirtool.yaml + - ../../common/compose-include/mimir.yaml - ./mimirtool.override.yaml - path: - ../../common/compose-include/grafana.yaml diff --git a/docker-compose/monolithic-mode/traces/.gitignore b/docker-compose/monolithic-mode/traces/.gitignore new file mode 100644 index 00000000..45f9470b --- /dev/null +++ b/docker-compose/monolithic-mode/traces/.gitignore @@ -0,0 +1,7 @@ +* +!.gitignore +!compose.yaml +!grafana.override.yaml +!grafana-agent.override.yaml +!mimirtool.override.yaml +!README.md \ No newline at end of file diff --git a/docker-compose/monolithic-mode/traces/compose.yaml b/docker-compose/monolithic-mode/traces/compose.yaml index 31aa09dd..ea727059 100644 --- a/docker-compose/monolithic-mode/traces/compose.yaml +++ b/docker-compose/monolithic-mode/traces/compose.yaml @@ -10,10 +10,9 @@ version: '3.9' include: - path: ../../common/compose-include/minio.yaml - path: ../../common/compose-include/memcached.yaml - - path: ../../common/compose-include/mimir.yaml - path: ../../common/compose-include/loki.yaml - path: - - ../../common/compose-include/mimirtool.yaml + - ../../common/compose-include/mimir.yaml - ./mimirtool.override.yaml - path: - ../../common/compose-include/grafana.yaml diff --git a/docker-compose/read-write-mode/logs/.gitignore b/docker-compose/read-write-mode/logs/.gitignore new file mode 100644 index 00000000..45f9470b --- /dev/null +++ b/docker-compose/read-write-mode/logs/.gitignore @@ -0,0 +1,7 @@ +* +!.gitignore +!compose.yaml +!grafana.override.yaml +!grafana-agent.override.yaml +!mimirtool.override.yaml +!README.md \ No newline at end of file diff --git a/docker-compose/read-write-mode/logs/compose.yaml b/docker-compose/read-write-mode/logs/compose.yaml index 3dd2b254..8388dabb 100644 --- a/docker-compose/read-write-mode/logs/compose.yaml +++ b/docker-compose/read-write-mode/logs/compose.yaml @@ -10,9 +10,8 @@ version: '3.9' include: - path: ../../common/compose-include/minio.yaml - path: ../../common/compose-include/memcached.yaml - - path: ../../common/compose-include/mimir.yaml - path: - - ../../common/compose-include/mimirtool.yaml + - ../../common/compose-include/mimir.yaml - ./mimirtool.override.yaml - path: - ../../common/compose-include/grafana.yaml diff --git a/docker-compose/read-write-mode/metrics/.gitignore b/docker-compose/read-write-mode/metrics/.gitignore new file mode 100644 index 00000000..45f9470b --- /dev/null +++ b/docker-compose/read-write-mode/metrics/.gitignore @@ -0,0 +1,7 @@ +* +!.gitignore +!compose.yaml +!grafana.override.yaml +!grafana-agent.override.yaml +!mimirtool.override.yaml +!README.md \ No newline at end of file diff --git a/docker-compose/read-write-mode/metrics/compose.yaml b/docker-compose/read-write-mode/metrics/compose.yaml index a55e98c0..ab89021d 100644 --- a/docker-compose/read-write-mode/metrics/compose.yaml +++ b/docker-compose/read-write-mode/metrics/compose.yaml @@ -9,7 +9,6 @@ version: '3.9' include: - path: ../../common/compose-include/minio.yaml - path: ../../common/compose-include/memcached.yaml - - path: ../../common/compose-include/mimirtool.yaml - path: ../../common/compose-include/grafana-agent.yaml - path: ../../common/compose-include/grafana.yaml @@ -98,3 +97,19 @@ services: default: aliases: - mimir-memberlist + + mimirtool: + labels: + metrics.agent.grafana.com/scrape: false + image: ${MIMIRTOOL_IMAGE:-docker.io/grafana/mimirtool:2.11.0} + volumes: + - ../../../monitoring-mixins/crontab:/etc/crontabs/root + - ../../../monitoring-mixins/agent-flow-mixin/deploy/agent-flow-mixin-alerts.yaml:/rules/agent-flow-mixin-alerts.yaml + - ../../../monitoring-mixins/memcached-mixin/deploy/memcached-mixin-alerts.yaml:/rules/memcached-mixin-alerts.yaml + - ../../../monitoring-mixins/mimir-mixin/deploy/mimir-mixin-rules.yaml:/rules/mimir-mixin-rules.yaml + - ../../../monitoring-mixins/mimir-mixin/deploy/mimir-mixin-alerts.yaml:/rules/mimir-mixin-alerts.yaml + environment: + - MIMIR_ADDRESS=http://gateway:8080 + - MIMIR_TENANT_ID=anonymous + entrypoint: crond -f + restart: always