uptime-monitoring by aj-geddes/useful-ai-prompts
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill uptime-monitoring通过健康检查、状态页面和事件跟踪来设置全面的运行时间监控,以确保服务可用性的可见性。
最小工作示例:
// Node.js health check
const express = require("express");
const app = express();
app.get("/health", (req, res) => {
res.json({
status: "ok",
timestamp: new Date().toISOString(),
uptime: process.uptime(),
});
});
app.get("/health/deep", async (req, res) => {
const health = {
status: "ok",
checks: {
database: "unknown",
cache: "unknown",
externalApi: "unknown",
},
};
try {
const dbResult = await db.query("SELECT 1");
health.checks.database = dbResult ? "ok" : "error";
// ... (完整实现请参阅参考指南)
references/ 目录下的详细实现:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 指南 | 内容 |
|---|---|
| 健康检查端点 | 健康检查端点 |
| Python 健康检查 | Python 健康检查 |
| 带心跳的运行时间监控器 | 带心跳的运行时间监控器 |
| 公共状态页面 API | 公共状态页面 API |
| Kubernetes 健康探针 | Kubernetes 健康探针 |
每周安装数
118
代码仓库
GitHub 星标数
121
首次出现
2026年1月21日
安全审计
安装于
opencode97
gemini-cli94
codex90
cursor89
claude-code85
github-copilot78
Set up comprehensive uptime monitoring with health checks, status pages, and incident tracking to ensure visibility into service availability.
Minimal working example:
// Node.js health check
const express = require("express");
const app = express();
app.get("/health", (req, res) => {
res.json({
status: "ok",
timestamp: new Date().toISOString(),
uptime: process.uptime(),
});
});
app.get("/health/deep", async (req, res) => {
const health = {
status: "ok",
checks: {
database: "unknown",
cache: "unknown",
externalApi: "unknown",
},
};
try {
const dbResult = await db.query("SELECT 1");
health.checks.database = dbResult ? "ok" : "error";
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Health Check Endpoints | Health Check Endpoints |
| Python Health Checks | Python Health Checks |
| Uptime Monitor with Heartbeat | Uptime Monitor with Heartbeat |
| Public Status Page API | Public Status Page API |
| Kubernetes Health Probes | Kubernetes Health Probes |
Weekly Installs
118
Repository
GitHub Stars
121
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode97
gemini-cli94
codex90
cursor89
claude-code85
github-copilot78