RabbitMQ - Download and setup rabbitmqadmin

You can download the rabbitmqadmin command line tool by going to http://<hostname>:<http or https port>/cli/rabbitmqadmin in your web browser. The rabbitmqadmin file is a Python script. This should download the rabbitmqadmin tool to your local PC. Or, better yet, the curl command can be used to download the rabbitmqadmin command line tool directly onto your RabbitMQ server.

curl http://$(hostname -s):<port>/cli/rabbitmqadmin > rabbitmqadmin 

 

Over over HTTPS.

curl --insecure https://$(hostname -s):<port>/cli/rabbitmqadmin > rabbitmqadmin 

 

Determine the directories in PATH. You will want to place the rabbitmqadmin file in one of these directories. You'll probably want to use a "bin" directory and not an "sbin" directory, as sudo or root are needed to invoke commands in an "sbin" directory.

~]# echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin

 

Move the rabbitmqadmin tool into one of the directories in PATH.

mv rabbitmqadmin /usr/bin

 

By default, the rabbitmqadmin file will have -rw-r--r-- permissions. Typically, the file is updated to have -rwxr-xr-x permissions.

chmod 755 /usr/bin/rabbitmqadmin

 

You should now be able to use the rabbitmqadmin command, like this.

rabbitmqadmin -help

 

Which should return something like this.

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
--ssl-ca-cert-file=SSL_CA_CERT_FILE
                        PEM format CA certificate file for SSL
--ssl-disable-hostname-verification
                        Disables peer hostname verification
--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

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee

Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.





Please enter 990f8 in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |