petrovich
petrovich

Reputation: 115

Monitoring rabbitmq (v 3.6.8) with prometheus

I have a challenge - build and release monitoring system in consist of RabbitMQ cluster (with 3 nodes) and standalone Grafana server for visualisation metrics.

I have found in official documentation of prometheus plugin for RabbitMQ (documentation) next section:

This plugin is new as of RabbitMQ 3.8.0.

But i have cluster of version 3.6.8 and when i run the next command

rabbitmq-plugins enable rabbitmq_prometheus

The output is:

Error: The following plugins could not be found: rabbitmq_prometheus

Upgrade the cluster now is not possible and my question is:

How do i may configure monitoring of the cluster without upgrade it and with prometheus (preferred option) and grafana?

Thanks in advance!

Upvotes: 1

Views: 8927

Answers (1)

Michael Doubez
Michael Doubez

Reputation: 6863

The Prometheus plugin is not the only way to monitor a RabbitMQ cluster.

You can also use the rabbitmq exporter in sidecar. If you are not on a docker platform, you can download the exporter from the release assets and install it as a service somewhere.

It would be best to install the exporter on every server hosting the RabbitMQ node because:

  • you will need to have as many install as there are nodes (Prometheus is service oriented monitoring)
  • from the settings, the exporter is accessing the management plugin interface of RabbitMQ; it should stay bound to localhost to reduce attack surface

If your hands are really tied, you can deploy them anywhere (let say on the same server) and point each exporter to a different RabbitMQ node. Prometheus configuration can then identify the underlying service.

  - job_name: rabbitmq
    honor_labels: true
    static_configs:
      - targets: ['monitoring-server:97001']
        labels:
          instance: 'rabbitmq_node_A'
      - targets: ['monitoring-server:97002']
        labels:
          instance: 'rabbitmq_node_B'
      # or play with relabeling to acchieve the same.

An important drawback is that there are more cases where the exporter may not be able to access RabbitMQ and you end up alert on events not impacting your RabbitMQ cluster.

Upvotes: 2

Related Questions