更新:中英文通知文档、中英文安装文档
This commit is contained in:
parent
a308d49a02
commit
b71ea0091e
@ -9,6 +9,10 @@ This document uses "cdn.example.com" and "data.example.com" domains to demonstra
|
|||||||
3. A Github or Gitlab account
|
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/>
|
||||||
<br/>
|
<br/>
|
||||||
## Get the Client ID and Client Secret on Github/Gitlab
|
## Get the Client ID and Client Secret on Github/Gitlab
|
||||||
|
@ -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}`
|
- ignore: Select to ignore specific servers, use with `cover` with server id and boolean, e.g.: `{"1": true, "2":false}`
|
||||||
|
|
||||||
**Complete examples:**
|
**Complete examples:**
|
||||||
:::tip
|
|
||||||
Add an offline notification
|
|
||||||
|
|
||||||
- Name: Offline notification
|
>>Add an offline notification
|
||||||
- Rules: `[{"Type":"offline","Duration":10}]`
|
>
|
||||||
- Enable: √
|
> - 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}]`
|
>>Add an notification when the CPU exceeds 50% for 10s **but** the memory usage is below 20% for 20s
|
||||||
- Enable: √
|
>
|
||||||
:::
|
> - 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: √
|
||||||
|
|
||||||
|
**Using these rules flexibly will help you to make full use of the notification function**
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
### Special: Any-cycle transfer notification
|
### 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`)
|
- `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
|
- `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}}]`
|
||||||

|

|
@ -1,7 +1,7 @@
|
|||||||
## 准备工作
|
## 准备工作
|
||||||
|
|
||||||
搭建一个哪吒监控,你需要:
|
搭建一个哪吒监控,你需要:
|
||||||
1. 一台可以连接公网的VPS,防火墙和安全策略需要放行8008和5555端口,否则会无法访问和无法接收数据。单核512MB内存的服务器配置就足以满足大多数使用场景
|
1. 一台可以连接公网的VPS,防火墙和安全策略需要放行 8008 和 5555 端口,否则会无法访问和无法接收数据。单核512MB内存的服务器配置就足以满足大多数使用场景
|
||||||
2. 一个已经设置好A记录,指向Dashboard服务器ip的域名
|
2. 一个已经设置好A记录,指向Dashboard服务器ip的域名
|
||||||
::: tip
|
::: tip
|
||||||
如果你想使用CDN,请准备两个域名,一个配置好CDN用作公开访问,CDN需要支持WebSocket协议;另一个域名不要使用CDN,用作Agent端与Dashboard的通信
|
如果你想使用CDN,请准备两个域名,一个配置好CDN用作公开访问,CDN需要支持WebSocket协议;另一个域名不要使用CDN,用作Agent端与Dashboard的通信
|
||||||
@ -13,6 +13,10 @@
|
|||||||
:::
|
:::
|
||||||
|
|
||||||
**本文档将以宝塔面板反代面板的过程作为范例,随着未来版本的变化,部分功能的入口可能会发生改变,本文档仅供参考**
|
**本文档将以宝塔面板反代面板的过程作为范例,随着未来版本的变化,部分功能的入口可能会发生改变,本文档仅供参考**
|
||||||
|
:::warning
|
||||||
|
本项目并不依赖宝塔,你可以选择使用你喜欢的任何服务器面板,如果你能力足够,可以手动安装 NginX 或 Caddy 来配置SSL和反代。
|
||||||
|
如果你认为没有必要使用 80、443 端口来访问 Dashboard,你甚至不需要安装 NginX 就可以直接使用安装脚本。
|
||||||
|
:::
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
|
@ -88,24 +88,48 @@ URL 里面也可放置占位符,请求时会进行简单的字符串替换。
|
|||||||
- `0` 监控所有,通过 `ignore` 忽略特定服务器
|
- `0` 监控所有,通过 `ignore` 忽略特定服务器
|
||||||
- `1` 忽略所有,通过 `ignore` 监控特定服务器
|
- `1` 忽略所有,通过 `ignore` 监控特定服务器
|
||||||
例如:`[{"type":"offline","duration":10, "cover":0, "ignore":{"5": true}}]`
|
例如:`[{"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}]`
|
||||||
|
> - 启用:√
|
||||||
|
|
||||||
:::tip
|
|
||||||
添加一个监控 CPU 持续 10s 超过 50% **且** 内存持续 20s 占用低于 20% 的报警
|
|
||||||
|
|
||||||
- 名称:CPU+内存
|
|
||||||
- 规则:`[{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":20}]`
|
>>添加一个监控 CPU 持续 10s 超过 50% **且** 内存持续 20s 占用低于 20% 的报警
|
||||||
- 启用:√
|
>
|
||||||
:::
|
> - 名称:CPU+内存
|
||||||
|
> - 规则:`[{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":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
|
||||||
|
> - 启用:√
|
||||||
|
|
||||||
|
**灵活使用参数可以让你的通知功能被充分使用**
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
### 特殊:任意周期流量报警
|
### 特殊:任意周期流量报警
|
||||||
@ -121,5 +145,8 @@ URL 里面也可放置占位符,请求时会进行简单的字符串替换。
|
|||||||
- cycle_unit 统计周期单位,默认`hour`,可选(`hour`, `day`, `week`, `month`, `year`)
|
- cycle_unit 统计周期单位,默认`hour`,可选(`hour`, `day`, `week`, `month`, `year`)
|
||||||
- min/max、cover、ignore 参考基本规则配置
|
- 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}}]`
|
||||||

|

|
||||||
|
Loading…
x
Reference in New Issue
Block a user