Compare commits

...

36 Commits

Author SHA1 Message Date
刘祥超
d6de9b5b09 缓存策略默认不启用MMAP 2024-05-01 12:51:38 +08:00
刘祥超
f3ed064c10 版本号修改为1.3.8 2024-04-30 19:10:11 +08:00
刘祥超
00d8588abd 可以在集群设置中修改节点最大并发读/写数 2024-04-30 19:08:21 +08:00
刘祥超
a987837904 版本修改为1.3.7 2024-04-29 23:12:29 +08:00
刘祥超
4bcad223ca 版本号变更为1.3.6 2024-04-22 10:56:04 +08:00
刘祥超
b9e5005d05 升级相关依赖 2024-04-21 20:54:16 +08:00
刘祥超
fd9bdee6be 修复单例安装程序编译问题 2024-04-21 20:12:29 +08:00
刘祥超
4460956de6 在IP名单中搜索IP时同时也搜索“所有IP”类型的IP 2024-04-21 10:48:25 +08:00
刘祥超
1923c2706a 版本号修改为1.3.5 2024-04-20 22:46:56 +08:00
刘祥超
1470ec2b65 修复ttlcache可能缺失回收数据的问题 2024-04-20 22:22:24 +08:00
刘祥超
62fc9bcc68 增加edgeMtricSumStats表中total长度 2024-04-19 16:13:32 +08:00
刘祥超
8a08df8593 更新相关依赖库 2024-04-17 22:23:46 +08:00
刘祥超
bc7a1f37b6 版本号修改为1.3.4.4 2024-04-16 14:14:59 +08:00
刘祥超
f8a01e4639 版本号修改为1.3.4.3 2024-04-15 09:26:18 +08:00
刘祥超
8e4c00ef31 删除一直未实现的Unix协议相关内容 2024-04-14 17:11:58 +08:00
刘祥超
dc894828e0 源站增加快速停用/启用功能 2024-04-14 16:27:27 +08:00
刘祥超
7f6d8ba7b4 修复4位版本号导致无法自动升级SQL的问题 2024-04-14 11:47:10 +08:00
刘祥超
b8b56db83c 进程重启时,自动保存未保存的带宽统计数据到本地文件,以便于在重启后恢复 2024-04-13 17:14:58 +08:00
刘祥超
17f0821945 简化IP名单中创建IP操作/支持IP以CIDR方式显示 2024-04-13 16:48:24 +08:00
刘祥超
b5436a6e57 网站看板数据中增加当日独立IP和当日流量 2024-04-12 18:51:42 +08:00
刘祥超
46fe2d8369 优化套餐变更后网站限流状态 2024-04-12 11:35:52 +08:00
刘祥超
ff429c270d 节点配置中增加集群的密钥信息 2024-04-11 14:19:08 +08:00
刘祥超
92de19e359 版本号修改为1.3.4.2 2024-04-09 10:05:40 +08:00
刘祥超
4121c81a0a 将版本号修改为1.3.4.1 2024-04-08 14:57:05 +08:00
刘祥超
f639ab8342 WAF策略增加JSCookie动作选项 2024-04-07 14:21:01 +08:00
刘祥超
f17a8ab1d0 标记edgeIPItems中两个字段为弃用 2024-04-07 11:26:56 +08:00
刘祥超
12f677eb12 IP名单中的“全局封锁名单”文字改为“系统黑名单” 2024-04-06 16:13:17 +08:00
刘祥超
7595bdeb6b 用户系统增加IP检查功能 2024-04-06 15:23:19 +08:00
刘祥超
fc223af3f0 IP检查也支持范围搜索 2024-04-06 15:15:33 +08:00
刘祥超
ebe3632f07 支持搜索IPv6范围 2024-04-06 14:55:51 +08:00
刘祥超
930babc010 IP名单搜索IP时同时搜索范围 2024-04-06 10:31:03 +08:00
刘祥超
255e3a61e6 更好地支持IPv6 2024-04-06 10:21:52 +08:00
刘祥超
52155a23ab 集群设置增加自动硬盘TRIM选项 2024-04-04 17:04:53 +08:00
刘祥超
200f244c0c “磁盘”文字改为“硬盘” 2024-04-04 16:49:17 +08:00
刘祥超
ab5d7539ce 节点上传指标数据时只上传变更的部分 2024-04-03 08:15:20 +08:00
刘祥超
3e79840fe6 使用MMAP提升缓存读取性能 2024-03-29 18:32:31 +08:00
46 changed files with 962 additions and 381 deletions

View File

@@ -12,5 +12,5 @@ dbs:
fields:
bool: [ "uamIsOn", "followPort", "requestHostExcludingPort", "autoRemoteStart", "autoInstallNftables", "enableIPLists", "detectAgents", "checkingPorts", "enableRecordHealthCheck", "offlineIsNotified", "http2Enabled", "http3Enabled", "enableHTTP2", "retry50X", "retry40X", "autoSystemTuning", "disableDefaultDB" ]
bool: [ "uamIsOn", "followPort", "requestHostExcludingPort", "autoRemoteStart", "autoInstallNftables", "enableIPLists", "detectAgents", "checkingPorts", "enableRecordHealthCheck", "offlineIsNotified", "http2Enabled", "http3Enabled", "enableHTTP2", "retry50X", "retry40X", "autoSystemTuning", "disableDefaultDB", "autoTrimDisks" ]

37
go.mod
View File

@@ -1,10 +1,11 @@
module github.com/TeaOSLab/EdgeAPI
go 1.18
go 1.21
replace github.com/TeaOSLab/EdgeCommon => ../EdgeCommon
require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns v1.1.0
github.com/TeaOSLab/EdgeCommon v0.0.0-00010101000000-000000000000
@@ -12,35 +13,35 @@ require (
github.com/andybalholm/brotli v1.0.4
github.com/aws/aws-sdk-go v1.40.45
github.com/cespare/xxhash v1.1.0
github.com/cespare/xxhash/v2 v2.1.2
github.com/fsnotify/fsnotify v1.6.0
github.com/go-acme/lego/v4 v4.10.2
github.com/go-sql-driver/mysql v1.7.0
github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible
github.com/iwind/TeaGo v0.0.0-20230704135818-4a5646ab1f5b
github.com/iwind/TeaGo v0.0.0-20240312020455-6f20b5121caf
github.com/iwind/gosock v0.0.0-20220505115348-f88412125a62
github.com/miekg/dns v1.1.50
github.com/mozillazg/go-pinyin v0.18.0
github.com/pkg/sftp v1.12.0
github.com/shirou/gopsutil/v3 v3.22.2
github.com/smartwalle/alipay/v3 v3.1.7
github.com/smartwalle/alipay/v3 v3.2.20
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.801
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.801
github.com/volcengine/volc-sdk-golang v1.0.124
golang.org/x/crypto v0.14.0
golang.org/x/net v0.15.0
golang.org/x/sys v0.13.0
google.golang.org/grpc v1.45.0
golang.org/x/crypto v0.22.0
golang.org/x/net v0.24.0
golang.org/x/sys v0.19.0
google.golang.org/grpc v1.62.0
gopkg.in/yaml.v3 v3.0.1
)
require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 // indirect
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/golang-jwt/jwt/v5 v5.0.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kr/fs v0.1.0 // indirect
@@ -52,20 +53,18 @@ require (
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/smartwalle/crypto4go v1.0.2 // indirect
github.com/tdewolff/minify/v2 v2.12.7 // indirect
github.com/tdewolff/parse/v2 v2.6.6 // indirect
github.com/smartwalle/ncrypto v1.0.4 // indirect
github.com/smartwalle/ngx v1.0.9 // indirect
github.com/smartwalle/nsign v1.0.9 // indirect
github.com/technoweenie/multipartstreamer v1.0.1 // indirect
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.801 // indirect
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.801 // indirect
github.com/tklauser/go-sysconf v0.3.9 // indirect
github.com/tklauser/numcpus v0.3.0 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
golang.org/x/mod v0.8.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.6.0 // indirect
google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e // indirect
google.golang.org/protobuf v1.28.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240228224816-df926f6c8641 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/ini.v1 v1.66.6 // indirect
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
)

98
go.sum
View File

@@ -45,7 +45,6 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60=
github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo=
github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo=
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
@@ -83,7 +82,6 @@ github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm
github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4=
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o=
github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
@@ -98,9 +96,7 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
@@ -112,11 +108,7 @@ github.com/cloudwego/hertz/cmd/hz v0.7.0/go.mod h1:6SroAwvZkyL54CiPANDkTR3YoX2MY
github.com/cloudwego/thriftgo v0.1.7/go.mod h1:LzeafuLSiHA9JTiWC8TIMIq64iadeObgRUhmVG1OC/w=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
@@ -126,11 +118,9 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/demdxx/gocast v1.2.0/go.mod h1:RTyqNS6BdIq/19jJX96PlVhfqG31tldKMnpVJnPa3pw=
github.com/dgryski/go-rendezvous v0.0.0-20200624174652-8d2f3be8b2d9/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/djherbis/atime v1.1.0/go.mod h1:28OF6Y8s3NQWwacXc5eZTsEsiMzp7LF8MbXE+XJPdBE=
github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI=
github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
@@ -142,7 +132,6 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
@@ -171,8 +160,6 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG
github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-redis/redis/v8 v8.0.0-beta.7/go.mod h1:FGJAWDWFht1sQ4qxyJHZZbVyvnVcKQN0E3u5/5lRz+g=
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc=
github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
@@ -215,8 +202,9 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
@@ -234,8 +222,9 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
@@ -251,8 +240,8 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
@@ -297,9 +286,8 @@ github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOc
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
github.com/iwind/TeaGo v0.0.0-20210411134150-ddf57e240c2f/go.mod h1:KU4mS7QNiZ7QWEuDBk1zw0/Q2LrAPZv3tycEFBsuUwc=
github.com/iwind/TeaGo v0.0.0-20230704135818-4a5646ab1f5b h1:yYUaxnc04uzfr7C9HBN52ZZvcQomND+C5aZTpjOUYFI=
github.com/iwind/TeaGo v0.0.0-20230704135818-4a5646ab1f5b/go.mod h1:fi/Pq+/5m2HZoseM+39dMF57ANXRt6w4PkGu3NXPc5s=
github.com/iwind/TeaGo v0.0.0-20240312020455-6f20b5121caf h1:WA9qgiynESu/DDTnLH6npRI5AK6UL9qwJ2YZ5qhJX5E=
github.com/iwind/TeaGo v0.0.0-20240312020455-6f20b5121caf/go.mod h1:SfqVbWyIPdVflyA6lMgicZzsoGS8pyeLiTRe8/CIpGI=
github.com/iwind/gosock v0.0.0-20220505115348-f88412125a62 h1:HJH6RDheAY156DnIfJSD/bEvqyXzsZuE2gzs8PuUjoo=
github.com/iwind/gosock v0.0.0-20220505115348-f88412125a62/go.mod h1:H5Q7SXwbx3a97ecJkaS2sD77gspzE7HFUafBO0peEyA=
github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs=
@@ -354,7 +342,6 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
@@ -404,17 +391,13 @@ github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opentracing/opentracing-go v1.1.1-0.20190913142402-a7454ce5950e/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b h1:FfH+VrHHk6Lxt9HdVS0PXzSXFyS2NbZKXv33FYPol0A=
github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b/go.mod h1:AC62GU6hc0BrNm+9RK9VSiwa/EUe1bkIeFORAMcHvJU=
@@ -475,17 +458,20 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/smartwalle/alipay/v3 v3.1.7 h1:J4U5slABafKVD/b9gPCZe/3HAPB8Pa2NOYOPcugEJBo=
github.com/smartwalle/alipay/v3 v3.1.7/go.mod h1:cZUMCCnsux9YAxA0/f3PWUR+7wckWtE1BqxbVRtGij0=
github.com/smartwalle/crypto4go v1.0.2 h1:9DUEOOsPhmp00438L4oBdcL8EZG1zumecft5bWj5phI=
github.com/smartwalle/crypto4go v1.0.2/go.mod h1:LQ7vCZIb7BE5+MuMtJBuO8ORkkQ01m4DXDBWPzLbkMY=
github.com/smartwalle/alipay/v3 v3.2.20 h1:IjpG3YYgUgzCfS0z/EHlUbbr0OlrmOBHUst/3FzToYE=
github.com/smartwalle/alipay/v3 v3.2.20/go.mod h1:KWg91KsY+eIOf26ZfZeH7bed1bWulGpGrL1ErHF3jWo=
github.com/smartwalle/ncrypto v1.0.4 h1:P2rqQxDepJwgeO5ShoC+wGcK2wNJDmcdBOWAksuIgx8=
github.com/smartwalle/ncrypto v1.0.4/go.mod h1:Dwlp6sfeNaPMnOxMNayMTacvC5JGEVln3CVdiVDgbBk=
github.com/smartwalle/ngx v1.0.9 h1:pUXDvWRZJIHVrCKA1uZ15YwNti+5P4GuJGbpJ4WvpMw=
github.com/smartwalle/ngx v1.0.9/go.mod h1:mx/nz2Pk5j+RBs7t6u6k22MPiBG/8CtOMpCnALIG8Y0=
github.com/smartwalle/nsign v1.0.9 h1:8poAgG7zBd8HkZy9RQDwasC6XZvJpDGQWSjzL2FZL6E=
github.com/smartwalle/nsign v1.0.9/go.mod h1:eY6I4CJlyNdVMP+t6z1H6Jpd4m5/V+8xi44ufSTxXgc=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI=
@@ -498,13 +484,7 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/tdewolff/minify/v2 v2.12.7 h1:pBzz2tAfz5VghOXiQIsSta6srhmTeinQPjRDHWoumCA=
github.com/tdewolff/minify/v2 v2.12.7/go.mod h1:ZRKTheiOGyLSK8hOZWWv+YoJAECzDivNgAlVYDHp/Ws=
github.com/tdewolff/parse/v2 v2.6.6 h1:Yld+0CrKUJaCV78DL1G2nk3C9lKrxyRTux5aaK/AkDo=
github.com/tdewolff/parse/v2 v2.6.6/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs=
github.com/tdewolff/test v1.0.7/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
github.com/tdewolff/test v1.0.9 h1:SswqJCmeN4B+9gEAi/5uqT0qpi1y2/2O47V/1hhGZT0=
github.com/tdewolff/test v1.0.9/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/technoweenie/multipartstreamer v1.0.1 h1:XRztA5MXiR1TIRHxH2uNxXxaIkKQDeX7m2XsSOlQEnM=
github.com/technoweenie/multipartstreamer v1.0.1/go.mod h1:jNVxdtShOxzAsukZwTSw6MDx5eUJoiEBsSvzDU9uzog=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.801 h1:zLWU179K63I2oLFIl9gXJ/NVfh7qDOVUARksccRDknE=
@@ -546,7 +526,6 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opentelemetry.io/otel v0.7.0/go.mod h1:aZMyHG5TqDOXEgH2tyLiXSUKly1jT3yqE9PmrzIeCdo=
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
@@ -559,7 +538,6 @@ go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190506204251-e1dfcc566284/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
@@ -575,8 +553,8 @@ golang.org/x/crypto v0.0.0-20210920023735-84f357641f63/go.mod h1:GvvjBRRGRdwPK5y
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio=
golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -590,7 +568,6 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/exp v0.0.0-20200513190911-00229845015e/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw=
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
@@ -665,8 +642,8 @@ golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA=
golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8=
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -685,8 +662,9 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -711,7 +689,6 @@ golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -730,7 +707,6 @@ golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -758,11 +734,10 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
@@ -770,7 +745,8 @@ golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o=
golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek=
golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q=
golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -784,8 +760,8 @@ golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -848,7 +824,6 @@ golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0=
@@ -884,7 +859,6 @@ google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRn
google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
@@ -909,8 +883,8 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e h1:fNKDNuUyC4WH+inqDMpfXDdfvwfYILbsX+oskGZ8hxg=
google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240228224816-df926f6c8641 h1:DKU1r6Tj5s1vlU/moGhuGz7E3xRfwjdAfDzbsaQJtEY=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240228224816-df926f6c8641/go.mod h1:UCOku4NytXMJuLQE5VuqA5lX3PcHCBo8pxNyvkf4xBs=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
@@ -928,8 +902,8 @@ google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
google.golang.org/grpc v1.45.0 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M=
google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk=
google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@@ -943,8 +917,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@@ -968,7 +943,6 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=

View File

