Install RabbitMQ on CentOS (RHEL)

Install erlang

rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
yum install erlang

Install RabbitMQ

rpm --import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
rpm -Uvh http://www.rabbitmq.com/releases/rabbitmq-server/v3.2.1/rabbitmq-server-3.2.1-1.noarch.rpm

Start the RabbitMQ server

chkconfig rabbitmq-server on
/etc/init.d/rabbitmq-server start

Configure SSL

Install RabbitMQ certificate authority and certificates

mkdir -p /etc/rabbitmq/ssl

Copy the following generated SSL files to the newly created SSL directory on the RabbitMQ server. These files were created by following the self-signed SSL certificates instructions.

cp /tmp/ssl_certs/sensu_ca/cacert.pem /etc/rabbitmq/ssl
cp /tmp/ssl_certs/server/cert.pem /etc/rabbitmq/ssl
cp /tmp/ssl_certs/server/key.pem /etc/rabbitmq/ssl

Configure the RabbitMQ SSL listener

vi /etc/rabbitmq/rabbitmq.config

[
    {rabbit, [
    {ssl_listeners, [5671]},
    {ssl_options, [{cacertfile,"/etc/rabbitmq/ssl/cacert.pem"},
                   {certfile,"/etc/rabbitmq/ssl/cert.pem"},
                   {keyfile,"/etc/rabbitmq/ssl/key.pem"},
                   {verify,verify_peer},
                   {fail_if_no_peer_cert,true}]}
  ]}
].

Restart RabbitMQ.

/etc/init.d/rabbitmq-server restart

Create credentials

Create a RabbitMQ vhost for Sensu

rabbitmqctl add_vhost /sensu

Create a RabbitMQ user with permissions for the vhost

Be sure to change mypass to something secretive.

rabbitmqctl add_user sensu mypass
rabbitmqctl set_permissions -p /sensu sensu ".*" ".*" ".*"

Enable the RabbitMQ web management console

rabbitmq-plugins enable rabbitmq_management

The web UI is located at: http://server-name:15672/
user/password : guest/guest

The HTTP API and its documentation are both located at: http://server-name:15672/api/ (or view our latest HTTP API documentation here).

Download rabbitmqadmin at: http://server-name:15672/cli/