dev_1.0.0_xuxt_2 更新反向代理,打包镜像,以及README文档 (#28)
Co-authored-by: xiuting.xu <xiutingxt.xu@gmail.com> Reviewed-on: #28 Reviewed-by: yuyr <yuyr@zgclab.edu.cn> Reviewed-by: huhy <husteryezi@163.com> Reviewed-by: sundapeng <sundp@mail.zgclab.edu.cn>
This commit was merged in pull request #28.
This commit is contained in:
@@ -1,13 +1,31 @@
|
||||
# Alertmanager
|
||||
|
||||
## 启动示例
|
||||
## 构建
|
||||
1. 首先设置构建和部署的环境变量, 在项目根目录下执行:
|
||||
```bash
|
||||
cp src/alert/tests/.env.example src/alert/tests/.env
|
||||
```
|
||||
|
||||
然后找到复制出来的.env文件,修改环境变量。
|
||||
|
||||
2. 使用脚本构建,在项目根目录下执行:
|
||||
|
||||
```bash
|
||||
docker run -d --name alertmanager \
|
||||
-p 9093:9093 \
|
||||
-v /opt/alertmanager/data:/alertmanager \
|
||||
argus-alert:latest
|
||||
bash src/alert/alertmanager/build/build.sh
|
||||
```
|
||||
|
||||
构建成功后,会在项目根目录下生成argus-alertmanager-latest.tar
|
||||
|
||||
## 部署
|
||||
|
||||
提供docker-compose部署。在src/alert/tests目录下
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
## 动态配置
|
||||
修改alertmanager.yml后,调用`/-/reload`接口可以重新加载配置
|
||||
配置文件放在`/private/argus/alert/alertmanager/alertmanager.yml`下,修改alertmanager.yml后,调用`http://alertmanager.alert.argus.com:9093/-/reload`接口(POST)可以重新加载配置.
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:9093/-/reload
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user