Integrate plugin with local monitor bridge
This commit is contained in:
15
README.md
15
README.md
@@ -84,13 +84,14 @@ node scripts/install.mjs --verbose
|
||||
{
|
||||
"plugins": {
|
||||
"entries": {
|
||||
"harborforge-monitor": {
|
||||
"harbor-forge": {
|
||||
"enabled": true,
|
||||
"config": {
|
||||
"enabled": true,
|
||||
"backendUrl": "https://monitor.hangman-lab.top",
|
||||
"identifier": "my-server-01",
|
||||
"apiKey": "your-api-key-here",
|
||||
"monitorPort": 9100,
|
||||
"reportIntervalSec": 30,
|
||||
"httpFallbackIntervalSec": 60,
|
||||
"logLevel": "info"
|
||||
@@ -115,10 +116,22 @@ openclaw gateway restart
|
||||
| `backendUrl` | string | `https://monitor.hangman-lab.top` | Monitor 后端地址 |
|
||||
| `identifier` | string | 自动检测 hostname | 服务器标识符 |
|
||||
| `apiKey` | string | 必填 | HarborForge Monitor 生成的服务器 API Key |
|
||||
| `monitorPort` | number | `9100`(示例) | 本地桥接端口;插件通过 `127.0.0.1:<monitorPort>` 与 HarborForge.Monitor 通信 |
|
||||
| `reportIntervalSec` | number | `30` | 报告间隔(秒) |
|
||||
| `httpFallbackIntervalSec` | number | `60` | HTTP 回退间隔(秒) |
|
||||
| `logLevel` | string | `"info"` | 日志级别: debug/info/warn/error |
|
||||
|
||||
## Monitor 本地桥接
|
||||
|
||||
当插件配置了 `monitorPort`,并且 HarborForge.Monitor 也以相同的 `MONITOR_PORT` 启动时:
|
||||
|
||||
- Monitor 会在 `127.0.0.1:<monitorPort>` 暴露本地桥接服务
|
||||
- 插件可探测 `GET /health`
|
||||
- 插件工具 `harborforge_monitor_telemetry` 可读取 `GET /telemetry`
|
||||
- 若桥接端口未配置或不可达,插件仍然正常工作,只是不会拿到 Monitor 的宿主机遥测补充数据
|
||||
|
||||
这条链路是**可选增强**,不是插件或 Monitor 心跳上报的前置依赖。
|
||||
|
||||
## 收集的指标
|
||||
|
||||
### 系统指标
|
||||
|
||||
Reference in New Issue
Block a user