Files
nexus/wiki/entities/Uptime-Kuma.md
2026-04-22 04:03:04 +08:00

65 lines
2.5 KiB
Markdown
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.
---
title: "Uptime Kuma"
type: entity
aliases: [uptime-kuma, Louislam Uptime Kuma]
tags: [monitoring, uptime, http, tls, self-hosted]
date: 2025-11-11
---
# Uptime Kuma
## Overview
Uptime Kuma 是开源的自托管 uptime monitoring 工具,被称为"自托管的 UptimeRobot",由 louislam 开发。它通过模拟 HTTP/TCP/DNS/TLS 请求来检测服务可用性,支持历史记录存储和丰富的通知通道。相比 Prometheus + blackbox_exporter 方案Uptime Kuma 提供了更友好的 Web UI 和更低的配置门槛,适合家庭用户快速搭建合成监控。
## Key Characteristics
- **友好 Web UI**:现代化的监控面板,无需编写 YAML 配置文件
- **多协议支持**HTTP(S)、TCP、DNS、TLS 证书、Ping、Steam 游戏服务器
- **通知通道**邮件、Slack、Telegram、Discord、Webhook、PagerDuty 等
- **历史记录**:持久化的 uptime 历史和响应时间图表
- **证书监控**:自动检测 TLS 证书到期并告警
- **Docker 部署**:一条命令即可启动
## Home Server Deployment
```yaml
# docker-compose.yml 片段来源uptimekuma.org
version: '3.8'
services:
uptime-kuma:
image: louislam/uptime-kuma:latest
container_name: uptime-kuma
restart: unless-stopped
ports:
- "3001:3001"
volumes:
- ./uptime-kuma-data:/app/data
environment:
- TZ=Asia/Shanghai
```
访问 `http://localhost:3001` 完成初始化(首次访问时设置管理员账户)。
## Comparison: Uptime Kuma vs Prometheus blackbox_exporter
| 维度 | Uptime Kuma | blackbox_exporter |
|------|-------------|------------------|
| 配置方式 | Web UI 点点点 | YAML 配置文件 |
| 学习门槛 | 低 | 中 |
| 数据持久化 | 内置 SQLite | 依赖 Prometheus 存储 |
| 仪表盘 | 内置 | 需 Grafana |
| 告警配置 | UI 绑定通知 | Prometheus rules |
| 适合场景 | 快速验证、家庭使用 | 生产级、规模化 |
## Use Case
Uptime Kuma 适合外网/内网服务可用性的快速监控搭建。配合 Prometheus + blackbox_exporter 使用Uptime Kuma 负责外网端点快速告警blackbox_exporter 负责更细粒度的指标(响应时间分布、证书剩余天数)。
## Related Sources
- [[家庭监控方案-prometheus-grafana-node-exporter-cadvisor-blackbox]]
## Related Entities
- [[Prometheus]] — 互补的 Prometheus blackbox_exporter
- [[blackbox_exporter]] — 细粒度探测方案
- [[Alertmanager]] — 告警分发
## Related Concepts
- [[合成监控]] — 核心应用场景
- [[System Monitoring]] — 上游领域