forked from rabbitmq/rabbitmq-server
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose-dist-metrics.yml
77 lines (73 loc) · 2.61 KB
/
docker-compose-dist-metrics.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# https://docs.docker.com/compose/compose-file/
version: "3.6"
# https://docs.docker.com/compose/compose-file/#networks
networks:
rabbitmq-prometheus:
# https://docs.docker.com/compose/compose-file/#volumes
volumes:
rabbitmq-prometheus_prometheus:
rabbitmq-prometheus_grafana:
services:
rmq0-dist-metrics: &rabbitmq
# https://network.pivotal.io/products/rabbitmq/
# This is a commercial edition of RabbitMQ that requires a valid Tanzu Network account
# Learn more: https://www.vmware.com/products/rabbitmq.html
image: dev.registry.pivotal.io/rabbitmq/vmware-rabbitmq:1.4.2
networks:
- "rabbitmq-prometheus"
ports:
- "15680:15672"
- "15700:15692"
# https://unix.stackexchange.com/questions/71940/killing-tcp-connection-in-linux
# https://en.wikipedia.org/wiki/Tcpkill
# https://www.digitalocean.com/community/tutorials/iptables-essentials-common-firewall-rules-and-commands#block-an-ip-address
cap_add:
- ALL
hostname: rmq0-dist-metrics
environment:
# RABBITMQ_ERLANG_COOKIE: rabbitmq-prometheus
RABBITMQ_SERVER_START_ARGS: -proto_dist inet_tcp_metrics
# Uncomment the following line if you want debug logs & colour
# RABBITMQ_LOG: debug,+color
volumes:
# This does not work that well on Windows
# https://github.com/rabbitmq/rabbitmq-prometheus/commit/c4b04ea9bae877ff7d22a7085475965016933d91#commitcomment-40660523
- ./erlang.cookie:/var/lib/rabbitmq/.erlang.cookie
- ./rabbitmq-dist-metrics.conf:/etc/rabbitmq/rabbitmq.conf:ro
- ./rabbitmq-dist-metrics-definitions.json:/etc/rabbitmq/rabbitmq-definitions.json:ro
# we want to simulate hitting thresholds
ulimits:
nofile:
soft: 2000
hard: 2000
rmq1-dist-metrics:
<< : *rabbitmq
hostname: rmq1-dist-metrics
ports:
- "15681:15672"
- "15701:15692"
rmq2-dist-metrics:
<< : *rabbitmq
hostname: rmq2-dist-metrics
ports:
- "15682:15672"
- "15702:15692"
qq:
image: &perf-test-image pivotalrabbitmq/perf-test:2.15.0-ubuntu
networks:
- "rabbitmq-prometheus"
environment:
URIS: "amqp://guest:guest@rmq0-dist-metrics:5672/%2f,amqp://guest:guest@rmq1-dist-metrics:5672/%2f,amqp://guest:guest@rmq2-dist-metrics:5672/%2f"
CONFIRM: 50
QUEUE_PATTERN: "qq%d"
QUEUE_PATTERN_FROM: 1
QUEUE_PATTERN_TO: 3
PRODUCERS: 3
CONSUMERS: 3
QUEUE_ARGS: x-queue-type=quorum,x-max-length=1000
FLAG: persistent
AUTO_DELETE: "false"
RATE: 10
AUTOACK: "false"
SERVERS_STARTUP_TIMEOUT: &startup_timeout 30
METRICS_PROMETHEUS: "true"