Skip to content

Commit

Permalink
更新帮助文档目录结构“
Browse files Browse the repository at this point in the history
Signed-off-by: jikun.zhang <[email protected]>
  • Loading branch information
jikun.zhang committed Jul 1, 2022
1 parent 6e53075 commit 5365b45
Show file tree
Hide file tree
Showing 107 changed files with 129 additions and 132 deletions.
56 changes: 28 additions & 28 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## PrometheusAlert全家桶
# PrometheusAlert全家桶

---------------------------------------

![author](https://img.shields.io/badge/author-jikun.zhang-blueviolet.svg)
![license](https://img.shields.io/github/license/feiyu563/PrometheusAlert.svg)
Expand All @@ -14,21 +16,19 @@
[![Travis](https://img.shields.io/badge/language-JavaScript-yellow.svg)]()
[![Travis](https://img.shields.io/badge/language-Shell-blue.svg)]()

-----------------
---------------------------------------

PrometheusAlert是开源的运维告警中心消息转发系统,支持主流的监控系统Prometheus、Zabbix,日志系统Graylog2,Graylog3、数据可视化系统Grafana、SonarQube。阿里云-云监控,以及所有支持WebHook接口的系统发出的预警消息,支持将收到的这些消息发送到钉钉,微信,email,飞书,腾讯短信,腾讯电话,阿里云短信,阿里云电话,华为短信,百度云短信,容联云电话,七陌短信,七陌语音,TeleGram,百度Hi(如流)等。

![it](doc/it.png)
![it](doc/images/it.png)

----------------------------------------

-----------------
* 如果这个项目能为您带来帮助,我将感到非常荣幸!同时非常欢迎您加入PrometheusAlert全家桶的微信群一起探讨关于PrometheusAlert新一期的开发计划。

* PrometheusAlert的成长离不开所有爱好运维和开发的朋友们的支持!如果您也对这个项目感兴趣,请点击一下 Star 以示鼓励,谢谢


<br>
<br>

----------------------------------------

## 构建

Expand Down Expand Up @@ -67,10 +67,7 @@ copy conf/app-example.conf conf/app.conf
curl http://localhost:8080/health
```


<br/>
<br/>

-------------------------------------

## 启动

Expand Down Expand Up @@ -111,18 +108,16 @@ feiyu563/prometheus-alert:latest

所有的配置文件内容请[点击此处](https://github.com/feiyu563/PrometheusAlert/blob/master/conf/app-example.conf)查看

<br>
<br>

-----------------
---------------------------------------

![dashboard](doc/images/dashboard.png)
![dashboard-test](doc/images/template.png)

--------------------------------------

PrometheusAlert具备如下特性
---------------------
## PrometheusAlert具备如下特性

--------------------------------------

- 支持任意包含WebHook接口系统的消息作为消息来源,常见的如Prometheus,Zabbix,Graylog2,Graylog3,Grafana,SonarQube和其他WebHook接口的系统。
- 支持多种类型的发送目标,支持钉钉,企业微信,email,飞书,腾讯短信,腾讯语音,阿里云短信,阿里云语音,华为短信,百度云短信,容联云电话,七陌短信,七陌语音,TeleGram,百度Hi(如流)。
Expand All @@ -142,10 +137,12 @@ PrometheusAlert具备如下特性
- 增加告警语音播报插件。
- 增加支持飞书机器人应用。

---------------------
-------------------------------------

## 致谢以下伙伴对PrometheusAlert的贡献

--------------------------------------

致谢以下伙伴对PrometheusAlert的贡献
---------------------
- [@cyancow](https://github.com/cyancow)
- [@birkh8792](https://github.com/birkh8792)
- [@minibear2333](https://github.com/minibear2333)
Expand All @@ -156,21 +153,24 @@ PrometheusAlert具备如下特性
- [@guvmao](https://github.com/guvmao)
- [@lusson-luo](https://github.com/lusson-luo)


--------------------------------------

## PrometheusAlert全家桶新手入门

--------------------------------------

### 系统接入PrometheusAlert流程

#### PrometheusAlert的原理就是通过自定义模版接口`/prometheusalert`接收各种告警系统或者任何带有WebHook功能的系统发来的消息,然后将收到的消息经过自定义模板渲染成消息文本,最终转发给不同的接收目标。

#### 一般情况下如果使用的是钉钉,企业微信、飞书等机器人作为接收目标的,可以不去配置PrometheusAlert的配置文件app.conf;但是如果需要使用如短信,电话,邮箱等功能,则需要先配置好app.conf中的相关配置项方可使用。

- 1.安装好PrometheusAlert 参考:[安装部署PrometheusAlert](base-install.md)
- 2.配置 app.conf [可选] 参考:[【 app.conf 默认参数配置】](conf.md)
- 1.安装好PrometheusAlert 参考:[安装部署PrometheusAlert](doc/readme/base-install.md)
- 2.配置 app.conf [可选] 参考:[【 app.conf 默认参数配置】](doc/readme/conf.md)
- 3.配置告警系统接入PrometheusAlert 参考:[【告警系统接入PrometheusAlert配置】](doc/readme/system.md)

-------------------------------------

### 目录

* [【PrometheusAlert入门】](doc/readme/base-install.md)
Expand Down Expand Up @@ -226,19 +226,19 @@ PrometheusAlert具备如下特性

项目源码

----
--------------------------------------

- [【GitHub】: PrometheusAlert](https://github.com/feiyu563/PrometheusAlert)
- [【码云】: PrometheusAlert](https://gitee.com/feiyu563/PrometheusAlert)

---
--------------------------------------

加入PrometheusAlert微信交流群

----
--------------------------------------


![me](doc/wx.png)
![me](doc/images/wx.png)

---

Expand Down
Binary file removed doc/dashboard.png
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file removed doc/markdown.png
Diff not rendered.
11 changes: 7 additions & 4 deletions doc/readme/base-install.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 安装部署PrometheusAlert
# 安装部署PrometheusAlert

## 部署方式

部署方式
----

PrometheusAlert可以部署在本地和云平台上,支持windows、linux、公有云、私有云、混合云、容器和kubernetes。你可以根据实际场景或需求,选择相应的方式来部署PrometheusAlert:
Expand Down Expand Up @@ -77,7 +78,8 @@ helm upgrade --install monitor prometheusalert -n monitoring
```
--------------------------------------------------------------------

配置PrometheusAlert使用mysql作为后端数据存储
## 配置PrometheusAlert使用mysql作为后端数据存储

----
- PrometheusAlert默认使用sqlite3作为后端自定义模板的存储,这种方式适合于单机部署,满足绝大部分生产场景使用。考虑到部分企业对于服务的高可用要求较高,同时也为了让PrometheusAlert更易于横向扩展,用户可以更改PrometheusAlert的默认存储为mysql。(推荐使用mysql 5.7及以上版本)
- 1.创建数据库
Expand All @@ -103,7 +105,8 @@ helm upgrade --install monitor prometheusalert -n monitoring
--------------------------------------------------------------------
PrometheusAlert语音播报插件部署
## PrometheusAlert语音播报插件部署
----
- PrometheusAlert语音播报插件目前仅支持windows系统部署,用于将从PrometheusAlert接收到的告警消息文本转换为语音播报给用户。
Expand Down
2 changes: 1 addition & 1 deletion doc/readme/base-metrics.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## PrometheusAlert Metrics接口说明
# PrometheusAlert Metrics接口说明

PrometheusAlert默认支持Metrics,可通过Prometheus进行收集指标信息,目前该功能处于测试阶段,欢迎体验及提供建议。

Expand Down
2 changes: 1 addition & 1 deletion doc/readme/base-other.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 其他配置
# user.csv值班配置

另外 PrometheusAlert 同时支持按照日期发送告警到不同号码,并且已经加入告警失败或者被告警人未接听电话后转联系默认联系人(defaultphone),只需新建user.csv文件,并将文件放到程序运行目录下即可自动加载

Expand Down
6 changes: 3 additions & 3 deletions doc/readme/base-restful.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
## PrometheusAlert接口说明
# PrometheusAlert接口说明

--------------------------------------

PrometheusAlert 目前提供以下几类接口,分别对应各自接入端,负责解析各自接口传入或者传出的消息。

### prometheusalert自定义模版接口
## prometheusalert自定义模版接口

```
/prometheusalert #自定义模版接口,可通过Dashboard自定义模版后,支持任意WebHook接入
```

#### Url参数解释:
### Url参数解释:

- `type=?`:指定消息转发的目标类型,如钉钉、企业微信、飞书等;`该参数为必选参数`

Expand Down
6 changes: 0 additions & 6 deletions doc/readme/conf-7moor.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
- 文档: developer.7moor.com
- 用户后台: kf.7moor.com

<br>

使用7moor短信或webcall语音通知需要以下配置:

Expand All @@ -18,7 +17,6 @@
- webcall虚拟服务号
- webcall语音通知,文本节点里语音信息替换的变量

<br>

**注意:**

Expand All @@ -29,10 +27,6 @@
- 七陌webcall语音通知,语速、重复次数、语调、音声等请自己在用户后台配置。


<br>
<br>


## 相关配置

```
Expand Down
6 changes: 3 additions & 3 deletions doc/readme/conf-aliyun.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 阿里云短信和电话告警配置
# 阿里云短信和电话告警配置

开启阿里云短信告警和语音告警需要提前注册好阿里云平台的帐号。并开通阿里云短信和语音相关服务。

Expand Down Expand Up @@ -45,11 +45,11 @@ ALY_DH_TtsCode=xxxxxxxx
```
开通阿里云语音服务,并进行资质管理认证,添加语音通知模板(建议模板内容使用中文,阿里云语音服务朗读会比较清晰)

![aliyun01](../aliyun-01.png)
![aliyun01](../images/aliyun-01.png)

在AlertTemplate中创建阿里云电话通知模板,内容可参照如图(appname为我自定义标签,可修改为自己的定义的标签)

![aliyun02](../aliyun-02.png)
![aliyun02](../images/aliyun-02.png)

在prometheus中添加rules,如下(description为语音朗读内容)

Expand Down
2 changes: 1 addition & 1 deletion doc/readme/conf-bark.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PrometheusAlert全家桶Bark配置说明
# PrometheusAlert全家桶Bark配置说明

-----------------

Expand Down
2 changes: 1 addition & 1 deletion doc/readme/conf-bd.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 百度云短信配置
# 百度云短信配置

目前百度云仅支持短信告警渠道,开启百度云短信告警渠道需要提前注册好百度云平台的帐号。并开通百度云短信相关服务。

Expand Down
12 changes: 6 additions & 6 deletions doc/readme/conf-dingding.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
PrometheusAlert全家桶钉钉配置说明
# PrometheusAlert全家桶钉钉配置说明

-----------------

**开启钉钉机器人**

打开钉钉,进入钉钉群中,选择群设置-->智能群助手-->添加机器人-->自定义,可参下图:

![ding](../dingding1.png)
![ding](../images/dingding1.png)

![ding2](../dingding2.png)
![ding2](../images/dingding2.png)

新版本的钉钉加了安全设置,只需选择安全设置中的 自定义关键词 即可,并将关键词设置为 Prometheus或者app.conf中设置的title值均可,参考下图

![ding3](../dingding3.png)
![ding3](../images/dingding3.png)

![ding4](../dingding4.png)
![ding4](../images/dingding4.png)

复制图中的Webhook地址,并填入PrometheusAlert配置文件app.conf中对应配置项即可。

**PS: 钉钉机器人目前已经支持 `@某人` ,使用该功能需要取得对应用户的钉钉关联手机号码,如下图:**
![ding4](../dingding5.png)
![ding4](../images/dingding5.png)

钉钉目前支持只支持markdown语法的子集,具体支持的元素如下:

Expand Down
2 changes: 1 addition & 1 deletion doc/readme/conf-email.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PrometheusAlert全家桶Email配置说明
# PrometheusAlert全家桶Email配置说明

-----------------

Expand Down
1 change: 0 additions & 1 deletion doc/readme/conf-es.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@ to_es_url=http://localhost:9200

![kibana-index](../images/kibana-index.png)

<br/>

![kibana-table](../images/kibana-table.png)
14 changes: 7 additions & 7 deletions doc/readme/conf-feishu.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PrometheusAlert全家桶飞书配置说明
# PrometheusAlert全家桶飞书配置说明

-----------------

Expand All @@ -11,27 +11,27 @@ PrometheusAlert全家桶飞书配置说明

打开飞书,进入飞书群中,选择群设置-->群机器人-->添加机器人-->Custom Bot,可参下图:

![fei](../feishu1.png)
![fei](../images/feishu1.png)

![fei2](../feishu2.png)
![fei2](../images/feishu2.png)

![fei3](../feishu3.png)
![fei3](../images/feishu3.png)

复制图中的Webhook地址,并填入PrometheusAlert配置文件app.conf中对应配置项即可。


**开启飞书机器人v2**

进入你的目标群组,打开会话设置,找到群机器人,并点击添加机器人。选择通知机器人,添加Custom Bot(自定义机器人)加入群聊。
![fei4](../feishu4.png)
![fei4](../images/feishu4.png)
为你的机器人输入一个合适的名字和描述,并选择添加。同时,你会获取该群组的 webhook 地址,格式如下。请妥善保存好此地址,避免泄露,恶意发送信息。
![fei5](../feishu5.gif)
![fei5](../images/feishu5.gif)
飞书V2接口的告警消息采用`消息卡片`消息模式,使用`lark_md`消息格式。
消息格式参考:
https://open.feishu.cn/document/ukTMukTMukTM/uADOwUjLwgDM14CM4ATN


**PS: 飞书机器人V2目前已经支持 `@某人` ,使用该功能需要取得对应用户的飞书关联的Email邮箱地址。**
**PS: 飞书机器人V2目前已经支持 `@某人` ,使用该功能需要取得对应用户的飞书关联的Email邮箱地址。**

飞书相关配置:

Expand Down
16 changes: 8 additions & 8 deletions doc/readme/conf-feishuapp.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PrometheusAlert全家桶飞书机器人应用配置说明
# PrometheusAlert全家桶飞书机器人应用配置说明

-----------------

Expand All @@ -8,28 +8,28 @@ PrometheusAlert全家桶飞书机器人应用配置说明

打开飞书开放平台,创建飞书企业自建app应用 https://open.feishu.cn/app/

![fei](../fsapp登录创建机器人1.png)
![fei](../images/fsapp登录创建机器人1.png)

![fei2](../fsapp登录创建机器人2.png)
![fei2](../images/fsapp登录创建机器人2.png)

创建完成后,选择刚刚创建的应用,进入应用管理后台,选择 应用功能--> 机器人,开启应用的机器人能力

![fei3](../fsapp启用机器人3.png)
![fei3](../images/fsapp启用机器人3.png)

继续分配应用权限,选择 权限管理--> 消息与群组,开通以下权限
- 给多个用户批量发消息
- 给一个或多个部门的成员批量发消息
- 获取与发送单聊、群组消息

![fei4](../fsapp分配机器人权限4.png)
![fei4](../images/fsapp分配机器人权限4.png)

最后发布应用版本,让具有管理员权限的用户去审核申请的权限和发布请求即可

![fei5](../fsapp版本管理5.png)
![fei5](../images/fsapp版本管理5.png)

审核完成后,获取到飞书应用的 `App ID``App Secret`,并配置到PrometheusAlert 的 app.conf配置项目中

![fei6](../fsapp6.png)
![fei6](../images/fsapp6.png)

**飞书应用app.conf配置**

Expand All @@ -49,7 +49,7 @@ AT_USER_ID="xxxxxxxxxxx"

通过飞书管理员登录飞书管理后台,进入 组织架构-->成员与部门-->找到对应的用户,查看成员详情即可

![fei7](../fsapp7.png)
![fei7](../images/fsapp7.png)

**如何使用**

Expand Down
2 changes: 1 addition & 1 deletion doc/readme/conf-hw.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 华为云短信配置
# 华为云短信配置

目前华为云仅支持短信告警渠道,开启华为短信告警渠道需要提前注册好华为云平台的帐号。并开通华为云短信相关服务。

Expand Down
Loading

0 comments on commit 5365b45

Please sign in to comment.