Files
shiroko-monitor/public/monitors.json
T
tamakyi 20b499c350 fix: 零配置克隆可直接看到数据 + 新增本地运行文档
实测「全新克隆 → node prober/node/index.js」时发现两个问题:

1. **面板是空的**(新手陷阱)
   public/monitors.json 默认 dataFilter=uptimerobot,但 uptimeRobot.enabled=false
   (API Key 放在不入库的 local.monitors.json 里)。新克隆的用户没有私有配置,
   于是日志显示「探测范围: uptimerobot —— 仅 UptimeRobot(0 个)」,面板永远空白。
   改默认为 dataFilter=both:零配置时探测 8 个示例目标,配了 UR 再自行切换口径。

2. DEPLOY-PAGES.md 里写了 `cp local.monitors.json.example` —— 该文件根本不存在。
   改成直接启动 + 用 <details> 折叠说明可选的私有配置写法。

另外:
- package.json 版本号从 0.1.0 同步到 0.12.3(此前一直漏更)
- 新增 docs/DEPLOY-LOCAL.md:最短路径(3 条命令)、三种运行模式、常用参数、
  配置示例(http/tcp/banner)、配置分层说明、UptimeRobot 接入、
  管理端 2FA 绑定四步、通知配置、开机自启(systemd + NSSM)、八条常见问题
- README 加「本地运行」入口,指向两份部署文档

实测验证:干净克隆 + 默认配置 → 8 个目标、5 在线 3 离线,心率图与事件区块均有数据。
2026-10-14 17:01:46 +08:00

107 lines
2.4 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"settings": {
"title": "Shiroko Monitor",
"description": "轻量级服务监控面板",
"view": "table",
"theme": "shiroko",
"artwork": "assets/shiroko-figure.webp",
"decoOpacity": 0.78,
"dataFilter": "both",
"refreshInterval": 300,
"dataSource": "auto",
"adminUrl": "",
"dataUrl": "",
"corsOrigins": [],
"uptimeRobot": {
"enabled": false,
"apiKey": "",
"pollIntervalSec": 300,
"group": "UptimeRobot"
}
},
"monitors": [
{
"id": "example-com",
"name": "Example 站点",
"group": "公共服务",
"type": "http",
"url": "https://www.example.com",
"method": "GET",
"expectStatus": [200],
"interval": 60,
"timeout": 10
},
{
"id": "baidu",
"name": "百度",
"group": "公共服务",
"type": "http",
"url": "https://www.baidu.com",
"expectStatus": [200],
"interval": 60,
"timeout": 10
},
{
"id": "cloudflare-site",
"name": "Cloudflare 官网",
"group": "公共服务",
"type": "http",
"url": "https://www.cloudflare.com",
"expectStatus": [200],
"interval": 60,
"timeout": 10
},
{
"id": "github-api",
"name": "GitHub API(限流目标示例)",
"group": "公共服务",
"type": "http",
"url": "https://api.github.com",
"expectStatus": [200],
"interval": 300,
"timeout": 10,
"probeOnRefresh": false
},
{
"id": "httpbin-500",
"name": "HTTPBin 500(演示 expectStatus)",
"group": "公共服务",
"type": "http",
"url": "https://httpbin.org/status/500",
"expectStatus": [500],
"interval": 120,
"timeout": 10
},
{
"id": "badssl-expired",
"name": "BadSSL 过期证书(演示离线)",
"group": "公共服务",
"type": "http",
"url": "https://expired.badssl.com/",
"expectStatus": [200],
"interval": 120,
"timeout": 10
},
{
"id": "cloudflare-dns-tcp",
"name": "Cloudflare 443 端口",
"group": "基础设施",
"type": "tcp",
"host": "1.1.1.1",
"port": 443,
"interval": 60,
"timeout": 10
},
{
"id": "google-dns-tcp",
"name": "Google DNS 53 端口",
"group": "基础设施",
"type": "tcp",
"host": "8.8.8.8",
"port": 53,
"interval": 60,
"timeout": 10
}
]
}