Commit Graph

48 Commits

Author SHA1 Message Date
Gerhard Lazu 35a6369327
Restart stream-perf-test on-failure
This handles the scenario where rmq2 is not available, and
stream-perf-test exits with a non-zero exit code. Good spot @ansd!

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-07-30 11:25:36 +01:00
David Ansari 47d572908d Convert string to integer for ulimits.nofile
Before this commit:

> make overview metrics
services.rmq1.ulimits.nofile.hard must be a integer
make: *** [Makefile:68: overview] Error 15

Accoring to the docs
https://docs.docker.com/compose/compose-file/compose-file-v3/#ulimits
this must be an integer.
2021-07-30 09:46:38 +02:00
Gerhard Lazu 6f5c4118ea
Publish RabbitMQ-Stream dashboard to grafana.com
Removed the Dockerfile and slimmed down the Makefile, all of this is now
handled by https://github.com/rabbitmq/rabbitmq-server/blob/master/.github/workflows/oci.yaml
cc @Zerpet @pjk25

More details here (including the steps used to publish to grafana.com):
https://github.com/rabbitmq/release-engineering/issues/11#issuecomment-887627938

I don't want to hold up this PR, will invest in automating the
steps described in the previous link another time. Time to 🚀

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-07-29 19:34:05 +01:00
David Ansari 377a933f4c
Filter Grafana dashboards by namespace (#2719)
So that clusters with the same rabbitmq_cluster name in different K8s namespaces don't clash

Namespace filter comes first, because the order of the layers is namespace -> cluster -> node

Tested with the latest 3.9.0 dev build

We had to account for plugin changes from .ez to directories & the management.load_definitions deprecation which would prevent a node from booting (fixed in 07a0dd7438). This commit didn't make it through the 3.9.x pipeline yet, so there is no 3.9.0 dev build with this fix yet. The simplest fix is to drop `management.` from the load_definitions config.

The next manual step is to generate all dashboards using e.g. `make RabbitMQ-Overview.json > ~/Downloads/RabbitMQ-Overview.json` and upload them to https://grafana.com/orgs/rabbitmq

Great contribution @ansd, thank you 👏🏻
2021-01-18 18:45:05 +00:00
Gerhard Lazu 8f7953438e Fix Erlang cookie when running with Docker Compose on Windows
Context:
9452cf179b (commitcomment-40660523)

Thanks @wainwrightmark!

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2020-07-17 10:28:14 +01:00
Gerhard Lazu 9452cf179b Mount .erlang.cookie file
Context: we want to move away from environment variables and use either
config files or env files (such as the rabbitmq-env.conf).

Since .erlang.cookie is neither, the official RabbitMQ Docker image
handles this by writing the value from the RABBITMQ_ERLANG_COOKIE env
var into the file if it does not exist. The problem is that if this file
exists, and the value is different from the RABBITMQ_ERLANG_COOKIE env
var, CLI tools will not be able to communicate with the rabbit node, as
described here: https://github.com/rabbitmq/rabbitmq-cli/issues/443

The only gotcha is that this file must be owned by the user, and
privileges should not be too open (git should have captured this). If
not, RabbitMQ will fail to boot. This is somewhat similar to how OpenSSH
reacts when private key permissions are too open.

re https://github.com/docker-library/rabbitmq/pull/422#issuecomment-650074731

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2020-07-01 17:07:16 +01:00
Gerhard Lazu a6f6244c85 Build Docker image from latest 3.9 dev release + this PR
Update OTP to latest stable, 23.0.2

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2020-06-18 11:52:16 +01:00
Gerhard Lazu eca19f7dd9 Bump versions across a number of deps
- RabbitMQ latest 3.9 dev build
- OpenSSL - https://github.com/docker-library/rabbitmq/pull/403
- OTP, PerfTest, Prometheus & Grafana latest GA

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
(cherry picked from commit b25b4e897337d97edbf6a826b0f12d20ea7cf914)
2020-04-22 18:12:21 +01:00
Gerhard Lazu d64361658a Bump to latest unverified generic-unix 3.9 dev build
Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2020-02-12 19:00:00 +00:00
Gerhard Lazu 92ef32d022 Build image with latest RabbitMQ 3.9.0 dev + local
Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2020-02-11 13:29:29 +00:00
Gerhard Lazu c079459e9c Bump Docker image to latest RabbitMQ 3.9 dev
Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2020-02-10 17:49:06 +00:00
Gerhard Lazu e91e4ea32b Bump to latest RabbitMQ 3.9.0 dev build & Erlang/OTP v22.2.6
Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2020-02-06 17:57:31 +00:00
Gerhard Lazu f632014e2c Bump RabbitMQ to latest dev & OTP to latest stable
Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2020-01-15 19:02:33 +00:00
Gerhard Lazu 5602a9eb4c Update Docker image to latest dev
Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2020-01-07 16:11:57 +00:00
Gerhard Lazu 0af70418b9 Bump OTP to latest stable & RabbitMQ to latest dev in Dockerfile
Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2019-12-20 10:07:58 +00:00
Gerhard Lazu 79284d0b02 Bump RabbitMQ to latest alpha 2019-12-03 11:26:40 +00:00
Gerhard Lazu 1723ac4357 Bump RabbitMQ to latest dev version + master
Makes it easy to test
https://github.com/rabbitmq/rabbitmq-prometheus/issues/19
2019-11-26 21:44:10 +00:00
Gerhard Lazu 098387db8b Bump to latest RabbitMQ 3.9.x alpha, OTP & PerfTest stable 2019-10-30 13:36:48 +00:00
Gerhard Lazu 33f03d9aa1 Bump Erlang/OTP & RabbitMQ versions to latest 2019-10-21 13:30:04 +01:00
Gerhard Lazu 722ce8bf86 Add RabbitMQ-Perftest Grafana dashboard & wire all PerfTest instances
[#168734745]
2019-10-03 17:39:09 +01:00
Gerhard Lazu 59ef1f1fa2 Update OTP, RabbitMQ & PerfTest images to latest versions
Once 3.8.0 got released, master became 3.9.x, so we are now tracking
RabbitMQ 3.9 dev builds.
2019-10-02 13:11:21 +01:00
Gerhard Lazu c2aef07678 Bump OTP to latest stable & RabbitMQ to latest 3.8 dev 2019-09-26 17:33:39 +01:00
Gerhard Lazu aaedcef4a5 Bump RabbitMQ & PerfTest Docker image versions
[#167846096]
2019-09-04 12:52:46 +01:00
Gerhard Lazu 1e5f4de4cb Rename process-related metrics to stay closer to conventions
While `process_open_fds` would have been ideal, because the value is
cached within RabbitMQ, and computed differently across platforms, it is
important to keep the distinction from, say, what the kernel reports
just-in-time.

I am also capturing the Erlang context by adding `erlang_` to the
relevant metrics. The full context is: RabbitMQ observed this Erlang VM
process metric to be X, so this is why some metrics are prefixed with
`rabbitmq_erlang_process_`

Because there is a difference betwen what RabbitMQ limits are set to,
e.g. `rabbitmq_memory_used_limit_bytes`, vs. what RabbitMQ reports about
the Erlang process, e.g. `rabbitmq_erlang_process_memory_used_bytes`.

This is the best that we can do while staying honest about what is being
reported. cc @brian-brazil

[#167846096]
2019-09-03 12:30:48 +01:00
Gerhard Lazu 2e686f1131 Continue updating RabbitMQ-Overview dashboard to use the new info metric
[#167846096]
2019-08-27 17:11:41 +01:00
Gerhard Lazu 052d92c74b Replace global labels with build_info & identity_info metrics
This started in the context of prometheus/docs#1414, specifically
https://github.com/prometheus/docs/pull/1414#issuecomment-520505757

Rather than labelling all metrics with the same label, we are
introducing 2 new metrics: rabbitmq_build_info & rabbitmq_identity_info.

I suspect that we may want to revert deadtrickster/prometheus.erl#91
when we agree that the proposed alternative is better.

We are yet to see through changes in Grafana dashboards. I am most
interested in how the updated queries will look like and, more
importantly, if we will have the same panels as we do now. More commits
to follow shortly, wanted to get this out the door first.

In summary, this commit changes:

    # TYPE erlang_mnesia_held_locks gauge
    # HELP erlang_mnesia_held_locks Number of held locks.
    erlang_mnesia_held_locks{node="rabbit@920f1e3272af",cluster="rabbit@920f1e3272af",rabbitmq_version="3.8.0-alpha.806",erlang_version="22.0.7"} 0
    # TYPE erlang_mnesia_lock_queue gauge
    # HELP erlang_mnesia_lock_queue Number of transactions waiting for a lock.
    erlang_mnesia_lock_queue{node="rabbit@920f1e3272af",cluster="rabbit@920f1e3272af",rabbitmq_version="3.8.0-alpha.806",erlang_version="22.0.7"} 0
    ...

To this:

    # TYPE erlang_mnesia_held_locks gauge
    # HELP erlang_mnesia_held_locks Number of held locks.
    erlang_mnesia_held_locks 0
    # TYPE erlang_mnesia_lock_queue gauge
    # HELP erlang_mnesia_lock_queue Number of transactions waiting for a lock.
    erlang_mnesia_lock_queue 0
    ...
    # TYPE rabbitmq_build_info untyped
    # HELP rabbitmq_build_info RabbitMQ & Erlang/OTP version info
    rabbitmq_build_info{rabbitmq_version="3.8.0-alpha.809",prometheus_plugin_version="3.8.0-alpha.809-2019.08.15",prometheus_client_version="4.4.0",erlang_version="22.0.7"} 1
    # TYPE rabbitmq_identity_info untyped
    # HELP rabbitmq_identity_info Node & cluster identity info
    rabbitmq_identity_info{node="rabbit@bc7aeb0c2564",cluster="rabbit@bc7aeb0c2564"} 1
    ...

[#167846096]
2019-08-15 16:00:29 +01:00
Gerhard Lazu 4aa3871194 Use different names for *_process_reductions_total metrics
It is invalid to have multiple metrics with the same name, TYPE & HELP,
but differing labels.

[#167846096]
2019-08-14 16:17:48 +01:00
Gerhard Lazu b297d7b9eb Set cluster name via config
Now that there is a 3.8 alpha build that includes
rabbitmq/rabbitmq-server#2075, let's make use of it!

Without this, when a new cluster was started, some nodes ended up wtih
`rabbit@localhost` for the cluster label, instead of e.g. `rmq-gcp-38`.
The main suspect was a race condition, where the rabbitmq_prometheus app
starts before the cluster name is set via `rabbitmqctl
set_cluster_name`.

[finishes #167835770]
2019-08-13 15:50:01 +01:00
Gerhard Lazu 62dc0543cc Update RabbitMQ version to latest alpha 2019-08-08 18:38:56 +01:00
Gerhard Lazu 9970059bc2 Bump RabbitMQ & PerfTest images to latest
PerfTest image includes rabbitmq/rabbitmq-perf-test#212
2019-07-22 13:59:49 +01:00
Gerhard Lazu c2a49d1513 Build on top of latest published RabbitMQ alpha version 2019-07-17 14:51:16 +01:00
Gerhard Lazu 4dec886e52 Add greedy-consumer to simulate unhealthy unack'ed messages
Re-order apps to nodes so that graphs show in a certain colour that
matches everything else. Little details like these matter.

[#165818779]
2019-06-27 19:26:05 +01:00
Gerhard Lazu 30eab6b0ac Build Docker image with latest alpha & make it easier next time 2019-06-26 11:35:17 +01:00
Gerhard Lazu 201365278d Update Docker image to latest 2019-06-25 11:47:57 +01:00
Gerhard Lazu 0a5b355ee3 Build Docker image with latest ra metrics tweaks
rabbitmq/ra#98

[#166819045]
2019-06-24 18:26:48 +01:00
Gerhard Lazu 31aa440bc4 Bump Erlang to latest stable & RabbitMQ to latest alpha 2019-06-20 20:10:02 +01:00
Gerhard Lazu 4b78d41055 Improve node naming, standardise the colour pinning regex 2019-06-17 22:20:54 +01:00
Gerhard Lazu 6daccf9b88 Improve node colour pinning
* start from 0, not 1
* fix colour pinning for nodes with numbers - e.q. rmq-gcp-38
2019-06-17 19:04:28 +01:00
Gerhard Lazu 22e59f3cf4 Use latest RabbitMQ 3.8.0 alpha release 2019-06-13 09:54:41 +01:00
Gerhard Lazu 7339c2efe3 Update to latest RabbitMQ 3.8 alpha 2019-06-10 10:33:17 +01:00
Gerhard Lazu 4ea1e4b29d Update to latest perf-test
Fixes rabbitmq/rabbitmq-perf-test#207
2019-06-10 10:08:16 +01:00
Gerhard Lazu 8f061f31e6 Bump to latest RabbitMQ & PerfTest images
This will be helpful to continue rabbitmq/rabbitmq-perf-test#207
2019-06-06 17:31:44 +01:00
Gerhard Lazu e7fa4a2753 Bump Erlang/OTP to 22.0.2 2019-06-03 17:59:57 +01:00
Gerhard Lazu 6eeeb6b0b4 Set up separate clusters for Overview & Distribution metrics
This will allow to simulate multiple clusters feeding metrics into
Prometheus & Grafana.

[#165818813]
2019-05-30 13:56:17 +01:00
Gerhard Lazu 931e07455e Extract metrics services into a separate docker-compose file
Add cadvisor & node-exporter & Docker metrics.
Inspired by https://github.com/stefanprodan/dockprom
There are no Grafana dashboards for these metrics yet. The dockprom ones
don't show any panels in Grafana 6.

[#165818813]
2019-05-30 13:53:02 +01:00
Gerhard Lazu 6e614301d0 Bump Grafana & Prometheus images to latest stable 2019-05-30 09:36:52 +01:00
Gerhard Lazu 21aa9e9e68 Awlays install Grafana plugins
Even though this slows down Grafana container startup, we need to ensure
that this plugin is present, otherwise the panels that track process
state won't work. This will be slow the first time the plugin is
downloaded, and slightly faster on subsequent runs.

[#166004512]
2019-05-30 09:35:12 +01:00
Gerhard Lazu 2645082738 Finish Erlang Distribution Grafana dashboard
Includes Erlang node to colour pinning

Adds a few make targets to help with docker-compose repetitive commands
& Grafana dashboard updates.

Split Overview & Distribution Docker deployments

re deadtrickster/prometheus.erl#92

[finishes #166004512]
2019-05-29 18:19:09 +01:00