-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Weifeng Wang <[email protected]>
Showing
8 changed files
with
50 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
docker-compose/monolithic-mode/logs/grafana-agent.override.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
services: | ||
# override included service grafana-agent entrypoint | ||
grafana-agent: | ||
entrypoint: | ||
- /bin/grafana-agent | ||
- run | ||
- /etc/agent-config/logs.river # Note: Agent use logs.river | ||
- --server.http.listen-addr=0.0.0.0:12345 | ||
- --cluster.enabled=true | ||
- --cluster.join-addresses=grafana-agent-cluster:12345 | ||
- --disable-reporting=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,58 +10,18 @@ version: '3.9' | |
include: | ||
- path: ../../common/compose-include/minio.yaml | ||
- path: ../../common/compose-include/memcached.yaml | ||
- path: ../../common/compose-include/pyroscope.yaml | ||
- path: | ||
- ../../common/compose-include/mimir.yaml | ||
- ./mimirtool.override.yaml | ||
- path: | ||
- ../../common/compose-include/grafana.yaml | ||
- ./grafana.override.yaml | ||
|
||
# # for git remote | ||
# # https://github.com/docker/compose/pull/10811 | ||
# # https://docs.docker.com/engine/reference/commandline/build/#git-repositories | ||
# # - [email protected]:ndeloof/test.git | ||
# - https://github.com/qclaogui/codelab-monitoring.git#main:docker-compose/common/compose-include/minio.yaml | ||
- path: | ||
- ../../common/compose-include/grafana-agent.yaml | ||
- ./grafana-agent.override.yaml | ||
|
||
services: | ||
grafana-agent: | ||
# https://github.com/qclaogui/codelab-monitoring/blob/main/docker-compose/common/config/agent-flow/modules/docker/README.md | ||
labels: | ||
logs.agent.grafana.com/log-format: logfmt | ||
depends_on: { gateway: { condition: service_healthy } } | ||
image: ${AGENT_IMAGE:-docker.io/grafana/agent:v0.40.3} | ||
volumes: | ||
- ../../common/config/agent-flow:/etc/agent-config | ||
- /var/run/docker.sock:/var/run/docker.sock:ro | ||
- /:/rootfs:ro | ||
- /sys:/sys:ro | ||
- /var/lib/docker:/var/lib/docker:ro | ||
entrypoint: | ||
- /bin/grafana-agent | ||
- run | ||
- /etc/agent-config/profiles.river | ||
- --server.http.listen-addr=0.0.0.0:12345 | ||
- --cluster.enabled=true | ||
- --cluster.join-addresses=grafana-agent-cluster:12345 | ||
- --disable-reporting=true | ||
environment: | ||
- AGENT_MODE=flow | ||
- AGENT_CONFIG_FOLDER=/etc/agent-config | ||
healthcheck: | ||
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:12345/ready || exit 1" ] | ||
interval: 5s | ||
timeout: 2s | ||
retries: 10 | ||
ports: | ||
- "12345:12345" | ||
# scale up support | ||
deploy: | ||
replicas: 1 | ||
networks: | ||
default: | ||
aliases: | ||
- grafana-agent-cluster | ||
|
||
gateway: | ||
labels: | ||
metrics.agent.grafana.com/scrape: false | ||
|
@@ -77,27 +37,3 @@ services: | |
interval: 5s | ||
timeout: 2s | ||
retries: 10 | ||
|
||
pyroscope: | ||
depends_on: { minio: { condition: service_healthy } } | ||
image: ${PYROSCOPE_IMAGE:-docker.io/grafana/pyroscope:1.5.0} | ||
container_name: pyroscope | ||
volumes: | ||
- ../../common/config/pyroscope:/etc/pyroscope | ||
- pyroscope_data:/data | ||
command: | ||
- -config.file=/etc/pyroscope/monolithic-mode-profiles.yaml | ||
- -target=all | ||
- -config.expand-env=true | ||
# - -runtime-config.file=/etc/pyroscope/overrides.yaml | ||
healthcheck: | ||
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:4040/ready || exit 1" ] | ||
interval: 5s | ||
timeout: 2s | ||
retries: 10 | ||
# expose 34040 port so we can directly access pyroscope inside container | ||
ports: | ||
- "34040:4040" | ||
|
||
volumes: | ||
pyroscope_data: |
11 changes: 11 additions & 0 deletions
11
docker-compose/monolithic-mode/profiles/grafana-agent.override.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
services: | ||
grafana-agent: # override included service grafana-agent entrypoint | ||
entrypoint: | ||
- /bin/grafana-agent | ||
- run | ||
- /etc/agent-config/profiles.river # Note: Agent use profiles.river | ||
- --server.http.listen-addr=0.0.0.0:12345 | ||
- --cluster.enabled=true | ||
- --cluster.join-addresses=grafana-agent-cluster:12345 | ||
- --disable-reporting=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
docker-compose/monolithic-mode/traces/grafana-agent.override.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
services: | ||
# override included service grafana-agent entrypoint | ||
grafana-agent: | ||
entrypoint: | ||
- /bin/grafana-agent | ||
- run | ||
- /etc/agent-config/traces.river # Note: Agent use traces.river | ||
- --server.http.listen-addr=0.0.0.0:12345 | ||
- --cluster.enabled=true | ||
- --cluster.join-addresses=grafana-agent-cluster:12345 | ||
- --disable-reporting=true |