[rabbitmq-discuss] Management API questions

Simon MacMullen simon at rabbitmq.com
Mon Jan 10 10:53:40 GMT 2011


On 10/01/11 09:00, James Casey wrote:
> I've written some Nagios plugins using the management API :
> <http://github.com/jamesc/nagios-plugins-rabbitmq>  to do some remote
> monitoring of a broker.

Cool!

> I just wanted to clarify some things I see
> when running them.
>
> Currently I use 2 API calls:
>
> 1)  /api/aliveness-test
>
> I have a question here - is it understood that testing only 1 vhost is
> enough to check the aliveness of the broker, or should all vhosts be
> tested?

It should be. The vhost is required for that call because the test does 
some work; it needs a vhost to do it in. However, while I can't 
necessarily predict all failure scenarios, it's very hard to think of 
one that would break one vhost and leave others working; vhosts are 
quite shallow inside Rabbit.

> 2) /api/nodes
>
> I want to reduce the permissions of the monitoring user to the
> minimum, in particular to not give it admin rights.  But I note that
> /api/nodes is protected and only accessible by admin (while other
> generic calls such as /api/overview) are not.  Is this a design
> decision or a bug ?

Somewhere in between I think. In future the user might be able to start 
/ stop nodes, which would certainly require admin rights. I'm not sure 
there's a good reason other than that. I'll have a look at this.

By the way, I had a look in the plugin code and I see you're pulling 
down /api/nodes/rabbit@(shortname). Is there a reason not to use 
/api/nodes, which will return detail for all nodes (if there's more than 
one node in the cluster)?

> Anyway, the management API is great and has made it very easy to write
> these nagios checks.

Thanks!

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



More information about the rabbitmq-discuss mailing list