Merge upstream monitoring features preserving domain extensions and require fixed Go toolchain

This commit is contained in:
Codex committed 2026-10-22 23:50:03 +08:00
commit 71dd21269b
92 files changed
+8557 -874

No files matched your search

+3 -2
View File
@@ -63,6 +63,7 @@ func LoadSingleton(bus chan<- *model.Service) (err error) {
ServerShared = NewServerClass()
CronShared = NewCronClass()
ServerTransferShared = NewServerTransferClass()
OnlineHistoryShared = NewOnlineHistoryRecorder()
// 最后初始化 ServiceSentinel
ServiceSentinelShared, err = NewServiceSentinel(bus)
if err == nil {
@@ -97,7 +98,7 @@ func InitDBFromPath(path string) error {
model.Cron{}, model.Transfer{}, model.ServerGroupServer{},
model.NAT{}, model.DDNSProfile{}, model.NotificationGroupNotification{},
model.WAF{}, model.Oauth2Bind{}, model.Domain{}, model.ServerTransfer{}, model.JWTSession{},
model.APIToken{}, model.MCPAuditLog{})
model.APIToken{}, model.MCPAuditLog{}, model.OnlineSession{})
if err != nil {
return err
@@ -171,7 +172,7 @@ func CleanMonitorHistory() {
for _, alert := range alerts {
for _, rule := range alert.Rules {
// 是不是流量记录规则
if !rule.IsTransferDurationRule() {
if !rule.HasSafeCycleConfiguration() {
continue
}
dataCouldRemoveBefore := rule.GetTransferDurationStart().UTC()