@@ -1,7 +1,7 @@
package teaconst
const (
Version = "1.3.4"
Version = "1.3.8"
ProductName = "Edge API"
ProcessName = "edge-api"
@@ -20,8 +20,5 @@ const (
// 其他节点版本号,用来检测是否有需要升级的节点
NodeVersion = "1.3.4"
// SQLVersion SQL版本号
SQLVersion = "11"
NodeVersion = "1.3.8"
)

View File

@@ -7,8 +7,8 @@ import (
"github.com/TeaOSLab/EdgeAPI/internal/errors"
"github.com/TeaOSLab/EdgeAPI/internal/goman"
"github.com/TeaOSLab/EdgeAPI/internal/remotelogs"
"github.com/TeaOSLab/EdgeAPI/internal/utils"
"github.com/TeaOSLab/EdgeAPI/internal/zero"
"github.com/TeaOSLab/EdgeCommon/pkg/iputils"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared"
@@ -520,14 +520,14 @@ func (this *HTTPAccessLogDAO) listAccessLogs(tx *dbs.Tx,
// keyword
if len(ip) > 0 {
// TODO 支持IP范围
// TODO 支持IPv6范围
if tableQuery.hasRemoteAddrField {
// IP格式
if strings.Contains(ip, ",") || strings.Contains(ip, "-") {
rangeConfig, err := shared.ParseIPRange(ip)
if err == nil {
if len(rangeConfig.IPFrom) > 0 && len(rangeConfig.IPTo) > 0 {
query.Between("INET_ATON(remoteAddr)", utils.IP2Long(rangeConfig.IPFrom), utils.IP2Long(rangeConfig.IPTo))
query.Between("INET_ATON(remoteAddr)", iputils.ToLong(rangeConfig.IPFrom), iputils.ToLong(rangeConfig.IPTo))
}
}
} else {
@@ -580,7 +580,7 @@ func (this *HTTPAccessLogDAO) listAccessLogs(tx *dbs.Tx,
if len(pieces) == 1 || len(pieces[1]) == 0 || pieces[0] == pieces[1] {
query.Attr("remoteAddr", pieces[0])
} else {
query.Between("INET_ATON(remoteAddr)", utils.IP2Long(pieces[0]), utils.IP2Long(pieces[1]))
query.Between("INET_ATON(remoteAddr)", iputils.ToLong(pieces[0]), iputils.ToLong(pieces[1]))
}
} else if statusRangeReg.MatchString(keyword) { // status:200-400
isSpecialKeyword = true

View File

@@ -174,7 +174,8 @@ func (this *HTTPCachePolicyDAO) CreateDefaultCachePolicy(tx *dbs.Tx, name string
}
var storageOptions = &serverconfigs.HTTPFileCacheStorage{
Dir: "/opt/cache",
Dir: "/opt/cache",
EnableMMAP: false,
MemoryPolicy: &serverconfigs.HTTPCachePolicy{
Capacity: &shared.SizeCapacity{
Count: 1,

View File

@@ -134,7 +134,7 @@ func (this *HTTPFirewallPolicyDAO) CreateFirewallPolicy(tx *dbs.Tx, userId int64
if userId <= 0 && serverGroupId <= 0 && serverId <= 0 {
// synFlood
var synFloodConfig = firewallconfigs.DefaultSYNFloodConfig()
var synFloodConfig = firewallconfigs.NewSYNFloodConfig()
synFloodJSON, err := json.Marshal(synFloodConfig)
if err != nil {
return 0, err
@@ -142,7 +142,7 @@ func (this *HTTPFirewallPolicyDAO) CreateFirewallPolicy(tx *dbs.Tx, userId int64
op.SynFlood = synFloodJSON
// block options
var blockOptions = firewallconfigs.DefaultHTTPFirewallBlockAction()
var blockOptions = firewallconfigs.NewHTTPFirewallBlockAction()
blockOptionsJSON, err := json.Marshal(blockOptions)
if err != nil {
return 0, err
@@ -150,7 +150,7 @@ func (this *HTTPFirewallPolicyDAO) CreateFirewallPolicy(tx *dbs.Tx, userId int64
op.BlockOptions = blockOptionsJSON
// page options
var pageOptions = firewallconfigs.DefaultHTTPFirewallPageAction()
var pageOptions = firewallconfigs.NewHTTPFirewallPageAction()
pageOptionsJSON, err := json.Marshal(pageOptions)
if err != nil {
return 0, err
@@ -158,12 +158,20 @@ func (this *HTTPFirewallPolicyDAO) CreateFirewallPolicy(tx *dbs.Tx, userId int64
op.PageOptions = pageOptionsJSON
// captcha options
var captchaOptions = firewallconfigs.DefaultHTTPFirewallCaptchaAction()
var captchaOptions = firewallconfigs.NewHTTPFirewallCaptchaAction()
captchaOptionsJSON, err := json.Marshal(captchaOptions)
if err != nil {
return 0, err
}
op.CaptchaOptions = captchaOptionsJSON
// jscookie options
var jsCookieOptions = firewallconfigs.NewHTTPFirewallJavascriptCookieAction()
jsCookieOptionsJSON, err := json.Marshal(jsCookieOptions)
if err != nil {
return 0, err
}
op.JsCookieOptions = jsCookieOptionsJSON
}
err := this.Save(tx, op)
@@ -323,6 +331,7 @@ func (this *HTTPFirewallPolicyDAO) UpdateFirewallPolicy(tx *dbs.Tx,
blockOptionsJSON []byte,
pageOptionsJSON []byte,
captchaOptionsJSON []byte,
jsCookieOptionsJSON []byte,
mode firewallconfigs.FirewallMode,
useLocalFirewall bool,
synFloodConfig *firewallconfigs.SYNFloodConfig,
@@ -358,6 +367,9 @@ func (this *HTTPFirewallPolicyDAO) UpdateFirewallPolicy(tx *dbs.Tx,
if IsNotNull(captchaOptionsJSON) {
op.CaptchaOptions = captchaOptionsJSON
}
if IsNotNull(jsCookieOptionsJSON) {
op.JsCookieOptions = jsCookieOptionsJSON
}
if synFloodConfig != nil {
synFloodConfigJSON, err := json.Marshal(synFloodConfig)
@@ -528,7 +540,7 @@ func (this *HTTPFirewallPolicyDAO) ComposeFirewallPolicy(tx *dbs.Tx, policyId in
// Block动作配置
if IsNotNull(policy.BlockOptions) {
var blockAction = &firewallconfigs.HTTPFirewallBlockAction{}
var blockAction = firewallconfigs.NewHTTPFirewallBlockAction()
err = json.Unmarshal(policy.BlockOptions, blockAction)
if err != nil {
return config, err
@@ -538,7 +550,7 @@ func (this *HTTPFirewallPolicyDAO) ComposeFirewallPolicy(tx *dbs.Tx, policyId in
// Page动作配置
if IsNotNull(policy.PageOptions) {
var pageAction = firewallconfigs.DefaultHTTPFirewallPageAction()
var pageAction = firewallconfigs.NewHTTPFirewallPageAction()
err = json.Unmarshal(policy.PageOptions, pageAction)
if err != nil {
return config, err
@@ -548,7 +560,7 @@ func (this *HTTPFirewallPolicyDAO) ComposeFirewallPolicy(tx *dbs.Tx, policyId in
// Captcha动作配置
if IsNotNull(policy.CaptchaOptions) {
var captchaAction = &firewallconfigs.HTTPFirewallCaptchaAction{}
var captchaAction = firewallconfigs.NewHTTPFirewallCaptchaAction()
err = json.Unmarshal(policy.CaptchaOptions, captchaAction)
if err != nil {
return config, err
@@ -556,6 +568,16 @@ func (this *HTTPFirewallPolicyDAO) ComposeFirewallPolicy(tx *dbs.Tx, policyId in
config.CaptchaOptions = captchaAction
}
// JSCookie动作配置
if IsNotNull(policy.JsCookieOptions) {
var jsCookieAction = firewallconfigs.NewHTTPFirewallJavascriptCookieAction()
err = json.Unmarshal(policy.JsCookieOptions, jsCookieAction)
if err != nil {
return config, err
}
config.JSCookieOptions = jsCookieAction
}
// syn flood
if IsNotNull(policy.SynFlood) {
var synFloodConfig = &firewallconfigs.SYNFloodConfig{}

View File

@@ -19,6 +19,7 @@ const (
HTTPFirewallPolicyField_BlockOptions dbs.FieldName = "blockOptions" // BLOCK动作选项
HTTPFirewallPolicyField_PageOptions dbs.FieldName = "pageOptions" // PAGE动作选项
HTTPFirewallPolicyField_CaptchaOptions dbs.FieldName = "captchaOptions" // 验证码动作选项
HTTPFirewallPolicyField_JsCookieOptions dbs.FieldName = "jsCookieOptions" // JSCookie动作选项
HTTPFirewallPolicyField_Mode dbs.FieldName = "mode" // 模式
HTTPFirewallPolicyField_UseLocalFirewall dbs.FieldName = "useLocalFirewall" // 是否自动使用本地防火墙
HTTPFirewallPolicyField_SynFlood dbs.FieldName = "synFlood" // SynFlood防御设置
@@ -46,6 +47,7 @@ type HTTPFirewallPolicy struct {
BlockOptions dbs.JSON `field:"blockOptions"` // BLOCK动作选项
PageOptions dbs.JSON `field:"pageOptions"` // PAGE动作选项
CaptchaOptions dbs.JSON `field:"captchaOptions"` // 验证码动作选项
JsCookieOptions dbs.JSON `field:"jsCookieOptions"` // JSCookie动作选项
Mode string `field:"mode"` // 模式
UseLocalFirewall uint8 `field:"useLocalFirewall"` // 是否自动使用本地防火墙
SynFlood dbs.JSON `field:"synFlood"` // SynFlood防御设置
@@ -72,6 +74,7 @@ type HTTPFirewallPolicyOperator struct {
BlockOptions any // BLOCK动作选项
PageOptions any // PAGE动作选项
CaptchaOptions any // 验证码动作选项
JsCookieOptions any // JSCookie动作选项
Mode any // 模式
UseLocalFirewall any // 是否自动使用本地防火墙
SynFlood any // SynFlood防御设置

View File

@@ -5,7 +5,7 @@ import (
"github.com/TeaOSLab/EdgeAPI/internal/errors"
"github.com/TeaOSLab/EdgeAPI/internal/goman"
"github.com/TeaOSLab/EdgeAPI/internal/remotelogs"
"github.com/TeaOSLab/EdgeAPI/internal/utils"
"github.com/TeaOSLab/EdgeCommon/pkg/iputils"
"github.com/TeaOSLab/EdgeCommon/pkg/nodeconfigs"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/firewallconfigs"
_ "github.com/go-sql-driver/mysql"
@@ -13,8 +13,8 @@ import (
"github.com/iwind/TeaGo/dbs"
"github.com/iwind/TeaGo/lists"
"github.com/iwind/TeaGo/types"
"math"
"net"
"strings"
"time"
)
@@ -156,6 +156,59 @@ func (this *IPItemDAO) DisableIPItemsWithIP(tx *dbs.Tx, ipFrom string, ipTo stri
return nil
}
// DisableIPItemsWithIPValue 禁用某个IP相关条目
func (this *IPItemDAO) DisableIPItemsWithIPValue(tx *dbs.Tx, value string, sourceUserId int64, listId int64) error {
if len(value) == 0 {
return errors.New("invalid 'value'")
}
var query = this.Query(tx).
Result("id", "listId").
Attr("value", value).
State(IPItemStateEnabled)
if listId > 0 {
query.Attr("listId", listId)
}
if sourceUserId > 0 {
query.Attr("sourceUserId", sourceUserId)
}
ones, err := query.FindAll()
if err != nil {
return err
}
var itemIds = []int64{}
for _, one := range ones {
var item = one.(*IPItem)
var itemId = int64(item.Id)
itemIds = append(itemIds, itemId)
}
for _, itemId := range itemIds {
version, err := SharedIPListDAO.IncreaseVersion(tx)
if err != nil {
return err
}
_, err = this.Query(tx).
Pk(itemId).
Set("state", IPItemStateDisabled).
Set("version", version).
Update()
if err != nil {
return err
}
}
if len(itemIds) > 0 {
return this.NotifyUpdate(tx, itemIds[len(itemIds)-1])
}
return nil
}
// DisableIPItemsWithListId 禁用某个IP名单内的所有IP
func (this *IPItemDAO) DisableIPItemsWithListId(tx *dbs.Tx, listId int64) error {
for {
@@ -237,9 +290,46 @@ func (this *IPItemDAO) DeleteOldItem(tx *dbs.Tx, listId int64, ipFrom string, ip
return nil
}
// DeleteOldItemWithValue 根据IP删除以前的旧记录
func (this *IPItemDAO) DeleteOldItemWithValue(tx *dbs.Tx, listId int64, value string) error {
if len(value) == 0 {
return nil
}
ones, err := this.Query(tx).
ResultPk().
UseIndex("ipFrom").
Attr("listId", listId).
Attr("value", value).
Attr("state", IPItemStateEnabled).
FindAll()
if err != nil {
return err
}
for _, one := range ones {
var itemId = int64(one.(*IPItem).Id)
version, err := SharedIPListDAO.IncreaseVersion(tx)
if err != nil {
return err
}
err = this.Query(tx).
Pk(itemId).
Set("version", version).
Set("state", IPItemStateDisabled).
UpdateQuickly()
if err != nil {
return err
}
}
return nil
}
// CreateIPItem 创建IP
func (this *IPItemDAO) CreateIPItem(tx *dbs.Tx,
listId int64,
value string,
ipFrom string,
ipTo string,
expiredAt int64,
@@ -254,6 +344,15 @@ func (this *IPItemDAO) CreateIPItem(tx *dbs.Tx,
sourceHTTPFirewallRuleGroupId int64,
sourceHTTPFirewallRuleSetId int64,
shouldNotify bool) (int64, error) {
// generate 'itemType'
if itemType != IPItemTypeAll && len(ipFrom) > 0 {
if iputils.IsIPv4(ipFrom) {
itemType = IPItemTypeIPv4
} else if iputils.IsIPv6(ipFrom) {
itemType = IPItemTypeIPv6
}
}
version, err := SharedIPListDAO.IncreaseVersion(tx)
if err != nil {
return 0, err
@@ -261,10 +360,10 @@ func (this *IPItemDAO) CreateIPItem(tx *dbs.Tx,
var op = NewIPItemOperator()
op.ListId = listId
op.Value = value
op.IpFrom = ipFrom
op.IpTo = ipTo
op.IpFromLong = utils.IP2Long(ipFrom)
op.IpToLong = utils.IP2Long(ipTo)
op.Reason = reason
op.Type = itemType
op.EventLevel = eventLevel
@@ -320,11 +419,20 @@ func (this *IPItemDAO) CreateIPItem(tx *dbs.Tx,
}
// UpdateIPItem 修改IP
func (this *IPItemDAO) UpdateIPItem(tx *dbs.Tx, itemId int64, ipFrom string, ipTo string, expiredAt int64, reason string, itemType IPItemType, eventLevel string) error {
func (this *IPItemDAO) UpdateIPItem(tx *dbs.Tx, itemId int64, value string, ipFrom string, ipTo string, expiredAt int64, reason string, itemType IPItemType, eventLevel string) error {
if itemId <= 0 {
return errors.New("invalid itemId")
}
// generate 'itemType'
if itemType != IPItemTypeAll && len(ipFrom) > 0 {
if iputils.IsIPv4(ipFrom) {
itemType = IPItemTypeIPv4
} else if iputils.IsIPv6(ipFrom) {
itemType = IPItemTypeIPv6
}
}
listId, err := this.Query(tx).
Pk(itemId).
Result("listId").
@@ -343,10 +451,10 @@ func (this *IPItemDAO) UpdateIPItem(tx *dbs.Tx, itemId int64, ipFrom string, ipT
var op = NewIPItemOperator()
op.Id = itemId
op.Value = value
op.IpFrom = ipFrom
op.IpTo = ipTo
op.IpFromLong = utils.IP2Long(ipFrom)
op.IpToLong = utils.IP2Long(ipTo)
op.Reason = reason
op.Type = itemType
op.EventLevel = eventLevel
@@ -443,16 +551,21 @@ func (this *IPItemDAO) FindItemListId(tx *dbs.Tx, itemId int64) (int64, error) {
}
// FindEnabledItemContainsIP 查找包含某个IP的Item
func (this *IPItemDAO) FindEnabledItemContainsIP(tx *dbs.Tx, listId int64, ip uint64) (*IPItem, error) {
query := this.Query(tx).
func (this *IPItemDAO) FindEnabledItemContainsIP(tx *dbs.Tx, listId int64, ip string) (*IPItem, error) {
var query = this.Query(tx).
Attr("listId", listId).
State(IPItemStateEnabled)
if ip > math.MaxUint32 {
query.Where("(type='all' OR ipFromLong=:ip)")
} else {
query.Where("(type='all' OR ipFromLong=:ip OR (ipToLong>0 AND ipFromLong<=:ip AND ipToLong>=:ip))").
if iputils.IsIPv4(ip) {
query.Where("(type='all' OR ipFrom =:ip OR INET_ATON(:ip) BETWEEN INET_ATON(ipFrom) AND INET_ATON(ipTo))").
Param("ip", ip)
} else if iputils.IsIPv6(ip) {
query.Where("(type='all' OR ipFrom =:ip OR HEX(INET6_ATON(:ip)) BETWEEN HEX(INET6_ATON(ipFrom)) AND HEX(INET6_ATON(ipTo)))").
Param("ip", ip)
} else {
return nil, nil
}
one, err := query.Find()
if err != nil {
return nil, err
@@ -500,7 +613,13 @@ func (this *IPItemDAO) CountAllEnabledIPItems(tx *dbs.Tx, sourceUserId int64, ke
}
if len(keyword) > 0 {
if net.ParseIP(keyword) != nil { // 是一个IP地址
query.Attr("ipFrom", keyword)
if iputils.IsIPv4(keyword) {
query.Where("(type='all' OR ipFrom =:ipKeyword OR INET_ATON(:ipKeyword) BETWEEN INET_ATON(ipFrom) AND INET_ATON(ipTo))").
Param("ipKeyword", keyword)
} else if iputils.IsIPv6(keyword) {
query.Where("(type='all' OR ipFrom =:ipKeyword OR HEX(INET6_ATON(:ipKeyword)) BETWEEN HEX(INET6_ATON(ipFrom)) AND HEX(INET6_ATON(ipTo)))").
Param("ipKeyword", keyword)
}
} else {
query.Like("ipFrom", dbutils.QuoteLike(keyword))
}
@@ -546,7 +665,13 @@ func (this *IPItemDAO) ListAllEnabledIPItems(tx *dbs.Tx, sourceUserId int64, key
}
if len(keyword) > 0 {
if net.ParseIP(keyword) != nil { // 是一个IP地址
query.Attr("ipFrom", keyword)
if iputils.IsIPv4(keyword) {
query.Where("(type='all' OR ipFrom =:ipKeyword OR INET_ATON(:ipKeyword) BETWEEN INET_ATON(ipFrom) AND INET_ATON(ipTo))").
Param("ipKeyword", keyword)
} else if iputils.IsIPv6(keyword) {
query.Where("(type='all' OR ipFrom =:ipKeyword OR HEX(INET6_ATON(:ipKeyword)) BETWEEN HEX(INET6_ATON(ipFrom)) AND HEX(INET6_ATON(ipTo)))").
Param("ipKeyword", keyword)
}
} else {
query.Like("ipFrom", dbutils.QuoteLike(keyword))
}
@@ -697,6 +822,60 @@ func (this *IPItemDAO) CleanExpiredIPItems(tx *dbs.Tx) error {
return nil
}
// ParseIPValue 解析IP值
func (this *IPItemDAO) ParseIPValue(value string) (newValue string, ipFrom string, ipTo string, ok bool) {
if len(value) == 0 {
return
}
newValue = value
// ip1-ip2
if strings.Contains(value, "-") {
var pieces = strings.Split(value, "-")
if len(pieces) != 2 {
return
}
ipFrom = strings.TrimSpace(pieces[0])
ipTo = strings.TrimSpace(pieces[1])
if !iputils.IsValid(ipFrom) || !iputils.IsValid(ipTo) {
return
}
if !iputils.IsSameVersion(ipFrom, ipTo) {
return
}
if iputils.CompareIP(ipFrom, ipTo) > 0 {
ipFrom, ipTo = ipTo, ipFrom
newValue = ipFrom + "-" + ipTo
}
ok = true
return
}
// ip/mask
if strings.Contains(value, "/") {
cidr, err := iputils.ParseCIDR(value)
if err != nil {
return
}
return newValue, cidr.From().String(), cidr.To().String(), true
}
// single value
if iputils.IsValid(value) {
ipFrom = value
ok = true
return
}
return
}
// NotifyUpdate 通知更新
func (this *IPItemDAO) NotifyUpdate(tx *dbs.Tx, itemId int64) error {
// 获取ListId

View File

@@ -51,7 +51,8 @@ func TestIPItemDAO_CreateManyIPs(t *testing.T) {
var dao = models.NewIPItemDAO()
var n = 10
for i := 0; i < n; i++ {
itemId, err := dao.CreateIPItem(tx, firewallconfigs.GlobalListId, "192."+types.String(rands.Int(0, 255))+"."+types.String(rands.Int(0, 255))+"."+types.String(rands.Int(0, 255)), "", time.Now().Unix()+86400, "test", models.IPItemTypeIPv4, "warning", 0, 0, 0, 0, 0, 0, 0, false)
var ip = "192." + types.String(rands.Int(0, 255)) + "." + types.String(rands.Int(0, 255)) + "." + types.String(rands.Int(0, 255))
itemId, err := dao.CreateIPItem(tx, firewallconfigs.GlobalListId, ip, ip, "", time.Now().Unix()+86400, "test", models.IPItemTypeIPv4, "warning", 0, 0, 0, 0, 0, 0, 0, false)
if err != nil {
t.Fatal(err)
}
@@ -74,3 +75,16 @@ func TestIPItemDAO_DisableIPItemsWithIP(t *testing.T) {
}
t.Log("ok")
}
func TestIPItemDAO_ParseIPValue(t *testing.T) {
var dao = models.NewIPItemDAO()
t.Log(dao.ParseIPValue("192.168.1.100"))
t.Log(dao.ParseIPValue("192.168.1.100-192.168.1.200"))
t.Log(dao.ParseIPValue("192.168.1.200-192.168.1.100"))
t.Log(dao.ParseIPValue("192.168.1.100/24"))
t.Log(dao.ParseIPValue("::1"))
t.Log(dao.ParseIPValue("192.168.1.100-::2"))
t.Log(dao.ParseIPValue("192"))
t.Log(dao.ParseIPValue("192.168.1.200/256"))
t.Log(dao.ParseIPValue("192.168.1.200-"))
}

View File

@@ -1,14 +1,44 @@
package models
import "github.com/iwind/TeaGo/dbs"
const (
IPItemField_Id dbs.FieldName = "id" // ID
IPItemField_ListId dbs.FieldName = "listId" // 所属名单ID
IPItemField_Value dbs.FieldName = "value" // 原始值
IPItemField_Type dbs.FieldName = "type" // 类型
IPItemField_IpFrom dbs.FieldName = "ipFrom" // 开始IP
IPItemField_IpTo dbs.FieldName = "ipTo" // 结束IP
IPItemField_IpFromLong dbs.FieldName = "ipFromLong" // 开始IP整型弃用
IPItemField_IpToLong dbs.FieldName = "ipToLong" // 结束IP整型弃用
IPItemField_Version dbs.FieldName = "version" // 版本
IPItemField_CreatedAt dbs.FieldName = "createdAt" // 创建时间
IPItemField_UpdatedAt dbs.FieldName = "updatedAt" // 修改时间
IPItemField_Reason dbs.FieldName = "reason" // 加入说明
IPItemField_EventLevel dbs.FieldName = "eventLevel" // 事件级别
IPItemField_State dbs.FieldName = "state" // 状态
IPItemField_ExpiredAt dbs.FieldName = "expiredAt" // 过期时间
IPItemField_ServerId dbs.FieldName = "serverId" // 有效范围服务ID
IPItemField_NodeId dbs.FieldName = "nodeId" // 有效范围节点ID
IPItemField_SourceNodeId dbs.FieldName = "sourceNodeId" // 来源节点ID
IPItemField_SourceServerId dbs.FieldName = "sourceServerId" // 来源服务ID
IPItemField_SourceHTTPFirewallPolicyId dbs.FieldName = "sourceHTTPFirewallPolicyId" // 来源策略ID
IPItemField_SourceHTTPFirewallRuleGroupId dbs.FieldName = "sourceHTTPFirewallRuleGroupId" // 来源规则集分组ID
IPItemField_SourceHTTPFirewallRuleSetId dbs.FieldName = "sourceHTTPFirewallRuleSetId" // 来源规则集ID
IPItemField_SourceUserId dbs.FieldName = "sourceUserId" // 用户ID
IPItemField_IsRead dbs.FieldName = "isRead" // 是否已读
)
// IPItem IP
type IPItem struct {
Id uint64 `field:"id"` // ID
ListId uint32 `field:"listId"` // 所属名单ID
Value string `field:"value"` // 原始值
Type string `field:"type"` // 类型
IpFrom string `field:"ipFrom"` // 开始IP
IpTo string `field:"ipTo"` // 结束IP
IpFromLong uint64 `field:"ipFromLong"` // 开始IP整型
IpToLong uint64 `field:"ipToLong"` // 结束IP整型
IpFromLong uint64 `field:"ipFromLong"` // 开始IP整型(弃用)
IpToLong uint64 `field:"ipToLong"` // 结束IP整型(弃用)
Version uint64 `field:"version"` // 版本
CreatedAt uint64 `field:"createdAt"` // 创建时间
UpdatedAt uint64 `field:"updatedAt"` // 修改时间
@@ -30,11 +60,12 @@ type IPItem struct {
type IPItemOperator struct {
Id any // ID
ListId any // 所属名单ID
Value any // 原始值
Type any // 类型
IpFrom any // 开始IP
IpTo any // 结束IP
IpFromLong any // 开始IP整型
IpToLong any // 结束IP整型
IpFromLong any // 开始IP整型(弃用)
IpToLong any // 结束IP整型(弃用)
Version any // 版本
CreatedAt any // 创建时间
UpdatedAt any // 修改时间

View File

@@ -1 +1,15 @@
package models
// ComposeValue 组合原始值
func (this *IPItem) ComposeValue() string {
if len(this.Value) > 0 {
return this.Value
}
// 兼容以往版本
if len(this.IpTo) > 0 {
return this.IpFrom + "-" + this.IpTo
}
return this.IpFrom
}

View File

@@ -23,7 +23,7 @@ const (
var listTypeCacheMap = map[int64]*IPList{} // listId => *IPList
var DefaultGlobalIPList = &IPList{
Id: uint32(firewallconfigs.GlobalListId),
Name: "全局封锁名单",
Name: "系统黑名单",
IsPublic: true,
IsGlobal: true,
Type: "black",

View File

@@ -13,8 +13,10 @@ import (
"github.com/iwind/TeaGo/rands"
"github.com/iwind/TeaGo/types"
timeutil "github.com/iwind/TeaGo/utils/time"
"regexp"
"sort"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
@@ -39,6 +41,8 @@ func init() {
const MetricStatTablePartials = 20 // 表格Partial数量
var metricHashRegexp = regexp.MustCompile(`^\w+$`)
func NewMetricStatDAO() *MetricStatDAO {
return dbs.NewDAO(&MetricStatDAO{
DAOObject: dbs.DAOObject{
@@ -123,18 +127,30 @@ func (this *MetricStatDAO) DeleteItemStats(tx *dbs.Tx, itemId int64) error {
}
// DeleteNodeItemStats 删除某个节点的统计数据
func (this *MetricStatDAO) DeleteNodeItemStats(tx *dbs.Tx, nodeId int64, serverId int64, itemId int64, time string) error {
func (this *MetricStatDAO) DeleteNodeItemStats(tx *dbs.Tx, nodeId int64, serverId int64, itemId int64, time string, keepKeys []string) error {
if serverId > 0 {
_, err := this.Query(tx).
var query = this.Query(tx).
Table(this.partialTable(serverId)).
Attr("nodeId", nodeId).
Attr("serverId", serverId).
Attr("itemId", itemId).
Attr("time", time).
Delete()
if this.canIgnore(err) {
Attr("time", time)
if len(keepKeys) > 0 {
query.Reuse(false)
var s []string
for _, k := range keepKeys {
if metricHashRegexp.MatchString(k) {
s = append(s, "'"+k+"@"+types.String(nodeId)+"'")
}
}
query.Where("hash NOT IN (" + strings.Join(s, ",") + ")")
}
err := query.
DeleteQuickly()
if err == nil || this.canIgnore(err) {
return nil
}
return err
}

View File

@@ -41,7 +41,7 @@ func TestMetricStatDAO_DeleteNodeItemStats(t *testing.T) {
defer func() {
t.Log(time.Since(before).Seconds()*1000, "ms")
}()
err := dao.DeleteNodeItemStats(nil, 1, 0, 1, timeutil.Format("Ymd"))
err := dao.DeleteNodeItemStats(nil, 1, 0, 1, timeutil.Format("Ymd"), nil)
if err != nil {
t.Fatal(err)
}

View File

@@ -126,7 +126,7 @@ func (this *NodeClusterDAO) FindAllEnableClusterIds(tx *dbs.Tx) (result []int64,
}
// CreateCluster 创建集群
func (this *NodeClusterDAO) CreateCluster(tx *dbs.Tx, adminId int64, name string, grantId int64, installDir string, dnsDomainId int64, dnsName string, dnsTTL int32, cachePolicyId int64, httpFirewallPolicyId int64, systemServices map[string]maps.Map, globalServerConfig *serverconfigs.GlobalServerConfig, autoInstallNftables bool, autoSystemTuning bool) (clusterId int64, err error) {
func (this *NodeClusterDAO) CreateCluster(tx *dbs.Tx, adminId int64, name string, grantId int64, installDir string, dnsDomainId int64, dnsName string, dnsTTL int32, cachePolicyId int64, httpFirewallPolicyId int64, systemServices map[string]maps.Map, globalServerConfig *serverconfigs.GlobalServerConfig, autoInstallNftables bool, autoSystemTuning bool, autoTrimDisks bool, maxConcurrentReads int32, maxConcurrentWrites int32) (clusterId int64, err error) {
uniqueId, err := this.GenUniqueId(tx)
if err != nil {
return 0, err
@@ -190,6 +190,15 @@ func (this *NodeClusterDAO) CreateCluster(tx *dbs.Tx, adminId int64, name string
op.Secret = secret
op.AutoInstallNftables = autoInstallNftables
op.AutoSystemTuning = autoSystemTuning
op.AutoTrimDisks = autoTrimDisks
if maxConcurrentReads > 0 {
op.MaxConcurrentReads = maxConcurrentReads
}
if maxConcurrentWrites > 0 {
op.MaxConcurrentWrites = maxConcurrentWrites
}
op.State = NodeClusterStateEnabled
err = this.Save(tx, op)
if err != nil {
@@ -200,7 +209,7 @@ func (this *NodeClusterDAO) CreateCluster(tx *dbs.Tx, adminId int64, name string
}
// UpdateCluster 修改集群
func (this *NodeClusterDAO) UpdateCluster(tx *dbs.Tx, clusterId int64, name string, grantId int64, installDir string, timezone string, nodeMaxThreads int32, autoOpenPorts bool, clockConfig *nodeconfigs.ClockConfig, autoRemoteStart bool, autoInstallTables bool, sshParams *nodeconfigs.SSHParams, autoSystemTuning bool) error {
func (this *NodeClusterDAO) UpdateCluster(tx *dbs.Tx, clusterId int64, name string, grantId int64, installDir string, timezone string, nodeMaxThreads int32, autoOpenPorts bool, clockConfig *nodeconfigs.ClockConfig, autoRemoteStart bool, autoInstallTables bool, sshParams *nodeconfigs.SSHParams, autoSystemTuning bool, autoTrimDisks bool, maxConcurrentReads int32, maxConcurrentWrites int32) error {
if clusterId <= 0 {
return errors.New("invalid clusterId")
}
@@ -228,6 +237,14 @@ func (this *NodeClusterDAO) UpdateCluster(tx *dbs.Tx, clusterId int64, name stri
op.AutoRemoteStart = autoRemoteStart
op.AutoInstallNftables = autoInstallTables
op.AutoSystemTuning = autoSystemTuning
op.AutoTrimDisks = autoTrimDisks
if maxConcurrentReads >= 0 {
op.MaxConcurrentReads = maxConcurrentReads
}
if maxConcurrentWrites >= 0 {
op.MaxConcurrentWrites = maxConcurrentWrites
}
if sshParams != nil {
sshParamsJSON, err := json.Marshal(sshParams)
@@ -1028,7 +1045,7 @@ func (this *NodeClusterDAO) FindClusterBasicInfo(tx *dbs.Tx, clusterId int64, ca
cluster, err := this.Query(tx).
Pk(clusterId).
State(NodeClusterStateEnabled).
Result("id", "name", "timeZone", "nodeMaxThreads", "cachePolicyId", "httpFirewallPolicyId", "autoOpenPorts", "webp", "uam", "cc", "httpPages", "http3", "isOn", "ddosProtection", "clock", "globalServerConfig", "autoInstallNftables", "autoSystemTuning", "networkSecurity").
Result("id", "name", "timeZone", "nodeMaxThreads", "cachePolicyId", "httpFirewallPolicyId", "autoOpenPorts", "webp", "uam", "cc", "httpPages", "http3", "isOn", "ddosProtection", "clock", "globalServerConfig", "autoInstallNftables", "autoSystemTuning", "networkSecurity", "autoTrimDisks", "maxConcurrentReads", "maxConcurrentWrites", "secret").
Find()
if err != nil || cluster == nil {
return nil, err

View File

@@ -45,6 +45,9 @@ const (
NodeClusterField_Http3 dbs.FieldName = "http3" // HTTP3设置
NodeClusterField_AutoSystemTuning dbs.FieldName = "autoSystemTuning" // 是否自动调整系统参数
NodeClusterField_NetworkSecurity dbs.FieldName = "networkSecurity" // 网络安全策略
NodeClusterField_AutoTrimDisks dbs.FieldName = "autoTrimDisks" // 是否自动执行TRIM
NodeClusterField_MaxConcurrentReads dbs.FieldName = "maxConcurrentReads" // 节点并发读限制
NodeClusterField_MaxConcurrentWrites dbs.FieldName = "maxConcurrentWrites" // 节点并发写限制
)
// NodeCluster 节点集群
@@ -91,6 +94,9 @@ type NodeCluster struct {
Http3 dbs.JSON `field:"http3"` // HTTP3设置
AutoSystemTuning bool `field:"autoSystemTuning"` // 是否自动调整系统参数
NetworkSecurity dbs.JSON `field:"networkSecurity"` // 网络安全策略
AutoTrimDisks bool `field:"autoTrimDisks"` // 是否自动执行TRIM
MaxConcurrentReads uint32 `field:"maxConcurrentReads"` // 节点并发读限制
MaxConcurrentWrites uint32 `field:"maxConcurrentWrites"` // 节点并发写限制
}
type NodeClusterOperator struct {
@@ -136,6 +142,9 @@ type NodeClusterOperator struct {
Http3 any // HTTP3设置
AutoSystemTuning any // 是否自动调整系统参数
NetworkSecurity any // 网络安全策略
AutoTrimDisks any // 是否自动执行TRIM
MaxConcurrentReads any // 节点并发读限制
MaxConcurrentWrites any // 节点并发写限制
}
func NewNodeClusterOperator() *NodeClusterOperator {

View File

@@ -1105,6 +1105,11 @@ func (this *NodeDAO) ComposeNodeConfig(tx *dbs.Tx, nodeId int64, dataMap *shared
continue
}
// 集群密钥
if len(config.ClusterSecret) == 0 {
config.ClusterSecret = nodeCluster.Secret
}
// 所有节点IP地址
nodeIPAddresses, err := SharedNodeIPAddressDAO.FindAllAccessibleIPAddressesWithClusterId(tx, nodeconfigs.NodeRoleNode, clusterId, cacheMap)
if err != nil {
@@ -1244,10 +1249,13 @@ func (this *NodeDAO) ComposeNodeConfig(tx *dbs.Tx, nodeId int64, dataMap *shared
}
}
// 自动安装nftables
// 自动安装nftables等集群配置
if clusterIndex == 0 {
config.AutoInstallNftables = nodeCluster.AutoInstallNftables
config.AutoSystemTuning = nodeCluster.AutoSystemTuning
config.AutoTrimDisks = nodeCluster.AutoTrimDisks
config.MaxConcurrentReads = int(nodeCluster.MaxConcurrentReads)
config.MaxConcurrentWrites = int(nodeCluster.MaxConcurrentWrites)
}
// 安全设置

View File

@@ -305,6 +305,19 @@ func (this *OriginDAO) UpdateOrigin(tx *dbs.Tx,
return this.NotifyUpdate(tx, originId)
}
// UpdateOriginIsOn 修改源站是否启用
func (this *OriginDAO) UpdateOriginIsOn(tx *dbs.Tx, originId int64, isOn bool) error {
err := this.Query(tx).
Pk(originId).
Set("isOn", isOn).
UpdateQuickly()
if err != nil {
return err
}
return this.NotifyUpdate(tx, originId)
}
// CloneOrigin 复制源站
func (this *OriginDAO) CloneOrigin(tx *dbs.Tx, fromOriginId int64) (newOriginId int64, err error) {
if fromOriginId <= 0 {

View File

@@ -64,7 +64,7 @@ func init() {
// UpdateServerBandwidth 写入数据
// 现在不需要把 userPlanId 加入到数据表unique key中因为只会影响5分钟统计影响非常有限
func (this *ServerBandwidthStatDAO) UpdateServerBandwidth(tx *dbs.Tx, userId int64, serverId int64, regionId int64, userPlanId int64, day string, timeAt string, bandwidthBytes int64, totalBytes int64, cachedBytes int64, attackBytes int64, countRequests int64, countCachedRequests int64, countAttackRequests int64) error {
func (this *ServerBandwidthStatDAO) UpdateServerBandwidth(tx *dbs.Tx, userId int64, serverId int64, regionId int64, userPlanId int64, day string, timeAt string, bandwidthBytes int64, totalBytes int64, cachedBytes int64, attackBytes int64, countRequests int64, countCachedRequests int64, countAttackRequests int64, countIPs int64) error {
if serverId <= 0 {
return errors.New("invalid server id '" + types.String(serverId) + "'")
}
@@ -78,6 +78,7 @@ func (this *ServerBandwidthStatDAO) UpdateServerBandwidth(tx *dbs.Tx, userId int
Param("countRequests", countRequests).
Param("countCachedRequests", countCachedRequests).
Param("countAttackRequests", countAttackRequests).
Param("countIPs", countIPs).
InsertOrUpdateQuickly(maps.Map{
"userId": userId,
"serverId": serverId,
@@ -93,6 +94,7 @@ func (this *ServerBandwidthStatDAO) UpdateServerBandwidth(tx *dbs.Tx, userId int
"countCachedRequests": countCachedRequests,
"countAttackRequests": countAttackRequests,
"userPlanId": userPlanId,
"countIPs": countIPs,
}, maps.Map{
"bytes": dbs.SQL("bytes+:bytes"),
"avgBytes": dbs.SQL("(totalBytes+:totalBytes)/300"), // 因为生成SQL语句时会自动将avgBytes排在totalBytes之前所以这里不用担心先后顺序的问题
@@ -102,6 +104,7 @@ func (this *ServerBandwidthStatDAO) UpdateServerBandwidth(tx *dbs.Tx, userId int
"countRequests": dbs.SQL("countRequests+:countRequests"),
"countCachedRequests": dbs.SQL("countCachedRequests+:countCachedRequests"),
"countAttackRequests": dbs.SQL("countAttackRequests+:countAttackRequests"),
"countIPs": dbs.SQL("countIPs+:countIPs"),
})
}
@@ -726,7 +729,7 @@ func (this *ServerBandwidthStatDAO) SumDailyStat(tx *dbs.Tx, serverId int64, reg
var query = this.Query(tx).
Table(this.partialTable(serverId)).
Result("SUM(totalBytes) AS totalBytes, SUM(cachedBytes) AS cachedBytes, SUM(countRequests) AS countRequests, SUM(countCachedRequests) AS countCachedRequests, SUM(countAttackRequests) AS countAttackRequests, SUM(attackBytes) AS attackBytes")
Result("SUM(totalBytes) AS totalBytes, SUM(cachedBytes) AS cachedBytes, SUM(countRequests) AS countRequests, SUM(countCachedRequests) AS countCachedRequests, SUM(countAttackRequests) AS countAttackRequests, SUM(attackBytes) AS attackBytes, SUM(countIPs) AS countIPs")
query.Attr("serverId", serverId)
@@ -755,6 +758,7 @@ func (this *ServerBandwidthStatDAO) SumDailyStat(tx *dbs.Tx, serverId int64, reg
stat.CountCachedRequests = one.GetInt64("countCachedRequests")
stat.CountAttackRequests = one.GetInt64("countAttackRequests")
stat.AttackBytes = one.GetInt64("attackBytes")
stat.CountIPs = one.GetInt64("countIPs")
return
}

View File

@@ -16,7 +16,7 @@ import (
func TestServerBandwidthStatDAO_UpdateServerBandwidth(t *testing.T) {
var dao = models.NewServerBandwidthStatDAO()
var tx *dbs.Tx
err := dao.UpdateServerBandwidth(tx, 1, 1, 0, 0, timeutil.Format("Ymd"), timeutil.FormatTime("Hi", time.Now().Unix()/300*300), 1024, 300, 0, 0, 0, 0, 0)
err := dao.UpdateServerBandwidth(tx, 1, 1, 0, 0, timeutil.Format("Ymd"), timeutil.FormatTime("Hi", time.Now().Unix()/300*300), 1024, 300, 0, 0, 0, 0, 0, 0)
if err != nil {
t.Fatal(err)
}
@@ -33,7 +33,7 @@ func TestSeverBandwidthStatDAO_InsertManyStats(t *testing.T) {
}
var day = timeutil.Format("Ymd", time.Now().AddDate(0, 0, -rands.Int(0, 200)))
var minute = fmt.Sprintf("%02d%02d", rands.Int(0, 23), rands.Int(0, 59))
err := dao.UpdateServerBandwidth(tx, 1, int64(rands.Int(1, 10000)), 0, 0, day, minute, 1024, 300, 0, 0, 0, 0, 0)
err := dao.UpdateServerBandwidth(tx, 1, int64(rands.Int(1, 10000)), 0, 0, day, minute, 1024, 300, 0, 0, 0, 0, 0, 0)
if err != nil {
t.Fatal(err)
}

View File

@@ -18,6 +18,7 @@ const (
ServerBandwidthStatField_CountCachedRequests dbs.FieldName = "countCachedRequests" // 缓存的请求数
ServerBandwidthStatField_CountAttackRequests dbs.FieldName = "countAttackRequests" // 攻击请求数
ServerBandwidthStatField_TotalBytes dbs.FieldName = "totalBytes" // 总流量
ServerBandwidthStatField_CountIPs dbs.FieldName = "countIPs" // 独立IP
)
// ServerBandwidthStat 服务峰值带宽统计
@@ -37,6 +38,7 @@ type ServerBandwidthStat struct {
CountCachedRequests uint64 `field:"countCachedRequests"` // 缓存的请求数
CountAttackRequests uint64 `field:"countAttackRequests"` // 攻击请求数
TotalBytes uint64 `field:"totalBytes"` // 总流量
CountIPs uint64 `field:"countIPs"` // 独立IP
}
type ServerBandwidthStatOperator struct {
@@ -55,6 +57,7 @@ type ServerBandwidthStatOperator struct {
CountCachedRequests any // 缓存的请求数
CountAttackRequests any // 攻击请求数
TotalBytes any // 总流量
CountIPs any // 独立IP
}
func NewServerBandwidthStatOperator() *ServerBandwidthStatOperator {

View File

@@ -158,7 +158,6 @@ func (this *ServerDAO) CreateServer(tx *dbs.Tx,
httpsJSON []byte,
tcpJSON []byte,
tlsJSON []byte,
unixJSON []byte,
udpJSON []byte,
webId int64,
reverseProxyJSON []byte,
@@ -206,9 +205,6 @@ func (this *ServerDAO) CreateServer(tx *dbs.Tx,
if IsNotNull(tlsJSON) {
op.Tls = tlsJSON
}
if IsNotNull(unixJSON) {
op.Unix = unixJSON
}
if IsNotNull(udpJSON) {
op.Udp = udpJSON
}
@@ -1236,18 +1232,6 @@ func (this *ServerDAO) ComposeServerConfig(tx *dbs.Tx, server *Server, ignoreCer
}
}
// Unix
if IsNotNull(server.Unix) {
var unixConfig = &serverconfigs.UnixProtocolConfig{}
err := json.Unmarshal(server.Unix, unixConfig)
if err != nil {
return nil, err
}
if !forNode || unixConfig.IsOn {
config.Unix = unixConfig
}
}
// UDP
if IsNotNull(server.Udp) {
var udpConfig = &serverconfigs.UDPProtocolConfig{}
@@ -2504,7 +2488,7 @@ func (this *ServerDAO) UpdateServerTrafficLimitStatus(tx *dbs.Tx, serverId int64
}
if len(oldStatus.UntilDay) > 0 &&
oldStatus.UntilDay >= day /** 如果已经限制,且比当前日期长,则无需重复 **/ &&
oldStatus.PlanId == planId /** 套餐无变化 **/ {
oldStatus.PlanId == planId {
// no need to change
return nil
}
@@ -2555,7 +2539,7 @@ func (this *ServerDAO) UpdateServersTrafficLimitStatusWithUserPlanId(tx *dbs.Tx,
return nil
}
// ResetServersTrafficLimitStatusWithPlanId 重置网站限流状态
// ResetServersTrafficLimitStatusWithPlanId 重置某个套餐相关网站限流状态
func (this *ServerDAO) ResetServersTrafficLimitStatusWithPlanId(tx *dbs.Tx, planId int64) error {
return this.Query(tx).
Where("JSON_EXTRACT(trafficLimitStatus, '$.planId')=:planId").
@@ -2632,13 +2616,17 @@ func (this *ServerDAO) UpdateServerUserPlanId(tx *dbs.Tx, serverId int64, userPl
return errors.New("serverId should not be smaller than 0")
}
oldClusterId, err := this.Query(tx).
oldServerOne, queryErr := SharedServerDAO.
Query(tx).
Pk(serverId).
Result("clusterId").
FindInt64Col(0)
if err != nil {
return err
Result("clusterId", "userPlanId").
Find()
if queryErr != nil || oldServerOne == nil {
return queryErr
}
var oldServer = oldServerOne.(*Server)
var oldClusterId = int64(oldServer.ClusterId)
var oldUserPlanId = int64(oldServer.UserPlanId)
// 取消套餐
if userPlanId <= 0 {
@@ -2670,6 +2658,15 @@ func (this *ServerDAO) UpdateServerUserPlanId(tx *dbs.Tx, serverId int64, userPl
if err != nil {
return err
}
// 重置以往的用户套餐状态
if oldUserPlanId > 0 {
err = SharedUserPlanStatDAO.ResetUserPlanStatsWithUserPlanId(tx, oldUserPlanId)
if err != nil {
return err
}
}
err = this.NotifyUpdate(tx, serverId)
if err != nil {
return err
@@ -2717,6 +2714,21 @@ func (this *ServerDAO) UpdateServerUserPlanId(tx *dbs.Tx, serverId int64, userPl
if err != nil {
return err
}
// 重置以往的用户套餐统计状态
if oldUserPlanId > 0 {
err = SharedUserPlanStatDAO.ResetUserPlanStatsWithUserPlanId(tx, oldUserPlanId)
if err != nil {
return err
}
}
// 重置当前用户套餐统计状态
err = SharedUserPlanStatDAO.ResetUserPlanStatsWithUserPlanId(tx, userPlanId)
if err != nil {
return err
}
err = this.NotifyUpdate(tx, serverId)
if err != nil {
return err

View File

@@ -0,0 +1,12 @@
// Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
//go:build !plus
package models
import "github.com/iwind/TeaGo/dbs"
// ResetServersTrafficLimitStatusWithUserPlanId 重置用户套餐相关网站限流状态
func (this *ServerDAO) ResetServersTrafficLimitStatusWithUserPlanId(tx *dbs.Tx, userPlanId int64) error {
// stub
return nil
}

View File

@@ -6,5 +6,11 @@ package models
import "github.com/iwind/TeaGo/dbs"
func (this *UserPlanStatDAO) IncreaseUserPlanStat(tx *dbs.Tx, userPlanId int64, trafficBytes int64, countRequests int64, countWebsocketConnections int64) error {
// stub
return nil
}
func (this *UserPlanStatDAO) ResetUserPlanStatsWithUserPlanId(tx *dbs.Tx, userPlanId int64) error {
// stub
return nil
}

View File

@@ -490,7 +490,7 @@ func (this *Instance) SetupDB() error {
return err
}
_, err = models.SharedServerDAO.CreateServer(tx, 0, userId, serverconfigs.ServerTypeHTTPProxy, "First Site", "Created by system", []byte(`[{"name": "example.org", "type":"full"}]`), false, nil, httpConfigJSON, nil, nil, nil, nil, nil, webId, reverseProxyRefJSON, clusterId, nil, nil, nil, 0)
_, err = models.SharedServerDAO.CreateServer(tx, 0, userId, serverconfigs.ServerTypeHTTPProxy, "First Site", "Created by system", []byte(`[{"name": "example.org", "type":"full"}]`), false, nil, httpConfigJSON, nil, nil, nil, nil, webId, reverseProxyRefJSON, clusterId, nil, nil, nil, 0)
if err != nil {
return fmt.Errorf("create server failed: %w", err)
}

View File

@@ -25,7 +25,6 @@ import (
"github.com/iwind/TeaGo/logs"
"github.com/iwind/TeaGo/maps"
"github.com/iwind/TeaGo/types"
stringutil "github.com/iwind/TeaGo/utils/string"
"github.com/iwind/gosock/pkg/gosock"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
@@ -35,11 +34,13 @@ import (
"net"
"os"
"os/exec"
"os/signal"
"runtime"
"sort"
"strconv"
"strings"
"sync"
"syscall"
"time"
// grpc decompression
@@ -92,6 +93,9 @@ func (this *APINode) Start() {
return
}
// 监听信号
this.listenSignals()
// 启动IP库
this.setProgress("IP_LIBRARY", "开始初始化IP库")
remotelogs.Println("API_NODE", "initializing ip library ...")
@@ -376,7 +380,7 @@ func (this *APINode) autoUpgrade() error {
if one != nil {
// 如果是同样的版本,则直接认为是最新版本
var version = one.GetString("version")
if stringutil.VersionCompare(version, setup.ComposeSQLVersion()) >= 0 {
if setup.CompareVersion(version, setup.ComposeSQLVersion()) >= 0 {
return nil
}
}
@@ -921,3 +925,16 @@ func (this *APINode) setupTimeZone() {
}
}
}
// 监听一些信号
func (this *APINode) listenSignals() {
var queue = make(chan os.Signal, 8)
signal.Notify(queue, syscall.SIGTERM, syscall.SIGINT, syscall.SIGKILL, syscall.SIGQUIT)
goman.New(func() {
for range queue {
events.Notify(events.EventQuit)
os.Exit(0)
return
}
})
}

View File

@@ -10,9 +10,9 @@ import (
"github.com/TeaOSLab/EdgeAPI/internal/dnsclients/dnstypes"
"github.com/TeaOSLab/EdgeAPI/internal/errors"
"github.com/TeaOSLab/EdgeAPI/internal/goman"
"github.com/TeaOSLab/EdgeAPI/internal/utils"
"github.com/TeaOSLab/EdgeAPI/internal/utils/numberutils"
"github.com/TeaOSLab/EdgeCommon/pkg/dnsconfigs"
"github.com/TeaOSLab/EdgeCommon/pkg/iputils"
"github.com/TeaOSLab/EdgeCommon/pkg/nodeconfigs"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/iwind/TeaGo/dbs"
@@ -547,7 +547,7 @@ func (this *DNSDomainService) findClusterDNSChanges(cluster *models.NodeCluster,
record, ok := nodeRecordMapping[key]
if !ok {
var recordType = dnstypes.RecordTypeA
if utils.IsIPv6(ip) {
if iputils.IsIPv6(ip) {
recordType = dnstypes.RecordTypeAAAA
}

View File

@@ -5,7 +5,6 @@ import (
"encoding/json"
"github.com/TeaOSLab/EdgeAPI/internal/db/models"
"github.com/TeaOSLab/EdgeAPI/internal/errors"
"github.com/TeaOSLab/EdgeAPI/internal/utils"
"github.com/TeaOSLab/EdgeCommon/pkg/iplibrary"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/firewallconfigs"
@@ -305,7 +304,7 @@ func (this *HTTPFirewallPolicyService) UpdateHTTPFirewallPolicy(ctx context.Cont
req.MaxRequestBodySize = 0
}
err = models.SharedHTTPFirewallPolicyDAO.UpdateFirewallPolicy(tx, req.HttpFirewallPolicyId, req.IsOn, req.Name, req.Description, inboundConfigJSON, outboundConfigJSON, req.BlockOptionsJSON, req.PageOptionsJSON, req.CaptchaOptionsJSON, req.Mode, req.UseLocalFirewall, synFloodConfig, logConfig, req.MaxRequestBodySize, req.DenyCountryHTML, req.DenyProvinceHTML)
err = models.SharedHTTPFirewallPolicyDAO.UpdateFirewallPolicy(tx, req.HttpFirewallPolicyId, req.IsOn, req.Name, req.Description, inboundConfigJSON, outboundConfigJSON, req.BlockOptionsJSON, req.PageOptionsJSON, req.CaptchaOptionsJSON, req.JsCookieOptionsJSON, req.Mode, req.UseLocalFirewall, synFloodConfig, logConfig, req.MaxRequestBodySize, req.DenyCountryHTML, req.DenyProvinceHTML)
if err != nil {
return nil, err
}
@@ -664,22 +663,33 @@ func (this *HTTPFirewallPolicyService) ImportHTTPFirewallPolicy(ctx context.Cont
// CheckHTTPFirewallPolicyIPStatus 检查IP状态
func (this *HTTPFirewallPolicyService) CheckHTTPFirewallPolicyIPStatus(ctx context.Context, req *pb.CheckHTTPFirewallPolicyIPStatusRequest) (*pb.CheckHTTPFirewallPolicyIPStatusResponse, error) {
_, err := this.ValidateAdmin(ctx)
_, userId, err := this.ValidateAdminAndUser(ctx, true)
if err != nil {
return nil, err
}
var tx = this.NullTx()
// 检查权限
if req.HttpFirewallPolicyId <= 0 {
return nil, errors.New("invalid 'httpFirewallPolicyId'")
}
if userId > 0 {
err = models.SharedHTTPFirewallPolicyDAO.CheckUserFirewallPolicy(tx, userId, req.HttpFirewallPolicyId)
if err != nil {
return nil, err
}
}
// 校验IP
ip := net.ParseIP(req.Ip)
var ip = net.ParseIP(req.Ip)
if len(ip) == 0 {
return &pb.CheckHTTPFirewallPolicyIPStatusResponse{
IsOk: false,
Error: "请输入正确的IP",
}, nil
}
ipLong := utils.IP2Long(req.Ip)
var tx = this.NullTx()
firewallPolicy, err := models.SharedHTTPFirewallPolicyDAO.ComposeFirewallPolicy(tx, req.HttpFirewallPolicyId, false, nil)
if err != nil {
return nil, err
@@ -713,7 +723,7 @@ func (this *HTTPFirewallPolicyService) CheckHTTPFirewallPolicyIPStatus(ctx conte
}
for _, listId := range listIds {
item, err := models.SharedIPItemDAO.FindEnabledItemContainsIP(tx, listId, ipLong)
item, err := models.SharedIPItemDAO.FindEnabledItemContainsIP(tx, listId, req.Ip)
if err != nil {
return nil, err
}
@@ -733,6 +743,7 @@ func (this *HTTPFirewallPolicyService) CheckHTTPFirewallPolicyIPStatus(ctx conte
IpList: &pb.IPList{Name: listName, Id: listId},
IpItem: &pb.IPItem{
Id: int64(item.Id),
Value: item.ComposeValue(),
IpFrom: item.IpFrom,
IpTo: item.IpTo,
ExpiredAt: int64(item.ExpiredAt),
@@ -768,7 +779,7 @@ func (this *HTTPFirewallPolicyService) CheckHTTPFirewallPolicyIPStatus(ctx conte
}
for _, listId := range listIds {
item, err := models.SharedIPItemDAO.FindEnabledItemContainsIP(tx, listId, ipLong)
item, err := models.SharedIPItemDAO.FindEnabledItemContainsIP(tx, listId, req.Ip)
if err != nil {
return nil, err
}
@@ -788,6 +799,7 @@ func (this *HTTPFirewallPolicyService) CheckHTTPFirewallPolicyIPStatus(ctx conte
IpList: &pb.IPList{Name: listName, Id: listId},
IpItem: &pb.IPItem{
Id: int64(item.Id),
Value: item.ComposeValue(),
IpFrom: item.IpFrom,
IpTo: item.IpTo,
ExpiredAt: int64(item.ExpiredAt),

View File

@@ -6,6 +6,7 @@ import (
"github.com/TeaOSLab/EdgeAPI/internal/errors"
rpcutils "github.com/TeaOSLab/EdgeAPI/internal/rpc/utils"
"github.com/TeaOSLab/EdgeAPI/internal/utils"
"github.com/TeaOSLab/EdgeCommon/pkg/iputils"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/firewallconfigs"
"net"
@@ -25,19 +26,31 @@ func (this *IPItemService) CreateIPItem(ctx context.Context, req *pb.CreateIPIte
return nil, err
}
if len(req.IpFrom) == 0 {
return nil, errors.New("'ipFrom' should not be empty")
}
if len(req.Value) > 0 {
newValue, ipFrom, ipTo, ok := models.SharedIPItemDAO.ParseIPValue(req.Value)
if !ok {
return nil, errors.New("invalid 'value' format")
}
var ipFrom = net.ParseIP(req.IpFrom)
if ipFrom == nil {
return nil, errors.New("invalid 'ipFrom'")
}
req.Value = newValue
req.IpFrom = ipFrom
req.IpTo = ipTo
} else if req.Type != models.IPItemTypeAll {
if !iputils.IsValid(req.IpFrom) {
return nil, errors.New("invalid 'ipFrom'")
}
if len(req.IpTo) > 0 {
if !iputils.IsValid(req.IpTo) {
return nil, errors.New("invalid 'ipTo'")
}
if len(req.IpTo) > 0 {
ipTo := net.ParseIP(req.IpTo)
if ipTo == nil {
return nil, errors.New("invalid 'ipTo'")
if !iputils.IsSameVersion(req.IpFrom, req.IpTo) {
return nil, errors.New("'ipFrom' and 'ipTo' should be in same version")
}
if iputils.CompareIP(req.IpFrom, req.IpTo) > 0 {
req.IpFrom, req.IpTo = req.IpTo, req.IpFrom
}
}
}
@@ -64,7 +77,7 @@ func (this *IPItemService) CreateIPItem(ctx context.Context, req *pb.CreateIPIte
return nil, err
}
itemId, err := models.SharedIPItemDAO.CreateIPItem(tx, req.IpListId, req.IpFrom, req.IpTo, req.ExpiredAt, req.Reason, req.Type, req.EventLevel, req.NodeId, req.ServerId, req.SourceNodeId, req.SourceServerId, req.SourceHTTPFirewallPolicyId, req.SourceHTTPFirewallRuleGroupId, req.SourceHTTPFirewallRuleSetId, true)
itemId, err := models.SharedIPItemDAO.CreateIPItem(tx, req.IpListId, req.Value, req.IpFrom, req.IpTo, req.ExpiredAt, req.Reason, req.Type, req.EventLevel, req.NodeId, req.ServerId, req.SourceNodeId, req.SourceServerId, req.SourceHTTPFirewallPolicyId, req.SourceHTTPFirewallRuleGroupId, req.SourceHTTPFirewallRuleSetId, true)
if err != nil {
return nil, err
}
@@ -84,19 +97,30 @@ func (this *IPItemService) CreateIPItems(ctx context.Context, req *pb.CreateIPIt
// 校验
for _, item := range req.IpItems {
if len(item.IpFrom) == 0 {
return nil, errors.New("'ipFrom' should not be empty")
}
if len(item.Value) > 0 {
newValue, ipFrom, ipTo, ok := models.SharedIPItemDAO.ParseIPValue(item.Value)
if !ok {
return nil, errors.New("invalid 'value': " + item.Value)
}
item.Value = newValue
item.IpFrom = ipFrom
item.IpTo = ipTo
} else if item.Type != models.IPItemTypeAll {
if !iputils.IsValid(item.IpFrom) {
return nil, errors.New("invalid 'ipFrom': " + item.IpFrom)
}
if len(item.IpTo) > 0 {
if !iputils.IsValid(item.IpTo) {
return nil, errors.New("invalid 'ipTo': " + item.IpTo)
}
var ipFrom = net.ParseIP(item.IpFrom)
if ipFrom == nil {
return nil, errors.New("invalid 'ipFrom'")
}
if !iputils.IsSameVersion(item.IpFrom, item.IpTo) {
return nil, errors.New("'ipFrom' (" + item.IpFrom + ") and 'ipTo' (" + item.IpTo + ") should be in same version")
}
if len(item.IpTo) > 0 {
ipTo := net.ParseIP(item.IpTo)
if ipTo == nil {
return nil, errors.New("invalid 'ipTo'")
if iputils.CompareIP(item.IpFrom, item.IpTo) > 0 {
item.IpFrom, item.IpTo = item.IpTo, item.IpFrom
}
}
}
@@ -117,21 +141,21 @@ func (this *IPItemService) CreateIPItems(ctx context.Context, req *pb.CreateIPIt
}
// 创建
// TODO 需要区分不同的用户
var ipItemIds = []int64{}
for index, item := range req.IpItems {
var shouldNotify = index == len(req.IpItems)-1
// 删除以前的
err = models.SharedIPItemDAO.DeleteOldItem(tx, item.IpListId, item.IpFrom, item.IpTo)
if len(item.Value) > 0 {
err = models.SharedIPItemDAO.DeleteOldItemWithValue(tx, item.IpListId, item.Value)
} else {
err = models.SharedIPItemDAO.DeleteOldItem(tx, item.IpListId, item.IpFrom, item.IpTo)
}
if err != nil {
return nil, err
}
itemId, err := models.SharedIPItemDAO.CreateIPItem(tx, item.IpListId, item.IpFrom, item.IpTo, item.ExpiredAt, item.Reason, item.Type, item.EventLevel, item.NodeId, item.ServerId, item.SourceNodeId, item.SourceServerId, item.SourceHTTPFirewallPolicyId, item.SourceHTTPFirewallRuleGroupId, item.SourceHTTPFirewallRuleSetId, shouldNotify)
if err != nil {
return nil, err
}
itemId, err := models.SharedIPItemDAO.CreateIPItem(tx, item.IpListId, item.Value, item.IpFrom, item.IpTo, item.ExpiredAt, item.Reason, item.Type, item.EventLevel, item.NodeId, item.ServerId, item.SourceNodeId, item.SourceServerId, item.SourceHTTPFirewallPolicyId, item.SourceHTTPFirewallRuleGroupId, item.SourceHTTPFirewallRuleSetId, shouldNotify)
if err != nil {
return nil, err
}
@@ -153,6 +177,34 @@ func (this *IPItemService) UpdateIPItem(ctx context.Context, req *pb.UpdateIPIte
var tx = this.NullTx()
// validate ip
if len(req.Value) > 0 {
newValue, ipFrom, ipTo, ok := models.SharedIPItemDAO.ParseIPValue(req.Value)
if !ok {
return nil, errors.New("invalid 'value' format")
}
req.Value = newValue
req.IpFrom = ipFrom
req.IpTo = ipTo
} else if req.Type != models.IPItemTypeAll {
if !iputils.IsValid(req.IpFrom) {
return nil, errors.New("invalid 'ipFrom'")
}
if len(req.IpTo) > 0 {
if !iputils.IsValid(req.IpTo) {
return nil, errors.New("invalid 'ipTo'")
}
if !iputils.IsSameVersion(req.IpFrom, req.IpTo) {
return nil, errors.New("'ipFrom' and 'ipTo' should be in same version")
}
if iputils.CompareIP(req.IpFrom, req.IpTo) > 0 {
req.IpFrom, req.IpTo = req.IpTo, req.IpFrom
}
}
}
if userId > 0 {
listId, err := models.SharedIPItemDAO.FindItemListId(tx, req.IpItemId)
if err != nil {
@@ -169,7 +221,7 @@ func (this *IPItemService) UpdateIPItem(ctx context.Context, req *pb.UpdateIPIte
req.Type = models.IPItemTypeIPv4
}
err = models.SharedIPItemDAO.UpdateIPItem(tx, req.IpItemId, req.IpFrom, req.IpTo, req.ExpiredAt, req.Reason, req.Type, req.EventLevel)
err = models.SharedIPItemDAO.UpdateIPItem(tx, req.IpItemId, req.Value, req.IpFrom, req.IpTo, req.ExpiredAt, req.Reason, req.Type, req.EventLevel)
if err != nil {
return nil, err
}
@@ -187,12 +239,34 @@ func (this *IPItemService) DeleteIPItem(ctx context.Context, req *pb.DeleteIPIte
var tx = this.NullTx()
if req.IpItemId <= 0 && len(req.Value) == 0 && len(req.IpFrom) == 0 {
return nil, errors.New("one of 'ipItemId', 'value' or 'ipFrom' params required")
}
// 如果是使用IPItemId删除
if req.IpItemId > 0 {
err = models.SharedIPItemDAO.DisableIPItem(tx, req.IpItemId, userId)
if err != nil {
return nil, err
}
return this.Success()
}
// 使用value删除
if len(req.Value) > 0 {
// 检查IP列表
if req.IpListId > 0 && userId > 0 && req.IpListId != firewallconfigs.GlobalListId {
err = models.SharedIPListDAO.CheckUserIPList(tx, userId, req.IpListId)
if err != nil {
return nil, err
}
}
err = models.SharedIPItemDAO.DisableIPItemsWithIPValue(tx, req.Value, userId, req.IpListId)
if err != nil {
return nil, err
}
return this.Success()
}
// 如果是使用ipFrom+ipTo删除
@@ -209,6 +283,7 @@ func (this *IPItemService) DeleteIPItem(ctx context.Context, req *pb.DeleteIPIte
if err != nil {
return nil, err
}
return this.Success()
}
return this.Success()
@@ -345,6 +420,7 @@ func (this *IPItemService) ListIPItemsWithListId(ctx context.Context, req *pb.Li
result = append(result, &pb.IPItem{
Id: int64(item.Id),
Value: item.ComposeValue(),
IpFrom: item.IpFrom,
IpTo: item.IpTo,
Version: int64(item.Version),
@@ -402,6 +478,7 @@ func (this *IPItemService) FindEnabledIPItem(ctx context.Context, req *pb.FindEn
return &pb.FindEnabledIPItemResponse{IpItem: &pb.IPItem{
Id: int64(item.Id),
Value: item.ComposeValue(),
IpFrom: item.IpFrom,
IpTo: item.IpTo,
Version: int64(item.Version),
@@ -456,6 +533,7 @@ func (this *IPItemService) ListIPItemsAfterVersion(ctx context.Context, req *pb.
result = append(result, &pb.IPItem{
Id: int64(item.Id),
Value: item.ComposeValue(),
IpFrom: item.IpFrom,
IpTo: item.IpTo,
Version: int64(item.Version),
@@ -484,14 +562,13 @@ func (this *IPItemService) CheckIPItemStatus(ctx context.Context, req *pb.CheckI
}
// 校验IP
ip := net.ParseIP(req.Ip)
var ip = net.ParseIP(req.Ip)
if len(ip) == 0 {
return &pb.CheckIPItemStatusResponse{
IsOk: false,
Error: "请输入正确的IP",
}, nil
}
ipLong := utils.IP2Long(req.Ip)
var tx = this.NullTx()
@@ -509,7 +586,7 @@ func (this *IPItemService) CheckIPItemStatus(ctx context.Context, req *pb.CheckI
var isAllowed = list.Type == "white"
// 检查IP名单
item, err := models.SharedIPItemDAO.FindEnabledItemContainsIP(tx, req.IpListId, ipLong)
item, err := models.SharedIPItemDAO.FindEnabledItemContainsIP(tx, req.IpListId, req.Ip)
if err != nil {
return nil, err
}
@@ -521,6 +598,7 @@ func (this *IPItemService) CheckIPItemStatus(ctx context.Context, req *pb.CheckI
IsAllowed: isAllowed,
IpItem: &pb.IPItem{
Id: int64(item.Id),
Value: item.ComposeValue(),
IpFrom: item.IpFrom,
IpTo: item.IpTo,
CreatedAt: int64(item.CreatedAt),
@@ -676,6 +754,7 @@ func (this *IPItemService) ListAllEnabledIPItems(ctx context.Context, req *pb.Li
var pbItem = &pb.IPItem{
Id: int64(item.Id),
Value: item.ComposeValue(),
IpFrom: item.IpFrom,
IpTo: item.IpTo,
Version: int64(item.Version),

View File

@@ -71,16 +71,18 @@ func init() {
}()
}
err = models.SharedMetricStatDAO.DeleteNodeItemStats(tx, nodeId, serverId, itemId, req.Time)
if err != nil {
return err
}
for _, stat := range req.MetricStats {
err := models.SharedMetricStatDAO.CreateStat(tx, stat.Hash, clusterId, nodeId, req.ServerId, req.ItemId, stat.Keys, float64(stat.Value), req.Time, req.Version)
if len(req.MetricStats) > 0 {
err = models.SharedMetricStatDAO.DeleteNodeItemStats(tx, nodeId, serverId, itemId, req.Time, req.KeepKeys)
if err != nil {
return err
}
for _, stat := range req.MetricStats {
err = models.SharedMetricStatDAO.CreateStat(tx, stat.Hash, clusterId, nodeId, req.ServerId, req.ItemId, stat.Keys, float64(stat.Value), req.Time, req.Version)
if err != nil {
return err
}
}
}
// 保存总和

View File

@@ -80,7 +80,7 @@ func (this *NodeClusterService) CreateNodeCluster(ctx context.Context, req *pb.C
req.DnsTTL = 0
}
clusterId, err = models.SharedNodeClusterDAO.CreateCluster(tx, adminId, req.Name, req.NodeGrantId, req.InstallDir, req.DnsDomainId, req.DnsName, req.DnsTTL, req.HttpCachePolicyId, req.HttpFirewallPolicyId, systemServices, serverGlobalConfig, req.AutoInstallNftables, req.AutoSystemTuning)
clusterId, err = models.SharedNodeClusterDAO.CreateCluster(tx, adminId, req.Name, req.NodeGrantId, req.InstallDir, req.DnsDomainId, req.DnsName, req.DnsTTL, req.HttpCachePolicyId, req.HttpFirewallPolicyId, systemServices, serverGlobalConfig, req.AutoInstallNftables, req.AutoSystemTuning, req.AutoTrimDisks, req.MaxConcurrentReads, req.MaxConcurrentWrites)
if err != nil {
return err
}
@@ -127,7 +127,7 @@ func (this *NodeClusterService) UpdateNodeCluster(ctx context.Context, req *pb.U
}
}
err = models.SharedNodeClusterDAO.UpdateCluster(tx, req.NodeClusterId, req.Name, req.NodeGrantId, req.InstallDir, req.TimeZone, req.NodeMaxThreads, req.AutoOpenPorts, clockConfig, req.AutoRemoteStart, req.AutoInstallNftables, sshParams, req.AutoSystemTuning)
err = models.SharedNodeClusterDAO.UpdateCluster(tx, req.NodeClusterId, req.Name, req.NodeGrantId, req.InstallDir, req.TimeZone, req.NodeMaxThreads, req.AutoOpenPorts, clockConfig, req.AutoRemoteStart, req.AutoInstallNftables, sshParams, req.AutoSystemTuning, req.AutoTrimDisks, req.MaxConcurrentReads, req.MaxConcurrentWrites)
if err != nil {
return nil, err
}
@@ -234,6 +234,9 @@ func (this *NodeClusterService) FindEnabledNodeCluster(ctx context.Context, req
AutoRemoteStart: cluster.AutoRemoteStart,
AutoInstallNftables: cluster.AutoInstallNftables,
AutoSystemTuning: cluster.AutoSystemTuning,
AutoTrimDisks: cluster.AutoTrimDisks,
MaxConcurrentReads: int32(cluster.MaxConcurrentReads),
MaxConcurrentWrites: int32(cluster.MaxConcurrentWrites),
}}, nil
}

View File

@@ -248,3 +248,27 @@ func (this *OriginService) FindEnabledOriginConfig(ctx context.Context, req *pb.
return &pb.FindEnabledOriginConfigResponse{OriginJSON: configData}, nil
}
// UpdateOriginIsOn 修改源站是否启用
func (this *OriginService) UpdateOriginIsOn(ctx context.Context, req *pb.UpdateOriginIsOnRequest) (*pb.RPCSuccess, error) {
_, userId, err := this.ValidateAdminAndUser(ctx, true)
if err != nil {
return nil, err
}
var tx = this.NullTx()
if userId > 0 {
err = models.SharedOriginDAO.CheckUserOrigin(tx, userId, req.OriginId)
if err != nil {
return nil, err
}
}
err = models.SharedOriginDAO.UpdateOriginIsOn(tx, req.OriginId, req.IsOn)
if err != nil {
return nil, err
}
return this.Success()
}

View File

@@ -181,7 +181,7 @@ func (this *ServerService) CreateServer(ctx context.Context, req *pb.CreateServe
}
}
serverId, err := models.SharedServerDAO.CreateServer(tx, req.AdminId, req.UserId, req.Type, req.Name, req.Description, serverNamesJSON, isAuditing, auditingServerNamesJSON, req.HttpJSON, req.HttpsJSON, req.TcpJSON, req.TlsJSON, req.UnixJSON, req.UdpJSON, req.WebId, req.ReverseProxyJSON, req.NodeClusterId, req.IncludeNodesJSON, req.ExcludeNodesJSON, req.ServerGroupIds, req.UserPlanId)
serverId, err := models.SharedServerDAO.CreateServer(tx, req.AdminId, req.UserId, req.Type, req.Name, req.Description, serverNamesJSON, isAuditing, auditingServerNamesJSON, req.HttpJSON, req.HttpsJSON, req.TcpJSON, req.TlsJSON, req.UdpJSON, req.WebId, req.ReverseProxyJSON, req.NodeClusterId, req.IncludeNodesJSON, req.ExcludeNodesJSON, req.ServerGroupIds, req.UserPlanId)
if err != nil {
return nil, err
}
@@ -451,7 +451,7 @@ func (this *ServerService) CreateBasicHTTPServer(ctx context.Context, req *pb.Cr
}
// finally, we create ...
serverId, err := models.SharedServerDAO.CreateServer(tx, adminId, req.UserId, serverconfigs.ServerTypeHTTPProxy, req.Domains[0], "", serverNamesJSON, isAuditing, auditingServerNamesJSON, httpJSON, httpsJSON, nil, nil, nil, nil, webId, reverseProxyJSON, req.NodeClusterId, nil, nil, nil, 0)
serverId, err := models.SharedServerDAO.CreateServer(tx, adminId, req.UserId, serverconfigs.ServerTypeHTTPProxy, req.Domains[0], "", serverNamesJSON, isAuditing, auditingServerNamesJSON, httpJSON, httpsJSON, nil, nil, nil, webId, reverseProxyJSON, req.NodeClusterId, nil, nil, nil, 0)
if err != nil {
return nil, err
}
@@ -687,7 +687,7 @@ func (this *ServerService) CreateBasicTCPServer(ctx context.Context, req *pb.Cre
}
// finally, we create ...
serverId, err := models.SharedServerDAO.CreateServer(tx, adminId, req.UserId, serverconfigs.ServerTypeTCPProxy, "TCP Service", "", nil, false, nil, nil, nil, tcpJSON, tlsJSON, nil, nil, 0, reverseProxyJSON, req.NodeClusterId, nil, nil, nil, 0)
serverId, err := models.SharedServerDAO.CreateServer(tx, adminId, req.UserId, serverconfigs.ServerTypeTCPProxy, "TCP Service", "", nil, false, nil, nil, nil, tcpJSON, tlsJSON, nil, 0, reverseProxyJSON, req.NodeClusterId, nil, nil, nil, 0)
if err != nil {
return nil, err
}
@@ -1116,29 +1116,6 @@ func (this *ServerService) UpdateServerTLS(ctx context.Context, req *pb.UpdateSe
return this.Success()
}
// UpdateServerUnix 修改Unix服务
func (this *ServerService) UpdateServerUnix(ctx context.Context, req *pb.UpdateServerUnixRequest) (*pb.RPCSuccess, error) {
// 校验请求
_, err := this.ValidateAdmin(ctx)
if err != nil {
return nil, err
}
if req.ServerId <= 0 {
return nil, errors.New("invalid serverId")
}
var tx = this.NullTx()
// 修改配置
err = models.SharedServerDAO.UpdateServerUnix(tx, req.ServerId, req.UnixJSON)
if err != nil {
return nil, err
}
return this.Success()
}
// UpdateServerUDP 修改UDP服务
func (this *ServerService) UpdateServerUDP(ctx context.Context, req *pb.UpdateServerUDPRequest) (*pb.RPCSuccess, error) {
// 校验请求
@@ -1645,7 +1622,6 @@ func (this *ServerService) ListEnabledServersMatch(ctx context.Context, req *pb.
HttpsJSON: server.Https,
TcpJSON: server.Tcp,
TlsJSON: server.Tls,
UnixJSON: server.Unix,
UdpJSON: server.Udp,
IncludeNodes: server.IncludeNodes,
ExcludeNodes: server.ExcludeNodes,
@@ -1830,7 +1806,6 @@ func (this *ServerService) FindEnabledServer(ctx context.Context, req *pb.FindEn
HttpsJSON: server.Https,
TcpJSON: server.Tcp,
TlsJSON: server.Tls,
UnixJSON: server.Unix,
UdpJSON: server.Udp,
WebId: int64(server.WebId),
ReverseProxyJSON: server.ReverseProxy,

View File

@@ -4,16 +4,21 @@ package services
import (
"context"
"encoding/json"
"errors"
teaconst "github.com/TeaOSLab/EdgeAPI/internal/const"
"github.com/TeaOSLab/EdgeAPI/internal/db/models"
"github.com/TeaOSLab/EdgeAPI/internal/events"
"github.com/TeaOSLab/EdgeAPI/internal/goman"
"github.com/TeaOSLab/EdgeAPI/internal/remotelogs"
"github.com/TeaOSLab/EdgeAPI/internal/utils/regexputils"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/TeaOSLab/EdgeCommon/pkg/systemconfigs"
"github.com/iwind/TeaGo/Tea"
"github.com/iwind/TeaGo/dbs"
"github.com/iwind/TeaGo/types"
timeutil "github.com/iwind/TeaGo/utils/time"
"os"
"strings"
"sync"
"time"
@@ -23,6 +28,29 @@ var serverBandwidthStatsMap = map[string]*pb.ServerBandwidthStat{} // server key
var serverBandwidthStatsLocker = &sync.Mutex{}
func init() {
// 数据缓存
if teaconst.IsMain {
var cacheFile = Tea.Root + "/data/server_bandwidth_stats.cache"
{
data, err := os.ReadFile(cacheFile)
if err == nil {
_ = os.Remove(cacheFile)
serverBandwidthStatsLocker.Lock()
_ = json.Unmarshal(data, &serverBandwidthStatsMap)
serverBandwidthStatsLocker.Unlock()
}
}
events.On(events.EventQuit, func() {
serverBandwidthStatsMapJSON, err := json.Marshal(serverBandwidthStatsMap)
if err == nil {
_ = os.WriteFile(cacheFile, serverBandwidthStatsMapJSON, 0666)
}
})
}
// 定时处理数据
var ticker = time.NewTicker(1 * time.Minute)
var useTx = true
@@ -66,7 +94,7 @@ func init() {
// 更新网站的带宽峰值
if stat.ServerId > 0 {
// 更新带宽统计
err = models.SharedServerBandwidthStatDAO.UpdateServerBandwidth(tx, stat.UserId, stat.ServerId, stat.NodeRegionId, stat.UserPlanId, stat.Day, stat.TimeAt, stat.Bytes, stat.TotalBytes, stat.CachedBytes, stat.AttackBytes, stat.CountRequests, stat.CountCachedRequests, stat.CountAttackRequests)
err = models.SharedServerBandwidthStatDAO.UpdateServerBandwidth(tx, stat.UserId, stat.ServerId, stat.NodeRegionId, stat.UserPlanId, stat.Day, stat.TimeAt, stat.Bytes, stat.TotalBytes, stat.CachedBytes, stat.AttackBytes, stat.CountRequests, stat.CountCachedRequests, stat.CountAttackRequests, stat.CountIPs)
if err != nil {
remotelogs.Error("ServerBandwidthStatService", "dump bandwidth stats failed: "+err.Error())
}
@@ -147,6 +175,7 @@ func (this *ServerBandwidthStatService) UploadServerBandwidthStats(ctx context.C
oldStat.CountCachedRequests += stat.CountCachedRequests
oldStat.CountAttackRequests += stat.CountAttackRequests
oldStat.CountWebsocketConnections += stat.CountWebsocketConnections
oldStat.CountIPs += stat.CountIPs
} else {
serverBandwidthStatsMap[key] = &pb.ServerBandwidthStat{
Id: 0,
@@ -164,6 +193,7 @@ func (this *ServerBandwidthStatService) UploadServerBandwidthStats(ctx context.C
CountAttackRequests: stat.CountAttackRequests,
CountWebsocketConnections: stat.CountWebsocketConnections,
UserPlanId: stat.UserPlanId,
CountIPs: stat.CountIPs,
}
}
serverBandwidthStatsLocker.Unlock()

View File

@@ -471,6 +471,17 @@ func (this *ServerStatBoardService) ComposeServerStatBoard(ctx context.Context,
}
}
// 当日统计
{
var day = timeutil.Format("Ymd")
stat, err := models.SharedServerBandwidthStatDAO.SumDailyStat(tx, req.ServerId, 0, day, day)
if err != nil {
return nil, err
}
result.DailyCountIPs = stat.CountIPs
result.DailyTrafficBytes = stat.Bytes
}
// 带宽统计
{
var month = timeutil.Format("Ym")

View File

@@ -102722,7 +102722,7 @@
"name": "edgeHTTPFirewallPolicies",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeHTTPFirewallPolicies` (\n `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `templateId` int(11) unsigned DEFAULT '0' COMMENT '模版ID',\n `adminId` int(11) unsigned DEFAULT '0' COMMENT '管理员ID',\n `userId` int(11) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `groupId` int(11) unsigned DEFAULT '0' COMMENT '服务分组ID',\n `state` tinyint(1) unsigned DEFAULT '1' COMMENT '状态',\n `createdAt` bigint(11) unsigned DEFAULT '0' COMMENT '创建时间',\n `isOn` tinyint(1) unsigned DEFAULT '1' COMMENT '是否启用',\n `name` varchar(255) DEFAULT NULL COMMENT '名称',\n `description` varchar(1024) DEFAULT NULL COMMENT '描述',\n `inbound` json DEFAULT NULL COMMENT '入站规则',\n `outbound` json DEFAULT NULL COMMENT '出站规则',\n `blockOptions` json DEFAULT NULL COMMENT 'BLOCK动作选项',\n `pageOptions` json DEFAULT NULL COMMENT 'PAGE动作选项',\n `captchaOptions` json DEFAULT NULL COMMENT '验证码动作选项',\n `mode` varchar(32) DEFAULT 'defend' COMMENT '模式',\n `useLocalFirewall` tinyint(1) unsigned DEFAULT '1' COMMENT '是否自动使用本地防火墙',\n `synFlood` json DEFAULT NULL COMMENT 'SynFlood防御设置',\n `log` json DEFAULT NULL COMMENT '日志配置',\n `maxRequestBodySize` int(11) unsigned DEFAULT '0' COMMENT '可以检查的最大请求内容尺寸',\n `denyCountryHTML` text COMMENT '区域封禁提示',\n `denyProvinceHTML` text COMMENT '省份封禁提示',\n PRIMARY KEY (`id`),\n KEY `userId` (`userId`),\n KEY `serverId` (`serverId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='HTTP防火墙'",
"definition": "CREATE TABLE `edgeHTTPFirewallPolicies` (\n `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `templateId` int(11) unsigned DEFAULT '0' COMMENT '模版ID',\n `adminId` int(11) unsigned DEFAULT '0' COMMENT '管理员ID',\n `userId` int(11) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `groupId` int(11) unsigned DEFAULT '0' COMMENT '服务分组ID',\n `state` tinyint(1) unsigned DEFAULT '1' COMMENT '状态',\n `createdAt` bigint(11) unsigned DEFAULT '0' COMMENT '创建时间',\n `isOn` tinyint(1) unsigned DEFAULT '1' COMMENT '是否启用',\n `name` varchar(255) DEFAULT NULL COMMENT '名称',\n `description` varchar(1024) DEFAULT NULL COMMENT '描述',\n `inbound` json DEFAULT NULL COMMENT '入站规则',\n `outbound` json DEFAULT NULL COMMENT '出站规则',\n `blockOptions` json DEFAULT NULL COMMENT 'BLOCK动作选项',\n `pageOptions` json DEFAULT NULL COMMENT 'PAGE动作选项',\n `captchaOptions` json DEFAULT NULL COMMENT '验证码动作选项',\n `jsCookieOptions` json DEFAULT NULL COMMENT 'JSCookie动作选项',\n `mode` varchar(32) DEFAULT 'defend' COMMENT '模式',\n `useLocalFirewall` tinyint(1) unsigned DEFAULT '1' COMMENT '是否自动使用本地防火墙',\n `synFlood` json DEFAULT NULL COMMENT 'SynFlood防御设置',\n `log` json DEFAULT NULL COMMENT '日志配置',\n `maxRequestBodySize` int(11) unsigned DEFAULT '0' COMMENT '可以检查的最大请求内容尺寸',\n `denyCountryHTML` text COMMENT '区域封禁提示',\n `denyProvinceHTML` text COMMENT '省份封禁提示',\n PRIMARY KEY (`id`),\n KEY `userId` (`userId`),\n KEY `serverId` (`serverId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='HTTP防火墙'",
"fields": [
{
"name": "id",
@@ -102788,6 +102788,10 @@
"name": "captchaOptions",
"definition": "json COMMENT '验证码动作选项'"
},
{
"name": "jsCookieOptions",
"definition": "json COMMENT 'JSCookie动作选项'"
},
{
"name": "mode",
"definition": "varchar(32) DEFAULT 'defend' COMMENT '模式'"
@@ -103738,7 +103742,7 @@
"name": "edgeIPItems",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeIPItems` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `listId` int(11) unsigned DEFAULT '0' COMMENT '所属名单ID',\n `type` varchar(64) DEFAULT 'ipv4' COMMENT '类型',\n `ipFrom` varchar(64) DEFAULT NULL COMMENT '开始IP',\n `ipTo` varchar(64) DEFAULT NULL COMMENT '结束IP',\n `ipFromLong` bigint(20) unsigned DEFAULT '0' COMMENT '开始IP整型',\n `ipToLong` bigint(20) unsigned DEFAULT '0' COMMENT '结束IP整型',\n `version` bigint(20) unsigned DEFAULT '0' COMMENT '版本',\n `createdAt` bigint(11) unsigned DEFAULT '0' COMMENT '创建时间',\n `updatedAt` bigint(11) unsigned DEFAULT '0' COMMENT '修改时间',\n `reason` varchar(255) DEFAULT NULL COMMENT '加入说明',\n `eventLevel` varchar(64) DEFAULT NULL COMMENT '事件级别',\n `state` tinyint(1) unsigned DEFAULT '1' COMMENT '状态',\n `expiredAt` bigint(11) unsigned DEFAULT '0' COMMENT '过期时间',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '有效范围服务ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '有效范围节点ID',\n `sourceNodeId` int(11) unsigned DEFAULT '0' COMMENT '来源节点ID',\n `sourceServerId` int(11) unsigned DEFAULT '0' COMMENT '来源服务ID',\n `sourceHTTPFirewallPolicyId` int(11) unsigned DEFAULT '0' COMMENT '来源策略ID',\n `sourceHTTPFirewallRuleGroupId` int(11) unsigned DEFAULT '0' COMMENT '来源规则集分组ID',\n `sourceHTTPFirewallRuleSetId` int(11) unsigned DEFAULT '0' COMMENT '来源规则集ID',\n `sourceUserId` bigint(11) unsigned DEFAULT '0' COMMENT '用户ID',\n `isRead` tinyint(1) unsigned DEFAULT '1' COMMENT '是否已读',\n PRIMARY KEY (`id`),\n KEY `listId` (`listId`),\n KEY `ipFrom` (`ipFrom`),\n KEY `serverId` (`serverId`),\n KEY `expiredAt_state` (`expiredAt`,`state`) USING BTREE,\n KEY `isRead` (`expiredAt`,`isRead`) USING BTREE,\n KEY `createdAt` (`createdAt`),\n KEY `sourceUserId` (`sourceUserId`),\n KEY `version` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='IP'",
"definition": "CREATE TABLE `edgeIPItems` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `listId` int(11) unsigned DEFAULT '0' COMMENT '所属名单ID',\n `value` varchar(255) DEFAULT NULL COMMENT '原始值',\n `type` varchar(64) DEFAULT 'ipv4' COMMENT '类型',\n `ipFrom` varchar(64) DEFAULT NULL COMMENT '开始IP',\n `ipTo` varchar(64) DEFAULT NULL COMMENT '结束IP',\n `ipFromLong` bigint(20) unsigned DEFAULT '0' COMMENT '开始IP整型(弃用)',\n `ipToLong` bigint(20) unsigned DEFAULT '0' COMMENT '结束IP整型(弃用)',\n `version` bigint(20) unsigned DEFAULT '0' COMMENT '版本',\n `createdAt` bigint(11) unsigned DEFAULT '0' COMMENT '创建时间',\n `updatedAt` bigint(11) unsigned DEFAULT '0' COMMENT '修改时间',\n `reason` varchar(255) DEFAULT NULL COMMENT '加入说明',\n `eventLevel` varchar(64) DEFAULT NULL COMMENT '事件级别',\n `state` tinyint(1) unsigned DEFAULT '1' COMMENT '状态',\n `expiredAt` bigint(11) unsigned DEFAULT '0' COMMENT '过期时间',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '有效范围服务ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '有效范围节点ID',\n `sourceNodeId` int(11) unsigned DEFAULT '0' COMMENT '来源节点ID',\n `sourceServerId` int(11) unsigned DEFAULT '0' COMMENT '来源服务ID',\n `sourceHTTPFirewallPolicyId` int(11) unsigned DEFAULT '0' COMMENT '来源策略ID',\n `sourceHTTPFirewallRuleGroupId` int(11) unsigned DEFAULT '0' COMMENT '来源规则集分组ID',\n `sourceHTTPFirewallRuleSetId` int(11) unsigned DEFAULT '0' COMMENT '来源规则集ID',\n `sourceUserId` bigint(11) unsigned DEFAULT '0' COMMENT '用户ID',\n `isRead` tinyint(1) unsigned DEFAULT '1' COMMENT '是否已读',\n PRIMARY KEY (`id`),\n KEY `listId` (`listId`),\n KEY `ipFrom` (`ipFrom`),\n KEY `serverId` (`serverId`),\n KEY `expiredAt_state` (`expiredAt`,`state`) USING BTREE,\n KEY `isRead` (`expiredAt`,`isRead`) USING BTREE,\n KEY `createdAt` (`createdAt`),\n KEY `sourceUserId` (`sourceUserId`),\n KEY `version` (`version`),\n KEY `value` (`value`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='IP'",
"fields": [
{
"name": "id",
@@ -103748,6 +103752,10 @@
"name": "listId",
"definition": "int(11) unsigned DEFAULT '0' COMMENT '所属名单ID'"
},
{
"name": "value",
"definition": "varchar(255) COMMENT '原始值'"
},
{
"name": "type",
"definition": "varchar(64) DEFAULT 'ipv4' COMMENT '类型'"
@@ -103762,11 +103770,11 @@
},
{
"name": "ipFromLong",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '开始IP整型'"
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '开始IP整型(弃用)'"
},
{
"name": "ipToLong",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '结束IP整型'"
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '结束IP整型(弃用)'"
},
{
"name": "version",
@@ -103869,6 +103877,10 @@
{
"name": "version",
"definition": "KEY `version` (`version`) USING BTREE"
},
{
"name": "value",
"definition": "KEY `value` (`value`) USING BTREE"
}
],
"records": []
@@ -105394,7 +105406,7 @@
"name": "edgeMetricStats_1",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricStats_1` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `hash` varchar(32) DEFAULT NULL COMMENT 'Hash值',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `keys` json DEFAULT NULL COMMENT '键值',\n `value` decimal(20,2) DEFAULT '0.00' COMMENT '数值',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT 'YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `hash` (`hash`),\n KEY `serverId` (`serverId`),\n KEY `createdDay` (`createdDay`),\n KEY `itemId` (`itemId`) USING BTREE,\n KEY `item_time` (`itemId`,`time`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`),\n KEY `server_item_time` (`serverId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计数据'",
"definition": "CREATE TABLE `edgeMetricStats_1` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `hash` varchar(32) DEFAULT NULL COMMENT 'Hash值',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `keys` json DEFAULT NULL COMMENT '键值',\n `value` decimal(22,2) DEFAULT '0.00' COMMENT '数值',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT 'YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `hash` (`hash`),\n KEY `serverId` (`serverId`),\n KEY `createdDay` (`createdDay`),\n KEY `itemId` (`itemId`) USING BTREE,\n KEY `item_time` (`itemId`,`time`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`),\n KEY `server_item_time` (`serverId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计数据'",
"fields": [
{
"name": "id",
@@ -105426,7 +105438,7 @@
},
{
"name": "value",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '数值'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '数值'"
},
{
"name": "time",
@@ -106304,7 +106316,7 @@
"name": "edgeMetricStats_19",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricStats_19` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `hash` varchar(32) DEFAULT NULL COMMENT 'Hash值',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `keys` json DEFAULT NULL COMMENT '键值',\n `value` decimal(20,2) DEFAULT '0.00' COMMENT '数值',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT 'YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `hash` (`hash`),\n KEY `serverId` (`serverId`),\n KEY `createdDay` (`createdDay`),\n KEY `itemId` (`itemId`) USING BTREE,\n KEY `item_time` (`itemId`,`time`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`),\n KEY `server_item_time` (`serverId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计数据'",
"definition": "CREATE TABLE `edgeMetricStats_19` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `hash` varchar(32) DEFAULT NULL COMMENT 'Hash值',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `keys` json DEFAULT NULL COMMENT '键值',\n `value` decimal(22,2) DEFAULT '0.00' COMMENT '数值',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT 'YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `hash` (`hash`),\n KEY `serverId` (`serverId`),\n KEY `createdDay` (`createdDay`),\n KEY `itemId` (`itemId`) USING BTREE,\n KEY `item_time` (`itemId`,`time`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`),\n KEY `server_item_time` (`serverId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计数据'",
"fields": [
{
"name": "id",
@@ -106336,7 +106348,7 @@
},
{
"name": "value",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '数值'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '数值'"
},
{
"name": "time",
@@ -107123,7 +107135,7 @@
"name": "edgeMetricSumStats",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricSumStats` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(20,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"definition": "CREATE TABLE `edgeMetricSumStats` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(22,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"fields": [
{
"name": "id",
@@ -107151,7 +107163,7 @@
},
{
"name": "total",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '总和'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '总和'"
},
{
"name": "time",
@@ -107198,7 +107210,7 @@
"name": "edgeMetricSumStats_0",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricSumStats_0` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(20,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"definition": "CREATE TABLE `edgeMetricSumStats_0` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(22,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"fields": [
{
"name": "id",
@@ -107226,7 +107238,7 @@
},
{
"name": "total",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '总和'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '总和'"
},
{
"name": "time",
@@ -107273,7 +107285,7 @@
"name": "edgeMetricSumStats_1",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricSumStats_1` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(20,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"definition": "CREATE TABLE `edgeMetricSumStats_1` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(22,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"fields": [
{
"name": "id",
@@ -107301,7 +107313,7 @@
},
{
"name": "total",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '总和'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '总和'"
},
{
"name": "time",
@@ -107348,7 +107360,7 @@
"name": "edgeMetricSumStats_10",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricSumStats_10` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(20,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"definition": "CREATE TABLE `edgeMetricSumStats_10` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(22,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"fields": [
{
"name": "id",
@@ -107376,7 +107388,7 @@
},
{
"name": "total",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '总和'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '总和'"
},
{
"name": "time",
@@ -107423,7 +107435,7 @@
"name": "edgeMetricSumStats_11",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricSumStats_11` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(20,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"definition": "CREATE TABLE `edgeMetricSumStats_11` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(22,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"fields": [
{
"name": "id",
@@ -107451,7 +107463,7 @@
},
{
"name": "total",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '总和'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '总和'"
},
{
"name": "time",
@@ -107498,7 +107510,7 @@
"name": "edgeMetricSumStats_12",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricSumStats_12` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(20,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"definition": "CREATE TABLE `edgeMetricSumStats_12` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(22,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"fields": [
{
"name": "id",
@@ -107526,7 +107538,7 @@
},
{
"name": "total",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '总和'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '总和'"
},
{
"name": "time",
@@ -107573,7 +107585,7 @@
"name": "edgeMetricSumStats_13",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricSumStats_13` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(20,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"definition": "CREATE TABLE `edgeMetricSumStats_13` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(22,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"fields": [
{
"name": "id",
@@ -107601,7 +107613,7 @@
},
{
"name": "total",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '总和'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '总和'"
},
{
"name": "time",
@@ -107648,7 +107660,7 @@
"name": "edgeMetricSumStats_14",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricSumStats_14` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(20,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"definition": "CREATE TABLE `edgeMetricSumStats_14` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(22,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"fields": [
{
"name": "id",
@@ -107676,7 +107688,7 @@
},
{
"name": "total",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '总和'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '总和'"
},
{
"name": "time",
@@ -107723,7 +107735,7 @@
"name": "edgeMetricSumStats_15",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricSumStats_15` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(20,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"definition": "CREATE TABLE `edgeMetricSumStats_15` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(22,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"fields": [
{
"name": "id",
@@ -107751,7 +107763,7 @@
},
{
"name": "total",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '总和'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '总和'"
},
{
"name": "time",
@@ -107798,7 +107810,7 @@
"name": "edgeMetricSumStats_16",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricSumStats_16` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(20,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"definition": "CREATE TABLE `edgeMetricSumStats_16` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(22,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"fields": [
{
"name": "id",
@@ -107826,7 +107838,7 @@
},
{
"name": "total",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '总和'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '总和'"
},
{
"name": "time",
@@ -107873,7 +107885,7 @@
"name": "edgeMetricSumStats_17",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricSumStats_17` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(20,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"definition": "CREATE TABLE `edgeMetricSumStats_17` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(22,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"fields": [
{
"name": "id",
@@ -107901,7 +107913,7 @@
},
{
"name": "total",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '总和'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '总和'"
},
{
"name": "time",
@@ -107948,7 +107960,7 @@
"name": "edgeMetricSumStats_18",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricSumStats_18` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(20,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"definition": "CREATE TABLE `edgeMetricSumStats_18` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(22,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"fields": [
{
"name": "id",
@@ -107976,7 +107988,7 @@
},
{
"name": "total",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '总和'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '总和'"
},
{
"name": "time",
@@ -108023,7 +108035,7 @@
"name": "edgeMetricSumStats_19",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricSumStats_19` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(20,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"definition": "CREATE TABLE `edgeMetricSumStats_19` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(22,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"fields": [
{
"name": "id",
@@ -108051,7 +108063,7 @@
},
{
"name": "total",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '总和'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '总和'"
},
{
"name": "time",
@@ -108098,7 +108110,7 @@
"name": "edgeMetricSumStats_2",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricSumStats_2` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(20,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"definition": "CREATE TABLE `edgeMetricSumStats_2` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(22,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"fields": [
{
"name": "id",
@@ -108126,7 +108138,7 @@
},
{
"name": "total",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '总和'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '总和'"
},
{
"name": "time",
@@ -108173,7 +108185,7 @@
"name": "edgeMetricSumStats_3",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricSumStats_3` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(20,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"definition": "CREATE TABLE `edgeMetricSumStats_3` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(22,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"fields": [
{
"name": "id",
@@ -108201,7 +108213,7 @@
},
{
"name": "total",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '总和'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '总和'"
},
{
"name": "time",
@@ -108248,7 +108260,7 @@
"name": "edgeMetricSumStats_4",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricSumStats_4` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(20,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"definition": "CREATE TABLE `edgeMetricSumStats_4` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(22,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"fields": [
{
"name": "id",
@@ -108276,7 +108288,7 @@
},
{
"name": "total",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '总和'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '总和'"
},
{
"name": "time",
@@ -108323,7 +108335,7 @@
"name": "edgeMetricSumStats_5",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricSumStats_5` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(20,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"definition": "CREATE TABLE `edgeMetricSumStats_5` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(22,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"fields": [
{
"name": "id",
@@ -108351,7 +108363,7 @@
},
{
"name": "total",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '总和'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '总和'"
},
{
"name": "time",
@@ -108398,7 +108410,7 @@
"name": "edgeMetricSumStats_6",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricSumStats_6` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(20,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"definition": "CREATE TABLE `edgeMetricSumStats_6` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(22,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"fields": [
{
"name": "id",
@@ -108426,7 +108438,7 @@
},
{
"name": "total",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '总和'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '总和'"
},
{
"name": "time",
@@ -108473,7 +108485,7 @@
"name": "edgeMetricSumStats_7",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricSumStats_7` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(20,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"definition": "CREATE TABLE `edgeMetricSumStats_7` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(22,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"fields": [
{
"name": "id",
@@ -108501,7 +108513,7 @@
},
{
"name": "total",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '总和'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '总和'"
},
{
"name": "time",
@@ -108548,7 +108560,7 @@
"name": "edgeMetricSumStats_8",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricSumStats_8` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(20,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"definition": "CREATE TABLE `edgeMetricSumStats_8` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(22,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"fields": [
{
"name": "id",
@@ -108576,7 +108588,7 @@
},
{
"name": "total",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '总和'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '总和'"
},
{
"name": "time",
@@ -108623,7 +108635,7 @@
"name": "edgeMetricSumStats_9",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeMetricSumStats_9` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(20,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"definition": "CREATE TABLE `edgeMetricSumStats_9` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `nodeId` int(11) unsigned DEFAULT '0' COMMENT '节点ID',\n `serverId` int(11) unsigned DEFAULT '0' COMMENT '服务ID',\n `itemId` bigint(20) unsigned DEFAULT '0' COMMENT '指标',\n `count` bigint(20) unsigned DEFAULT '0' COMMENT '数量',\n `total` decimal(22,2) DEFAULT '0.00' COMMENT '总和',\n `time` varchar(14) DEFAULT NULL COMMENT '分钟值YYYYMMDDHHII',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdDay` varchar(8) DEFAULT NULL COMMENT '创建日期YYYYMMDD',\n PRIMARY KEY (`id`),\n UNIQUE KEY `node_server_item_time_version` (`nodeId`,`serverId`,`itemId`,`time`,`version`) USING BTREE,\n KEY `server_item_time` (`serverId`,`itemId`,`time`,`version`),\n KEY `createdDay` (`createdDay`),\n KEY `cluster_item_time` (`clusterId`,`itemId`,`time`),\n KEY `node_item_time` (`nodeId`,`itemId`,`time`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标统计总和数据'",
"fields": [
{
"name": "id",
@@ -108651,7 +108663,7 @@
},
{
"name": "total",
"definition": "decimal(20,2) DEFAULT '0.00' COMMENT '总和'"
"definition": "decimal(22,2) DEFAULT '0.00' COMMENT '总和'"
},
{
"name": "time",
@@ -109864,7 +109876,7 @@
"name": "edgeNodeClusters",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeNodeClusters` (\n `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `adminId` int(11) unsigned DEFAULT '0' COMMENT '管理员ID',\n `userId` int(11) unsigned DEFAULT '0' COMMENT '用户ID',\n `isOn` tinyint(1) unsigned DEFAULT '1' COMMENT '是否启用',\n `name` varchar(255) DEFAULT NULL COMMENT '名称',\n `useAllAPINodes` tinyint(1) unsigned DEFAULT '1' COMMENT '是否使用所有API节点',\n `apiNodes` json DEFAULT NULL COMMENT '使用的API节点',\n `installDir` varchar(512) DEFAULT NULL COMMENT '安装目录',\n `order` int(11) unsigned DEFAULT '0' COMMENT '排序',\n `createdAt` bigint(11) unsigned DEFAULT '0' COMMENT '创建时间',\n `grantId` int(11) unsigned DEFAULT '0' COMMENT '默认认证方式',\n `sshParams` json DEFAULT NULL COMMENT 'SSH默认参数',\n `state` tinyint(1) unsigned DEFAULT '1' COMMENT '状态',\n `autoRegister` tinyint(1) unsigned DEFAULT '1' COMMENT '是否开启自动注册',\n `uniqueId` varchar(32) DEFAULT NULL COMMENT '唯一ID',\n `secret` varchar(32) DEFAULT NULL COMMENT '密钥',\n `healthCheck` json DEFAULT NULL COMMENT '健康检查',\n `dnsName` varchar(255) DEFAULT NULL COMMENT 'DNS名称',\n `dnsDomainId` int(11) unsigned DEFAULT '0' COMMENT '域名ID',\n `dns` json DEFAULT NULL COMMENT 'DNS配置',\n `toa` json DEFAULT NULL COMMENT 'TOA配置',\n `cachePolicyId` int(11) unsigned DEFAULT '0' COMMENT '缓存策略ID',\n `httpFirewallPolicyId` int(11) unsigned DEFAULT '0' COMMENT 'WAF策略ID',\n `accessLog` json DEFAULT NULL COMMENT '访问日志设置',\n `systemServices` json DEFAULT NULL COMMENT '系统服务设置',\n `timeZone` varchar(64) DEFAULT NULL COMMENT '时区',\n `nodeMaxThreads` int(11) unsigned DEFAULT '0' COMMENT '节点最大线程数',\n `ddosProtection` json DEFAULT NULL COMMENT 'DDoS防护设置',\n `autoOpenPorts` tinyint(1) unsigned DEFAULT '1' COMMENT '是否自动尝试开放端口',\n `isPinned` tinyint(1) unsigned DEFAULT '0' COMMENT '是否置顶',\n `webp` json DEFAULT NULL COMMENT 'WebP设置',\n `uam` json DEFAULT NULL COMMENT 'UAM设置',\n `clock` json DEFAULT NULL COMMENT '时钟配置',\n `globalServerConfig` json DEFAULT NULL COMMENT '全局服务配置',\n `autoRemoteStart` tinyint(1) unsigned DEFAULT '1' COMMENT '自动远程启动',\n `autoInstallNftables` tinyint(1) unsigned DEFAULT '0' COMMENT '自动安装nftables',\n `isAD` tinyint(1) unsigned DEFAULT '0' COMMENT '是否为高防集群',\n `httpPages` json DEFAULT NULL COMMENT '自定义页面设置',\n `cc` json DEFAULT NULL COMMENT 'CC设置',\n `http3` json DEFAULT NULL COMMENT 'HTTP3设置',\n `autoSystemTuning` tinyint(1) unsigned DEFAULT '1' COMMENT '是否自动调整系统参数',\n `networkSecurity` json DEFAULT NULL COMMENT '网络安全策略',\n PRIMARY KEY (`id`),\n KEY `uniqueId` (`uniqueId`),\n KEY `grantId` (`grantId`),\n KEY `dnsDomainId` (`dnsDomainId`),\n KEY `cachePolicyId` (`cachePolicyId`),\n KEY `httpFirewallPolicyId` (`httpFirewallPolicyId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='节点集群'",
"definition": "CREATE TABLE `edgeNodeClusters` (\n `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `adminId` int(11) unsigned DEFAULT '0' COMMENT '管理员ID',\n `userId` int(11) unsigned DEFAULT '0' COMMENT '用户ID',\n `isOn` tinyint(1) unsigned DEFAULT '1' COMMENT '是否启用',\n `name` varchar(255) DEFAULT NULL COMMENT '名称',\n `useAllAPINodes` tinyint(1) unsigned DEFAULT '1' COMMENT '是否使用所有API节点',\n `apiNodes` json DEFAULT NULL COMMENT '使用的API节点',\n `installDir` varchar(512) DEFAULT NULL COMMENT '安装目录',\n `order` int(11) unsigned DEFAULT '0' COMMENT '排序',\n `createdAt` bigint(11) unsigned DEFAULT '0' COMMENT '创建时间',\n `grantId` int(11) unsigned DEFAULT '0' COMMENT '默认认证方式',\n `sshParams` json DEFAULT NULL COMMENT 'SSH默认参数',\n `state` tinyint(1) unsigned DEFAULT '1' COMMENT '状态',\n `autoRegister` tinyint(1) unsigned DEFAULT '1' COMMENT '是否开启自动注册',\n `uniqueId` varchar(32) DEFAULT NULL COMMENT '唯一ID',\n `secret` varchar(32) DEFAULT NULL COMMENT '密钥',\n `healthCheck` json DEFAULT NULL COMMENT '健康检查',\n `dnsName` varchar(255) DEFAULT NULL COMMENT 'DNS名称',\n `dnsDomainId` int(11) unsigned DEFAULT '0' COMMENT '域名ID',\n `dns` json DEFAULT NULL COMMENT 'DNS配置',\n `toa` json DEFAULT NULL COMMENT 'TOA配置',\n `cachePolicyId` int(11) unsigned DEFAULT '0' COMMENT '缓存策略ID',\n `httpFirewallPolicyId` int(11) unsigned DEFAULT '0' COMMENT 'WAF策略ID',\n `accessLog` json DEFAULT NULL COMMENT '访问日志设置',\n `systemServices` json DEFAULT NULL COMMENT '系统服务设置',\n `timeZone` varchar(64) DEFAULT NULL COMMENT '时区',\n `nodeMaxThreads` int(11) unsigned DEFAULT '0' COMMENT '节点最大线程数',\n `ddosProtection` json DEFAULT NULL COMMENT 'DDoS防护设置',\n `autoOpenPorts` tinyint(1) unsigned DEFAULT '1' COMMENT '是否自动尝试开放端口',\n `isPinned` tinyint(1) unsigned DEFAULT '0' COMMENT '是否置顶',\n `webp` json DEFAULT NULL COMMENT 'WebP设置',\n `uam` json DEFAULT NULL COMMENT 'UAM设置',\n `clock` json DEFAULT NULL COMMENT '时钟配置',\n `globalServerConfig` json DEFAULT NULL COMMENT '全局服务配置',\n `autoRemoteStart` tinyint(1) unsigned DEFAULT '1' COMMENT '自动远程启动',\n `autoInstallNftables` tinyint(1) unsigned DEFAULT '0' COMMENT '自动安装nftables',\n `isAD` tinyint(1) unsigned DEFAULT '0' COMMENT '是否为高防集群',\n `httpPages` json DEFAULT NULL COMMENT '自定义页面设置',\n `cc` json DEFAULT NULL COMMENT 'CC设置',\n `http3` json DEFAULT NULL COMMENT 'HTTP3设置',\n `autoSystemTuning` tinyint(1) unsigned DEFAULT '1' COMMENT '是否自动调整系统参数',\n `networkSecurity` json DEFAULT NULL COMMENT '网络安全策略',\n `autoTrimDisks` tinyint(1) unsigned DEFAULT '1' COMMENT '是否自动执行TRIM',\n `maxConcurrentReads` int(11) unsigned DEFAULT '0' COMMENT '节点并发读限制',\n `maxConcurrentWrites` int(11) unsigned DEFAULT '0' COMMENT '节点并发写限制',\n PRIMARY KEY (`id`),\n KEY `uniqueId` (`uniqueId`),\n KEY `grantId` (`grantId`),\n KEY `dnsDomainId` (`dnsDomainId`),\n KEY `cachePolicyId` (`cachePolicyId`),\n KEY `httpFirewallPolicyId` (`httpFirewallPolicyId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='节点集群'",
"fields": [
{
"name": "id",
@@ -110033,6 +110045,18 @@
{
"name": "networkSecurity",
"definition": "json COMMENT '网络安全策略'"
},
{
"name": "autoTrimDisks",
"definition": "tinyint(1) unsigned DEFAULT '1' COMMENT '是否自动执行TRIM'"
},
{
"name": "maxConcurrentReads",
"definition": "int(11) unsigned DEFAULT '0' COMMENT '节点并发读限制'"
},
{
"name": "maxConcurrentWrites",
"definition": "int(11) unsigned DEFAULT '0' COMMENT '节点并发写限制'"
}
],
"indexes": [
@@ -237595,7 +237619,7 @@
"name": "edgeServerBandwidthStats",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeServerBandwidthStats` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `userId` (`userId`),\n KEY `day` (`day`) USING BTREE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"definition": "CREATE TABLE `edgeServerBandwidthStats` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `countIPs` bigint(20) unsigned DEFAULT '0' COMMENT '独立IP',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `userId` (`userId`),\n KEY `day` (`day`) USING BTREE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"fields": [
{
"name": "id",
@@ -237656,6 +237680,10 @@
{
"name": "totalBytes",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '总流量'"
},
{
"name": "countIPs",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '独立IP'"
}
],
"indexes": [
@@ -237682,7 +237710,7 @@
"name": "edgeServerBandwidthStats_0",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeServerBandwidthStats_0` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"definition": "CREATE TABLE `edgeServerBandwidthStats_0` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n `countIPs` bigint(20) unsigned DEFAULT '0' COMMENT '独立IP',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"fields": [
{
"name": "id",
@@ -237743,6 +237771,10 @@
{
"name": "countAttackRequests",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数'"
},
{
"name": "countIPs",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '独立IP'"
}
],
"indexes": [
@@ -237769,7 +237801,7 @@
"name": "edgeServerBandwidthStats_1",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeServerBandwidthStats_1` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"definition": "CREATE TABLE `edgeServerBandwidthStats_1` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n `countIPs` bigint(20) unsigned DEFAULT '0' COMMENT '独立IP',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"fields": [
{
"name": "id",
@@ -237830,6 +237862,10 @@
{
"name": "countAttackRequests",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数'"
},
{
"name": "countIPs",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '独立IP'"
}
],
"indexes": [
@@ -237856,7 +237892,7 @@
"name": "edgeServerBandwidthStats_10",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeServerBandwidthStats_10` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"definition": "CREATE TABLE `edgeServerBandwidthStats_10` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n `countIPs` bigint(20) unsigned DEFAULT '0' COMMENT '独立IP',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"fields": [
{
"name": "id",
@@ -237917,6 +237953,10 @@
{
"name": "countAttackRequests",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数'"
},
{
"name": "countIPs",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '独立IP'"
}
],
"indexes": [
@@ -237943,7 +237983,7 @@
"name": "edgeServerBandwidthStats_11",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeServerBandwidthStats_11` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"definition": "CREATE TABLE `edgeServerBandwidthStats_11` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n `countIPs` bigint(20) unsigned DEFAULT '0' COMMENT '独立IP',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"fields": [
{
"name": "id",
@@ -238004,6 +238044,10 @@
{
"name": "countAttackRequests",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数'"
},
{
"name": "countIPs",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '独立IP'"
}
],
"indexes": [
@@ -238030,7 +238074,7 @@
"name": "edgeServerBandwidthStats_12",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeServerBandwidthStats_12` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"definition": "CREATE TABLE `edgeServerBandwidthStats_12` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n `countIPs` bigint(20) unsigned DEFAULT '0' COMMENT '独立IP',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"fields": [
{
"name": "id",
@@ -238091,6 +238135,10 @@
{
"name": "countAttackRequests",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数'"
},
{
"name": "countIPs",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '独立IP'"
}
],
"indexes": [
@@ -238117,7 +238165,7 @@
"name": "edgeServerBandwidthStats_13",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeServerBandwidthStats_13` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"definition": "CREATE TABLE `edgeServerBandwidthStats_13` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n `countIPs` bigint(20) unsigned DEFAULT '0' COMMENT '独立IP',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"fields": [
{
"name": "id",
@@ -238178,6 +238226,10 @@
{
"name": "countAttackRequests",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数'"
},
{
"name": "countIPs",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '独立IP'"
}
],
"indexes": [
@@ -238204,7 +238256,7 @@
"name": "edgeServerBandwidthStats_14",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeServerBandwidthStats_14` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户 ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"definition": "CREATE TABLE `edgeServerBandwidthStats_14` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户 ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n `countIPs` bigint(20) unsigned DEFAULT '0' COMMENT '独立IP',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"fields": [
{
"name": "id",
@@ -238265,6 +238317,10 @@
{
"name": "countAttackRequests",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数'"
},
{
"name": "countIPs",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '独立IP'"
}
],
"indexes": [
@@ -238291,7 +238347,7 @@
"name": "edgeServerBandwidthStats_15",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeServerBandwidthStats_15` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"definition": "CREATE TABLE `edgeServerBandwidthStats_15` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n `countIPs` bigint(20) unsigned DEFAULT '0' COMMENT '独立IP',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"fields": [
{
"name": "id",
@@ -238352,6 +238408,10 @@
{
"name": "countAttackRequests",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数'"
},
{
"name": "countIPs",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '独立IP'"
}
],
"indexes": [
@@ -238378,7 +238438,7 @@
"name": "edgeServerBandwidthStats_16",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeServerBandwidthStats_16` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"definition": "CREATE TABLE `edgeServerBandwidthStats_16` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n `countIPs` bigint(20) unsigned DEFAULT '0' COMMENT '独立IP',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"fields": [
{
"name": "id",
@@ -238439,6 +238499,10 @@
{
"name": "countAttackRequests",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数'"
},
{
"name": "countIPs",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '独立IP'"
}
],
"indexes": [
@@ -238465,7 +238529,7 @@
"name": "edgeServerBandwidthStats_17",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeServerBandwidthStats_17` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"definition": "CREATE TABLE `edgeServerBandwidthStats_17` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n `countIPs` bigint(20) unsigned DEFAULT '0' COMMENT '独立IP',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"fields": [
{
"name": "id",
@@ -238526,6 +238590,10 @@
{
"name": "countAttackRequests",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数'"
},
{
"name": "countIPs",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '独立IP'"
}
],
"indexes": [
@@ -238552,7 +238620,7 @@
"name": "edgeServerBandwidthStats_18",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeServerBandwidthStats_18` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"definition": "CREATE TABLE `edgeServerBandwidthStats_18` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n `countIPs` bigint(20) unsigned DEFAULT '0' COMMENT '独立IP',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"fields": [
{
"name": "id",
@@ -238613,6 +238681,10 @@
{
"name": "countAttackRequests",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数'"
},
{
"name": "countIPs",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '独立IP'"
}
],
"indexes": [
@@ -238639,7 +238711,7 @@
"name": "edgeServerBandwidthStats_19",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeServerBandwidthStats_19` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"definition": "CREATE TABLE `edgeServerBandwidthStats_19` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n `countIPs` bigint(20) unsigned DEFAULT '0' COMMENT '独立IP',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"fields": [
{
"name": "id",
@@ -238700,6 +238772,10 @@
{
"name": "countAttackRequests",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数'"
},
{
"name": "countIPs",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '独立IP'"
}
],
"indexes": [
@@ -238726,7 +238802,7 @@
"name": "edgeServerBandwidthStats_2",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeServerBandwidthStats_2` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"definition": "CREATE TABLE `edgeServerBandwidthStats_2` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n `countIPs` bigint(20) unsigned DEFAULT '0' COMMENT '独立IP',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"fields": [
{
"name": "id",
@@ -238787,6 +238863,10 @@
{
"name": "countAttackRequests",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数'"
},
{
"name": "countIPs",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '独立IP'"
}
],
"indexes": [
@@ -238813,7 +238893,7 @@
"name": "edgeServerBandwidthStats_3",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeServerBandwidthStats_3` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `userId` (`userId`),\n KEY `day` (`day`) USING BTREE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"definition": "CREATE TABLE `edgeServerBandwidthStats_3` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n `countIPs` bigint(20) unsigned DEFAULT '0' COMMENT '独立IP',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `userId` (`userId`),\n KEY `day` (`day`) USING BTREE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"fields": [
{
"name": "id",
@@ -238874,6 +238954,10 @@
{
"name": "countAttackRequests",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数'"
},
{
"name": "countIPs",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '独立IP'"
}
],
"indexes": [
@@ -238900,7 +238984,7 @@
"name": "edgeServerBandwidthStats_4",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeServerBandwidthStats_4` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"definition": "CREATE TABLE `edgeServerBandwidthStats_4` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n `countIPs` bigint(20) unsigned DEFAULT '0' COMMENT '独立IP',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"fields": [
{
"name": "id",
@@ -238961,6 +239045,10 @@
{
"name": "countAttackRequests",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数'"
},
{
"name": "countIPs",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '独立IP'"
}
],
"indexes": [
@@ -238987,7 +239075,7 @@
"name": "edgeServerBandwidthStats_5",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeServerBandwidthStats_5` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"definition": "CREATE TABLE `edgeServerBandwidthStats_5` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n `countIPs` bigint(20) unsigned DEFAULT '0' COMMENT '独立IP',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"fields": [
{
"name": "id",
@@ -239048,6 +239136,10 @@
{
"name": "countAttackRequests",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数'"
},
{
"name": "countIPs",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '独立IP'"
}
],
"indexes": [
@@ -239074,7 +239166,7 @@
"name": "edgeServerBandwidthStats_6",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeServerBandwidthStats_6` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"definition": "CREATE TABLE `edgeServerBandwidthStats_6` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n `countIPs` bigint(20) unsigned DEFAULT '0' COMMENT '独立IP',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"fields": [
{
"name": "id",
@@ -239135,6 +239227,10 @@
{
"name": "countAttackRequests",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数'"
},
{
"name": "countIPs",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '独立IP'"
}
],
"indexes": [
@@ -239161,7 +239257,7 @@
"name": "edgeServerBandwidthStats_7",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeServerBandwidthStats_7` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"definition": "CREATE TABLE `edgeServerBandwidthStats_7` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n `countIPs` bigint(20) unsigned DEFAULT '0' COMMENT '独立IP',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"fields": [
{
"name": "id",
@@ -239222,6 +239318,10 @@
{
"name": "countAttackRequests",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数'"
},
{
"name": "countIPs",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '独立IP'"
}
],
"indexes": [
@@ -239248,7 +239348,7 @@
"name": "edgeServerBandwidthStats_8",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeServerBandwidthStats_8` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"definition": "CREATE TABLE `edgeServerBandwidthStats_8` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n `countIPs` bigint(20) unsigned DEFAULT '0' COMMENT '独立IP',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"fields": [
{
"name": "id",
@@ -239309,6 +239409,10 @@
{
"name": "countAttackRequests",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数'"
},
{
"name": "countIPs",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '独立IP'"
}
],
"indexes": [
@@ -239335,7 +239439,7 @@
"name": "edgeServerBandwidthStats_9",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeServerBandwidthStats_9` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"definition": "CREATE TABLE `edgeServerBandwidthStats_9` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `userId` bigint(20) unsigned DEFAULT '0' COMMENT '用户ID',\n `serverId` bigint(20) unsigned DEFAULT '0' COMMENT '服务ID',\n `day` varchar(8) DEFAULT NULL COMMENT '日期YYYYMMDD',\n `timeAt` varchar(4) DEFAULT NULL COMMENT '时间点HHMM',\n `bytes` bigint(20) unsigned DEFAULT '0' COMMENT '带宽字节',\n `regionId` int(11) unsigned DEFAULT '0' COMMENT '区域ID',\n `userPlanId` bigint(20) unsigned DEFAULT '0' COMMENT '用户套餐ID',\n `totalBytes` bigint(20) unsigned DEFAULT '0' COMMENT '总流量',\n `avgBytes` bigint(20) unsigned DEFAULT '0' COMMENT '平均流量',\n `cachedBytes` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的流量',\n `attackBytes` bigint(20) unsigned DEFAULT '0' COMMENT '攻击流量',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '请求数',\n `countCachedRequests` bigint(20) unsigned DEFAULT '0' COMMENT '缓存的请求数',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数',\n `countIPs` bigint(20) unsigned DEFAULT '0' COMMENT '独立IP',\n PRIMARY KEY (`id`),\n UNIQUE KEY `server_day_time_region` (`serverId`,`day`,`timeAt`,`regionId`) USING BTREE,\n KEY `day` (`day`),\n KEY `userId` (`userId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务峰值带宽统计'",
"fields": [
{
"name": "id",
@@ -239396,6 +239500,10 @@
{
"name": "countAttackRequests",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '攻击请求数'"
},
{
"name": "countIPs",
"definition": "bigint(20) unsigned DEFAULT '0' COMMENT '独立IP'"
}
],
"indexes": [
@@ -243275,7 +243383,7 @@
"name": "edgeServers",
"engine": "InnoDB",
"charset": "utf8mb4_general_ci",
"definition": "CREATE TABLE `edgeServers` (\n `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `isOn` tinyint(1) unsigned DEFAULT '1' COMMENT '是否启用',\n `userId` int(11) unsigned DEFAULT '0' COMMENT '用户ID',\n `adminId` int(11) unsigned DEFAULT '0' COMMENT '管理员ID',\n `type` varchar(64) DEFAULT NULL COMMENT '服务类型',\n `name` varchar(255) DEFAULT NULL COMMENT '名称',\n `description` varchar(512) DEFAULT NULL COMMENT '描述',\n `plainServerNames` json DEFAULT NULL COMMENT '扁平化域名列表',\n `serverNames` json DEFAULT NULL COMMENT '域名列表',\n `auditingAt` bigint(11) unsigned DEFAULT '0' COMMENT '审核提交时间',\n `auditingServerNames` json DEFAULT NULL COMMENT '审核中的域名',\n `isAuditing` tinyint(1) unsigned DEFAULT '0' COMMENT '是否正在审核',\n `auditingResult` json DEFAULT NULL COMMENT '审核结果',\n `http` json DEFAULT NULL COMMENT 'HTTP配置',\n `https` json DEFAULT NULL COMMENT 'HTTPS配置',\n `tcp` json DEFAULT NULL COMMENT 'TCP配置',\n `tls` json DEFAULT NULL COMMENT 'TLS配置',\n `unix` json DEFAULT NULL COMMENT 'Unix配置',\n `udp` json DEFAULT NULL COMMENT 'UDP配置',\n `webId` int(11) unsigned DEFAULT '0' COMMENT 'WEB配置',\n `reverseProxy` json DEFAULT NULL COMMENT '反向代理配置',\n `groupIds` json DEFAULT NULL COMMENT '分组ID列表',\n `config` json DEFAULT NULL COMMENT '服务配置,自动生成',\n `configMd5` varchar(32) DEFAULT NULL COMMENT 'Md5',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `includeNodes` json DEFAULT NULL COMMENT '部署条件',\n `excludeNodes` json DEFAULT NULL COMMENT '节点排除条件',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdAt` bigint(11) unsigned DEFAULT '0' COMMENT '创建时间',\n `state` tinyint(1) unsigned DEFAULT '1' COMMENT '状态',\n `dnsName` varchar(255) DEFAULT NULL COMMENT 'DNS名称',\n `tcpPorts` json DEFAULT NULL COMMENT '所包含TCP端口',\n `udpPorts` json DEFAULT NULL COMMENT '所包含UDP端口',\n `supportCNAME` tinyint(1) unsigned DEFAULT '0' COMMENT '允许CNAME不在域名名单',\n `trafficLimit` json DEFAULT NULL COMMENT '流量限制',\n `trafficDay` varchar(8) DEFAULT NULL COMMENT 'YYYYMMDD',\n `trafficMonth` varchar(6) DEFAULT NULL COMMENT 'YYYYMM',\n `totalDailyTraffic` decimal(20,6) unsigned DEFAULT '0.000000' COMMENT '日流量',\n `totalMonthlyTraffic` decimal(20,6) unsigned DEFAULT '0.000000' COMMENT '月流量',\n `trafficLimitStatus` json DEFAULT NULL COMMENT '流量限制状态',\n `totalTraffic` decimal(20,6) unsigned DEFAULT '0.000000' COMMENT '总流量',\n `userPlanId` int(11) unsigned DEFAULT '0' COMMENT '所属套餐ID',\n `lastUserPlanId` int(11) unsigned DEFAULT '0' COMMENT '上一次使用的套餐',\n `uam` json DEFAULT NULL COMMENT 'UAM设置',\n `bandwidthTime` varchar(12) DEFAULT NULL COMMENT '带宽更新时间YYYYMMDDHHII',\n `bandwidthBytes` bigint(20) unsigned DEFAULT '0' COMMENT '最近带宽峰值',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '最近攻击请求数',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '最近总请求数',\n PRIMARY KEY (`id`),\n KEY `userId` (`userId`),\n KEY `adminId` (`adminId`),\n KEY `isUpdating_state` (`state`) USING BTREE,\n KEY `dnsName` (`dnsName`),\n KEY `clusterId` (`clusterId`),\n KEY `isAuditing` (`isAuditing`),\n KEY `webId` (`webId`),\n KEY `userPlanId` (`userPlanId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务'",
"definition": "CREATE TABLE `edgeServers` (\n `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `isOn` tinyint(1) unsigned DEFAULT '1' COMMENT '是否启用',\n `userId` int(11) unsigned DEFAULT '0' COMMENT '用户ID',\n `adminId` int(11) unsigned DEFAULT '0' COMMENT '管理员ID',\n `type` varchar(64) DEFAULT NULL COMMENT '服务类型',\n `name` varchar(255) DEFAULT NULL COMMENT '名称',\n `description` varchar(512) DEFAULT NULL COMMENT '描述',\n `plainServerNames` json DEFAULT NULL COMMENT '扁平化域名列表',\n `serverNames` json DEFAULT NULL COMMENT '域名列表',\n `auditingAt` bigint(11) unsigned DEFAULT '0' COMMENT '审核提交时间',\n `auditingServerNames` json DEFAULT NULL COMMENT '审核中的域名',\n `isAuditing` tinyint(1) unsigned DEFAULT '0' COMMENT '是否正在审核',\n `auditingResult` json DEFAULT NULL COMMENT '审核结果',\n `http` json DEFAULT NULL COMMENT 'HTTP配置',\n `https` json DEFAULT NULL COMMENT 'HTTPS配置',\n `tcp` json DEFAULT NULL COMMENT 'TCP配置',\n `tls` json DEFAULT NULL COMMENT 'TLS配置',\n `unix` json DEFAULT NULL COMMENT 'Unix配置(弃用)',\n `udp` json DEFAULT NULL COMMENT 'UDP配置',\n `webId` int(11) unsigned DEFAULT '0' COMMENT 'WEB配置',\n `reverseProxy` json DEFAULT NULL COMMENT '反向代理配置',\n `groupIds` json DEFAULT NULL COMMENT '分组ID列表',\n `config` json DEFAULT NULL COMMENT '服务配置,自动生成',\n `configMd5` varchar(32) DEFAULT NULL COMMENT 'Md5',\n `clusterId` int(11) unsigned DEFAULT '0' COMMENT '集群ID',\n `includeNodes` json DEFAULT NULL COMMENT '部署条件',\n `excludeNodes` json DEFAULT NULL COMMENT '节点排除条件',\n `version` int(11) unsigned DEFAULT '0' COMMENT '版本号',\n `createdAt` bigint(11) unsigned DEFAULT '0' COMMENT '创建时间',\n `state` tinyint(1) unsigned DEFAULT '1' COMMENT '状态',\n `dnsName` varchar(255) DEFAULT NULL COMMENT 'DNS名称',\n `tcpPorts` json DEFAULT NULL COMMENT '所包含TCP端口',\n `udpPorts` json DEFAULT NULL COMMENT '所包含UDP端口',\n `supportCNAME` tinyint(1) unsigned DEFAULT '0' COMMENT '允许CNAME不在域名名单',\n `trafficLimit` json DEFAULT NULL COMMENT '流量限制',\n `trafficDay` varchar(8) DEFAULT NULL COMMENT 'YYYYMMDD',\n `trafficMonth` varchar(6) DEFAULT NULL COMMENT 'YYYYMM',\n `totalDailyTraffic` decimal(20,6) unsigned DEFAULT '0.000000' COMMENT '日流量',\n `totalMonthlyTraffic` decimal(20,6) unsigned DEFAULT '0.000000' COMMENT '月流量',\n `trafficLimitStatus` json DEFAULT NULL COMMENT '流量限制状态',\n `totalTraffic` decimal(20,6) unsigned DEFAULT '0.000000' COMMENT '总流量',\n `userPlanId` int(11) unsigned DEFAULT '0' COMMENT '所属套餐ID',\n `lastUserPlanId` int(11) unsigned DEFAULT '0' COMMENT '上一次使用的套餐',\n `uam` json DEFAULT NULL COMMENT 'UAM设置',\n `bandwidthTime` varchar(12) DEFAULT NULL COMMENT '带宽更新时间YYYYMMDDHHII',\n `bandwidthBytes` bigint(20) unsigned DEFAULT '0' COMMENT '最近带宽峰值',\n `countAttackRequests` bigint(20) unsigned DEFAULT '0' COMMENT '最近攻击请求数',\n `countRequests` bigint(20) unsigned DEFAULT '0' COMMENT '最近总请求数',\n PRIMARY KEY (`id`),\n KEY `userId` (`userId`),\n KEY `adminId` (`adminId`),\n KEY `isUpdating_state` (`state`) USING BTREE,\n KEY `dnsName` (`dnsName`),\n KEY `clusterId` (`clusterId`),\n KEY `isAuditing` (`isAuditing`),\n KEY `webId` (`webId`),\n KEY `userPlanId` (`userPlanId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务'",
"fields": [
{
"name": "id",
@@ -243347,7 +243455,7 @@
},
{
"name": "unix",
"definition": "json COMMENT 'Unix配置'"
"definition": "json COMMENT 'Unix配置(弃用)'"
},
{
"name": "udp",

View File

@@ -6,7 +6,6 @@ import (
"github.com/TeaOSLab/EdgeAPI/internal/db/models"
"github.com/TeaOSLab/EdgeAPI/internal/db/models/stats"
"github.com/TeaOSLab/EdgeAPI/internal/errors"
"github.com/TeaOSLab/EdgeAPI/internal/utils"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/firewallconfigs"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared"
@@ -17,7 +16,6 @@ import (
"github.com/iwind/TeaGo/maps"
"github.com/iwind/TeaGo/rands"
"github.com/iwind/TeaGo/types"
stringutil "github.com/iwind/TeaGo/utils/string"
"strconv"
"strings"
)
@@ -117,10 +115,10 @@ func UpgradeSQLData(db *dbs.DB) error {
if err != nil {
return err
}
versionString := types.String(version)
var versionString = types.String(version)
if len(versionString) > 0 {
for _, f := range upgradeFuncs {
if stringutil.VersionCompare(versionString, f.version) >= 0 {
if CompareVersion(versionString, f.version) >= 0 {
continue
}
err = f.f(db)
@@ -263,20 +261,6 @@ func upgradeV0_0_9(db *dbs.DB) error {
// v0.0.10
func upgradeV0_0_10(db *dbs.DB) error {
// IP Item列表转换
ones, _, err := db.FindOnes("SELECT * FROM edgeIPItems ORDER BY id ASC")
if err != nil {
return err
}
for _, one := range ones {
ipFromLong := utils.IP2Long(one.GetString("ipFrom"))
ipToLong := utils.IP2Long(one.GetString("ipTo"))
_, err = db.Exec("UPDATE edgeIPItems SET ipFromLong=?, ipToLong=? WHERE id=?", ipFromLong, ipToLong, one.GetInt64("id"))
if err != nil {
return err
}
}
return nil
}
@@ -528,7 +512,7 @@ func upgradeV0_3_7(db *dbs.DB) error {
// v0.4.0
func upgradeV0_4_0(db *dbs.DB) error {
// 升级SYN Flood配置
synFloodJSON, err := json.Marshal(firewallconfigs.DefaultSYNFloodConfig())
synFloodJSON, err := json.Marshal(firewallconfigs.NewSYNFloodConfig())
if err == nil {
_, err := db.Exec("UPDATE edgeHTTPFirewallPolicies SET synFlood=? WHERE synFlood IS NULL AND state=1", string(synFloodJSON))
if err != nil {

View File

@@ -4,17 +4,31 @@ package setup
import (
teaconst "github.com/TeaOSLab/EdgeAPI/internal/const"
"github.com/iwind/TeaGo/types"
stringutil "github.com/iwind/TeaGo/utils/string"
"strings"
)
// ComposeSQLVersion 组合SQL的版本号
func ComposeSQLVersion() string {
var version = teaconst.Version
if len(teaconst.SQLVersion) == 0 {
return version
return teaconst.Version
}
// CompareVersion 对比版本
func CompareVersion(version1 string, version2 string) int8 {
if len(version1) == 0 || len(version2) == 0 {
return 0
}
if strings.Count(version, ".") <= 2 {
return version + "." + teaconst.SQLVersion
return stringutil.VersionCompare(fixVersion(version1), fixVersion(version2))
}
func fixVersion(version string) string {
var pieces = strings.Split(version, ".")
var lastPiece = types.Int(pieces[len(pieces)-1])
if lastPiece > 10 {
// 这个是以前使用的SQL版本号我们给去掉
version = strings.Join(pieces[:len(pieces)-1], ".")
}
return version
}

View File

@@ -4,9 +4,20 @@ package setup_test
import (
"github.com/TeaOSLab/EdgeAPI/internal/setup"
"github.com/iwind/TeaGo/assert"
"testing"
)
func TestComposeSQLVersion(t *testing.T) {
t.Log(setup.ComposeSQLVersion())
}
func TestCompareVersion(t *testing.T) {
var a = assert.NewAssertion(t)
a.IsTrue(setup.CompareVersion("1.3.4", "1.3.4") == 0)
a.IsTrue(setup.CompareVersion("1.3.4", "1.3.3") > 0)
a.IsTrue(setup.CompareVersion("1.3.4", "1.3.5") < 0)
a.IsTrue(setup.CompareVersion("1.3.4.3", "1.3.4.12") > 0) // because 12 > 10
a.IsTrue(setup.CompareVersion("1.3.4.3", "1.3.4.2") > 0)
a.IsTrue(setup.CompareVersion("1.3.4.3", "1.3.4.4") < 0)
}

View File

@@ -7,8 +7,8 @@ import (
"github.com/TeaOSLab/EdgeAPI/internal/dnsclients"
"github.com/TeaOSLab/EdgeAPI/internal/dnsclients/dnstypes"
"github.com/TeaOSLab/EdgeAPI/internal/goman"
"github.com/TeaOSLab/EdgeAPI/internal/utils"
"github.com/TeaOSLab/EdgeCommon/pkg/dnsconfigs"
"github.com/TeaOSLab/EdgeCommon/pkg/iputils"
"github.com/TeaOSLab/EdgeCommon/pkg/nodeconfigs"
"github.com/iwind/TeaGo/dbs"
"github.com/iwind/TeaGo/lists"
@@ -434,7 +434,7 @@ func (this *DNSTaskExecutor) doCluster(taskId int64, taskVersion int64, clusterI
}
var recordType = dnstypes.RecordTypeA
if utils.IsIPv6(ip) {
if iputils.IsIPv6(ip) {
recordType = dnstypes.RecordTypeAAAA
}

View File

@@ -7,8 +7,8 @@ import (
teaconst "github.com/TeaOSLab/EdgeAPI/internal/const"
"github.com/TeaOSLab/EdgeAPI/internal/db/models"
"github.com/TeaOSLab/EdgeAPI/internal/errors"
"github.com/TeaOSLab/EdgeAPI/internal/utils"
"github.com/TeaOSLab/EdgeCommon/pkg/configutils"
"github.com/TeaOSLab/EdgeCommon/pkg/iputils"
"github.com/TeaOSLab/EdgeCommon/pkg/nodeconfigs"
"github.com/TeaOSLab/EdgeCommon/pkg/nodeutils"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
@@ -259,7 +259,7 @@ func (this *HealthCheckExecutor) runNode(healthCheckConfig *serverconfigs.Health
// 检查单个节点
func (this *HealthCheckExecutor) runNodeOnce(healthCheckConfig *serverconfigs.HealthCheckConfig, result *HealthCheckResult) error {
// 支持IPv6
if utils.IsIPv6(result.NodeAddr) {
if iputils.IsIPv6(result.NodeAddr) {
result.NodeAddr = configutils.QuoteIP(result.NodeAddr)
}

View File

@@ -161,7 +161,7 @@ func (this *NodeMonitorTask) MonitorCluster(cluster *models.NodeCluster) error {
}
}
// 检查CPU、内存、盘不足节点
// 检查CPU、内存、盘不足节点
// TODO 需要实现
return nil

View File

@@ -55,17 +55,19 @@ func (this *List) Add(itemId uint64, expiresAt int64) {
if oldExpiresAt == expiresAt {
return
}
delete(this.expireMap, oldExpiresAt)
delete(this.expireMap[oldExpiresAt], itemId)
if len(this.expireMap[oldExpiresAt]) == 0 {
delete(this.expireMap, oldExpiresAt)
}
}
expireItemMap, ok := this.expireMap[expiresAt]
if ok {
expireItemMap[itemId] = zero.New()
} else {
expireItemMap = ItemMap{
this.expireMap[expiresAt] = ItemMap{
itemId: zero.New(),
}
this.expireMap[expiresAt] = expireItemMap
}
this.itemsMap[itemId] = expiresAt

View File

@@ -1,31 +0,0 @@
package utils
import (
"encoding/binary"
"github.com/cespare/xxhash/v2"
"math"
"net"
"strings"
)
// IP2Long 将IP转换为整型
// 注意IPv6没有顺序
func IP2Long(ip string) uint64 {
if len(ip) == 0 {
return 0
}
s := net.ParseIP(ip)
if len(s) == 0 {
return 0
}
if strings.Contains(ip, ":") {
return math.MaxUint32 + xxhash.Sum64(s)
}
return uint64(binary.BigEndian.Uint32(s.To4()))
}
// IsIPv6 判断是否为IPv6
func IsIPv6(ip string) bool {
return strings.Contains(ip, ":")
}

View File

@@ -1,12 +1,14 @@
package utils
import (
"encoding/binary"
"net"
"strings"
)
// 计算版本代号
// VersionToLong 计算版本代号
func VersionToLong(version string) uint32 {
countDots := strings.Count(version, ".")
var countDots = strings.Count(version, ".")
if countDots == 2 {
version += ".0"
} else if countDots == 1 {
@@ -14,5 +16,9 @@ func VersionToLong(version string) uint32 {
} else if countDots == 0 {
version += ".0.0.0"
}
return uint32(IP2Long(version))
var ip = net.ParseIP(version)
if ip == nil || ip.To4() == nil {
return 0
}
return binary.BigEndian.Uint32(ip.To4())
}