Skip to content

Commit

Permalink
yhf
Browse files Browse the repository at this point in the history
  • Loading branch information
yihongfei committed Apr 14, 2017
1 parent 021965d commit b6d82fd
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@ Node Ping Manage
启动方法
----------------
```bash
git clone https://github.com/hongfeioo/NodePingManage.git
cd NodePingManage
git clone https://github.com/hongfeioo/messagemodule.git
python npm.py
```

推荐添加计划任务
---------------
```bash
*/3 * * * * python /root/npm/npm.py > /dev/null
```

配置文件格式
-----------------------
```bash
vi npm.ini
```
| 设备IP | 设备描述|初始状态关键字|邮箱|手机号|
|-----|------|----|----|----|
|114.114.114.114|CoreSwExample|Init|[email protected]|13521161889
Expand All @@ -28,11 +29,7 @@ python npm.py

邮件短信报警模块配置
---------------------------
```bash
cd NodePingManage
git clone https://github.com/hongfeioo/messagemodule.git
```
[messagemodule](https://github.com/hongfeioo/messagemodule)</p>
[messagemodule](https://github.com/hongfeioo/messagemodule#%E9%82%AE%E7%AE%B1%E6%89%8B%E6%9C%BA%E5%8F%B7%E7%9F%AD%E4%BF%A1%E9%80%9A%E9%81%93%E9%85%8D%E7%BD%AE)</p>



Expand All @@ -59,6 +56,14 @@ Up,Down 报警状态机
2 当程序第二次运行时,会先读取npm.tmp文件中数据作为参考,然后进行第二次ping探测,如果发现本次探测结果和参考状态不符,则说明状态有变化,触发报警,并把最新状态存入npm.tmp。</p>
3 如果npm.ini进行了调整,需要删除npm.tmp文件。



添加计划任务
---------------
```bash
*/3 * * * * python /root/npm/npm.py > /dev/null
```

排错
------
1 配置文件末尾请不要留空行.</p>
Expand Down

0 comments on commit b6d82fd

Please sign in to comment.