使用uptime控件对服务器进行监控的配置步骤

1.获取uptime的源代码,并安装到服务器上

 git clone git://github.com/fzaninotto/uptime.git  
 cd uptime
 npm install

2.修改Uptime 的配置文件 

    修改/uptime/config/default.yaml文件

url:        'http://localhost:8082'
  server:   localhost    # 此处是需要修改的(修改成与mongodb副本集的主库对应的IP地址)
  database: uptime       # 此处是需要修改的 
  user:     root         # 此处是需要修改的
  password:              # 此处是需要修改的
  connectionString:       # alternative to setting server, database, user and password separatelymonitor:
  name:                   origin
  apiUrl:                 'http://localhost:8082/api' # must be accessible without a proxy
  pollingInterval:        10000      # ten seconds
  timeout:                5000       # five seconds
  userAgent:              NodeUptime/2.0 (https://github.com/fzaninotto/uptime)analyzer:
  updateInterval:         60000      # one minute
  qosAggregationInterval: 600000     # ten minutes
  pingHistory:            8035200000 # three monthsautoStartMonitor: trueplugins:
  - ./plugins/console
  - ./plugins/patternMatcher
  - ./plugins/httpOptions
  # - ./plugins/email

3.开启守护进程

forever start app.js

相关文档参照:https://github.com/fzaninotto/uptime



转载于:https://my.oschina.net/chinacaptain/blog/322959

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值