アリス-RESTモニタリングRabbitMQ

実際、 RabbitMQを使用する場合、サーバーを監視する必要があるという問題に遭遇しました。 rabbitmqctlシステムユーティリティはコマンドラインから起動できますが、アプリケーションからは機能しませんでした。 アーランの環境に関連する何か。

ターゲットのフォーラムで少しグーグルとコミュニケーションをした後、 切望されたリンクを受け取りまし

このツールは、サーバー管理を自動化します。
古いキュー、接続、交換、および同時接続の数の監視と削除。

詳細説明...


RabbitMQキューサーバーには、監視と統計のためのAPIがありません。 Aliceモジュールを使用すると、REST監視操作のセット全体を実行できます。
/ conn-現在の接続情報
/ exchanges-現在の交換情報
/キュー-現在のキュー
/ users-現在のユーザー
/バインディング-現在のバインディング
/ control-RabbitMQコントロールへのアクセス
/許可-現在の許可
/ vhosts-現在の仮想ホスト

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


ユーザーのリストを取得する
# 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"}


接続のリストを取得する
# 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" ...}]}


交換のリストを取得する
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":...}


キューのリストを取得する
# 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":"/"}]}


リンクのリストを取得する
# 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"}]}


サーバー管理の可能性があります:開始/停止
データをキューに取得/配置しますが、まだ使用していません。

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


All Articles