当前位置:网站首页>[technical grass planting] how to batch check your server status? Cloud probe panel setup tutorial
[technical grass planting] how to batch check your server status? Cloud probe panel setup tutorial
2022-06-24 01:47:00 【Mintimate】
author :Mintimate
Blog :https://www.mintimate.cn Mintimate's Blog, Just to share with you
Cloud probe
What is a cloud probe ? Cloud probe , In fact, it is to use TCP, After a handshake connection to the server , Get the running status of the server .
This cloud probe , Use Nezha panel , Can realize to oneself ( More than one ) The server :
- Support system status
- HTTP、TCP、Ping Monitoring and alarming
- Planning tasks
- Online terminals
It is recommended that multi server users build , To improve security , Better prepare
- domain name : Used to resolve domain name to Nezha panel ( Probe panel )API Interface , At the same time, you can compile panel migration .
- CDN: The user resolves to the panel monitoring address , Opposite panel IP Protection , It is also convenient for migration .
This tutorial , The scheme used : domain name +CDN+ The server .
Double 11 bought so many servers , Finally, it can be monitored in batches ~
Effect demonstration
In fact, Tencent cloud's console , The information is complete , You can also see the current... On the console CPU And bandwidth , Watch one at a time :
But it is always not intuitive , such as , An individual developer like me , There are several servers , You need to click one by one to view :
Probe function
This is the time , Our probe is set up , You can visually view :
Did you see my two servers at this time CPU It's full ?
Mainly , I'm compiling Android Source code , therefore CPU Run slowly , So the probe , It is also convenient for me to check whether the compilation is completed .
Log in online
Online login function , In fact, it is remote SSH. I know there are a lot of SSH Software for , such as : Tencent cloud's online one click login 、Windows Of Powershell and Linux/macOS Of Terminal wait .
But the Nezha panel also provides one button SSH Sign in , The effect is similar to the online one click login of Tencent cloud :
Login effect :
Of course , Such login , It's Secret free , Use the premise :
- User login Nezha panel
- Yes Nginx Anti generation environment support
Don't talk much , Let's start the tutorial .
precondition
The first is the precondition , The basic requirements are simple :
- At least one server
- Github or Gitee account number
Enhance the experience :
- Two domain names ( No top-level domain name , Two secondary or tertiary domain names are sufficient )
- CDN( Tencent cloud is recommended CDN content distribution )
Recently, double 11 , It is highly recommended that new users purchase servers :https://curl.mintimate.cn/1jccDM8rK1S
here hypothesis I have prepared the domain name :
ops.mintimate.cn: Panel external domain name ( You can use CDN)nezha.mintimate.cn: Probe connection domain name ( Not to be used CDN)
Why do you do this ? Draw a simple diagram :
That is to say :
- Panel external domain name (CDN) It is used for public network access ;
- Probe connection domain name ( Not to be used CDN), It is used to receive probe data , It is convenient to migrate the panel in the future .
CDN analysis
Considering the use of CDN Little buddy , Not as many people as the server , Here is how to use Tencent cloud CDN analysis . First, log in to Tencent cloud CDN backstage :https://console.cloud.tencent.com/cdn
after , Add a domain name here :
Remember to configure Https, Increase security :
Build panels
First we need to apply for a Oauth, Then the panel can be formally built , This server serves as the server where the panel is located and provides probes .
apply Oauth
apply Oauth, You can use GitHub, You can also use Gitee Of , Take one of the two :
In this paper, Gitee Method ,GitHub In fact, it's almost .
The permission can be set by default :
among :
- apply name : at will , Just a code name. .
- Application description : Ditto panel external domain name , It can be for IP, But it's not safe .
- App home : As above, add the callback address to the external domain name in the panel , Nezha panel callback address is :
/oauth2/callback
After creating the app , obtain :
- Client ID: client ID, The following text requires .
- Client Secret: Client key , The following text requires .
The creation is complete
Remote connection
Here we use SSH Connect to our server remotely :
Here I use the server oh-my-zsh, If you want to use , article :Linux/Mac How to configure ZSH And use Oh-my-zsh? Make your terminal more practical 、 beautiful
Run script
According to official website Project tips , We can use the one click installation script to install :
curl -L https://cdn.jsdelivr.net/gh/naiba/[email protected]/script/install.sh -o nezha.sh && chmod +x nezha.sh CN=true sudo ./nezha.sh
Note here , We'd better run the script in an empty folder , It is convenient to call up the script control interface later , such as :
after , Will ask if , We choose 1:
After selection , Input Gitee( If you use GitHub, Just hit enter ):
Last , Enter the client generated above ID And key :
Here we are , The panel is installed . Actually , You can release 8008 After the port , The browser visited . But for the convenience of access 、 Security , Use Nginx Reverse proxy .
Be careful , This is the administrator account :
Nginx Reverse proxy
Nginx Reverse proxy is too simple , But consider that many users use pagoda panels , So there is a two-step demonstration :
- Conventional methods : Use compile 、 Package manager or Docker Installed Nginx, Set up your own Nginx.conf.
- Pagoda method : Use the pagoda to install Nginx.
If you don't know how to install Ngixn, Reference resources : An article 、 There are three ways Debian Easy to install on Nginx
The domain name resolved here is the external domain name of the panel mentioned above ( You can use CDN), This is what was assumed above ops.mintimate.cn. If it's Tencent cloud CDN, You can go to CDN Console Set up .
Conventional methods
Conventional methods , Create a new one conf, stay conf Add reverse proxy in :
location /
{
proxy_pass http://127.0.0.1:8008;
proxy_set_header Host $host;
}
location ~ ^/(ws|terminal/.+)$
{
proxy_pass http://127.0.0.1:8008;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}among :
location ~ ^/(ws|terminal/.+)$
{
proxy_pass http://127.0.0.1:8008;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}For remote terminal function , need Nginx Install regular rules , If you do not need the remote login function , Don't write .
Last , Save overloads Nginx The configuration can be .
Pagoda method
The pagoda method is also very simple , After adding a website , Select reverse proxy :
After adding any proxy , Editing :
Paste content :
location /
{
proxy_pass http://127.0.0.1:8008;
proxy_set_header Host $host;
}
location ~ ^/(ws|terminal/.+)$
{
proxy_pass http://127.0.0.1:8008;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}among :
location ~ ^/(ws|terminal/.+)$
{
proxy_pass http://127.0.0.1:8008;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}For remote terminal function , need Nginx Install regular rules , If you do not need the remote login function , Don't write .
Browser access
This is the time , You can access it through the browser , If open CDN, There may be a caching mechanism , Remember to cache .
Create probe
Now? , We can create the probe , The first is the initialization of the panel , Then create the probe , Finally, place the probe .
Initialization panel
Initialization panel , It's simple . After browser access panel , Click login :
after , Will use Gitee/GitHub To verify :
After verification , Our initialization is complete .
Add key
after , We add a key , Click on the Add host :
This key is very important , That's what follows Agent secret key , Used to bind the server .
Insert the probe
after , We log in to the server we need to detect , Run... Above Build panels - Run script One click script in , That is to say :
curl -L https://cdn.jsdelivr.net/gh/naiba/[email protected]/script/install.sh -o nezha.sh && chmod +x nezha.sh CN=true sudo ./nezha.sh
Of course , If you have run this script before , You can run the script directly :
This is the time , We are not choosing Install the panel end 了 , But to choose 8( Installation monitoring Agent):
among :
- Don't go ahead CDN Domain name of , That's what I mentioned above “「
nezha.mintimate.cn: Probe connection domain name ( Not to be used CDN)」”
This is the time , We can go to the panel home page , See our server :
matters needing attention
Of course , You can also add more probes , But we need to pay attention :
- Add host after , The key may not be displayed immediately , This is the reason for caching ; If you don't use it CDN, You can force the browser to refresh directly , If you use CDN, You can go to CDN The console is refreshed and preheated .
- The migration panel is simple , Data is stored in
/opt/nezhaIn the folder , Package this folder when migrating data , Unzip to the new environment . Then execute the one click script installation .
END
Here we are , Our cloud probe panel has been installed . Many people are concerned about performance , In fact, whether it is a panel or a probe , The memory consumption of the server is extremely low .
among , Panel function , Can be found in 64M Running on the memory server , Probe words , Not to mention oh .
边栏推荐
- Tcapulusdb Jun · industry news collection
- [tcapulusdb knowledge base] how to rebuild tables in tcapulusdb table management?
- Netease Shufan: Data productivity platform 2.0 promotes "everyone uses data and always uses data"
- Why use CDN content distribution network?
- Coding compass -- creating a software factory like a flowing cloud
- Disaster recovery series (VI) -- data storage disaster recovery construction
- Tcapulusdb pays high tribute to Chinese journalists!
- This invincible design can analyze and operate any mathematical expression
- Tke cluster setup linkerd2
- Zoom supports automatic generation of subtitles; Shareplay goes online; Safari update leads to a large number of bugs | webrtc wind direction
猜你喜欢
![[SQL injection 12] user agent injection foundation and Practice (based on burpsuite tool and sqli labs LESS18 target machine platform)](/img/c8/f6c2a62b8ab8fa88bd2b3d8f35f592.jpg)
[SQL injection 12] user agent injection foundation and Practice (based on burpsuite tool and sqli labs LESS18 target machine platform)

I, a 27 year old female programmer, feel that life is meaningless, not counting the accumulation fund deposit of 430000
![[SQL injection 13] referer injection foundation and Practice (based on burpseuite tool and sqli labs less19 target platform)](/img/b5/a8c4bbaf868dd20b7dc9449d2a4378.jpg)
[SQL injection 13] referer injection foundation and Practice (based on burpseuite tool and sqli labs less19 target platform)

It's too difficult for me. Ali has had 7 rounds of interviews (5 years of experience and won the offer of P7 post)
随机推荐
What are the selected CDN content acceleration scenarios of Tencent cloud?
How to realize court face recognition / flow statistics based on easycvr technology?
If the program exits abnormally, how to catch the fatal error through the go language?
Common e-commerce data index system
SMS marketing is the key to retain customers
Build your own DSL with go and HCl
[tcapulusdb knowledge base] how to get started with tcapulus SQL driver?
Horizontal movement of Intranet penetration -- password spray attack from domain to domain
From idea to finished product, the necessary process of APP product development
[tcapulusdb knowledge base] how does tcapulusdb add a business cluster cluster?
AES encryption analysis of CNKI academic translation
SAP mm Migo 411k error - correct the customizing settings for the unique
Oracle sqlldr quick import and sqluldr2 quick export
Can the fortress machine connect to the ECS? What are the reasons why the fortress cannot connect to the ECS?
[tcapulusdb knowledge base] common problems of tcapulusdb local deployment
How to develop the industrial Internet platform?
How does the education industry realize the TRTC interactive classroom apaas solution under the "double reduction policy"?
What does fortress server mean? What are the benefits of Fortress server installation
Comparison between rule engine and ML model - xlaszlo
What is data analysis? Analysis is not storytelling... - Cassie kozyrkov