https://github.com/monibuca/plugin-monitor
生成监控数据
https://github.com/monibuca/plugin-monitor
Last synced: 9 months ago
JSON representation
生成监控数据
- Host: GitHub
- URL: https://github.com/monibuca/plugin-monitor
- Owner: Monibuca
- License: mit
- Created: 2023-03-29T01:14:31.000Z (about 3 years ago)
- Default Branch: v4
- Last Pushed: 2024-01-03T01:28:18.000Z (over 2 years ago)
- Last Synced: 2025-05-27T00:43:17.736Z (about 1 year ago)
- Language: Go
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# plugin-monitor
生成监控数据
## 插件地址
https://github.com/Monibuca/plugin-monitor
## 插件引入
```go
import (
_ "m7s.live/plugin/monitor/v4"
)
```
## 配置
```yaml
monitor:
path: monitor # 监控数据存储路径
```
## API
### 获取监控的流历史数据
```
GET /monitor/api/list/stream?time=xxxx-xxxx&streamPath=xxxx
```
streamPath 是可选的,用于筛选指定的流
time 是可选的,用于筛选指定时间段的数据,不传则返回当天的数据
### 获取历史流的轨道列表
```
GET /monitor/api/list/track?streamPath=xxxx
```
该 streamPath 的值来自上一个 API 中的 path 拼接时间而成(时间格式为 2006-01-02T15:04:05)
### 获取历史数据
```
GET /monitor/[streamPath]/track/h264.yaml
```
就是从 monitor 目录里面读取文件,路径就是文件路径,自行替换。