https://garage.godaddy.com/tech/config/install-sensu-centos7/
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.
1
|
# rpm -Uvh http://archive.linux.duke.edu/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
|
Install Erlang.
1
|
# yum -y install erlang
|
Add the key for RabbitMQ.
1
|
# rpm –import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
|
Install RabbitMQ RMP.
1
|
# 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.
1
|
# rabbitmq-plugins enable rabbitmq_management
|
Install Redis and start its services.
1
|
# yum -y install redis
|
1
|
# chkconfig redis on
|
1
|
# /etc/init.d/redis start
|
2. Start and configure RabbitMQ.
Start the RabbitMQ server.
1
|
# chkconfig rabbitmq-server on
|
1
|
# /etc/init.d/rabbitmq-server start
|
Create the RabbitMQ vhost and user/password.
1
|
# rabbitmqctl add_vhost /sensu
|
1
|
# rabbitmqctl add_user sensu sensu
|
1
|
# rabbitmqctl set_permissions -p /sensu sensu “.*” “.*” “.*”
|
3. Register the Sensu repository
Create the file /etc/yum.repos.d/sensu.repo with the following contents:
1
2
3
4
5
6
|
[sensu]
name=sensu–main
baseurl=http://repos.sensuapp.org/yum/el/6/x86_64/
gpgcheck=0
enabled=1
EOM
|
4. Install and start the Sensu services.
Install Sensu.
1
|
# yum -y install sensu
|
Create a sample Sensu configuration file.
1
|
# mv /etc/sensu/config.json.example /etc/sensu/config.json
|
Enable the Sensu services.
1
|
# chkconfig sensu-server on
|
1
|
# chkconfig sensu-client on
|
Start the Sensu services.
1
|
# /etc/init.d/sensu-server start
|
1
|
# /etc/init.d/sensu-client start
|
5. Install and start the Uchiwa services.
Install Uchiwa.
1
|
#yum install -y uchiwa
|
Enable the Uchiwa service.
1
|
#chkconfig uchiwa on
|
Start the Uchiwa service.
1
|
#/etc/init.d/uchiwa start
|
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.
Image by quinn.anya via Compfight cc