基于postman/newman实现的HTTP接口监控

HTTP API monitor based on postman and newman. It provides webui for newman, and some other useful things.

《基于postman/newman实现的HTTP接口监控》

How it work

  1. setup monitor-man
  2. export your collection, data file, enviroment from postman, then upload to monitor-man
  3. monitor-man will setup a newman for monitor your test

Distribute

The distribute branch is design for deploy monitor-man in multiple idc. Upload collection in one place, and run collection in multiple idc according to an environment variable value. See Collection Create

Setup

By Node

  1. git clone this project
  2. run npm install
  3. change listening port export PORT=9200(default 3000)
  4. set redis info export REDIS_HOST=127.0.0.1;export REDIS_PORT=6379;export REDIS_AUTH=123456 (monitor-man rely on redis to store all information)
  5. set log level export LOG_LEVEL=debug
  6. run node bin/www

note: if you use distribute branch, set REDIS_RHOST, REDIS_WHOST. And you need to set an environment to distinguish idc(eg export IDC=beijing).

BY Docker

  1. docker pull yangxikun/monitor-man(hub.docker.com/r/yangxikun…)
  2. or docker pull yangxikun/monitor-man-distribute(hub.docker.com/r/yangxikun…)
  3. docker run --env REDIS_HOST=127.0.0.1 --env REDIS_PORT=6379 --env TIMEZONE=Asia/Shanghai -p 3000:3000 yangxikun/monitor-man:1.0.0
  4. now, visit http://127.0.0.1:3000

note: if you use distribute branch, use “–env REDIS_RHOST=127.0.0.1 –env REDIS_WHOST=127.0.0.1”. And additional environment to distinguish idc “–env IDC=beijing”

build docker image:

  1. git clone this project
  2. checkout distribute branch if needed
  3. npm install
  4. wget nodejs.org/dist/v6.11.…
  5. docker build -t yangxikun/monitor-man:1.0.0 .

Available config environment variable

  • REDIS_HOST
  • REDIS_PORT
  • REDIS_AUTH
  • REDIS_DB
  • TIMEZONE: see /usr/share/zoneinfo/(docker only)
  • LOG_LEVEL: default debug, see log4js

Doc

see Wiki

License

This software is licensed under MIT. See the LICENSE file for more information.

    原文作者:HTTP
    原文地址: https://juejin.im/entry/5974af21f265da6c4f350ce7
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