Commit Graph

521 Commits

Author SHA1 Message Date
Gerhard Lazu e8e224cc57 Expose management & prometheus ports for all RabbitMQ nodes
* rabbitmq1 - http://localhost:15672 & http://localhost:15692/metrics
* rabbitmq2 - http://localhost:25672 & http://localhost:25692/metrics
* rabbitmq3 - http://localhost:35672 & http://localhost:35692/metrics

[#164374321]
2019-04-16 15:48:43 +01:00
Gerhard Lazu 307585568a Add amqp_client build dep
Otherwise it fails to compile in a clean umbrella
2019-04-16 12:48:05 +01:00
Gerhard Lazu e6af0c39fe Remove table legend from metrics
Makes the graphs look too busy

[#164374321]
2019-04-15 19:21:22 +01:00
Gerhard Lazu d61c58d0d6 Capture a 3-node RabbitMQ & Prometheus + Grafana stack
cd docker && docker-compose up

[#164374321]
2019-04-15 19:18:45 +01:00
Gerhard Lazu 394426559e Add RabbitMQ Overview Grafana dashboard
Captures all nodes metrics shown on the Overview page:

* File descriptors
* Socket descriptors
* Erlang processes
* Memory
* Disk

Not displaying any limits since they would make the variations
impossible to see. For example, when file descriptors go for 90 to 30,
if one of the metrics on the graph is 1048576 (Docker image default for
rabbitmq_node_sockets_total), it's impossible to see the metric change
from 90 to 30. The same problem is present in the current RabbitMQ Management
graphs on the node page, under Node statistics.

No thresholds have been set. Threshold values must be defined as
integers in Grafana 6, we can't reference metrics e.g.
rabbitmq_node_sockets_total. Templating the dashboard would be one way,
but the problem with that is keeping it in sync with limits. It's a more
difficult problem than meets the eye, deferring it for now.

Created on Grafana v6.1

[finishes #164374321]
2019-04-15 13:30:13 +01:00
Gerhard Lazu 891c304981 Add make targets to build & publish Docker image
Dockerfile is based on
https://github.com/docker-library/rabbitmq/blob/master/3.8-rc/ubuntu/Dockerfile
+
https://github.com/docker-library/rabbitmq/blob/master/3.8-rc/ubuntu/management/Dockerfile
2019-04-15 11:32:54 +01:00
Gerhard Lazu 802417c921 Avoid an extra function call, prepend_node_label
Thanks @dcorbacho!
2019-04-15 10:46:46 +01:00
Gerhard Lazu c513beb926 Prepend node label to all metrics, including totals 2019-04-10 12:57:16 +01:00
Gerhard Lazu c5d5c04b3b Convert certain metrics from gauges to counters
They are cumulative and can only increase or be reset to zero on
restart: https://prometheus.io/docs/concepts/metric_types/#counter
2019-04-10 11:59:18 +01:00
Gerhard Lazu d05f64b070 Remove prometheus_cowboy & prometheus_httpd deps
They are not needed
2019-04-10 11:51:27 +01:00
Gerhard Lazu 5f9e7ff212 Do not import functions that are not being used 2019-04-10 11:49:31 +01:00
Gerhard Lazu 113cc7294b Use register_collector/1 and the default registry 2019-04-10 11:21:47 +01:00
Gerhard Lazu e61a5efde9 Use latest deps, depend on rabbitmq_management_agent + add node label
Bumping all prometheus-related deps to latest stable. Defining them in
rabbitmq-components.mk, so that they can be promoted to all deps in
umbrella.

rabbitmq_management_agent is required for alarm-related metrics to be
available.

Added node label to most `rabbitmq_` metrics. I need help adding them to
mfa_totals - metrics_node_label_test test currently fails. The new unit
tests ensure that label/0 behaves as expected in all cases - made
refactoring easy. Run unit tests via:

    gmake eunit EUNIT_MODS=prometheus_rabbitmq_core_metrics_collector

Updating to latest erlang.mk makes running eunit tests much faster: 2s
vs 10s. To do this, comment `ERLANG_MK_*` in Makefile and run `gmake
erlank-mk`.
2019-04-09 17:02:40 +01:00
Michael Klishin 08be918234 Change default port to 15692 2019-04-01 18:00:39 +03:00
Michael Klishin 492908ee1d README updates, point out project immaturity 2019-04-01 17:57:40 +03:00
Michael Klishin 8cfeaea344 Sync Code of Conduct doc with other RabbitMQ subprojects 2019-04-01 17:57:18 +03:00
Michael Klishin 7fc23b8ce0 License files 2019-04-01 17:57:00 +03:00
Diana Corbacho 46431063a3 Support only text format and (optional) gzip encoding
Since Prometheus 2.0 protobuf is not longer a supported format
2019-03-13 14:36:49 +00:00
Diana Corbacho 01c81e07e9 Metrics rename to follow Prometheus naming convetions 2019-03-13 14:36:49 +00:00
Diana Corbacho 1180d13285 Remove dependency from prometheus_httpd and prometheus_cowboy 2019-03-13 14:36:49 +00:00
Diana Corbacho 0490a43f17 Core metrics prometheus collector 2019-03-13 14:36:44 +00:00