# Monitoring RabbitMQ?

**URL:** <https://community.dynatrace.com/t/monitoring-rabbitmq/6801>\
**Category:** Extensions\
**Tags:** extensions, queues, dynatrace-api\
**Created:** [July 7, 2017, 12:37pm UTC](https://community.dynatrace.com/t/monitoring-rabbitmq/6801 "2017-07-07T12:37:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![raffaele\_talari](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/raffaele_talari/32/5319_2.png) [@raffaele\_talari](https://community.dynatrace.com/u/raffaele_talari)\
**Post date:** [July 7, 2017, 12:37pm UTC](https://community.dynatrace.com/t/monitoring-rabbitmq/6801/1 "2017-07-07T12:37:25Z")

</div>

Hi there,

is it  
possible to monitor a RabbitMQ (CloudFoundry service) queue size somehow?

If so, how? Would it be possible to pull queue size data using the DynatraceAPI?

Thanks in advance for your help,

Raff

---

<div class="post-metadata">

**Author:** ![Jakub\_Mierzewsk](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jakub_mierzewsk/32/36350_2.png) [@Jakub\_Mierzewsk](https://community.dynatrace.com/u/Jakub_Mierzewsk)\
**Post date:** [July 10, 2017, 9:47am UTC](https://community.dynatrace.com/t/monitoring-rabbitmq/6801/2 "2017-07-10T09:47:37Z")

</div>

Hi Raff,

We have RabbitMQ plugin which runs in OneAgent. If OneAgent can be installed on RabbitMQ host then we will have all metrics form [plugin](https://www.dynatrace.com/blog/introducing-rabbitmq-monitoring-beta/) . If OneAgent could not be install then plugin will not work and API will be needed.

Best,  
Jakub

---

<div class="post-metadata">

**Author:** ![raffaele\_talari](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/raffaele_talari/32/5319_2.png) [@raffaele\_talari](https://community.dynatrace.com/u/raffaele_talari)\
**Post date:** [July 11, 2017, 9:36am UTC](https://community.dynatrace.com/t/monitoring-rabbitmq/6801/3 "2017-07-11T09:36:26Z")

</div>

Hi,

just to add some details about using Dynatrace API for RabbitMQ metrics, here’s a quick guide.

Hope that helps.

Ciao,

Raff

**Dynatrace API – RabbitMQ**

For details about monitoring  
RabbitMQ please refer to these pages:

[https://www.dynatrace.com/blog/introducing-rabbitmq-monitoring-beta/](https://www.dynatrace.com/blog/introducing-rabbitmq-monitoring-beta/)

**API Endpoints:**

- - **Dynatrace SaaS**
- ohttps://{{Tenant}}.live.dynatrace.com/api/v1/
- - **Dynatrace Managed URL Prefix**
- ohttps://{{owndomain}}/e/{{Tenant}}/api/v1/

**RabbitMQ timeseries API invocation:**

https://{{Tenant}}.live.dynatrace.com/api/v1/timeseries

https://{{owndomain}}/e/{{Tenant}}/api/v1/timeseries

\*remember  
to always put the APIToken in the API invocations. That is generated in the UI  
under Settings → Integration → Dynatrace API

All the  
available API parameters here: [Timeseries API v1 — Dynatrace Docs](https://help.dynatrace.com/dynatrace-api/timeseries/how-do-i-fetch-the-metrics-of-monitored-entities/)

**RabbitMQ timeseries API invocation examples:**

Querying  
the average size of the queues in the specified timeframe expressed in Unix  
time milliseconds (useful link for UTC to milliseconds and conversion: [https://currentmillis.com/](https://currentmillis.com/))

https://{{Tenant}}.live.dynatrace.com/api/v1/ **timeseries**? **Api-Token** ={{ApiToken}}& **timeseriesId** =ruxit.python.rabbitmq:queues\_count& **startTimestamp** =1492905600000& **endTimestamp** =1492992000000& **aggregationType** =avg

**Available RabbitMQ metrics (timeseriesId=):**

- **“ruxit.python.rabbitmq:ad\_queues\_no\_consumers”,**
- oAuto-delete  
queues without consumers.
- **“ruxit.python.rabbitmq:channels\_count”**
- oThe  
number of channels (virtual connections). If the number of channels is high,  
you may have a memory leak in your client code.
- **“ruxit.python.rabbitmq:cluster\_channels”**
- oThe  
number of virtual connections (AMPQ connection).
- **“ruxit.python.rabbitmq:cluster\_connections”**
- oThe  
number of TCP connections to the message broker. Frequently opened and closed  
connections can result in high CPU usage. Connections should be long-lived.  
Channels can be opened and closed more frequently.
- **"ruxit.python.rabbitmq:cluster\_consumers”**
- oThe  
number of consumers.
- **“ruxit.python.rabbitmq:cluster\_exchanges”**
- oThe  
number of exchanges.
- **“ruxit.python.rabbitmq:cluster\_messages\_ack”**
- oThe  
rate at which messages are acknowledged by the client/consumer.
- **“ruxit.python.rabbitmq:cluster\_messages\_deliver\_get”**
- oThe  
rate per second of the sum of messages: (1) delivered in acknowledgment mode to  
consumers, (2) delivered in n0-acknowledgment mode to consumers, (3) delivered  
in acknowledgment mode in response to basic.get, (4) delivered in  
n0-acknowledgment mode in response to basic.get.
- **“ruxit.python.rabbitmq:cluster\_messages\_publish”**
- oThe  
rate at which messages are incoming to the RabbitMQ cluster.
- **“ruxit.python.rabbitmq:cluster\_messages\_ready”**
- oThe  
number of messages that are ready to be delivered. This is the sum of messages  
in the messages\_ready status.
- **“ruxit.python.rabbitmq:cluster\_messages\_redeliver”,**
- **“ruxit.python.rabbitmq:cluster\_messages\_return\_unroutable”,**
- **“ruxit.python.rabbitmq:cluster\_messages\_unacknowledged”,**
- oThe  
number of messages delivered to clients, but not yet acknowledged. This is the  
sum of messages in the messages\_unacknowledged status.
- **“ruxit.python.rabbitmq:cluster\_nodes\_failed”,**
- oThe  
number of unhealthy nodes. Please be aware that not every RabbitMQ version  
provides this metric.
- **“ruxit.python.rabbitmq:cluster\_nodes\_ok”,**
- oThe  
number of healthy nodes. Please be aware that note every RabbitMQ version  
provides this metric.
- **“ruxit.python.rabbitmq:cluster\_queues\_crashed”,**
- **“ruxit.python.rabbitmq:cluster\_queues\_down”,**
- **“ruxit.python.rabbitmq:cluster\_queues\_flow”,**
- **“ruxit.python.rabbitmq:cluster\_queues\_idle”,**
- **“ruxit.python.rabbitmq:cluster\_queues\_running”,**
- **“ruxit.python.rabbitmq:connections\_count”,**
- oThe  
number of connections.
- **“ruxit.python.rabbitmq:consumers”,**
- oThe  
number of consumers.
- **“ruxit.python.rabbitmq:disk\_free\_left\_to\_limit”**
- oThe  
percentage of available RabbitMQ disk space. Indicates how much available disk  
space remains before the disk\_free\_limit is reached. Once all available disk  
space is used up, RabbitMQ blocks producers and prevents memory-based messages  
from being paged to disk. This reduces, but doesn’t eliminate, the likelihood  
of a crash due to the exhaustion of disk space.
- **“ruxit.python.rabbitmq:fd\_usage”**
- oThe  
percentage of available file descriptors. RabbitMQ installations running  
production workloads may require system limits and kernel-parameter tuning to  
handle a realistic number of concurrent connections and queues. RabbitMQ  
recommends allowing for at least 65,536 file descriptors when using RabbitMQ in  
production environments. 4,096 file descriptors is sufficient for most  
development workloads. RabbitMQ documentation suggests that you set your file  
descriptor limit to 1.5 times the maximum number of connections you expect.
- **“ruxit.python.rabbitmq:mem\_usage”**
- oThe  
percentage of available RabbitMQ memory. 100% means that the RabbitMQ memory  
limit vm\_memory\_high\_watermark has been reached. (by default, vm\_memory\_high\_watermark is set to 40% of  
installed RAM). Once the RabbitMQ server has used up all available memory, all  
new connections are blocked. Note that this doesn’t prevent the RabbitMQ server  
from using more than its limit—this is merely the point at which publishers are  
throttled.
- **“ruxit.python.rabbitmq:messages\_ready”,**
- oThe  
number of ready messages.
- **“ruxit.python.rabbitmq:messages\_unacknowledged”,**
- oThe  
number of unacknowledged messages.
- **“ruxit.python.rabbitmq:node\_status”,**
- oThe  
status of the node.
- **“ruxit.python.rabbitmq:proc\_usage”,**
- oThe  
percentage of available Erlang processes. The maximum number of processes can  
be changed via the RABBITMQ\_SERVER\_ERL\_ARGS environment variable.
- **“ruxit.python.rabbitmq:queues\_count”,**
- oRabbitMQ’s  
queues are most efficient when they’re empty, so the lower the Queued messages  
count, the better.
- **“ruxit.python.rabbitmq:sockets\_usage”,**
- oThe  
percentage of available Erlang sockets. The required number of sockets is  
correlated with the required number of file descriptors. For more details, see  
the” Controlling System Limits on Linux” section at [www.rabbitmq.com](http://www.rabbitmq.com).
- **“ruxit.python.rabbitmq:status-failed”,**
- on/a
- **“ruxit.python.rabbitmq:status-ok”,**
- on/a
- **“ruxit.python.rabbitmq:topN\_queue\_ack”,**
- on/a
- **“ruxit.python.rabbitmq:topN\_queue\_consumers”,**
- on/a
- **“ruxit.python.rabbitmq:topN\_queue\_deliver\_get”,**
- on/a
- **“ruxit.python.rabbitmq:topN\_queue\_messages\_ready”,**
- on/a
- **“ruxit.python.rabbitmq:topN\_queue\_messages\_unacknowledged”,**
- on/a
- **“ruxit.python.rabbitmq:topN\_queue\_publish”,**
- on/a

**API invocation of available metrics for Dynatrace Plugins:**

https://{{Tenant}}.live.dynatrace.com/api/v1/timeseries?Api-Token={{ApiToken}}& **filter=PLUGIN**

---

<div class="post-metadata">

**Author:** ![hjamal21](https://avatars.discourse-cdn.com/v4/letter/h/e68b1a/32.png) [@hjamal21](https://community.dynatrace.com/u/hjamal21)\
**Post date:** [October 2, 2018, 9:55am UTC](https://community.dynatrace.com/t/monitoring-rabbitmq/6801/4 "2018-10-02T09:55:43Z")

</div>

Can anybody confirm if we need to restart the Rabbit MQ instances after the oneagent deployment?
