How to Install Sensu Go on Ubuntu

This brief tutorial shows students and new users how to install Sensu Go monitoring software on Ubuntu 20.04 | 18.04.

Sensu Go is the latest version of Sensu. It is a free, cross-platform, open source monitoring tool that anyone can use to monitor systems and applications health.

Sensu Go has three primary components:

Sensu backend is powered by an embedded transport and etcd datastore and responsible for automating workflows to route metrics and alert.

Sensu Agent is a lightweight client that runs on infrastructure components that you want to monitor.

Sensuctl is a command-line tool for managing resources within Sensu.

If you’re looking for a robust monitoring tool to monitor your environment and replace your legacy software, Sensu should be a great place to start.

To get started with installing Sensu, follow the steps below:

Prepare Ubuntu

To install Sensu Go, you’ll need some packages in order to get it going. To do that, run the commands below:

sudo apt update
sudo apt install curl gnupg unzip wget

Install Sensu backend

To install Sensu backend, you’ll need to add its repository to Ubuntu since it’s not included in the default repositories.

The repository can quickly be added to Ubuntu by downloading the script and running it below:

curl -s  | sudo bash

Once the script is downloaded and executed, you can go and begin installing Sensu packages.

Run the commands below to install Sensu backend.

sudo apt install sensu-go-backend

After installing, go and download the configuration file in its default configure directory.

sudo curl -L  -o /etc/sensu/backend.yml

Once installed, you can then start and enable the service to automatically start up when the server boots.

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

To check and verify that it’s installed and running, run the commands below:

sudo systemctl status sensu-backend

You should see similar message as shown 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-12 09:04:16 CST; 38s ago
   Main PID: 4699 (sensu-backend)
      Tasks: 8 (limit: 4654)
     Memory: 17.6M
     CGroup: /system.slice/sensu-backend.service
             └─4699 /usr/sbin/sensu-backend start -c /etc/sensu/backend.yml

Feb 12 09:04:48 ubuntu2004 sensu-backend[4699]: {"backend_id":"7ebd7e44-8cdb-426e-b110-408>
Feb 12 09:04:49 ubuntu2004 sensu-backend[4699]: {"backend_id":"7ebd7e44-8cdb-426e-b110-408>

Access Sensu Web UI

Now that Sensu is installed, you’ll want to create an admin credential to be able to access its web UI.

To do that, run the commands below from the commands line

sensu-backend init --interactive

That should allow you to create an admin username and password.

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

After creating the cred above, go to the server hostname or IP address followed by port 3000.

Login with the credential you create above.

Begin configuring your environment.

Sensu backend should be installed and ready to use.

Install Sensuctl

To install Sensu command line management tool, run the commands below:

If you didn’t add the repository above, run it below to add it.

curl -s  | sudo bash

Next, run the commands below to install Sensuctl.

sudo apt install sensu-go-cli

That should do it!

Configure Sensuctl by running the commands below:

sensuctl configure

Provide the same credential you created above when prompted.

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

Install Sensu Go Agent

To monitor Sensu server, you’ll need to install its agent and start service. Run the commands below to install Sensu go agent.

sudo apt install sensu-go-agent

Then place the agent config file in the default directory.

sudo curl -L  -o /etc/sensu/agent.yml

Now start the server and go back to the backend UI to see some server stats.

sudo service sensu-agent start

That should do it.

Fore more configuration like sending alerts and email, you’ll need to visit Sensu documentation site.


This post showed you how to install Sensu on Ubuntu 20.04 | 18.04. If you find any error above, please use the comment form below to report.