13 C
Texas
angeloma
Senior Writer and partner

How to install Sensu GO monitoring tool on Ubuntu 20.04?

Hello, friends. In this post, you will learn how to install Sensu Go Monitoring Tool on Ubuntu 20.04. With this complete tool you can monitor nodes in your network and at the same time check the health of some applications.

Sensu is a complete solution for monitoring and observability at scale. Sensu Go is designed to give you visibility into everything you care about: traditional server closets, containers, applications, the cloud, and more.

The application is composed of three elements:

  • Backend: which is the server where the monitoring operations are performed.
  • Sensuctl: is a command-line tool for managing resources within Sensu.
  • Agent: This microprogram is installed on those devices that we want to monitor.

In this post, we will install the first two, and in another post the agent in another one.

Install Sensu GO Monitoring Tool on Ubuntu 20.04

- Advertisement -

Note:There are many ports that we need to open for the tutorial to work. The complete list can be found at this link.

As powerful as the application is, the reality is that installing Sensu Go is quite easy.

First, in a terminal session update Ubuntu 20.04

sudo apt update
sudo apt upgrade

After that, you have to install some necessary packages such as gnupg

sudo apt install curl gnupg unzip wget

Sensu Go provides us with a script that adds its repository to our system in a very convenient way:

curl -s https://packagecloud.io/install/repositories/sensu/stable/script.deb.sh | sudo bash
Detected operating system as Ubuntu/focal.
 Checking for curl…
 Detected curl…
 Checking for gpg…
 Detected gpg…
 Running apt-get update… done.
 Installing apt-transport-https… done.
 Installing /etc/apt/sources.list.d/sensu_stable.list…done.
 Importing packagecloud gpg key… done.
 Running apt-get update… done.
 The repository is setup! You can now install packages.

Once the repository is successfully added to the system, we can start the installation by running:

sudo apt install sensu-go-backend
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  sensu-go-backend
0 upgraded, 1 newly installed, 0 to remove and 53 not upgraded.
Need to get 15.2 MB of archives.
After this operation, 41.5 MB of additional disk space will be used.

Once the application has been successfully downloaded, it is necessary to download the default configuration file:

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

And now move it to the correct location:

sudo mv backend.yml /etc/sensu/

After this, you will be able to manage Sensu as a system service. So, start it, enable it and check the status of the service

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

As everything is OK you have to start the Backend by assigning it a username and password.

sensu-backend init --interactive
? Cluster Admin Username: admin
? Cluster Admin Password: ******
? Retype Cluster Admin Password: ******
{"component":"backend.seeds","level":"info","msg":"seeding etcd store with intial data","time":"2021-02-17T17:15:36+01:00"}
{"component":"store","level":"warning","msg":"migrating etcd database to a new version","time":"2021-02-17T17:15:36+01:00"}
{"component":"store","database_version":1,"level":"info","msg":"successfully upgraded database","time":"2021-02-17T17:15:36+01:00"}
{"component":"store","database_version":2,"level":"info","msg":"successfully upgraded database","time":"2021-02-17T17:15:36+01:00"}

Assign a username and a strong password.

Then you need to install sensuctl by running:

sudo apt install sensu-go-cli

And then you have to configure it by running:

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

Leave it as I currently show you. Remember that the username and password must be the same as the one you set in the previous step.

Testing the installation

After applying the changes, you can check that the backend is working through the web interface provided by the application.

So, access it from http://your-server:3000

And you will see the Login screen

1.- Sensu GO login screen
1.- Sensu GO login screen

Log in with your username and password and you will see the dashboard.

2.- Sensu Go on Ubuntu 20.04
2.- Sensu Go on Ubuntu 20.04

Obviously, it’s empty because we haven’t added any nodes. But the backend is ready.

Conclusion

In this post, you have learned how to install a part of Sensu GO that will allow you to monitor devices on a network. Although it is a very professional application, it is really easy to install.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article