Updated May 5, 2017
Sensu is a monitoring router for Linux operating systems such as CentOS 7. It monitors “check” scripts and passes their results to the corresponding handler scripts when the specified conditions are met. Checking the status of a service such as Apache is one of the most common uses of Sensu. Installing Sensu requires you to install its supporting applications, which include Erlang, RabbitMQ and Redis. You’ll also need to view Sensu data with an application such as Uchiwa, which is a web-based dashboard for Sensu. The primary challenge with this procedure is locating the current software packages for your system.
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).
Install the EPEL-7 yum repository.1. Install the supporting software.
# rpm -Uvh http://archive.linux.duke.edu/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
# yum -y install erlang
Add the key for RabbitMQ.
# rpm --import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
Install RabbitMQ RMP.
# rpm -Uvh http://www.rabbitmq.com/releases/rabbitmq-server/v3.4.1/rabbitmq-server-3.4.1-1.noarch.rpm
Install the RabbitMQ management console.
# rabbitmq-plugins enable rabbitmq_management
Install Redis and start its services.
# yum -y install redis
# chkconfig redis on
# /etc/init.d/redis start
2. Start and configure RabbitMQ.
Start the RabbitMQ server.
# chkconfig rabbitmq-server on
# /etc/init.d/rabbitmq-server start
Create the RabbitMQ vhost and user/password.
# rabbitmqctl add_vhost /sensu
# rabbitmqctl add_user sensu sensu
# rabbitmqctl set_permissions -p /sensu sensu ".*" ".*" ".*"
3. Register the Sensu repository
Create the file /etc/yum.repos.d/sensu.repo with the following contents:
[sensu] name=sensu-main baseurl=http://repositories.sensuapp.org/yum/el/7/x86_64/ gpgcheck=0 enabled=1
4. Install and start the Sensu services.
# yum -y install sensu
Create a sample Sensu configuration file.
# mv /etc/sensu/config.json.example /etc/sensu/config.json
Enable the Sensu services.
# chkconfig sensu-server on
# chkconfig sensu-client on
Start the Sensu services.
# /etc/init.d/sensu-server start
# /etc/init.d/sensu-client start
5. Install and start the Uchiwa services.
#yum install -y uchiwa
Enable the Uchiwa service.
#chkconfig uchiwa on
Start the Uchiwa service.
6. Verify that Sensu is running.
Open a browser window and enter the default address and port number for Sensu, which is localhost:3000. This page should appear similar to the following screenshot if Sensu is running:
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.