📜 ⬆️ ⬇️

Alice - REST Monitoring RabbitMQ

Actually I ran into the problem that when using RabbitMQ you need to monitor the server. The system utility rabbitmqctl can be run from the command line, but it could not be started from the application. Something to do with the erlang environment.

After a little googling and communication in the target forumal received a cherished link

This tool will automate server administration:
monitoring and deletion of old queues, connections and exchanges and the number of simultaneous connections.
')
further kr description ...


The RabbitMQ queue server does not have an API for monitoring and statistics. The Alice module allows you to perform the entire set of REST monitoring operations:
/ conn - Current connection information
/ exchanges - Current exchanges information
/ queues - Current queues
/ users - Current users
/ bindings - Current bindings
/ control - Access to the RabbitMQ control
/ permissions - Current permissions
/ vhosts - Current vhosts

start
git clone git://github.com/auser/alice.git
cd alice
./start.sh


Get a list of users
# List users
curl -i localhost:9999/users
HTTP/1.1 200 OK
Server: MochiWeb/1.0 (Any of you quaids got a smint?)
Date: Tue, 04 Aug 2009 07:08:20 GMT
Content-Type: text/json
Content-Length: 19

{"users":["guest"]}

# Viewing a specific user
curl -i localhost:9999/users/guest
HTTP/1.1 200 OK
Server: MochiWeb/1.0 (Any of you quaids got a smint?)
Date: Tue, 04 Aug 2009 08:01:01 GMT
Content-Type: text/json
Content-Length: 17

{"users":"guest"}


Get a list of connections
# List connections
curl -i localhost:9999/conn
HTTP/1.1 200 OK
Server: MochiWeb/1.0 (Any of you quaids got a smint?)
Date: Tue, 04 Aug 2009 07:30:52 GMT
Content-Type: text/json
Content-Length: 287

{"conn":[{"pid":"...","ip":"127.0.0.1","port":"5672","peer_address":"127.0.0.1" ...}]}


Get a list of exchanges
Exchanges

# List the current exchanges
curl -i localhost:9999/exchanges
HTTP/1.1 200 OK
Server: MochiWeb/1.0 (Any of you quaids got a smint?)
Date: Tue, 04 Aug 2009 07:34:14 GMT
Content-Type: text/json
Content-Length: 654

{"exchanges":[{"name":"amq.rabbitmq.log","type":"topic","durable":"true","auto_delete":...}


Get a list of queues
# List the current queues
curl -i localhost:9999/queues
HTTP/1.1 200 OK
Server: MochiWeb/1.0 (Any of you quaids got a smint?)
Date: Tue, 04 Aug 2009 07:35:42 GMT
Content-Type: text/json
Content-Length: 60

{"queues":[{"memory":"212988","name":"noises","vhost":"/"}]}


Get a list of links
# List the current bindings
curl -i localhost:9999/bindings
HTTP/1.1 200 OK
Server: MochiWeb/1.0 (Any of you quaids got a smint?)
Date: Tue, 04 Aug 2009 07:36:13 GMT
Content-Type: text/json
Content-Length: 69

{"bindings":[{"queue":"noises","exchange":"","from_queue":"noises"}]}


there is a possibility to manage the server: start / stop
get / put data into the queue but I have not used it yet.

Source: https://habr.com/ru/post/71328/


All Articles