An image

Corporate Blogs

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

E-Commerce Businesses Need a Mobile App

What Is Sensu?

Sensu 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 the 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 analyses for your business with Sensu.

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

  • 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

Install and Configure RabbitMQ

RabbitMQ supports multiple messaging protocols. It 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

sudo wget -O- | sudo apt-key add –
Next, update the repository with below command

Once the repository is updated, install Erlang-nox

Next, We need to download and install the latest version of RabbitMQ repository.
sudo wget

Update the repository

Finally, Install the RabbitMQ server using the following command

After installing rabbitmq-server , Start the  RabbitMQ service and enable it.

Next, we need to create a RabbitMQ vhost and user for Sensu application.

Use the following command to provide the permission for users to access Sensu

sudo rabbitmqctl set_permissions -p /sensu sensu “.*” “.*” “.*”

[Related: Tips To Optimize Angular Application To Increase The Website Speed ]

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.
Redis is an open-source, in-memory data structure store, used as a database, cache and message broker.
Install Redis Server with below command,

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

Sensu Installation

First, add Sensu GPG key
sudo wget -O- | sudo apt-key add –
Next, add the Sensu repository by creating sensu.list file inside /etc/apt/sources.list.d
sudo vi /etc/apt/sources.list.d/sensu.list

Then add the following line
deb sensu main
Next, update the repository

Now, use the following command to install the 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

Next, create redis.json file with the following command

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

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

Install and Configure the Uchiwa Dashboard

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

  • Add the public key to the Uchiwa repository

sudo wget -O- | sudo apt-key add –

File Path: /etc/apt/sources.list.d

Add this repository to the uchiwa.list file.

Next, update the repository

Once the system is updated, install Uchiwa

The following command used to the configuration file for the Uchiwa dashboard.

File path: sudo vi /etc/sensu/uchiwa.json

Next, configuration file for Uchiwa client

File path: /etc/sensu/conf.d/client.json

Next, add transport file to the following location

File Path: sudo vi /etc/sensu/conf.d/transport.json

Finally use the following command to restart & enable the Sensu and Uchiwa service.

Now you can  monitor your Dashboard through access path : or http://<yourpublicip>:<your givenpostnumber>

Plugin Installation & Configurations

Here i have explained the configuration process for primary plugins and you can also add more plugins if required,

Go to the following location and run the listed commands to install the plugins

cd /opt/sensu/embedded/bin/

Configuring CPU Check File

Copy and paste the below code to the specified path.

Configuration Path:  Sudo vi /etc/sensu/conf.d/check_cpu.json

Similarly, you can configure all the plugins as listed,

Configuring Memory Check File

Configuration Path: sudo vi /etc/sensu/conf.d/check_memory.json

Configuring Disk Usage File

Configuration Path:  sudo vi /etc/sensu/conf.d/check_disk_usage.json

Configuring Nginx Service File

Configuration Path:  sudo vi /etc/sensu/conf.d/nginx_process.json

Enabling Email Alerts Using Postfix

After installing and configuring postfix, include the following json handler files

sudo vi etc/sensu/conf.d/ handler_mail.json

Finally, Restart the services

Now you can monitor the Dashboard through the access path: or http://<yourpublicip>:<your givenpostnumber>

Turn your vision to magnificent reality With
Our Web and Mobile Solutions
Professional Life of an IT Consultant Interview with Valentin Crettaz
Written by
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 &amp; 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.

Leave a Comment

You have an Idea. We have the Solution.

We help business evolve with lates technologies and infrastructures tailored to their needs and market trends.