rabbitmqadmin 可以完成和 Web UI 一样的工作,它其实是使用Python写的一个脚本,实现了一个http client
The management plugin ships with a command line tool rabbitmqadmin which can perform the same actions as the web-based UI, and which may be more convenient for use when scripting. Note that rabbitmqadmin is just a specialised HTTP client; if you are contemplating invoking rabbitmqadmin from your own program you may want to consider using the HTTP API directly
在web UI管理界面中,的 /cli/
下可以下载此脚本
点击【here】会呈现脚本内容
但是有些情况下,并没条件使用Web UI,使用下面的方法一样可以获取这个脚本
[root@h102 rabbitmq]# wget http://localhost:15672/cli/rabbitmqadmin
--2016-04-18 19:47:50-- http://localhost:15672/cli/rabbitmqadmin
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:15672... failed: Connection refused.
Connecting to localhost|127.0.0.1|:15672... connected.
HTTP request sent, awaiting response... 200 OK
Length: 34504 (34K) [text/plain]
Saving to: “rabbitmqadmin”
100%[===================================================================================================>] 34,504 --.-K/s in 0s
2016-04-18 19:47:50 (155 MB/s) - “rabbitmqadmin” saved [34504/34504]
[root@h102 rabbitmq]# ll rabbitmqadmin
-rw-r--r-- 1 root root 34504 Apr 18 19:29 rabbitmqadmin
[root@h102 rabbitmq]# file rabbitmqadmin
rabbitmqadmin: a /usr/bin/env python script text executable
[root@h102 rabbitmq]#
[root@h102 rabbitmq]# chmod +x rabbitmqadmin
[root@h102 rabbitmq]# ./rabbitmqadmin --help
Usage
=====
rabbitmqadmin [options] subcommand
Options
=======
--help, -h show this help message and exit
--config=CONFIG, -c CONFIG
configuration file [default: ~/.rabbitmqadmin.conf]
--node=NODE, -N NODE node described in the configuration file [default:
'default' only if configuration file is specified]
--host=HOST, -H HOST connect to host HOST [default: localhost]
--port=PORT, -P PORT connect to port PORT [default: 15672]
--path-prefix=PATH_PREFIX
use specific URI path prefix for the RabbitMQ HTTP API
(default: blank string) [default: ]
--vhost=VHOST, -V VHOST
connect to vhost VHOST [default: all vhosts for list,
'/' for declare]
--username=USERNAME, -u USERNAME
connect using username USERNAME [default: guest]
--password=PASSWORD, -p PASSWORD
connect using password PASSWORD [default: guest]
--quiet, -q suppress status messages [default: True]
--ssl, -s connect with ssl [default: False]
--ssl-key-file=SSL_KEY_FILE
PEM format key file for SSL
--ssl-cert-file=SSL_CERT_FILE
PEM format certificate file for SSL
--format=FORMAT, -f FORMAT
format for listing commands - one of [raw_json, long,
pretty_json, kvp, tsv, table, bash] [default: table]
--sort=SORT, -S SORT sort key for listing queries
--sort-reverse, -R reverse the sort order
--depth=DEPTH, -d DEPTH
maximum depth to recurse for listing tables [default:
1]
--bash-completion Print bash completion script [default: False]
--version Display version and exit
More Help
=========
For more help use the help subcommand:
rabbitmqadmin help subcommands # For a list of available subcommands
rabbitmqadmin help config # For help with the configuration file
[root@h102 rabbitmq]#
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。