Learn about the Wavefront RabbitMQ Integration.

RabbitMQ Integration

RabbitMQ is a popular open source message broker. By setting up this integration, you can send RabbitMQ metrics to Wavefront.

  1. RabbitMQ Metrics: This explains the installation and configuration of Telegraf to send RabbitMQ metrics into Wavefront. Telegraf is a light-weight server process capable of collecting, processing, aggregating, and sending metrics to a Wavefront proxy.

  2. RabbitMQ on Kubernetes: This explains the configuration of Wavefront Collector for Kubernetes to scrape RabbitMQ metrics using prometheus plugin.

In addition to setting up the metrics flow, this integration also installs dashboards:

  • RabbitMQ Metrics
  • RabbitMQ on Kubernetes

Here’s the screenshot of RabbitMQ dashboard displaying RabbitMQ metrics scraped using Telegraf plugin:

images/rabbitmq_dashboard.png

To see a list of the metrics for this integration, select the integration from https://github.com/influxdata/telegraf/tree/master/plugins/inputs.

RabbitMQ Setup

Step 1. Install the Telegraf Agent

This integration uses the RabbitMQ input plugin for Telegraf. If you’ve already installed Telegraf on your server(s), you can skip to Step 2.

Log in to your Wavefront instance and follow the instructions in the Setup tab to install Telegraf and a Wavefront proxy in your environment. If a proxy is already running in your environment, you can select that proxy and the Telegraf install command connects with that proxy. Sign up for a free trial to check it out!

Step 2. Enable the RabbitMQ Management Plugin

This integration requires the RabbitMQ Management Plugin to be enabled on the RabbitMQ server.

To enable the management plugin:

sudo rabbitmq-plugins enable rabbitmq_management

Step 3. Configure RabbitMQ Input Plugin

Create a file called rabbitmq.conf in /etc/telegraf/telegraf.d and enter the following snippet:

 [[inputs.rabbitmq]]
  url = "http://your.rabbitmq.server:15672"
  username = "guest"
  password = "guest"

Modify the url, username and password properties appropriately.

Note: The RabbitMQ Management API is accessed over port 15672 by default. Modify the port in the url if different.

To monitor specific nodes, include the nodes property. For example:

  nodes = ["rabbit@node1", "rabbit@node2"]

If not specified metrics for all nodes are gathered.

Configure additional [[inputs.rabbitmq]] entries to monitor multiple RabbitMQ instances. For additional details on the RabbitMQ configuration, refer here.

Step 4. Restart Telegraf

Run sudo service telegraf restart to restart your agent.

RabbitMQ on Kubernetes

Note: These instructions are for monitoring RabbitMQ on Kubernetes where the version for RabbitMQ should be 3.9.0 or above.

Step 1. Enable RabbitMQ Plugins

This integration requires the RabbitMQ Management Plugin, RabbitMQ Prometheus Plugin and RabbitMQ Peer Disocvery Plugin to be enabled on the RabbitMQ server.

To enable the management plugin:

rabbitmq-plugins enable rabbitmq_management

To enable the prometheus plugin:

rabbitmq-plugins enable rabbitmq_prometheus

To enable the peer discovery plugin:

rabbitmq-plugins enable rabbitmq_peer_discovery_k8s

Step 2. Update the Wavefront Collector ConfigMap

If you do not have the Wavefront Collector for Kubernetes installed on your Kubernetes cluster, follow these instructions to add it to your cluster by using Helm or performing Manual Installation. You can check the status of Wavefront Collector and Proxy if you are already monitoring the Kubernetes cluster here.

Edit the Wavefront Collector ConfigMap at runtime using the following command:

kubectl edit configmap collector-config -n wavefront-collector

To enable the Wavefront Collector to discover the RabbitMQ instances and dynamically start collecting metrics, under rabbitmq add the following snippet:

        ## rabbitmq
      - name: rabbitmq
        type: prometheus
        selectors:
          images:
            - 'rabbitmq*'
        port: 15692
        path: /metrics
        scheme: http
        filters:
          metricDenyList:
          - 'rabbitmq.telemetry.*'