更新:主机中文文档、主机英文文档、服务英文文档、报警英文文档

This commit is contained in:
hhhkkk520 2022-05-20 19:14:49 +02:00
parent a5aa54d483
commit 9388baa310
4 changed files with 152 additions and 6 deletions

View File

@ -1 +1,81 @@
notifications
Nezha Monitoring supports monitoring of server load, CPU, memory, hard disk, bandwidth, data transfer, monthly data transfer, number of processes, number of connections, and sends alarm notifications when one of these items reaches a user-set limit.
<br/>
<br/>
## Flexible notification methods
`#NEZHA#` is the panel message placeholder, the panel will automatically replace the placeholder with the actual message when it triggers the notification
The content of Body is in `JSON` format**When the request type is FORM**the value is in the form of `key:value``value` can contain placeholders that will be automatically replaced when notified. **When the request type is JSON** It will only do string substitution and submit to the `URL` directly.
Placeholders can also be placed inside the URL, and it will perform a simple string substitution when requested.
Refer to the example below, it is very flexible.
- Telegram Example, contributed by [@haitau](https://github.com/haitau)
- NameTelegram Robot message notification
- URLhttps://api.telegram.org/botXXXXXX/sendMessage?chat_id=YYYYYY&text=#NEZHA#
- Request method: GET
- Request type: default
- Body: null
- URL Parameter acquisition instructionsThe XXXXXX in botXXXXXX is the token provided when you follow the official @Botfather in Telegram and enter /newbot to create a new bot. (In the line after _Use this token to access the HTTP API_). The 'bot' are essential. After creating a bot, you need to talk to the BOT in Telegram (send a random message) before you can send a message by using API. YYYYYY is Telegram user's ID, you can get it by talking to the bot @userinfobot.
<br/>
<br/>
## Description of notification rules
### Basic Rules
- Type: one or more types can be selected, such as in a rule to select more than one type, you need to **meet all the selected types at the same time** to trigger the notification (see the example later)
- `cpu``memory``swap``disk`
- `net_in_speed` Inbound speed, `net_out_speed` Outbound speed, `net_all_speed` Inbound + Outbound speed, `transfer_in` Inbound Transfer, `transfer_out` Outbound Transfer, `transfer_all` Total Transfer
- `offline` Offline monitoring
- `load1``load5``load15` Load
- `process_count` Number of processes _Currently, counting the number of processes takes up too many resources and is not supported at the moment_
- `tcp_conn_count``udp_conn_count` Number of connections
- durationLasting for a few seconds, the notification will only be triggered when the sampling record reaches 30% or more within a few seconds
- min/max
- Transfer, network speed, and other values of the same type. Unit is byte (1KB=1024B1MB = 1024\*1024B)
- Memory, hard disk, CPU. units are usage percentages
- No setup required for offline monitoring
- cover `[{"type":"offline","duration":10, "cover":0, "ignore":{"5": true}}]`
- `0` Cover all, use `ignore` to ignore specific servers
- `1` Ignore all, use `ignore` to monitoring specific servers
For example: `[{"type":"offline","duration":10, "cover":0, "ignore":{"5": true}}]`
- ignore: Select to ignore specific servers, use with `cover` with server id and boolean, e.g.: `{"1": true, "2":false}`
**Complete examples:**
:::tip
Add an offline notification
- Name: Offline notification
- Rules: `[{"Type":"offline","Duration":10}]`
- Enable: √
:::
:::tip
Add an notification when the CPU exceeds 50% for 10s **but** the memory usage is below 20% for 20s
- Name CPU and RAM
- Rules: `[{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":20}]`
- Enable: √
:::
<br/>
### Special: Any-cycle transfer notification
Can be used as monthly transfer notificatin
- type
- `transfer_in_cycle` Inbound transfer during the cycle
- `transfer_out_cycle` Outbound transfer during the cycle
- `transfer_all_cycle` The sum of inbound and outbound transfer during the cycle
- `cycle_start` Start date of the statistical cycle (can be the start date of your server's billing cycle), the time format is RFC3339, for example, the format in Beijing time zone is `2022-01-11T08:00:00.00+08:00`
- `cycle_interval` Interval time cycle (For example, if the cycle is in days and the value is 7, it means that the statistics are counted every 7 days)
- `cycle_unit` Statistics cycle unit, default `hour`, optional (`hour`, `day`, `week`, `month`, `year`)
- `min/max`, `cover`, `ignore` Please refer to the basic rules to configure
Example: The server with ID 3 (defined in the `ignore`) is counted on the 15th of each month, and a notification is triggered when the monthly outbound traffic reaches 1TB during the cycle. `[{"type":"transfer_out_cycle","max":1000000000000,"cycle_start":"2022-01-11T08:00:00.00+08:00","cycle_interval":1,"cycle_unit":"month","cover":1,"ignore":{"3":true}}]`
![7QKaUx.md.png](https://s4.ax1x.com/2022/01/13/7QKaUx.md.png)

View File

@ -1 +1,28 @@
servers
# Servers
## Introduction
The Servers area is responsible for managing the Agent, the most basic area in Nezha Monitoring, and the basis for other functions.
## Add a server
The first step is to add a servers, which can be customized with names, groups, display index and notes.
Servers in the same group will be displayed in groups in supported themes, and notes will only be displayed in the admin panel, no need to worry about leaking information.
## Install Agent
Please refer to the previous article: [Install Agent](/en_US/guide/agent.html)
We recommend using one-click installation, that is, **after configuring the communication domain name**, click the button on the column **one-click installation** and copy it to the monitored servers for installation.
## Forced Updates
The flags related to the update of the Agent are: `--disable-auto-update` and `--disable-force-update`. Please refer to [Customize Agent](/en_US/guide/agent.html#customize-agent)
By default, the Agent is updated automatically, but when the user turns off automatic updates, the specified servers can also be selected for forced updates.
This feature does not take effect when `-disable-force-update` is turned on.
## Data List
* Version number: Record the current version of Agent
* Secret: Used when configuring the Agent
* One-Click Installation: A more convenient way to install Agent
* Manage: WebShell on the left, Edit in the middle, Delete on the right
## Webshell
This feature does not take effect when `disable-command-execute` is turned on.
Both Linux and Windows are available and can be pasted using Ctrl+Shift+V.
For connection failure, please refer to [Real-time channel disconnection/online terminal connection failure](/en_US/guide/q4.html).
Note that in theWebShell function, the Agent also connects to the **Domain names for public access** via WebSocket, not via grpc.

View File

@ -1 +1,40 @@
services
**Service area is a function setting area for setting up Agents to monitor external websites or servers**
**The monitoring results can be viewed on the "Services" page in the home page**
<br/>
## How to use
To add a new monitor, you can go to the "Services" page in the administration panel and click "Add Service Monitor".
To add a service monitor, you need to complete the following settings:
+ `Name` - Customize a name
+ `Type` - Select a monitoring type. Nezha currently supports three monitoring types: "HTTP-GET", "ICMP-Ping" and "TCP-Ping".
+ `Target` - Depending on the type you choose, the target is set in different ways
> + `HTTP-GET`: Selecting this type, you should enter a URL as the target, the URL should be added with `http://` or `https://` **If your target URL is `https://`, it will also monitor the SSL certificate of that URL and trigger a notification when the SSL certificate expires or changes.**
For example: https://example.com
> + `ICMP-Ping`: When selecting this type, you should enter a domain name or IP without a port number
For example: 1.1.1.1 or example.com
> + `TCP-Ping`: When selecting this type, you should enter a domain name or IP and include the port number
For example: 1.1.1.1:80 or example.com:22
+ `Interval` Sets the time interval in seconds between each time Agent sends requests to the target
+ `Coverage` Select a rule to determine which Agents to use to send requests to the target
+ `Specific Servers` Use with coverage to select the Agent to be excluded from the rule
+ `Notification Group` Select the notification method you have set up on the "Notification" page. [Click here](/en_US/guide/notifications.html#flexible-notification-methods) for more information
+ `Enable Failure Notification` Select whether to receive target failure notifications as needed, default is inactive
After setting, click "Add" and you are done.
Wait for a moment to go to the "Services" page on the home page to view the monitoring results
<br/>
## Management Monitor
To manage existing service monitoring, you can go to the "Services" page in the administration panel
Select a monitoring configuration and click the icon on the right to edit or delete it

View File

@ -11,7 +11,7 @@
推荐使用一键安装,即**配置好参数后**,点击主机**一键安装**列上的按钮,复制到相应主机进行安装。
## 强制更新
强制更新对应的是[自定义agent监控项目](/guide/agent.html#自定义agent监控项目)中的--disable-auto-update和--disable-force-update。
Agent更新相关的参数是 [自定义agent监控项目](/guide/agent.html#自定义agent监控项目) 中的 `--disable-auto-update` `--disable-force-update`
默认情况下Agent会自动更新无需干预。但当用户关闭自动更新后也可以选中指定主机进行强制更新。
disable-force-update开启时此功能不生效。
@ -22,7 +22,7 @@ disable-force-update开启时此功能不生效。
* 管理: 左为WebShell中为编辑右为删除
## 在线终端
即WebShelldisable-command-execute开启时此功能不生效。
即WebShell`disable-command-execute `开启时此功能不生效。
Linux和Windows均可用可使用Ctrl+Shift+V粘贴。
连接失败请参考[实时通道断开/在线终端连接失败](/guide/q4.html)。
注意在线终端功能中Agent也是通过WebSocket连接到**用户使用域名**而非通过grpc交互。
注意在线终端功能中Agent也是通过WebSocket连接到**公开访问域名**而非通过grpc交互。