Nezha Panel: The best probe for chicks

888u

Last update at :2024-03-12,Edit by888u

The blogger found a good probe today, the Nezha probe, so the blogger contacted the developer. Developers are lazy and naughty. Tutorial? When I asked, there was no answer. Host Information took over this chore and helped write tutorials. . .

Nezha open source probe: https://github.com/p14yground/nezha

Demo address: https://ops.naibahq.com/

The probe is divided into dashboard panel and agent client, which can be obtained by simply compiling.

Install the dependencies required for compilation:

yum -y install wget git gcc make

Install the go compilation environment:

wget https://golang.org/dl/go1.15.3.linux-amd64.tar.gztar -C /usr/local -xzf go1.15.3.linux-amd64.tar.gzecho “export PATH=\$ PATH:/usr/local/go/bin” >>/etc/profilesource /etc/profile

Compile dashboard:

git clone https://github.com/p14yground/nezha.gitcd nezhago mod tidy -vgo build cmd/dashboard/main.go

Then the main directory will generate a main executable file, create two directories under /root to store the compiled dashboard and agent, and move the compiled dashboard to the corresponding directory.

mkdir -p /root/{dashboard,agent}mv main /root/dashboard/

Compile the agent, just one sentence is enough, and the generated binary file is also moved to the agent directory for direct use in the future:

go build cmd/agent/main.gomv main /root/agent/agent

Write dashboard configuration file:

cp -ra resource /root/dashboard/mkdir /root/dashboard/data/vi /root/dashboard/data/config.yamldebug: truehttpport: 80github:admin:– 7113412 #github idclientid: e34j4bjk34h34vh42k #Create OAuth Apps to obtain clientsecret: ea28bbe4e4jk34b34vdsa9b3b4hk4d5 ##Create OAuth Apps to obtain site:brand: Monitoring panel name cookiename: tulong #Cookie name

The github id, clientid and clientsecret need to be obtained from GitHub. The specific method is as follows:

Find oauth apps in settings to create a new application:

Fill in the site name and URL information:

Copy the avatar URL address and get the github id in the address:

Copy client id and client secret:

After the configuration is completed, start the monitoring panel and log in with your github account.

cd /root/dashboard/./main

After startup, access the domain name and port you configured, log in to your github account and add the server that needs to be monitored. Here we take monitoring the local machine as an example:

Record the ID and key generated by the panel:

Then we run the agent, the -i parameter is connected to the id generated on the panel, and the -p parameter is connected to the key:

cd /root/agent/./agent -i 2 -s localhost:5555 -p 52a1c9abbe -d

Then let’s take a look at the effect. Is it awesome?

This probe does not require complicated configuration. If you want to monitor other chicks, just copy the compiled agent file and run it.

Recommended site searches: US server URL, registration query, registration-free space in mainland China, telecom server rental, vps virtual host, US server, free domain name registration, instant IP server replacement, private server website space, domain name registration information query, < /p>

Nezha Panel: The best probe for chicks

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码