To start using the Sensu Go monitoring tool on Windows 11 or 10, your system should have 10 GB of free space and 4GB of RAM. However, if you are in a production environment, 8GB RAM is recommended.
Here we are using Ubuntu 22.04 WSL App on Windows, you can also use Debian or Ubuntu 20.04. If you already have a WSL 1 or 2 application enabled and using it, you can go to the next step.
The next step is to make the repository provide the packages we need to install the Sensu backend on the Ubuntu WSL system since it cannot use the default system repository to install. So run the given command in your command terminal.
sudo apt install curl
curl -s https://packagecloud.io/install/repositories/sensu/stable/script.deb.sh | sudo bash
We already have the Sesnu repository on our Ubuntu 22.04/20.04 system, now we can use the system’s APT package manager Easy to install backend. Here is the command to follow:
sudo apt install sensu-go-backend
We need a supporting configuration file to start the Sensu Go service, without it you will be stuck trying to start the Sensu Go service An error was encountered while serving. So, first, download it using the given command:
sudo curl -L https://docs.sensu.io/sensu-go/latest/files/backend.yml -o /etc/sensu/backend.yml
sudo mkdir /var/run/sensu/
Now, start the service:
sudo service sensu-backend start
To check the service status, use:
sudo service sensu-backend status
Once you are sure that the Sensu Go backend is running without any errors. Set up a username and password to access the web-based graphical user interface of this monitoring tool. To do this, we need to set two environment variables with the required credential values to set the admin user and password. sensu-backend init
After setting the environment variable, use the command to initialize it.
Method 1:
export SENSU_BACKEND_CLUSTER_ADMIN_USERNAME=h2smedia
export SENSU_BACKEND_CLUSTER_ADMIN_PASSWORD=yourpassword
sensu-backend init
If the system requires allowing Sensu supported firewall, then don’t forget to click the “Allow Access” button.
Method 2:
or , the user can use the given command instead of the above command , set the username and password interactively:
sensu-backend init --interactive
You will be asked to set the username and password as well as the API. However, the API key is optional - press Enter to skip it.
Open the local or remote system browser to access the IP address of the server where you installed the Sensu GO monitoring solution.
Point your browser to the server IP using the port number in the following format:
http://server-ip-address:3000
Use Sensu in step 5 of this tutorial Administrator credentials set. Then click the "Login" button.
Finally, the Sensu Go dashboard is there from where you can get the metrics extracted from the system. Overview for monitoring with the Sensu agent. But for this, we have to manually install the agent on every system we want to monitor. Go to next step.
Now, assuming you want to monitor a remote system using Sensu GO, first we have to make sure that the specific system has Sensu Agent .
For Ubuntu or Debian
curl -s https://packagecloud.io/install/repositories/sensu/stable/script.deb.sh | sudo bash
sudo apt-get install sensu-go-agent
For RHEL/CentOS/Rocky Linux/AlmaLinux/Oracle Linux
curl -s https://packagecloud.io/install/repositories/sensu/stable/script.rpm.sh | sudo bash
sudo yum install sensu-go-agent
For Windows
Go to the Sensu website and download the agent executable - Here is the link.
Assume that you have to use the previous step to install the Sensu Go Agent on Linux (such as Ubuntu/Debian or RedHat). Now you want to configure it so that the backend can recognize the system and add it for monitoring.
Here we use Ubuntu/Debian, but the method is the same for other Linux systems.
Copy proxy configuration file
sudo curl -L https://docs.sensu.io/sensu-go/latest/files/agent.yml -o /etc/sensu/agent.yml
Edit the proxy file and add the Sensu backend server URL.
sudo nano /etc/sensu/agent.yml
Remove # from the name, namespace, backend URL and IP address as shown in the given screenshot. Then replace the address 127.0.0.1 with your Sensu Go’s backend server.
Save the file using Ctrl O, press Enter, and exit - Ctrl X.
Now, restart the agent for the changes to take effect.
sudo systemctl restart sensu-agent
After installing and configuring the Sensu Go Agent on the system to be monitored, refresh the WSL Linux application running on Windows 11 or 10 Sensu Go web interface to view added devices on the dashboard. You can see we have two entities which are the backend and another proxy.
Sensuctl 是 Sensu 监控解决方案提供的一种工具,用于使用命令行管理其资源。它通过调用 Sensu 的底层 API 来创建、读取、更新和删除事件、实体和资源。Sensuctl 适用于 Linux、macOS 和 Windows。
下面是在 Debian 或 Ubuntu 系统上安装它的方法。
curl -s https://packagecloud.io/install/repositories/sensu/stable/script.deb.sh | sudo bash
sudo apt install sensu-go-cli
在官方文档页面上了解有关此命令实用程序及其用法的更多信息。
如果您的 Windows WSL 系统上不再需要 Sensu Go 后端和代理,那么这里是删除它们的命令。
sudo apt autoremove --purge sensu-go-backend
sudo apt autoremove --purge sensu-go-agent
The above is the detailed content of How to install Sensu Go Monitoring on Windows 11 or 10 via WSL. For more information, please follow other related articles on the PHP Chinese website!