Install and Configure Sensu-Go Monitoring on Debian 10
- 5 minsSensu Monitoring Tool
Sensu(Sensu Core) is a free open-source monitoring tool. Sensu known as Sensu Go now. Sensu and Sensu Go are both open-source monitoring and event management tools, but they represent different versions of the same project, with Sensu Go being the newer and more advanced version. Here are the key differences.
- Sensu: Sensu (often referred to as “Sensu Classic”) has a monolithic architecture where all components are tightly integrated into a single package. It uses Redis for storing data and RabbitMQ for handling message queues.
- Sensu Go: Sensu Go is designed with a modern microservices architecture. It decouples its components and services, making them easier to deploy, manage, and scale. It uses an embedded etcd data store for configuration and state management, and supports both the agent-based and agentless monitoring approaches.
Components of Sensu Go
- Sensu Agents: These are little clients that run on the infrastructure components you wish to keep track of. Agents are entities that are automatically registered with Sensu and are in charge of creating check and metric events to transmit to the backend event pipeline.
- Sensu backend: This is an embedded transport and etcd datastore, allowing you to create flexible and automated workflows for routing metrics and alerts. Sensu backends need permanent storage for their embedded database, as well as disk space for local asset caching and a few accessible ports.
- Sensuctl: This is a command-line utility used to manage Sensu’s resources. It creates, reads, updates, and deletes resources, events, and entities by using Sensu’s HTTP API.
Step 1: Install Sensu Backend
- Start by adding Sensu repository
- Install Sensu Backend:
Step 2: Start Sensu Backend
- To start sensu backend, download the configuration file to the directory
- Start and enable the Sensu backend service.
- Verify sensu backend service status
Step 3: Configure Sensu Credentials
- You just need to set environment variables with a username and password string in this initialization phase.
Once the backend is operational, execute “sensu-backend init” to establish your Sensu admin credentials. Prior to initialization, ensure that you’ve added sensu-backend to your $PATH by exporting it.
Step 4: Access Sensu Web UI
- Sensu provides a web interface designed for event and alert visualization. Confirm whether the interface is actively listening on the designated port, which is typically set to 3000 by default.
Use the command below to send a request to the backend to ensure it is up and running.
Open your web browser and go to http://your-server-ip:3000
Use your credentials created above to login. After Successful login you will get the following dashboard:
Step 5: Install Sensuctl command line utility
Sensuctl is a command-line utility for managing Sensu resources. It creates, reads, updates, and deletes resources, events, and entities by using Sensu’s HTTP API. Sensuctl repository to the server:
Install sensuctl by running the following command:
Run sensuctl configure and log in with your user credentials, namespace, and Sensu backend URL to begin using sensuctl. To set default values for sensuctl, follow these steps:
Non-interactive mode is triggered by the -n flag in this case. To see your user profile, run sensuctl config view.
You can now update the admin password with the utility tool by entering the command:
Step 6: Install and Configure Sensu Go Agent
Subsequently, you’ll need to install the Sensu Go Agent package on every system you wish to monitor. In this demonstration, we’ll install the agent on debian10. Simply run the provided command to perform the installation:
Start by Adding the Sensu repository.
Run the following command to install Sensu Go Agent.
Once the agent is installed, run the following command to get the agent configuration file:
Start Sensu agent
Confirm sensu agent status:
Configure sensu-agent by specify the Sensu backend URL as below.
Start Sensu agent
Restart the service after saving the changes: systemctl restart sensu-agent
Now, go back to the Sensu dashboard page and reload it. The agent should have been included, as you can see
or you can use sensuctl to confirm the event:
Thanks for reading.
Guneycan Sanli.