Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zhentaoo/hawk-eye
前端监控:定时监控站点渲染情况,记录异常并保存截图: puppeteer, thinkjs,mongodb,headless-chrome,vuejs
https://github.com/zhentaoo/hawk-eye
headless-chrome mongodb monitor nodejs thinkjs
Last synced: 3 months ago
JSON representation
前端监控:定时监控站点渲染情况,记录异常并保存截图: puppeteer, thinkjs,mongodb,headless-chrome,vuejs
- Host: GitHub
- URL: https://github.com/zhentaoo/hawk-eye
- Owner: zhentaoo
- Created: 2017-09-28T09:29:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-11T10:52:33.000Z (over 7 years ago)
- Last Synced: 2024-10-11T20:12:01.260Z (4 months ago)
- Topics: headless-chrome, mongodb, monitor, nodejs, thinkjs
- Language: JavaScript
- Homepage:
- Size: 2.62 MB
- Stars: 96
- Watchers: 6
- Forks: 28
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-puppeteer - hawk-eye
README
## Hawk-eye: 小型前端监控系统,PuppeteerJS + ThinkJS + VueJS
### Usage
1. npm i
2. npm start### 监控系统
- 通过Puppeteer,定时爬取被监控站点,如果有异常则保存截图至 /data/err
- 创建一个后台Server,为定时脚本提供API,记录成功or失败的情况
- server提供api,可以查询所有的监控记录## 运行说明
### 1. PuppeteerJS: 定时脚本,爬取被监控对象的状态
`/scripts/monitor-pp.js`### 2. ThinkJS+MongoDB: Restful API
- 使用ThinkJS创建一个简单的RestFUl API服务
- 文档: https://thinkjs.org/zh-cn/doc/3.0/rest.html#toc-b15
- 安装2.0脚手架:`npm install -g thinkjs@2`
- 初始化项目:`thinkjs new hawk-eye`
- 创建restful api:`thinkjs controller home/monitor -r`
- mongod: 启动mongodb服务
- mongo: 启动mongodb客户端### 3. 运行结果