[rabbitmq-discuss] Document HTTP API responses?

Simon MacMullen simon at rabbitmq.com
Fri Jun 3 11:02:20 BST 2011

On 02/06/11 21:35, Brian K. Jones wrote:
> I'm testing a Python module that provides an easy way to work with the
> RabbitMQ Management HTTP API. I'm testing against various different
> broker instances, and I'm finding that, although they're the same
> version, there are apparently circumstances that exist which make the
> same call return different collections of attributes across different
> servers.

Hi Brian. You're right, this isn't very well documented. I'll try to 
give an overview here.

There are two reasons why different attributes appear: relevance and 

The first derives from the fact that internally the mgmt plugin works by 
receiving statistics events from the various entities (connections, 
channels, queues) inside the broker. If a certain entity has never done 
something it'll never emit an event related to that - for example if the 
queue has only just been created and never received or delivered any 
messages, it won't have a message_stats attribute. This could also 
happen if fine-grained stats are disabled - the broker simply isn't 
emitting the events in this case. Therefore for stats-related 
attributes, you should always bear in mind that any given metric might 
be unknown.

However, that's not what you are seeing. The presence or absence of 
listeners / nodes etc comes down to the principle that non-administrator 
users are not meant to be able to see any of the structure of the broker 
- so they can't learn about which nodes exist other than the one they 
connect to. They also don't see message rates for vhosts they can't 
access, even when looking at "global" rates, while administrators do.

tl;dr: it depends whether you connect as an administrator or not.

Of course, for monitoring, lots of people want to be able to have a 
monitoring user which does not have administrator rights but can still 
see everything. This will hopefully bubble towards the top of the to-do 
list soon.

Cheers, Simon

Simon MacMullen
Staff Engineer, RabbitMQ
SpringSource, a division of VMware

More information about the rabbitmq-discuss mailing list