This brief tutorial shows students and new users how to install Sensu Go monitoring software on Ubuntu 20.04 | 18.04.
Sensu Go is a powerful and flexible monitoring tool that can help you keep track of the health of your systems and applications. It is cross-platform and open-source, making it accessible to anyone who wants to use it.
Ubuntu Linux is a popular and widely used operating system known for its stability, security, and ease of use. Installing Sensu Go on Ubuntu Linux is a great choice for those who want to monitor their systems and applications on a reliable platform.
Additionally, Ubuntu’s package manager, apt, makes installing and managing Sensu Go packages and dependencies easy. Following the steps outlined in this tutorial, you can get Sensu Go up and running on your Ubuntu system in no time.
Sensu backend is powered by an embedded transport and etcd datastore and is responsible for automating workflows to route metrics and alerts.
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.
To get started with installing Sensu, follow the steps below:
Prepare Ubuntu
To install Sensu Go, you’ll need some packages 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 the Sensu backend, you must 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 https://packagecloud.io/install/repositories/sensu/stable/script.deb.sh | sudo bash
Once the script is downloaded and executed, you can install Sensu packages.
Run the commands below to install the Sensu backend.
sudo apt install sensu-go-backend
After installing, download the configuration file in its default configure directory.
sudo curl -L https://docs.sensu.io./sensu-go/latest/files/backend.yml -o /etc/sensu/backend.yml
Once installed, you can start and enable the service to automatically start 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 a 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 access its web UI.
To do that, run the commands below from the command 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.
http://localhost:3000
Login with the credentials you created above.

Begin configuring your environment.

Sensu’s backend should be installed and ready to use.
Install Sensuctl
To install the 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 https://packagecloud.io/install/repositories/sensu/stable/script.deb.sh | 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: http://127.0.0.1:8080 ? Namespace: default ? Preferred output format: tabular ? Username: admin ? Password: ********
Install Sensu Go Agent
To monitor the Sensu server, you must install its agent and start the service. Run the commands below to install the Sensu Go agent.
sudo apt install sensu-go-agent
Then place the agent config file in the default directory.
sudo curl -L https://docs.sensu.io/sensu-go/latest/files/agent.yml -o /etc/sensu/agent.yml
Now start the server and return to the backend UI to see some server stats.
sudo service sensu-agent start
That should do it.
You’ll need to visit the Sensu documentation site for more configuration, like sending alerts and emails.
Conclusion:
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.
Leave a Reply Cancel reply