render-monitor
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMonitor Render Services
监控Render服务
Real-time monitoring of Render services including health checks, performance metrics, and logs.
实时监控Render服务,包括健康检查、性能指标和日志。
When to Use This Skill
何时使用此技能
Activate this skill when users want to:
- Check if services are healthy
- View performance metrics
- Monitor logs
- Verify a deployment is working
- Investigate slow performance
- Check database health
当用户有以下需求时激活此技能:
- 检查服务是否健康
- 查看性能指标
- 监控日志
- 验证部署是否正常运行
- 排查性能缓慢问题
- 检查数据库健康状态
Prerequisites
前提条件
MCP tools (preferred): Test with - provides structured data
list_services()CLI (fallback): - use if MCP tools unavailable
render --versionAuthentication: For MCP, use an API key (set in the MCP config or via the env var, depending on tool). For CLI, verify with .
RENDER_API_KEYrender whoami -o jsonWorkspace: or
get_selected_workspace()render workspace current -o jsonNote: MCP tools require the Render MCP server. If unavailable, use the CLI for status and logs; metrics and database queries require MCP.
MCP工具(推荐): 使用测试 - 提供结构化数据
list_services()CLI(备选): - 当MCP工具不可用时使用
render --version身份验证: 对于MCP,使用API密钥(在MCP配置中设置,或通过环境变量,具体取决于工具)。对于CLI,使用验证。
RENDER_API_KEYrender whoami -o json工作区: 或
get_selected_workspace()render workspace current -o json注意: MCP工具需要Render MCP服务器。如果不可用,使用CLI查看状态和日志;指标和数据库查询需要MCP。
MCP Setup (Per Tool)
按工具配置MCP
If fails because MCP isn't configured, guide the user to set up the hosted Render MCP server. Ask which AI tool they're using, then provide the matching instructions below. Always use their API key.
list_services()如果因未配置MCP而失败,引导用户设置托管的Render MCP服务器。询问用户使用的AI工具,然后提供以下对应说明。请始终使用他们的API密钥。
list_services()Cursor
Cursor
Walk the user through these steps:
- Get a Render API key:
https://dashboard.render.com/u/*/settings#api-keys- Add this to (replace
~/.cursor/mcp.json):<YOUR_API_KEY>
json
{
"mcpServers": {
"render": {
"url": "https://mcp.render.com/mcp",
"headers": {
"Authorization": "Bearer <YOUR_API_KEY>"
}
}
}
}- Restart Cursor, then retry .
list_services()
引导用户完成以下步骤:
- 获取Render API密钥:
https://dashboard.render.com/u/*/settings#api-keys- 将以下内容添加到(替换
~/.cursor/mcp.json):<YOUR_API_KEY>
json
{
"mcpServers": {
"render": {
"url": "https://mcp.render.com/mcp",
"headers": {
"Authorization": "Bearer <YOUR_API_KEY>"
}
}
}
}- 重启Cursor,然后重试。
list_services()
Claude Code
Claude Code
Walk the user through these steps:
- Get a Render API key:
https://dashboard.render.com/u/*/settings#api-keys- Add the MCP server with Claude Code (replace ):
<YOUR_API_KEY>
bash
claude mcp add --transport http render https://mcp.render.com/mcp --header "Authorization: Bearer <YOUR_API_KEY>"- Restart Claude Code, then retry .
list_services()
引导用户完成以下步骤:
- 获取Render API密钥:
https://dashboard.render.com/u/*/settings#api-keys- 使用Claude Code添加MCP服务器(替换):
<YOUR_API_KEY>
bash
claude mcp add --transport http render https://mcp.render.com/mcp --header "Authorization: Bearer <YOUR_API_KEY>"- 重启Claude Code,然后重试。
list_services()
Codex
Codex
Walk the user through these steps:
- Get a Render API key:
https://dashboard.render.com/u/*/settings#api-keys- Set it in their shell:
bash
export RENDER_API_KEY="<YOUR_API_KEY>"- Add the MCP server with the Codex CLI:
bash
codex mcp add render --url https://mcp.render.com/mcp --bearer-token-env-var RENDER_API_KEY- Restart Codex, then retry .
list_services()
引导用户完成以下步骤:
- 获取Render API密钥:
https://dashboard.render.com/u/*/settings#api-keys- 在Shell中设置:
bash
export RENDER_API_KEY="<YOUR_API_KEY>"- 使用Codex CLI添加MCP服务器:
bash
codex mcp add render --url https://mcp.render.com/mcp --bearer-token-env-var RENDER_API_KEY- 重启Codex,然后重试。
list_services()
Other Tools
其他工具
If the user is on another AI app, direct them to the Render MCP docs for that tool's setup steps and install method.
如果用户使用其他AI应用,引导他们查看Render MCP文档中对应工具的设置步骤和安装方法。
Workspace Selection
工作区选择
After MCP is configured, have the user set the active Render workspace with a prompt like:
Set my Render workspace to [WORKSPACE_NAME]配置MCP后,让用户通过如下提示设置活跃的Render工作区:
将我的Render工作区设置为[WORKSPACE_NAME]Quick Health Check
快速健康检查
Run these 5 checks to assess service health:
undefined运行以下5项检查来评估服务健康状态:
undefined1. Check service status
1. 检查服务状态
list_services()
list_services()
2. Check latest deploy
2. 检查最新部署
list_deploys(serviceId: "<service-id>", limit: 1)
list_deploys(serviceId: "<service-id>", limit: 1)
3. Check for errors
3. 检查错误
list_logs(resource: ["<service-id>"], level: ["error"], limit: 20)
list_logs(resource: ["<service-id>"], level: ["error"], limit: 20)
4. Check resource usage
4. 检查资源使用情况
get_metrics(resourceId: "<service-id>", metricTypes: ["cpu_usage", "memory_usage"])
get_metrics(resourceId: "<service-id>", metricTypes: ["cpu_usage", "memory_usage"])
5. Check latency
5. 检查延迟
get_metrics(resourceId: "<service-id>", metricTypes: ["http_latency"], httpLatencyQuantile: 0.95)
---get_metrics(resourceId: "<service-id>", metricTypes: ["http_latency"], httpLatencyQuantile: 0.95)
---Service Health
服务健康状态
Check Status
检查状态
list_services()get_service(serviceId: "<id>")list_services()get_service(serviceId: "<id>")Check Deployments
检查部署
list_deploys(serviceId: "<service-id>", limit: 5)| Status | Meaning |
|---|---|
| Deployment successful |
| Building |
| Build failed |
| Replaced by newer deploy |
list_deploys(serviceId: "<service-id>", limit: 5)| 状态 | 含义 |
|---|---|
| 部署成功 |
| 构建中 |
| 构建失败 |
| 已被新版本部署替代 |
Check Errors
检查错误
list_logs(resource: ["<service-id>"], level: ["error"], limit: 50)list_logs(resource: ["<service-id>"], statusCode: ["500", "502", "503"], limit: 50)list_logs(resource: ["<service-id>"], level: ["error"], limit: 50)list_logs(resource: ["<service-id>"], statusCode: ["500", "502", "503"], limit: 50)Performance Metrics
性能指标
CPU & Memory
CPU与内存
get_metrics(
resourceId: "<service-id>",
metricTypes: ["cpu_usage", "memory_usage", "cpu_limit", "memory_limit"]
)| Metric | Healthy | Warning | Critical |
|---|---|---|---|
| CPU | <70% | 70-85% | >85% |
| Memory | <80% | 80-90% | >90% |
get_metrics(
resourceId: "<service-id>",
metricTypes: ["cpu_usage", "memory_usage", "cpu_limit", "memory_limit"]
)| 指标 | 健康状态 | 警告 | 严重 |
|---|---|---|---|
| CPU | <70% | 70-85% | >85% |
| 内存 | <80% | 80-90% | >90% |
HTTP Latency
HTTP延迟
get_metrics(
resourceId: "<service-id>",
metricTypes: ["http_latency"],
httpLatencyQuantile: 0.95
)| p95 Latency | Status |
|---|---|
| <200ms | Excellent |
| 200-500ms | Good |
| 500ms-1s | Concerning |
| >1s | Problem |
get_metrics(
resourceId: "<service-id>",
metricTypes: ["http_latency"],
httpLatencyQuantile: 0.95
)| p95延迟 | 状态 |
|---|---|
| <200ms | 优秀 |
| 200-500ms | 良好 |
| 500ms-1s | 需关注 |
| >1s | 存在问题 |
Request Count
请求数量
get_metrics(
resourceId: "<service-id>",
metricTypes: ["http_request_count"]
)get_metrics(
resourceId: "<service-id>",
metricTypes: ["http_request_count"]
)Filter by Endpoint
按端点过滤
get_metrics(
resourceId: "<service-id>",
metricTypes: ["http_latency"],
httpPath: "/api/users"
)Detailed metrics guide: references/metrics-guide.md
get_metrics(
resourceId: "<service-id>",
metricTypes: ["http_latency"],
httpPath: "/api/users"
)详细指标指南:references/metrics-guide.md
Database Monitoring
数据库监控
PostgreSQL Status
PostgreSQL状态
list_postgres_instances()
get_postgres(postgresId: "<postgres-id>")list_postgres_instances()
get_postgres(postgresId: "<postgres-id>")Connection Count
连接数
get_metrics(resourceId: "<postgres-id>", metricTypes: ["active_connections"])get_metrics(resourceId: "<postgres-id>", metricTypes: ["active_connections"])Query Database
查询数据库
query_render_postgres(
postgresId: "<postgres-id>",
sql: "SELECT state, count(*) FROM pg_stat_activity GROUP BY state"
)query_render_postgres(
postgresId: "<postgres-id>",
sql: "SELECT state, count(*) FROM pg_stat_activity GROUP BY state"
)Find Slow Queries
查找慢查询
query_render_postgres(
postgresId: "<postgres-id>",
sql: "SELECT query, mean_exec_time FROM pg_stat_statements ORDER BY mean_exec_time DESC LIMIT 10"
)query_render_postgres(
postgresId: "<postgres-id>",
sql: "SELECT query, mean_exec_time FROM pg_stat_statements ORDER BY mean_exec_time DESC LIMIT 10"
)Key-Value Store
键值存储
list_key_value()
get_key_value(keyValueId: "<kv-id>")list_key_value()
get_key_value(keyValueId: "<kv-id>")Log Monitoring
日志监控
Recent Logs
近期日志
list_logs(resource: ["<service-id>"], limit: 100)list_logs(resource: ["<service-id>"], limit: 100)Error Logs
错误日志
list_logs(resource: ["<service-id>"], level: ["error"], limit: 50)list_logs(resource: ["<service-id>"], level: ["error"], limit: 50)Search Logs
搜索日志
list_logs(resource: ["<service-id>"], text: ["timeout", "error"], limit: 50)list_logs(resource: ["<service-id>"], text: ["timeout", "error"], limit: 50)Filter by Time
按时间过滤
list_logs(
resource: ["<service-id>"],
startTime: "2024-01-15T10:00:00Z",
endTime: "2024-01-15T11:00:00Z"
)list_logs(
resource: ["<service-id>"],
startTime: "2024-01-15T10:00:00Z",
endTime: "2024-01-15T11:00:00Z"
)Stream Logs (CLI)
流式日志(CLI)
bash
render logs -r <service-id> --tail -o textbash
render logs -r <service-id> --tail -o textQuick Reference
快速参考
MCP Tools
MCP工具
undefinedundefinedServices
服务
list_services()
get_service(serviceId: "<id>")
list_deploys(serviceId: "<id>", limit: 5)
list_services()
get_service(serviceId: "<id>")
list_deploys(serviceId: "<id>", limit: 5)
Logs
日志
list_logs(resource: ["<id>"], level: ["error"], limit: 100)
list_logs(resource: ["<id>"], text: ["search"], limit: 50)
list_logs(resource: ["<id>"], level: ["error"], limit: 100)
list_logs(resource: ["<id>"], text: ["search"], limit: 50)
Metrics
指标
get_metrics(resourceId: "<id>", metricTypes: ["cpu_usage", "memory_usage"])
get_metrics(resourceId: "<id>", metricTypes: ["http_latency"], httpLatencyQuantile: 0.95)
get_metrics(resourceId: "<id>", metricTypes: ["http_request_count"])
get_metrics(resourceId: "<id>", metricTypes: ["cpu_usage", "memory_usage"])
get_metrics(resourceId: "<id>", metricTypes: ["http_latency"], httpLatencyQuantile: 0.95)
get_metrics(resourceId: "<id>", metricTypes: ["http_request_count"])
Database
数据库
list_postgres_instances()
get_postgres(postgresId: "<id>")
query_render_postgres(postgresId: "<id>", sql: "SELECT ...")
get_metrics(resourceId: "<postgres-id>", metricTypes: ["active_connections"])
list_postgres_instances()
get_postgres(postgresId: "<id>")
query_render_postgres(postgresId: "<id>", sql: "SELECT ...")
get_metrics(resourceId: "<postgres-id>", metricTypes: ["active_connections"])
Key-Value
键值存储
list_key_value()
get_key_value(keyValueId: "<id>")
undefinedlist_key_value()
get_key_value(keyValueId: "<id>")
undefinedCLI Commands (Fallback)
CLI命令(备选)
Use these if MCP tools are unavailable:
bash
undefined当MCP工具不可用时使用以下命令:
bash
undefinedService status
服务状态
render services -o json
render services instances <service-id>
render services -o json
render services instances <service-id>
Deployments
部署
render deploys list <service-id> -o json
render deploys list <service-id> -o json
Logs
日志
render logs -r <service-id> --tail -o text # Stream logs
render logs -r <service-id> --level error -o json # Error logs
render logs -r <service-id> --type deploy -o json # Build logs
render logs -r <service-id> --tail -o text # 流式日志
render logs -r <service-id> --level error -o json # 错误日志
render logs -r <service-id> --type deploy -o json # 构建日志
Database
数据库
render psql <database-id> # Connect to PostgreSQL
render psql <database-id> # 连接到PostgreSQL
SSH for live debugging
SSH实时调试
render ssh <service-id>
undefinedrender ssh <service-id>
undefinedHealthy Service Indicators
健康服务指标
| Indicator | Healthy | Warning | Critical |
|---|---|---|---|
| Deploy Status | | | |
| Error Rate | <0.1% | 0.1-1% | >1% |
| p95 Latency | <500ms | 500ms-2s | >2s |
| CPU Usage | <70% | 70-90% | >90% |
| Memory Usage | <80% | 80-95% | >95% |
| 指标 | 健康状态 | 警告 | 严重 |
|---|---|---|---|
| 部署状态 | | | |
| 错误率 | <0.1% | 0.1-1% | >1% |
| p95延迟 | <500ms | 500ms-2s | >2s |
| CPU使用率 | <70% | 70-90% | >90% |
| 内存使用率 | <80% | 80-95% | >95% |
References
参考资料
- Metrics guide: references/metrics-guide.md
- 指标指南: references/metrics-guide.md
Related Skills
相关技能
- deploy: Deploy new applications to Render
- debug: Diagnose and fix deployment failures
- deploy: 将新应用部署到Render
- debug: 诊断并修复部署失败问题