Skip to content

Commit

Permalink
move mimirtool to mimir.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: Weifeng Wang <[email protected]>

move inbucket to grafana.yaml

Signed-off-by: Weifeng Wang <[email protected]>

Update pyroscope.yaml

Update compose.yaml

add .gitignore

Signed-off-by: Weifeng Wang <[email protected]>
  • Loading branch information
qclaogui committed Apr 2, 2024
1 parent 5bdb1b9 commit 059c982
Show file tree
Hide file tree
Showing 31 changed files with 189 additions and 107 deletions.
2 changes: 0 additions & 2 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 22 additions & 5 deletions docker-compose/common/compose-include/grafana.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
21 changes: 0 additions & 21 deletions docker-compose/common/compose-include/inbucket.yaml

This file was deleted.

16 changes: 16 additions & 0 deletions docker-compose/common/compose-include/mimir.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 0 additions & 17 deletions docker-compose/common/compose-include/mimirtool.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions docker-compose/common/compose-include/pyroscope.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -20,3 +21,6 @@ services:
# expose 34040 port so we can directly access pyroscope inside container
ports:
- "34040:4040"

volumes:
pyroscope_data:
3 changes: 2 additions & 1 deletion docker-compose/common/config/.env
Original file line number Diff line number Diff line change
Expand Up @@ -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
MEMCACHED_EXPORTER_IMAGE=prom/memcached-exporter:v0.14.2
INBUCKET_IMAGE=inbucket/inbucket:3.0.4
4 changes: 0 additions & 4 deletions docker-compose/common/config/grafana/grafana.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 7 additions & 0 deletions docker-compose/microservices-mode/logs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*
!.gitignore
!compose.yaml
!grafana.override.yaml
!grafana-agent.override.yaml
!mimirtool.override.yaml
!README.md
3 changes: 1 addition & 2 deletions docker-compose/microservices-mode/logs/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions docker-compose/microservices-mode/metrics/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*
!.gitignore
!compose.yaml
!grafana.override.yaml
!grafana-agent.override.yaml
!mimirtool.override.yaml
!README.md
17 changes: 16 additions & 1 deletion docker-compose/microservices-mode/metrics/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
7 changes: 7 additions & 0 deletions docker-compose/microservices-mode/profiles/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*
!.gitignore
!compose.yaml
!grafana.override.yaml
!grafana-agent.override.yaml
!mimirtool.override.yaml
!README.md
3 changes: 1 addition & 2 deletions docker-compose/microservices-mode/profiles/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions docker-compose/microservices-mode/traces/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*
!.gitignore
!compose.yaml
!grafana.override.yaml
!grafana-agent.override.yaml
!mimirtool.override.yaml
!README.md
3 changes: 1 addition & 2 deletions docker-compose/microservices-mode/traces/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions docker-compose/monolithic-mode/all-in-one/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*
!.gitignore
!compose.yaml
!grafana.override.yaml
!grafana-agent.override.yaml
!mimirtool.override.yaml
!README.md
34 changes: 28 additions & 6 deletions docker-compose/monolithic-mode/all-in-one/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -201,3 +220,6 @@ services:
# expose 34040 port so we can directly access pyroscope inside container
ports:
- "34040:4040"

volumes:
pyroscope_data:
10 changes: 0 additions & 10 deletions docker-compose/monolithic-mode/all-in-one/mimirtool.override.yaml

This file was deleted.

7 changes: 7 additions & 0 deletions docker-compose/monolithic-mode/logs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*
!.gitignore
!compose.yaml
!grafana.override.yaml
!grafana-agent.override.yaml
!mimirtool.override.yaml
!README.md
3 changes: 1 addition & 2 deletions docker-compose/monolithic-mode/logs/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions docker-compose/monolithic-mode/metrics/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*
!.gitignore
!compose.yaml
!grafana.override.yaml
!grafana-agent.override.yaml
!mimirtool.override.yaml
!README.md
26 changes: 1 addition & 25 deletions docker-compose/monolithic-mode/metrics/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
7 changes: 7 additions & 0 deletions docker-compose/monolithic-mode/profiles/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*
!.gitignore
!compose.yaml
!grafana.override.yaml
!grafana-agent.override.yaml
!mimirtool.override.yaml
!README.md
Loading

0 comments on commit 059c982

Please sign in to comment.