Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alfierichou/koa-influx-galen
https://github.com/alfierichou/koa-influx-galen
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/alfierichou/koa-influx-galen
- Owner: AlfieriChou
- License: mit
- Created: 2020-07-21T07:37:12.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T20:18:50.000Z (about 2 years ago)
- Last Synced: 2023-03-02T03:46:18.279Z (almost 2 years ago)
- Language: JavaScript
- Size: 236 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# koa-influx-galen
influxDB监控系统
## 环境搭建
* 拉取influxDB镜像
```bash
docker pull influxdb:1.7-alpine
docker run -p 8086:8086 --name docker-influxdb -d influxdb:1.7-alpine
```* 测试启动
```bash
yarn run dev
```### api文档
PS: query添加isReload条件,强制生成文档,否则,将会缓存60秒
* json
```url
http://127.0.0.1:3000/v1/swagger.json
```* html
```url
http://127.0.0.1:3000/v1/apidoc
```### 搜索
例子:
```url
http://127.0.0.1:3000/v1/responseTimes?where={"time":{"$gt":1597745072984}}&order=time desc&limit=2
```* where
* equal where={"host":"127.0.0.1"}
* gt where={"time":{"$gt":1597745072984}}
* gte where={"time":{"$gte":1597745072984}}
* lt where={"time":{"$lt":1597745072984}}
* lte where={"time":{"$lte":1597745072984}}* order default order=time desc
* desc order=time desc
* asc order=time asc* limit default 20
* number 20## 目前存在的问题
* [x] 未支持虚拟的model类型
* [x] 异步检查database是否存在改为同步逻辑
* [x] 未支持koa中间件注入
* [x] koa安全关闭