Uptime Kuma Monitoring Multi-tenant Design —

Uptime Kuma

Uptime Kuma Monitoring Multi-tenant Self-hosted Uptime HTTP TCP Ping DNS Docker Notification Telegram Slack Status Page Dashboard Real-time
| Monitor Type | Protocol | Check | Interval | เหมาะกับ |
|---|---|---|---|---|
| HTTP(S) | HTTP/HTTPS | Status Code Body | 20s-300s | Website API |
| TCP | TCP | Port Open | 20s-300s | Database Service |
| Ping | ICMP | Response Time | 20s-300s | Server Network |
| DNS | DNS | Record Resolution | 60s-300s | DNS Server |
| Docker | Docker API | Container Running | 20s-300s | Container |
| Push | HTTP Push | Heartbeat Received | Custom | Cron Job Script |
Installation
=== Uptime Kuma Installation ===
Docker (Recommended)
docker run -d \
--name uptime-kuma \
--restart=always \
-p 3001:3001 \
-v uptime-kuma:/app/data \
louislam/uptime-kuma:latest
Docker Compose
version: '3.8'
services:
uptime-kuma:
image: louislam/uptime-kuma:latest
container_name: uptime-kuma
restart: always
ports:
- "3001:3001"
volumes:
- uptime-kuma-data:/app/data
environment:
- NODE_ENV=production
volumes:
uptime-kuma-data:
Nginx Reverse Proxy
server {
listen 443 ssl http2;
server_name status.example.com;
ssl_certificate /etc/letsencrypt/live/status.example.com/fullchain.pem;
เนื้อหาเกี่ยวข้อง — อ่านต่อ: Cloudflare D1 Hybrid Cloud Setup — คู่มือฉบับสมบูรณ์ 2026
ssl_certificate_key /etc/letsencrypt/live/status.example.com/privkey.pem;
location / {
proxy_pass http://localhost:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
แนะนำเพิ่มเติม — อีบุ๊กการลงทุน SiamCafeBook
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
Node.js (Without Docker)
git clone https://github.com/louislam/uptime-kuma.git
cd uptime-kuma
npm run setup
npm run start-server
from dataclasses import dataclass
@dataclass
class MonitorConfig:
name: str
monitor_type: str
เนื้อหาเกี่ยวข้อง — ทำความเข้าใจ inverse head and shoulders pattern meaning
url: str
interval: int
retry: int
notification: str
tags: str
monitors = [
MonitorConfig("Main Website", "HTTP", "https://www.example.com", 30, 3, "Telegram + Slack", "tenant-a, web"),
MonitorConfig("API Server", "HTTP", "https://api.example.com/health", 20, 3, "PagerDuty", "tenant-a, api"),
MonitorConfig("Database", "TCP", "db.example.com:5432", 30, 5, "Slack", "tenant-a, db"),
MonitorConfig("DNS", "DNS", "example.com (A record)", 60, 3, "Email", "tenant-a, infra"),
MonitorConfig("Backup Job", "Push", "Push URL (heartbeat)", 3600, 1, "Telegram", "tenant-a, cron"),
แนะนำเพิ่มเติม — iCafeForex
MonitorConfig("Tenant B Web", "HTTP", "https://www.tenant-b.com", 30, 3, "Discord", "tenant-b, web"),
]
Multi-tenant Architecture
=== Multi-tenant Monitoring Design ===
เนื้อหาเกี่ยวข้อง — ทำความเข้าใจ Java Virtual Threads Kubernetes Deployment
Approach 1: Single Instance + Tags
- Use Tags to separate tenants
- Create Tag per tenant: tenant-a, tenant-b, tenant-c
- Assign monitors to tenant tags
- Status Pages per tenant (built-in feature)
- Pro: Simple, low resource
- Con: No data isolation, shared admin
Approach 2: Instance per Tenant (Docker)
docker-compose.yml per tenant
services:

uptime-kuma-tenant-a:
image: louislam/uptime-kuma:latest
ports: ["3001:3001"]
volumes: [tenant-a-data:/app/data]
uptime-kuma-tenant-b:
image: louislam/uptime-kuma:latest
ports: ["3002:3001"]
volumes: [tenant-b-data:/app/data]
Approach 3: Kubernetes per Tenant
apiVersion: apps/v1
kind: Deployment
metadata:
name: uptime-kuma-{{ tenant }}
namespace: monitoring
spec:
replicas: 1
template:
spec:
containers:
- name: uptime-kuma
image: louislam/uptime-kuma:latest
ports: [{containerPort: 3001}]
volumeMounts:
- name: data
mountPath: /app/data
@dataclass
เนื้อหาเกี่ยวข้อง — Segment Routing Monitoring และ Alerting
class TenantApproach:
approach: str
isolation: str
complexity: str
resource: str
max_tenants: str
use_case: str
approaches = [
TenantApproach("Single + Tags", "Low (shared DB)", "ง่าย", "1 instance", "5-10", "Small team internal"),
TenantApproach("Instance per Tenant", "High (separate DB)", "ปานกลาง", "1 container/tenant", "10-50", "MSP small"),
TenantApproach("K8s per Tenant", "High (separate Pod)", "สูง", "1 Pod/tenant", "50-200", "MSP large"),
TenantApproach("API Automation", "High + Automated", "สูง", "Dynamic", "200+", "SaaS platform"),
]
เคล็ดลับ
- Docker: ใช้ Docker ติดตั้ง ง่าย Update ง่าย
- Tags: ใช้ Tags แยก Tenant สำหรับ Single Instance
- Status Page: สร้าง Status Page แยกตาม Tenant
- Backup: Backup /app/data ทุกวัน SQLite ไฟล์เดียว
- Notification: ตั้ง Notification หลายช่องทาง ป้องกันพลาด
Uptime Kuma คืออะไร
Open Source Self-hosted Monitoring HTTP TCP Ping DNS Docker Push Notification Telegram Slack Status Page Dashboard Real-time ฟรี





