前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >RabbitMQ 的CLI管理工具 rabbitmqadmin(7)

RabbitMQ 的CLI管理工具 rabbitmqadmin(7)

作者头像
franket
发布2021-11-25 22:40:24
3200
发布2021-11-25 22:40:24
举报
文章被收录于专栏:技术杂记技术杂记

rabbitmqadmin

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


获取 rabbitmqadmin

在web UI管理界面中,的 /cli/ 下可以下载此脚本

mq_cli.png
mq_cli.png

点击【here】会呈现脚本内容

mq_physcript.png
mq_physcript.png

但是有些情况下,并没条件使用Web UI,使用下面的方法一样可以获取这个脚本

代码语言:javascript
复制
[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 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • rabbitmqadmin
    • 获取 rabbitmqadmin
    领券
    问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档