Add local SQLite database and sync with Uptime Kuma
All checks were successful
Build and Push Container / build (push) Successful in 1m4s
All checks were successful
Build and Push Container / build (push) Successful in 1m4s
Features: - SQLite database to track monitors and hosts locally - Uses Uptime Kuma tags to mark monitors as managed by Kuma Strapper - Sync on startup, before each scan, and on-demand via API - Shows existing monitors when re-scanning a host New files: - backend/services/database.py - SQLite database service - backend/services/sync.py - Sync service for Uptime Kuma reconciliation API endpoints: - POST /api/sync - Full sync with Uptime Kuma - POST /api/sync/host/<hostname> - Sync specific host - GET /api/hosts - List tracked hosts - GET /api/hosts/<hostname>/monitors - Get monitors for host - GET /api/monitors/tracked - Get all tracked monitors 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -81,4 +81,13 @@ export const api = {
|
||||
body: JSON.stringify({ username, password, totp }),
|
||||
}),
|
||||
kumaLogout: () => fetchApi('/kuma/logout', { method: 'POST' }),
|
||||
|
||||
// Sync
|
||||
triggerSync: () => fetchApi('/sync', { method: 'POST' }),
|
||||
syncHost: (hostname) => fetchApi(`/sync/host/${encodeURIComponent(hostname)}`, { method: 'POST' }),
|
||||
|
||||
// Hosts and tracked monitors
|
||||
getHosts: () => fetchApi('/hosts'),
|
||||
getHostMonitors: (hostname) => fetchApi(`/hosts/${encodeURIComponent(hostname)}/monitors`),
|
||||
getTrackedMonitors: () => fetchApi('/monitors/tracked'),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user