clank-uptime
Lightweight CLI for tracking website uptime and response times over time.
When to use (trigger phrases)
Use this skill when the user asks any of:
- - "Is my site up?"
- "Check if website X is online"
- "Monitor my site's uptime"
- "What's the response time for..."
- "Show availability stats"
Quick start
CODEBLOCK0
Commands
| Command | Description |
|---|
| INLINECODE0 | Add site to monitoring |
| INLINECODE1 |
Check all sites, append to history |
|
stats | Show 24h availability & latency stats |
|
list | List all monitored sites |
|
remove <URL> | Remove site from monitoring |
Output examples
Check
CODEBLOCK1
Stats
CODEBLOCK2
Data storage
CODEBLOCK3
Automating with cron
CODEBLOCK4
Tips
- - Run
check periodically (cron or heartbeat) to build history data - INLINECODE6 requires at least a few hours of data for meaningful results
- Use
--name for readability; defaults to URL - History is CSV-based — easy to parse or visualize with other tools
clank-uptime
轻量级命令行工具,用于跟踪网站运行时间和响应时间变化。
使用时机(触发短语)
当用户提出以下任一问题时使用此技能:
- - 我的网站是否在线?
- 检查网站X是否在线
- 监控我的网站运行时间
- ...的响应时间是多少?
- 显示可用性统计
快速开始
bash
添加网站
clank-uptime add https://example.com --name 我的网站
clank-uptime add https://api.example.com --name API
立即检查所有网站
clank-uptime check
显示24小时可用性统计
clank-uptime stats
列出被监控的网站
clank-uptime list
移除一个网站
clank-uptime remove https://example.com
命令
| 命令 | 描述 |
|---|
| add <URL> [--name NAME] | 添加网站到监控列表 |
| check |
检查所有网站,追加到历史记录 |
| stats | 显示24小时可用性和延迟统计 |
| list | 列出所有被监控的网站 |
| remove
| 从监控列表中移除网站 |
输出示例
检查
🔍 正在检查3个网站...
✅ 我的网站: 200 (0.092秒)
✅ API: 200 (0.056秒)
⚠️ 旧网站: 503 (1.234秒)
📊 检查时间: 2026-03-29T04:22:38Z
统计
📊 运行时间统计(最近24小时)
==================================================
我的网站
[████████████████████] 100.0% (12/12次检查)
⚡ 平均: 0.089秒 | 最小: 0.056秒 | 最大: 0.142秒
API
[██████████████████░░] 91.7% (11/12次检查)
⚡ 平均: 0.067秒 | 最小: 0.041秒 | 最大: 0.098秒
数据存储
~/.clank-uptime/
├── sites.json # 网站配置
└── history/
└── /
└── checks.csv # 时间戳,状态,响应时间
使用cron自动化
bash
每5分钟检查一次
/5 * clank-uptime check > /dev/null 2>&1
每日统计报告
0 8 * clank-uptime stats | mail -s 每日运行时间报告 you@email.com
提示
- - 定期运行 check(通过cron或心跳)以构建历史数据
- stats 需要至少几小时的数据才能获得有意义的结果
- 使用 --name 提高可读性;默认为URL
- 历史记录基于CSV格式——易于使用其他工具解析或可视化