Nezha Monitoring: An open source, lightweight server and website monitoring, operation and maintenance tool that can monitor the information of multiple hosts in real time and is simple to configure.

888u

Last update at :2024-02-23,Edit by888u

Nezha Monitoring: An open source, lightweight server and website monitoring, operation and maintenance tool that can monitor the information of multiple hosts in real time and is simple to configure. Supports monitoring the system status of multiple servers at the same time, supports monitoring web pages, ports, and SSL certificate status; supports status alarms such as faults and traffic, supports multiple notification methods (Telegram, email, WeChat, etc.); supports online SSH, and supports traffic cycle monitoring , supports setting scheduled tasks and server batch execution tasks; supports one-click script installation panel and monitoring services, easy to use; mainstream systems such as Linux, Windows, MacOS, and OpenWRT are supported.

Nezha monitoring project address: GitHub – naiba/nezha: Self-hosted, lightweight server and website monitoring and O&M tool

During installation, it is divided into a control terminal and a controlled terminal. The control terminal is one host, and the controlled terminals can be multiple.

1. The installation of the control terminal is finally stable and safe

1. Have a domain name and resolve it to the control host IP2. The control host needs to open ports 8008 and 5555. 3. A Github account (or: Gitlab, Jihulab, Gitee)

Get the Client ID and key of Github/Jihulab#Nezha Monitor and access Github, Gitlab, Jihulab, and Gitee as the backend administrator account

First we need to create a new verification application, taking Github as an example. After logging in to Github, open https://github.com/settings/developers and select "OAuth Apps" - "New OAuth App" Application name - fill in whatever you want Homepage URL - fill in the access domain name of the panel, such as: "http://ping.example.com" Authorization callback URL - fill in the callback address, such as: "http://ping.example.com/oauth2/callback" Click "Register" application" save the Client ID in the page, and then click "Generate a new client secret" to create a new Client Secret. The newly created key will only be displayed once, please save it properly

JihuLab’s application creation entrance is: https://jihulab.com/-/profile/applicationsRedirect. The callback address should be filled in in the URL. Check read_user and read_api in the range below. After the creation is completed, save the application ID and password.

4. Install the control panel on the control host

In the panel server, run the installation script:

curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

If your panel server is located in mainland China, you can use mirroring:

curl -L https://jihulab.com/nezha/nezha/-/raw/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh

After Docker is installed, enter the following values: OAuth provider – Select a Client ID from Github, Gitlab, Jihulab, Gitee – the previously saved Client ID; Client Secret – the previously saved key username – from the OAuth provider User name Site title – Custom site title Access port – Public access port, customizable, default 8008 Agent’s communication port – Communication port between Agent and Dashboard, default 5555

After the input is completed, wait for the pull image installation to complete. If everything is normal, you can access the domain name + port number at this time, such as "http://ping.example.com:8008" to view the panel

If you need to run the script again in the future, you can run:

./nezha.sh

To open the management script

5. After configuring the reverse proxy, remember to change the reverse code in the configuration file to the following code: 127.0.0.1 is your control host IP

#PROXY-START/ location/{ proxy_pass http://127.0.0.1:8008; proxy_set_header Host $http_host; proxy_set_header Upgrade $http_upgrade; } 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 $http_host; } #PROXY-END/

5. Database changes. If you need to modify data in the database, please stop the panel container first and then modify it. The database type is sqlite3, located at /opt/nezha/dashboard/data/sqlite.db. Please back up before modifying

2. Installation of the controlled terminal

1. After setting the domain name on the control terminal, the one-click installation code will be displayed after adding the host

2. Execute the above one-click code on the controlled terminal.

Demo: http://ping.kx.al/

Recommended site searches: wordpress space, free asp.net space, Korean server recommendation, domain name query network, space registration, Dalian virtual host, vps dynamic ip server, registration-free space, proxy ip, managed host,

Nezha Monitoring: An open source, lightweight server and website monitoring, operation and maintenance tool that can monitor the information of multiple hosts in real time and is simple to configure.

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