-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from canghai908/patch-2
update redame
- Loading branch information
Showing
1 changed file
with
29 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) | ||
|
@@ -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 | ||
|