How to Install Sensu Monitoring Solution on Ubuntu 22.04
How to Install Sensu Monitoring Solution on Ubuntu 22.04
Author: Łukasz Bodziony
Email: lukasz@bodziony.net.pl
DevOps Services: bodziony.net.pl
Published: June 2025
Introduction
Sensu Go is a scalable, flexible monitoring solution for infrastructure and applications. In this tutorial, Łukasz Bodziony will guide you through installing and configuring Sensu on an Ubuntu 22.04 server, so you can start collecting metrics, events, and alerts with ease.
Prerequisites
- Ubuntu 22.04 LTS server with sudo/root access
- Minimum 2 GB RAM (4 GB+ recommended)
- Static IP or DNS pointing to the server
- Firewall allowing required ports (e.g. TCP 8080 for the dashboard)
Step 1: Update System Packages
sudo apt update && sudo apt upgrade -y
Step 2: Install Dependencies
sudo apt install -y curl wget apt-transport-https gnupg
Step 3: Add Sensu Repository
# Import the Sensu GPG key
curl -fsSL https://packagecloud.io/sensu/stable/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/sensu-stable-archive-keyring.gpg
# Add the repository
echo "deb [signed-by=/usr/share/keyrings/sensu-stable-archive-keyring.gpg] https://packagecloud.io/sensu/stable/ubuntu/ jammy main" | sudo tee /etc/apt/sources.list.d/sensu.list
sudo apt update
Step 4: Install Sensu Backend and CLI
sudo apt install -y sensu-go-backend sensu-go-cli
Step 5: Configure and Start the Sensu Backend
Edit the backend configuration file /etc/sensu/backend.yml
and set your namespace, storage, and API settings as needed. For a simple setup, you can use the defaults.
sudo systemctl enable --now sensu-backend
sudo sensu-backend init --name sensu-backend.local
Step 6: Install Sensu Agent (on Same or Additional Hosts)
sudo apt install -y sensu-go-agent
sudo tee /etc/sensu/agent.yml << 'EOF'
backend-url:
- "ws://127.0.0.1:8081"
namespace: default
subscriptions:
- "system"
EOF
sudo systemctl enable --now sensu-agent
Step 7: Access the Sensu Dashboard
The Sensu Web UI runs on port 8080
by default. Open your browser and navigate to:
http://Your-Server-IP:8080
Log in with the username and password you configured during sensu-backend init
.
Conclusion
You now have a working Sensu Go monitoring stack on Ubuntu 22.04, complete with backend, agent, and dashboard. Begin defining checks, handlers, and filters to tailor your monitoring to your environment.
🚀 Host your Sensu monitoring on a reliable Linux VPS: netcloud24.com/servers/vps-linux/
Comments
Post a Comment