Sensu Server in Ubuntu

Server Installation on Ubuntu 

Install Rabbitmq

apt-get install -y erlang-nox 
echo "deb testing main" >/etc/apt/sources.list.d/rabbitmq.list
wget -q -O- | apt-key add -
apt-get install rabbitmq-server

Make some certs (Thanks to Joe Miller for creating this cert bundle):
git clone git://
./ clean
./ generate

Add vhost and user

rabbitmqctl add_vhost /sensu
rabbitmqctl add_user sensu PIsensurabbit1
rabbitmqctl set_permissions -p /sensu sensu ".*" ".*" ".*"

Add certs to /etc/rabbitmq/rabbitmq.config:

{rabbit, [
    {ssl_listeners, [5671]},
    {ssl_options, [{cacertfile,"/etc/rabbitmq/ssl/cacert.pem"},

Install Redis

apt-get install redis

Install Sensu

wget -q -O- | sudo apt-key add -
cat "deb sensu main" > /etc/apt/sources.list.d/sensu.sources.list
apt-get install sensu
mkdir /etc/sensu/ssl 

Install the certs from rabbit into sensu
cd /etc/ssl/rabbitmq/
cp client_key.pem client_cert.pem /etc/sensu/ssl/

Config sensu server

Edit /etc/sensu/config.json

Config sensu client

Edit /etc/sensu/conf.d/client.json

    "client": {
    "name": "sensu-server.dom.tld",
    "address": "",
    "subscriptions": [ "test" ]

Start the server
sudo /etc/init.d/sensu-server start
sudo /etc/init.d/sensu-api start
sudo /etc/init.d/sensu-client start
sudo /etc/init.d/sensu-dashboard start

Install sensu-admin
sudo apt-get install libmysql-ruby libmysqlclient-dev
sudo apt-get install libsqlite3-0 libsqlite3-dev 

You'll want to install the sensu-admin cookbook from: 
It requires a reasonably recent version of the mysql cookbook. 
% knife cookbook install mysql chef-sensu-admin-master

Then install the sensu-admin-master recipe, run chef-client on the host, and watch the magic happen.
This will install nginx and listen on port 80 (redirecting to) 443.
Configs are in /opt/sensu/admin/

Add custom port:

knife edit node netmon1

"normal": {
    "sensu": { 
        "admin": {
            "http_port": "81"
    "build_essential": {
    "compiletime": true
    "tags": [

To update the SSL certs You'll need to update the databag.

Export the databag to a file
knife data bag show sensu ssl -Fj > sensu_ssl.json

Edit the file to include the certs you want (in the client section, not server) 

vi sensu_ssl.json

Reupload the sensu databag. It'll know it's supposed to go in the ssl section: 
knife data bag from file sensu sensu_ssl.json

You can connect to the server at this point
The seed file creates a user account named with a password of secret.