Add public monitoring features and CI updates

- Add status pages, incidents, badges, maintenance, bulk ops, and metrics
- Add Docker packaging, env example, and frontend routes
- Refresh GitHub workflows and project metadata
This commit is contained in:
Tomas Dvorak
2026-04-27 11:10:18 +02:00
parent 363d708e91
commit 8011d487f1
101 changed files with 16126 additions and 2028 deletions
+70 -47
View File
@@ -6,23 +6,46 @@ import "time"
type Status string
const (
StatusUp Status = "up"
StatusDown Status = "down"
StatusPending Status = "pending"
StatusPaused Status = "paused"
StatusUp Status = "up"
StatusDown Status = "down"
StatusPending Status = "pending"
StatusPaused Status = "paused"
StatusMaintenance Status = "maintenance"
)
// Monitor types
const (
TypeHTTP = "http"
TypeHTTPS = "https"
TypeTCP = "tcp"
TypePing = "ping"
TypeDNS = "dns"
TypeKeyword = "keyword"
TypeJSONQuery = "json-query"
TypeDocker = "docker"
TypeHTTP = "http"
TypeHTTPS = "https"
TypeTCP = "tcp"
TypePing = "ping"
TypeDNS = "dns"
TypeKeyword = "keyword"
TypeJSONQuery = "json-query"
TypeDocker = "docker"
TypePush = "push"
TypeManual = "manual"
TypeSystemService = "system-service"
TypeRealBrowser = "real-browser"
TypeGRPCKeyword = "grpc-keyword"
TypeMQTT = "mqtt"
TypeRabbitMQ = "rabbitmq"
TypeKafka = "kafka-producer"
TypeSMTP = "smtp"
TypeSNMP = "snmp"
TypeSIP = "sip-options"
TypeTailscalePing = "tailscale-ping"
TypeWebSocket = "websocket-upgrade"
TypeGlobalping = "globalping"
TypeMySQL = "mysql"
TypeMongoDB = "mongodb"
TypeRedis = "redis"
TypePostgreSQL = "postgresql"
TypeSQLServer = "sqlserver"
TypeOracleDB = "oracledb"
TypeRADIUS = "radius"
TypeGameDig = "gamedig"
TypeSteam = "steam"
)
// HTTPMethod constants
@@ -38,39 +61,39 @@ const (
// Monitor represents a website/service monitor configuration
type Monitor struct {
ID string `json:"id" db:"id"`
Name string `json:"name" db:"name"`
Type string `json:"type" db:"type"`
URL string `json:"url" db:"url"`
Hostname string `json:"hostname" db:"hostname"`
Port int `json:"port" db:"port"`
Method string `json:"method" db:"method"`
Headers string `json:"headers" db:"headers"`
Body string `json:"body" db:"body"`
Interval int `json:"interval" db:"interval"`
Timeout int `json:"timeout" db:"timeout"`
Retries int `json:"retries" db:"retries"`
RetryInterval int `json:"retry_interval" db:"retry_interval"`
MaxRedirects int `json:"max_redirects" db:"max_redirects"`
Keyword string `json:"keyword" db:"keyword"`
JSONQuery string `json:"json_query" db:"json_query"`
ExpectedValue string `json:"expected_value" db:"expected_value"`
InvertKeyword bool `json:"invert_keyword" db:"invert_keyword"`
DNSResolveServer string `json:"dns_resolve_server" db:"dns_resolve_server"`
DNSResolverMode string `json:"dns_resolver_mode" db:"dns_resolver_mode"`
Status Status `json:"status" db:"status"`
Active bool `json:"active" db:"active"`
UserID string `json:"user" db:"user"`
Tags []string `json:"tags" db:"tags"`
Created time.Time `json:"created" db:"created"`
Updated time.Time `json:"updated" db:"updated"`
LastCheck time.Time `json:"last_check" db:"last_check"`
UptimeStats map[string]float64 `json:"uptime_stats" db:"uptime_stats"`
Description string `json:"description" db:"description"`
CertExpiryNotification bool `json:"cert_expiry_notification" db:"cert_expiry_notification"`
CertExpiryDays int `json:"cert_expiry_days" db:"cert_expiry_days"`
ProxyID string `json:"proxy" db:"proxy"`
IgnoreTLSError bool `json:"ignore_tls_error" db:"ignore_tls_error"`
ID string `json:"id" db:"id"`
Name string `json:"name" db:"name"`
Type string `json:"type" db:"type"`
URL string `json:"url" db:"url"`
Hostname string `json:"hostname" db:"hostname"`
Port int `json:"port" db:"port"`
Method string `json:"method" db:"method"`
Headers string `json:"headers" db:"headers"`
Body string `json:"body" db:"body"`
Interval int `json:"interval" db:"interval"`
Timeout int `json:"timeout" db:"timeout"`
Retries int `json:"retries" db:"retries"`
RetryInterval int `json:"retry_interval" db:"retry_interval"`
MaxRedirects int `json:"max_redirects" db:"max_redirects"`
Keyword string `json:"keyword" db:"keyword"`
JSONQuery string `json:"json_query" db:"json_query"`
ExpectedValue string `json:"expected_value" db:"expected_value"`
InvertKeyword bool `json:"invert_keyword" db:"invert_keyword"`
DNSResolveServer string `json:"dns_resolve_server" db:"dns_resolve_server"`
DNSResolverMode string `json:"dns_resolver_mode" db:"dns_resolver_mode"`
Status Status `json:"status" db:"status"`
Active bool `json:"active" db:"active"`
UserID string `json:"user" db:"user"`
Tags []string `json:"tags" db:"tags"`
Created time.Time `json:"created" db:"created"`
Updated time.Time `json:"updated" db:"updated"`
LastCheck time.Time `json:"last_check" db:"last_check"`
UptimeStats map[string]float64 `json:"uptime_stats" db:"uptime_stats"`
Description string `json:"description" db:"description"`
CertExpiryNotification bool `json:"cert_expiry_notification" db:"cert_expiry_notification"`
CertExpiryDays int `json:"cert_expiry_days" db:"cert_expiry_days"`
ProxyID string `json:"proxy" db:"proxy"`
IgnoreTLSError bool `json:"ignore_tls_error" db:"ignore_tls_error"`
}
// Heartbeat represents a single monitor check result
@@ -107,8 +130,8 @@ type CheckResult struct {
// CheckRequest holds parameters for a monitor check
type CheckRequest struct {
Monitor *Monitor
Timeout time.Duration
Monitor *Monitor
Timeout time.Duration
}
// ToPublicJSON returns a monitor object suitable for public display