Skip to content

Update RabbitMQ Dashboards to support latest Grafana versions #5449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions deps/rabbitmq_prometheus/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,41 +70,3 @@ qq: # Make RabbitMQ-Quorum-Queues-Raft panels come alive - HIGH LOAD
.PHONY: dist-metrics
dist-metrics: # Make inet_tcp_metrics come alive
@$(DOCKER_COMPOSE_UP)

JQ := /usr/local/bin/jq
$(JQ):
@brew install jq

# Defined as explicit, individual targets so that autocompletion works
DASHBOARDS_TO_PATH := $(CURDIR)/docker/grafana/dashboards
define GENERATE_DASHBOARD
cd $(DASHBOARDS_TO_PATH) \
&& $(JQ) --slurp add $(@F) ../__inputs.json \
| $(JQ) '.templating.list[].datasource = "$${DS_PROMETHEUS}"' \
| $(JQ) '.panels[].datasource = "$${DS_PROMETHEUS}"'
endef
.PHONY: Erlang-Distribution.json
Erlang-Distribution.json: $(JQ)
@$(GENERATE_DASHBOARD)
.PHONY: Erlang-Memory-Allocators.json
Erlang-Memory-Allocators.json: $(JQ)
@$(GENERATE_DASHBOARD)
.PHONY: Erlang-Distributions-Compare.json
Erlang-Distributions-Compare.json: $(JQ)
@$(GENERATE_DASHBOARD)
.PHONY: RabbitMQ-Overview.json
RabbitMQ-Overview.json: $(JQ)
@$(GENERATE_DASHBOARD)
.PHONY: RabbitMQ-PerfTest.json
RabbitMQ-PerfTest.json: $(JQ)
@$(GENERATE_DASHBOARD)
.PHONY: RabbitMQ-Quorum-Queues-Raft.json
RabbitMQ-Quorum-Queues-Raft.json: $(JQ)
@$(GENERATE_DASHBOARD)
.PHONY: rabbitmq-exporter_vs_rabbitmq-prometheus.json
rabbitmq-exporter_vs_rabbitmq-prometheus.json: $(JQ)
@$(GENERATE_DASHBOARD)
.PHONY: RabbitMQ-Stream.json
RabbitMQ-Stream.json: $(JQ)
@$(GENERATE_DASHBOARD)

2 changes: 1 addition & 1 deletion deps/rabbitmq_prometheus/docker/docker-compose-metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ volumes:
services:
grafana:
# https://hub.docker.com/r/grafana/grafana/tags
image: grafana/grafana:8.0.6
image: grafana/grafana:8.3.4
ports:
- "3000:3000"
networks:
Expand Down
39 changes: 39 additions & 0 deletions deps/rabbitmq_prometheus/docker/grafana/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# RabbitMQ Grafana Dashboards

## Creating or updating dashboards

### Making changes

First, from the `rabbitmq_prometheus` directory, run `make overview metrics` to spin up a local environment using
`docker-compose`. This will provide you with a full Prometheus + Grafana stack, and sample workloads to make the
dashboards 'come alive' with non-zero metrics. To tear down this infrastructure, run `make down`.

Login to `localhost:3000` with the credentials `admin`:`admin` and begin creating / updating your dashboard in the
Grafana UI.

Once you have finished editing your dashboard, navigate to the 'Share' menu next to the name of the dashboard, go to
'Export', and be sure to tick 'Export for sharing externally'. Either save the dashboard JSON to a file or click 'View
JSON' and copy-paste over into this repo.

At this point, you can test your changes work on different versions of Grafana, by editing `services.grafana.image` in
[docker-compose-metrics.yml](../docker-compose-metrics.yml) and running `make metrics` to rebuild the Grafana server.
Be sure to test on the latest version publicly available.

### If creating a new dashboard

You will need some additional files for a new dashboard:

- A description of the dashboard; see [the Erlang-Distribution one](publish/erlang-distribution-11352.md) for example
- Screenshots of the dashboard in action, saved in `./publish/`

### Create a PR

Create a pull request in `rabbitmq-server` with the above changes.

## Making a dashboard available on grafana.com

If you are on the RabbitMQ team, navigate to our GrafanaLabs dashboard at https://grafana.com/orgs/rabbitmq/dashboards,
and log in with the team credentials.

Once a PR is merged, either create a new revision of a dashboard from the JSON checked in under `./dashboards/`, or
create a new dashboard from the JSON.
12 changes: 0 additions & 12 deletions deps/rabbitmq_prometheus/docker/grafana/__inputs.json

This file was deleted.

Loading