Welcome to our guide on How to Install Sensu Monitoring Tool on Ubuntu 20.04 | 18.04 LTS. Sensu is an open-source, full-stack monitoring tool suitable for any kind of dynamic operating environments. It is a simple, scalable and malleable framework that helps you compose the monitoring system you need.

Introduction to Sensu Monitoring Tool

Sensu is capable of monitoring public, private, and hybrid cloud, and container-based environments. It is written in Ruby and uses RabbitMQ for queuing check events and requests. Data that needs persistent storage like client information are stored in Redis. Sensu ships with a ton of plugins for monitoring common services.

How Sensu Works

Sensu uses a client-server model where all systems to be monitored runs a sensu client software. This client application is responsible for executing local checks, managing client subscription and registration, and fulfilling checks requested by the Sensu Server. The agent reports the results of a check and the server will take action based on the results, e.g sending a notification message to the user if the service is down.

Install Sensu Monitoring Tool on Ubuntu 20.04/18.04 LTS

In this section, I’ll show you the steps to install the Sensu Monitoring Tool on Ubuntu 20.04/18.04 LTS. I assume you already have a running Ubuntu 20.04/18.04 server, it can be a VM locally, in the Cloud, or a dedicated server.

Step 1: Set server hostname, ntp, and update

Always start your installations by updating system package to the latest version.

sudo apt-get update
sudo apt-get -y upgrade
sudo reboot

Wait for the server to come up then set hostname:

sudo hostnamectl set-hostname sensu.example.com

Setup NTP and Timezone

It is good to have NTP configured on both Sensu server and agents for correct timestamp on all data.

Set correct timezone:

sudo timedatectl set-timezone Africa/Nairobi

Install ntp package:

sudo apt -y install ntp

Show ntp status:

$ ntpq -p

Step 2: Install Redis and RabbitMQ

RabbitMQ runs on the Erlang runtime, you need to import GPG key:

wget -O- https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc | sudo apt-key add -

Add Erlang repository using below command:

echo "deb http://binaries.erlang-solutions.com/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/erlang-solutions.list

Install RabbitMQ:

sudo apt update
sudo apt install rabbitmq-server

When done, Create a RabbitMQ vhost for Sensu

$ sudo rabbitmqctl add_vhost /sensu
Creating vhost "/sensu"

Add user to manage the vhost

$ sudo rabbitmqctl add_user sensu  StrongPassword
Creating user "sensu"

Replace StrongPassword with your password.

Assing sensu user full permissions for the vhost /sensu

$ sudo rabbitmqctl set_permissions -p /sensu sensu ".*" ".*" ".*"
Setting permissions for user "sensu" in vhost "/sensu"

Install Redis Server:

sudo apt -y install redis-server

Step 3: Install and Configure Sensu

Sensu packages are not available on official Ubuntu repository. You’ll need to add the upstream repository before you can install sensu package.

echo "deb https://sensu.global.ssl.fastly.net/apt bionic main" | sudo tee /etc/apt/sources.list.d/sensu.list

Import repository GPG key:

wget -O- https://sensu.global.ssl.fastly.net/apt/pubkey.gpg | sudo apt-key add -

Update package index and install Sensu:

sudo apt update
sudo apt -y install sensu

Sensu configuration files, plugins and extensions will be placed under the /etc/sensu/directory.

Create sensu configuration file for connecting to RabbitMQ, API and Redis

Create API configuration file:

sudo tee /etc/sensu/conf.d/api.json<<EOF
  "api": {
    "host": "localhost",
    "bind": "",
    "port": 4567

Create RabbitMQ access config:

sudo tee /etc/sensu/conf.d/rabbitmq.json<<EOF
  "rabbitmq": {
    "host": "",
    "port": 5672,
    "vhost": "/sensu",
    "user": "sensu",
    "password": "StrongPassword"

Redis config:

sudo tee /etc/sensu/conf.d/redis.json<<EOF
  "redis": {
    "host": "",
    "port": 6379

Step 4: Install and Configure Uchiwa Sensu web interface

Install uchiwa by running:

sudo apt -y install uchiwa

Create configuration file:

Set Some variables for configuring Sensu:

UI_PASSWORD="[email protected]"

Create configuration file:

sudo tee /etc/sensu/conf.d/uchiwa.json<<EOF
  "sensu": [
      "name": "$DOMAIN",
      "host": "",
      "port": 4567,
      "timeout": 10
  "uchiwa": {
    "host": "",
    "port": 3000,
    "refresh": 10,
    "user": "$UI_USERNAME",
    "pass": "$UI_PASSWORD"

Configure Sensu client:

sudo tee /etc/sensu/conf.d/uchiwa.json<<EOF
  "client": {
    "environment": "development",
    "name": "sensu-server",
    "address": "",
    "subscriptions": [

Set permissions:

sudo chown sensu. /etc/sensu/conf.d/*

Step 5: Start Sensu Service

You can now start sensu services and enable them to start on boot:

for i in sensu-server sensu-api sensu-client uchiwa; do
  sudo systemctl enable $i
  sudo systemctl start $i

Access Sensu Dashboard using http://[ip|hostname]:3000

Login with configured username and password.

sensu dashboard min

More guides:

Install and Configure Nagios 4 on Ubuntu

Install Zabbix 5 on Ubuntu

Install LibreNMS on Ubuntu

Install Grafana on Ubuntu

Install Prometheus on Ubuntu

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.



Please enter your comment!
Please enter your name here