IT Blog

How To Get Started With Sensu – A Full Stack Monitoring Tool

What Is Sensu?

Sensu’s is an open source platform that provides the full stack monitoring solution for your problems. Through Sensu you can progressively monitor your servers, services, application health, and business KPIs etc. On other hand, it can also collect and analyze custom metrics. And it can keep you updated when something happens, you will be notified through email or phone call (customized) . Precisely you can do all these competitive monitoring analysis for your business with Sensu.

Steps are required to configure Sensu for Linux and Ubuntu platform.

Sensu Installation and configuration

Install and Configure RabbitMQ

Install Redis server

Install and Configure Uchiwa Dashboard Setup

Installing & Configuring Plugins

Enabling Email Alerts Using Postfix

Sensu Installation and configuration

Before installing Sensu, it is recommended to update your system to the latest stable version.You can use the below command to update your system

1

sudo apt-get update

Install and Configure RabbitMQ

RabbitMQ supports multiple messaging protocols. Its can be deployed in distributed and federated configurations to meet high-scale availability.The following command will add Erlang repository and will add Erlang public key to your trusted key list.sudo wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb

Installing Redis Server

Once you are done with the RabbitMQ configuration, then start installing Redis server. Because Sensu uses Redis server to store their data.Note:Redis is an open source , in-memory data structure store, used as a database, cache and message broker.Install Redis Server with below command,

1

2

sudo apt-get install redis-server

sudo apt-get install apt-transport-https

Once the redis-server installation is complete, start the Redis server and enable it.

Then add the following linedeb https://sensu.global.ssl.fastly.net/apt sensu mainNext, update the repository

1

sudo apt-get update

Now, use the following command to install the Sensu

1

sudo apt-get install sensu

After installing Sensu, you will need to configure Sensu for RabbitMQ and Redis.By default, Sensu will load configuration from /etc/sensu/conf.d/ directory.Now copy and paste the below code to create a rabbitmq.json file inside the following directory /etc/sensu/conf.d

File path : sudo vi /etc/sensu/conf.d/rabbitmq.json

1

2

3

4

5

6

7

8

9

{

"rabbitmq":{

"host":"127.0.0.1",

"port":5672,

"vhost":"/sensu",

"user":"sensu",

"password":"password"

}

}

Next, create redis.json file with the following command

File path : sudo vi /etc/sensu/conf.d/redis.json

1

2

3

4

5

6

{

"redis":{

"host":"127.0.0.1",

"port":6379

}

}

Next, create a api.json file to include the connection information for Sensu to access APIFile path : sudo vi /etc/sensu/conf.d/api.json

1

2

3

4

5

6

7

{

"api":{

"host":"127.0.0.1",

"bind":"0.0.0.0",

"port":4567

}

}

Install and Configure Uchiwa Dashboard

Basically Sensu does not come with the Dashboard to monitor Sensu through web interface. So, we need to install an open source Dashboard Uchiwa to your system.

Manigandan

An ideal Full Stack Developer, having around 5+ years of experience in web development arena, expertise in AngularJS, Nodejs, PHP and also scoring 6 years of experience in Networking & Window servers. A perfect all-rounder has fondness to play diverse role. he always strives to match perfection and likely remains the best in whatever role he takes.