mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-11-04 16:40:21 +00:00
Merge upstream monitoring features preserving domain extensions and require fixed Go toolchain
This commit is contained in:
commit
71dd21269b
92 files changed
+8557
-874
No files matched your search
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user