mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-29 14:26:35 +08:00
定义WAF统计数据接口
This commit is contained in:
@@ -388,11 +388,13 @@ message UpdateEnabledUserServerBasicRequest {
|
||||
|
||||
// 上传HTTP请求待统计数据
|
||||
message UploadServerHTTPRequestStatRequest {
|
||||
string month = 1; // 这里使用了全局的月份,为了性能起见,不需要一定精确
|
||||
repeated RegionCity regionCities = 2;
|
||||
repeated RegionProvider regionProviders = 3;
|
||||
repeated System systems = 4;
|
||||
repeated Browser browsers = 5;
|
||||
string month = 1;
|
||||
string day = 2;
|
||||
repeated RegionCity regionCities = 3;
|
||||
repeated RegionProvider regionProviders = 4;
|
||||
repeated System systems = 5;
|
||||
repeated Browser browsers = 6;
|
||||
repeated HTTPFirewallRuleGroup httpFirewallRuleGroups = 7;
|
||||
|
||||
message RegionCity {
|
||||
int64 serverId = 1;
|
||||
@@ -421,4 +423,11 @@ message UploadServerHTTPRequestStatRequest {
|
||||
string version = 3;
|
||||
int64 count = 4;
|
||||
}
|
||||
|
||||
message HTTPFirewallRuleGroup {
|
||||
int64 serverId = 1;
|
||||
int64 httpFirewallRuleGroupId = 2;
|
||||
string action = 3;
|
||||
int64 count = 4;
|
||||
}
|
||||
}
|
||||
43
pkg/rpc/protos/service_server_http_firewall_daily_stat.proto
Normal file
43
pkg/rpc/protos/service_server_http_firewall_daily_stat.proto
Normal file
@@ -0,0 +1,43 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
import "models/model_http_firewall_rule_group.proto";
|
||||
|
||||
// WAF统计
|
||||
service ServerHTTPFirewallDailyStatService {
|
||||
// 组合Dashboard
|
||||
rpc composeServerHTTPFirewallDashboard (ComposeServerHTTPFirewallDashboardRequest) returns (ComposeServerHTTPFirewallDashboardResponse);
|
||||
}
|
||||
|
||||
// 组合Dashboard
|
||||
message ComposeServerHTTPFirewallDashboardRequest {
|
||||
string day = 1;
|
||||
int64 userId = 2;
|
||||
int64 serverId = 3;
|
||||
}
|
||||
|
||||
message ComposeServerHTTPFirewallDashboardResponse {
|
||||
int64 countDailyLog = 1;
|
||||
int64 countDailyBlock = 2;
|
||||
int64 countDailyCaptcha = 3;
|
||||
int64 countWeeklyBlock = 4;
|
||||
int64 countMonthlyBlock = 5;
|
||||
|
||||
repeated HTTPFirewallRuleGroupStat httpFirewallRuleGroups = 30;
|
||||
repeated DailyStat logDailyStats = 31;
|
||||
repeated DailyStat blockDailyStats = 32;
|
||||
repeated DailyStat captchaDailyStats = 33;
|
||||
|
||||
message HTTPFirewallRuleGroupStat {
|
||||
HTTPFirewallRuleGroup httpFirewallRuleGroup = 1;
|
||||
int64 count = 2;
|
||||
}
|
||||
|
||||
message DailyStat {
|
||||
string day = 1;
|
||||
int64 count = 2;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user