Skip to content

Commit

Permalink
Merge pull request #21 from canghai908/patch-2
Browse files Browse the repository at this point in the history
update redame
  • Loading branch information
freedomkk-qfeng authored Jan 30, 2019
2 parents 0261146 + 4f8fdd4 commit ff5098c
Showing 1 changed file with 29 additions and 10 deletions.
39 changes: 29 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,24 @@ mail-provider

## 安装方法

1.二进制安装(推荐)
1.二进制安装(推荐)
sha256sum
```bash
7f714c8e4542670833505c274c420be1c89c5247dd8c72121cf0baa1d33edd49 falcon-mail-provider.tar.gz
```

下载编译好的二进制
```bash
wget http://cactifans.hi-www.com/open-falcon/mail-provider.tar.gz
mkdir -p mail-provider
tar zxvf mail-provider.tar.gz -C mail-provider
cd mail-provider
wget https://dl.cactifans.com/open-falcon/falcon-mail-provider.tar.gz
mkdir -p falcon-mail-provider
tar zxvf falcon-mail-provider.tar.gz -C falcon-mail-provider
cd falcon-mail-provider
```
修改cfg.json文件相关信息,使用
```bash
./control start
```
即可启动客户端
即可启动

2.源码编译(如无科学上网方法,请勿尝试)
下载之后为源码,安装golang环境,环境配置参考[golang环境配置](http://book.open-falcon.org/zh/quick_install/prepare.html)
Expand All @@ -35,14 +40,28 @@ go get ./...
```bash
./control start
```
即可启动
即可启动


## 使用方法
下载之后为源码,需要编译

启动之后使用以下命令测试:
```
curl http://127.0.0.1:4000/sender/mail -d "[email protected],[email protected]&subject=xx&content=yy"
```
是否能收到邮件,如收到邮件,表示配置成功,如未收到邮件,使用
```bash
./control tail
```
curl http://$ip:4000/sender/mail -d "[email protected],[email protected]&subject=xx&content=yy"
查看日志。
在Alarm组件的配置文件里,配置对应地址即可
```json
...
"api": {
...
"mail": "http://127.0.0.1:4000/sender/mail",
...
},
...
```

## FAQ
Expand Down

0 comments on commit ff5098c

Please sign in to comment.