更新:中英文通知文档、中英文安装文档

This commit is contained in:
“hhhkkk520” 2022-07-31 13:13:55 +02:00
parent a308d49a02
commit b71ea0091e
4 changed files with 92 additions and 31 deletions

View File

@ -8,7 +8,11 @@ This document uses "cdn.example.com" and "data.example.com" domains to demonstra
:::
3. A Github or Gitlab account
**This document will use the aaPanel as an example, with future versions of the changes, some of the features may change, this document is for reference only**
**This document will use the aaPanel as an example, with future versions of the changes, some of the features may change, this document is for reference only**
:::warning
This project does not rely on aaPanel, you can choose to use any server panel you like, and if you are capable enough, you can manually install NginX or Caddy to configure SSL and reverse proxy.
If you don't think it's necessary to use port 80 or 443 to access Dashboard, you don't even need to install NginX and you can just use the install script.
:::
<br/>
<br/>
## Get the Client ID and Client Secret on Github/Gitlab

View File

@ -78,21 +78,44 @@ Refer to the example below, it is very flexible.
- 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
>>Add an offline notification
>
> - Name: Offline notification
> - Rules: `[{"Type":"offline","Duration":10}]`
> - Enable: √
- Name: Offline notification
- Rules: `[{"Type":"offline","Duration":10}]`
- Enable: √
:::
>>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: √
>>Send specific server notifications to specific notification groups
>
>Case:
>You have four servers, 1, 2, 3, 4, and two different notification groups, A and B
>1, 2 The two servers are down for 10 minutes and send a notification to Notification Group A
>3, 4 These two servers are down for ten minutes and then send a notification to Notification Group B
>
>First you need to set up two notification groups, A and B, and then add two alarm rules:
>
>**Rule I:**
> - Name: 1, 2 Off-line, send notification to group A
> - Rules:`[{"type":"offline","duration":600,"cover":1,"ignore":{"1":true,"2":true}}]`
> - Notification group: A
> - Enable: √
>
>**Rule II:**
> - Name: 3, 4 Off-line, send notification to group B
> - Rules:`[{"type":"offline","duration":600,"cover":1,"ignore":{"3":true,"4":true}}]`
> - Notification group: B
> - 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: √
:::
**Using these rules flexibly will help you to make full use of the notification function**
<br/>
### Special: Any-cycle transfer notification
@ -109,5 +132,8 @@ Can be used as monthly transfer notificatin
- `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 servers with ID 3 and 4 (defined in the `ignore`) are counted on the 1st of each month, and a notification is triggered when the monthly outbound transfer reaches 1TB during the cycle. `[{"type":"transfer_out_cycle","max":1099511627776,"cycle_start":"2022-01-01T00:00:00+08:00","cycle_interval":1,"cycle_unit":"month","cover":1,"ignore":{"3":true,"4":true}}]`
>Example:
>>The servers with ID 3 and 4 (defined in the `ignore`) are counted on the 1st of each month, and a notification is triggered when the monthly outbound transfer reaches 1TB during the cycle.
>
> `[{"type":"transfer_out_cycle","max":1099511627776,"cycle_start":"2022-01-01T00:00:00+08:00","cycle_interval":1,"cycle_unit":"month","cover":1,"ignore":{"3":true,"4":true}}]`
![7QKaUx.md.png](https://s4.ax1x.com/2022/01/13/7QKaUx.md.png)

View File

@ -1,7 +1,7 @@
## 准备工作
搭建一个哪吒监控,你需要:
1. 一台可以连接公网的VPS防火墙和安全策略需要放行8008和5555端口否则会无法访问和无法接收数据。单核512MB内存的服务器配置就足以满足大多数使用场景
1. 一台可以连接公网的VPS防火墙和安全策略需要放行 8008 5555 端口否则会无法访问和无法接收数据。单核512MB内存的服务器配置就足以满足大多数使用场景
2. 一个已经设置好A记录指向Dashboard服务器ip的域名
::: tip
如果你想使用CDN请准备两个域名一个配置好CDN用作公开访问CDN需要支持WebSocket协议另一个域名不要使用CDN用作Agent端与Dashboard的通信
@ -12,7 +12,11 @@
如果您位于中国大陆,访问 Github 有困难,我们建议您选择 Jihulab 作为OAuth提供商
:::
**本文档将以宝塔面板反代面板的过程作为范例,随着未来版本的变化,部分功能的入口可能会发生改变,本文档仅供参考**
**本文档将以宝塔面板反代面板的过程作为范例,随着未来版本的变化,部分功能的入口可能会发生改变,本文档仅供参考**
:::warning
本项目并不依赖宝塔,你可以选择使用你喜欢的任何服务器面板,如果你能力足够,可以手动安装 NginX 或 Caddy 来配置SSL和反代。
如果你认为没有必要使用 80、443 端口来访问 Dashboard你甚至不需要安装 NginX 就可以直接使用安装脚本。
:::
<br/>
<br/>

View File

@ -88,24 +88,48 @@ URL 里面也可放置占位符,请求时会进行简单的字符串替换。
- `0` 监控所有,通过 `ignore` 忽略特定服务器
- `1` 忽略所有,通过 `ignore` 监控特定服务器
例如:`[{"type":"offline","duration":10, "cover":0, "ignore":{"5": true}}]`
- ignore: 选择忽略特定服务器,搭配 `cover` 使用内容为服务器id和布尔值例如`{"1": true, "2":false}`
- ignore: 选择忽略特定服务器,搭配 `cover` 使用,内容为服务器 id 和布尔值,例如:`{"1": true, "2":false}`
**完整示例:**
:::tip
添加一个离线报警
>>添加一个离线报警
>
> - 名称:离线通知
> - 规则:`[{"Type":"offline","Duration":10}]`
> - 启用:√
- 名称:离线通知
- 规则:`[{"Type":"offline","Duration":10}]`
- 启用:√
:::
>>添加一个监控 CPU 持续 10s 超过 50% **且** 内存持续 20s 占用低于 20% 的报警
>
> - 名称CPU+内存
> - 规则:`[{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":20}]`
> - 启用:√
:::tip
添加一个监控 CPU 持续 10s 超过 50% **且** 内存持续 20s 占用低于 20% 的报警
>>将特定的服务器通知发送到特定的通知分组
>
>示例场景:
>你有 1、2、3、4 四台服务器和 A、B 两个不同的通知组
>1、2 这两台服务器掉线十分钟后给通知组 A 发送通知
>3、4 这两台服务器掉线十分钟后给通知组 B 发送通知
>
>首先你需要先设置好 A、B 两个通知组,然后添加两条报警规则:
>
>**规则一:**
> - 名称1、2 离线,发送给通知组 A
> - 规则:`[{"type":"offline","duration":600,"cover":1,"ignore":{"1":true,"2":true}}]`
> - 通知方式组: A
> - 启用:√
>
>**规则二:**
> - 名称3、4 离线,发送给通知组 B
> - 规则:`[{"type":"offline","duration":600,"cover":1,"ignore":{"3":true,"4":true}}]`
> - 通知方式组: B
> - 启用:√
- 名称CPU+内存
- 规则:`[{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":20}]`
- 启用:√
:::
**灵活使用参数可以让你的通知功能被充分使用**
<br/>
### 特殊:任意周期流量报警
@ -121,5 +145,8 @@ URL 里面也可放置占位符,请求时会进行简单的字符串替换。
- cycle_unit 统计周期单位,默认`hour`,可选(`hour`, `day`, `week`, `month`, `year`)
- min/max、cover、ignore 参考基本规则配置
示例: ID 为 3 和 4 的服务器ignore 里面定义),以每月 1 号为统计周期,周期内统计的出站月流量达到 1TB 时报警 `[{"type":"transfer_out_cycle","max":1099511627776,"cycle_start":"2022-01-01T00:00:00+08:00","cycle_interval":1,"cycle_unit":"month","cover":1,"ignore":{"3":true,"4":true}}]`
>示例:
>> ID 为 3 和 4 的服务器ignore 里面定义),以每月 1 号为统计周期,周期内统计的出站月流量达到 1TB 时报警
>
>`[{"type":"transfer_out_cycle","max":1099511627776,"cycle_start":"2022-01-01T00:00:00+08:00","cycle_interval":1,"cycle_unit":"month","cover":1,"ignore":{"3":true,"4":true}}]`
![7QKaUx.md.png](https://s4.ax1x.com/2022/01/13/7QKaUx.md.png)