How to Install Sensu Go on Ubuntu 18.04 | 20.04

How to Install Sensu Go on Ubuntu 18.04 | 20.04

In this article, we are going to shows that how to Install Sensu Go on Ubuntu 18.04 | 20.04.

Sensu is an open-source, free and cross-platform monitoring software that is used to monitor different environments like public, private and hybrid cloud, and container-based environments. Sensu Go is the latest version of Sensu.

It is divided in three main primary components that are listed below:

  • Sensu backend – It is a service that manages check requests and observability data.
  • Sensu Agent – It is a lightweight client that runs on the infrastructure components you want to monitor.
  • Sensuctl – It is a command-line tool for managing resources within Sensu.

Install Sensu Go on Ubuntu

Simply follow below steps to installing Sensu Go on your Ubuntu:

Step 1 : Prepare Ubuntu for Sensu Go

Before install Sensu Go, you will need to update your system to the latest stable version and install some required packages and dependencies using commands below:

sudo apt update
sudo apt install curl gnupg unzip wget

Step 2 : Install Sensu backend

To install Sensu backend, you will need to add its repository to Ubuntu by downloading the script and running it below:

curl -s https://packagecloud.io/install/repositories/sensu/stable/script.deb.sh | sudo bash

Now run the commands below to install Sensu backend:

sudo apt install sensu-go-backend

After installing Sensu backend, now download the configuration file in its default configure directory by running below command:

sudo curl -L https://docs.sensu.io./sensu-go/latest/files/backend.yml -o /etc/sensu/backend.yml

After installed, you can start and enable the Sensu backend service by running commands below:

sudo systemctl start sensu-backend
sudo systemctl enable sensu-backend

To check status of the Sensu backend , run the commands below:

sudo systemctl status sensu-backend

The above command display a message similar as below:

sensu-backend.service - The Sensu Backend service.
     Loaded: loaded (/lib/systemd/system/sensu-backend.service; enabled; vendor preset: en>
     Active: active (running) since Fri 2021-02-13 11:53:06 UTC; 18s ago
   Main PID: 4699 (sensu-backend)
      Tasks: 10 (limit: 4573)
     Memory: 27.5M
     CGroup: /system.slice/sensu-backend.service
             └─4699 /usr/sbin/sensu-backend start -c /etc/sensu/backend.yml

Feb 13 11:53:52 ubuntu2004 sensu-backend[4699]: {"backend_id":"5ec9e24-6cfb-406f-b230-518>
Feb 13 11:53:54 ubuntu2004 sensu-backend[4699]: {"backend_id":"5ec9e24-6cfb-406f-b230-518>

Step 3 : Access Sensu Dashboard

At this point, Sensu is installed in your ubuntu system, now create an admin to access Sensu web UI.

To create an admin, run the commands below :

sensu-backend init --interactive

Now, create an admin username and password as below:

? Cluster Admin Username: admin
? Cluster Admin Password: ********
? Retype Cluster Admin Password: ********

After create admin credentials, open your favorite web browser and browse the URL http://your-server-ip:3000 as below:

http://localhost:3000

It will open the Sensu Web UI with sign in screen. Sign in with the admin credential that you are create above.

Sensu Web UI

After sign in, you can access the Sensu Dashboard .


Step 4 : Install Sensuctl

Run the commands below, to install Sensu command line management tool:

sudo apt install sensu-go-cli

After installing Sensuctl, configure it by using the commands below:

sensuctl configure

The above prompted you to provide the admin credential that you created above.

? Authentication method: username/password
? Sensu Backend URL: http://127.0.0.1:8080
? Namespace: default
? Preferred output format: tabular
? Username: admin
? Password: ********

Step 5 : Install Sensu Go Agent

You will need to install Sensu Go Agent to monitor your Sensu server by running command below:

sudo apt install sensu-go-agent

After installing, now download the Sensu Go Agent configuration file by running below command:

sudo curl -L https://docs.sensu.io/sensu-go/latest/files/agent.yml -o /etc/sensu/agent.yml

Now start the services of Sensu Go Agent server and go back to the backend UI :

sudo service sensu-agent start

That’s all

If you face any error and issue in above steps , please use comment box below to report.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top