On Debian 13:
curl -s https://packagecloud.io/install/repositories/sensu/stable/script.deb.sh | sudo bash
On RHEL 10:
curl -s https://packagecloud.io/install/repositories/sensu/stable/script.rpm.sh | sudo bash
On Debian 13:
sudo apt update
sudo apt install -y sensu-go-backend
On RHEL 10:
sudo dnf install -y sensu-go-backend
On Debian 13:
sudo apt install -y sensu-go-agent
On RHEL 10:
sudo dnf install -y sensu-go-agent
Start the backend service:
sudo systemctl enable --now sensu-backend
Initialize the backend (run once):
sudo sensuctl configure -n \
--username admin \
--password 'StrongPassword123!' \
--url http://localhost:8080
Create agent configuration:
sudo tee /etc/sensu/agent.yml >/dev/null <<'EOF'
backend-url:
- "ws://localhost:8081"
cache-dir: "/var/cache/sensu/sensu-agent"
log-level: "info"
state-dir: "/var/lib/sensu/sensu-agent"
EOF
Start the agent:
sudo systemctl enable --now sensu-agent
Create a basic CPU check:
sensuctl check create check-cpu \
--command 'check-cpu.sh -w 75 -c 90' \
--interval 60 \
--subscriptions linux \
--handlers email
On UFW:
sudo ufw allow 8080/tcp
sudo ufw allow 8081/tcp
sudo ufw allow 3000/tcp
On firewalld:
sudo firewall-cmd --permanent --add-port=8080/tcp
sudo firewall-cmd --permanent --add-port=8081/tcp
sudo firewall-cmd --permanent --add-port=3000/tcp
sudo firewall-cmd --reload
Open http://SERVER_IP:3000 and log in with the admin credentials.
On Debian/Ubuntu monitored hosts:
curl -s https://packagecloud.io/install/repositories/sensu/stable/script.deb.sh | sudo bash
sudo apt install -y sensu-go-agent
On RHEL/CentOS monitored hosts:
curl -s https://packagecloud.io/install/repositories/sensu/stable/script.rpm.sh | sudo bash
sudo dnf install -y sensu-go-agent
Configure the agent to connect to the backend:
sudo tee /etc/sensu/agent.yml >/dev/null <<'EOF'
backend-url:
- "ws://SENSU_BACKEND_IP:8081"
cache-dir: "/var/cache/sensu/sensu-agent"
log-level: "info"
state-dir: "/var/lib/sensu/sensu-agent"
subscriptions:
- linux
EOF
sudo systemctl enable --now sensu-agent
# Memory check
sensuctl check create check-memory \
--command 'check-memory.sh -w 80 -c 95' \
--interval 60 \
--subscriptions linux
# Disk check
sensuctl check create check-disk \
--command 'check-disk.sh -w 80 -c 95 -p /' \
--interval 300 \
--subscriptions linux
sensuctl handler create email \
--type pipe \
--command 'email-handler.sh' \
--timeout 10
See Sensu Hardening.
Stuck on a step or need custom configuration? We provide paid consulting for Sensu deployments, from single-instance setups to distributed clusters.
📧 office@linux-server-admin.com
🌐 Contact Page
Prefer automation? See Sensu Ansible Setup for an example playbook.
Prefer containers? See Sensu Docker Setup.
See Sensu Configuration for configuration guidance.
See Sensu Security for hardening guidance.