Sensu is an open source monitoring tool that is capable of monitoring public, private, hybrid cloud, and container-based Infrastructure environments. Sensu has been designed to be simple, scalable and malleable framework that enables you to customize monitoring to meet the business needs. This guide will walk you through the installation of Sensu Go Monitoring Tool on CentOS 8 / RHEL 8 Linux machine.

Sensu Architecture

Sensu works in a Server-Client 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.

Install Sensu Go on CentOS 8 / RHEL 8

There are three main sections of Sensu monitoring tool.

Sensu architecture diagram

Step 1: Install Sensu Backend on CentOS 8 / RHEL 8

Add the backend repository:

curl -s | sudo bash

If repository configuration was successful the output will look like below.

Generating yum cache for sensu_stable...
Importing GPG key 0x0A3F7426:
 Userid     : " ( <[email protected]>"
 Fingerprint: CB16 05C4 E988 C91F 4382 49E3 A5BC 3FB7 0A3F 7426
 From       :
Generating yum cache for sensu_stable-source...

The repository is setup! You can now install packages.

After repository addition, install Sensu backend on CentOS 8 / RHEL 8:

sudo yum install sensu-go-backend

Accept installation prompt:

Dependencies resolved.
 Package                                 Architecture                  Version                                Repository                           Size
 sensu-go-backend                        x86_64                        5.20.1-12427                           sensu_stable                         14 M

Transaction Summary
Install  1 Package

Total download size: 14 M
Installed size: 38 M
Is this ok [y/N]: y

Step 2: Configure Sensu Backend on CentOS 8 / RHEL 8

Copy the config template from the docs:

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

Edit it to your liking:

sudo vi /etc/sensu/backend.yml

This is how my configuration looks like:

# Sensu backend configuration

# backend configuration
state-dir: "/var/lib/sensu/sensu-backend"
cache-dir: "/var/cache/sensu/sensu-backend"
config-file: "/etc/sensu/backend.yml"
debug: false
log-level: "debug" # available log levels: panic, fatal, error, warn, info, debug

# agent configuration
agent-port: 8081

# api configuration
api-listen-address: "[::]:8080" # listen on all IPv4 and IPv6 addresses
#api-url: "http://localhost:8080"

# dashboard configuration
#dashboard-cert-file: "/path/to/ssl/cert.pem"
#dashboard-key-file: "/path/to/ssl/key.pem"
dashboard-host: "[::]" # listen on all IPv4 and IPv6 addresses
dashboard-port: 3000

# ssl configuration
#cert-file: "/path/to/ssl/cert.pem"
#key-file: "/path/to/ssl/key.pem"
#trusted-ca-file: "/path/to/trusted-certificate-authorities.pem"
#insecure-skip-tls-verify: false

# store configuration
#etcd-advertise-client-urls: "http://localhost:2379"
#etcd-cert-file: "/path/to/ssl/cert.pem"
#etcd-client-cert-auth: false
#etcd-initial-advertise-peer-urls: ""
#etcd-initial-cluster: "default="
#etcd-initial-cluster-state: "new" # new or existing
#etcd-initial-cluster-token: "sensu"
#etcd-key-file: "/path/to/ssl/key.pem"
#etcd-listen-client-urls: ""
#etcd-listen-peer-urls: ""
#etcd-name: "default"
#etcd-peer-cert-file: "/path/to/ssl/cert.pem"
#etcd-peer-client-cert-auth: false
#etcd-peer-key-file: "/path/to/ssl/key.pem"
#etcd-peer-trusted-ca-file: "/path/to/ssl/key.pem"
#etcd-trusted-ca-file: "/path/to/ssl/key.pem"
#no-embed-etcd: false

For a complete list of configuration options, see the backend reference.

Start Sensu backend service:

sudo systemctl enable --now  sensu-backend

Check service status:

systemctl status sensu-backend
● sensu-backend.service - The Sensu Backend service.
   Loaded: loaded (/usr/lib/systemd/system/sensu-backend.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2020-05-19 21:45:05 CEST; 14s ago
 Main PID: 2194 (sensu-backend)
    Tasks: 11 (limit: 26213)
   Memory: 25.8M
   CGroup: /system.slice/sensu-backend.service
           └─2194 /usr/sbin/sensu-backend start -c /etc/sensu/backend.yml

May 19 21:45:11 sensu-backend[2194]: {"backend_id":"861176a0-1874-4007-be62-c41f1b048dfe","component":"metricsd","level":"d>
May 19 21:45:12 sensu-backend[2194]: {"backend_id":"861176a0-1874-4007-be62-c41f1b048dfe","component":"metricsd","level":"d>
May 19 21:45:13 sensu-backend[2194]: {"backend_id":"861176a0-1874-4007-be62-c41f1b048dfe","component":"metricsd","level":"d>
May 19 21:45:16 sensu-backend[2194]: {"component":"cache","level":"debug","msg":"rebuilding the cache for resource type *v2>
May 19 21:45:16 sensu-backend[2194]: {"component":"cache","level":"debug","msg":"rebuilding the cache for resource type *v2>
May 19 21:45:16 sensu-backend[2194]: {"component":"cache","level":"debug","msg":"rebuilding the cache for resource type *v2>
May 19 21:45:16 sensu-backend[2194]: {"component":"tessend","level":"debug","metric_name":"auth_provider_count","metric_val>
May 19 21:45:16 sensu-backend[2194]: {"backend_id":"861176a0-1874-4007-be62-c41f1b048dfe","component":"metricsd","level":"d>
May 19 21:45:17 sensu-backend[2194]: {"backend_id":"861176a0-1874-4007-be62-c41f1b048dfe","component":"metricsd","level":"d>
May 19 21:45:18 sensu-backend[2194]: {"backend_id":"861176a0-1874-4007-be62-c41f1b048dfe","component":"metricsd","level":"d>

Step 3: Initialize Sensu Backend

You now need to set up your Sensu administrator username and password. Run the following command to initialize the Sensu backend:

export [email protected]
sensu-backend init 

Command execution output:

{"component":"backend.seeds","level":"info","msg":"seeding etcd store with intial data","time":"2020-05-19T21:50:07+02:00"}

You can also run the sensu-backend init command in interactive mode if you prefer to respond to prompts for your username and password:

sensu-backend init --interactive

More details abou the sensu-backend init, see the backend reference documentation.

Step 4: Access Sensu Dashboard

The Sensu web UI provides a unified view of your monitoring events and user-friendly tools to reduce alert fatigue.

Confirm the UI service port is up.

$ sudo ss -tunelp | grep 3000
tcp   LISTEN  0       128                         *:3000                *:*      users:(("sensu-backend",pid=2194,fd=18)) uid:994 ino:27800 sk:a v6only:0 <->   

Check if the backend is up and running by querying API health:

$ curl

If you have active firewall service, allow port 3000.

sudo firewall-cmd --add-port=3000/tcp --permanent
sudo firewall-cmd --reload

Open your browser and access Sensu dashboard on http://localhost:3000 or http://server_ip_or_hostname:3000.

install sensu centos 8 01

Login with credentials set earlier.

install sensu centos 8 02

Our next guides will cover installation of Sensu Agents and sensuctl command line tool.


More on monitoring:

Install Nagios 4 on CentOS / RHEL 8

How to install Cacti on RHEL / CentOS 8

How to Install Zabbix Server on RHEL / CentOS 8

How to Install Netdata on RHEL / CentOS 8

Install and Configure Telegraf on RHEL / CentOS 8

How to Install Prometheus on RHEL / CentOS 8

How to Install Grafana on RHEL 8

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