Sensu is a monitoring tool that uses RabbitMQ to handle messages and Redis to store data. It's typically used to create a robust monitoring and alert system in a cloud environment by coordinating check executions with check and handler scripts. An event that's triggered by a check script is passed to its corresponding handler script, which takes the specified action. Installing Sensu on Ubuntu 14.04 also requires you to install RabbitMQ and Redis, among other supporting software. You must also install the Uchiwa dashboard, which will display information from Sensu in your browser.
To set this up, you'll need a live Linux server (that you can tweak) with a dedicated IP address and a way to connect to it. We recommend a GoDaddy Virtual Private Server if you're just getting started, or a full dedicated server if you’re ready to take total control. To connect to your server, you'll need some kind of an SSH client. Google it, or try PuTTY (Windows) or Terminal (Mac).
[requirements difficulty="4" time="20"]
1. Install the supporting software.
Open a terminal window with a user that has root privileges. Update the list of available apt-get packages.
# apt-get update
Add the RabbitMQ source to the APT source list.
# curl -s http://www.rabbitmq.com/rabbitmq-signing-key-public.asc | apt-key add -
# echo "deb http://www.rabbitmq.com/debian/ testing main" > /etc/apt/sources.list.d/rabbitmq.list
Add the Sensuapp source to the APT source list.
# curl -s http://repos.sensuapp.org/apt/pubkey.gpg | apt-key add -
# echo "deb http://repos.sensuapp.org/apt sensu main" > /etc/apt/sources.list.d/sensu.list
Add the Elasticsearch source to the APT source list.
# curl -s http://packages.elasticsearch.org/GPG-KEY-elasticsearch | apt-key add -
# echo "deb http://packages.elasticsearch.org/elasticsearch/1.0/debian stable main" > /etc/apt/sources.list.d/elasticsearch.list
2. Install Erlang, RabbitMQ and Redis-server.
# apt-get install -y erlang-nox
# apt-get install -y rabbitmq-server
# apt-get install -y redis-server
3. Install Sensu and Uchiwa.
Download the Sensu source code.
# wget http://repos.sensuapp.org/apt/pubkey.gpg -O- | sudo apt-key add -
Add the keys for Sensu.
# echo "deb http://repos.sensuapp.org/apt sensu main" | tee -a /etc/apt/sources.list.d/sensu.list
Install Sensu.
# apt-get install -y sensu
Install Uchiwa.
# apt-get install -y uchiwa
4. Configure RabbitMQ.
Create a RabbitMQ virtual host.
# rabbitmqctl add_vhost /sensu
Create a user for Sensu.
# rabbitmqctl add_user sensu monitor
Change the password for the Sensu user.
# rabbitmqctl set_permissions -p /sensu sensu ".*" ".*" ".*"
5. Start the Sensu and Uchiwa services.
Enable the Sensu services to start automatically.
# update-rc.d sensu-server defaults
# update-rc.d sensu-client defaults
# update-rc.d sensu-api defaults
Enable the Uchiwa service to start automatically.
# update-rc.d uchiwa defaults
6. Verify that Sensu is installed and configured.
Point your browser to the address and port number specified in /etc/sensu/uchiwa.json to access the Uchiwa dashboard that will display the Sensu API. This address defaults to localhost and the default port number is 3000. In this case, you would enter localhost:3000 in your browser's address line. You'll be prompted for the user/password for the Uchiwa dashboard, which defaults to admin/secret. You should see a browser page similar to the following if Sensu and Uchiwa are properly installed and configured:
As a courtesy, we provide information about how to use certain third-party products, but we do not endorse or directly support third-party products and we are not responsible for the functions or reliability of such products. Third-party marks and logos are registered trademarks of their respective owners. All rights reserved.