WAF看板增加节点拦截排行和域名拦截排行

This commit is contained in:
GoEdgeLab
2021-10-09 16:01:42 +08:00
parent f54c3b0477
commit cdfc43755c
2 changed files with 321 additions and 46 deletions

View File

@@ -80,6 +80,8 @@ type ComposeFirewallGlobalBoardResponse struct {
HttpFirewallRuleGroups []*ComposeFirewallGlobalBoardResponse_HTTPFirewallRuleGroupStat `protobuf:"bytes,30,rep,name=httpFirewallRuleGroups,proto3" json:"httpFirewallRuleGroups,omitempty"` HttpFirewallRuleGroups []*ComposeFirewallGlobalBoardResponse_HTTPFirewallRuleGroupStat `protobuf:"bytes,30,rep,name=httpFirewallRuleGroups,proto3" json:"httpFirewallRuleGroups,omitempty"`
DailyStats []*ComposeFirewallGlobalBoardResponse_DailyStat `protobuf:"bytes,31,rep,name=dailyStats,proto3" json:"dailyStats,omitempty"` DailyStats []*ComposeFirewallGlobalBoardResponse_DailyStat `protobuf:"bytes,31,rep,name=dailyStats,proto3" json:"dailyStats,omitempty"`
HourlyStats []*ComposeFirewallGlobalBoardResponse_HourlyStat `protobuf:"bytes,32,rep,name=hourlyStats,proto3" json:"hourlyStats,omitempty"` HourlyStats []*ComposeFirewallGlobalBoardResponse_HourlyStat `protobuf:"bytes,32,rep,name=hourlyStats,proto3" json:"hourlyStats,omitempty"`
TopNodeStats []*ComposeFirewallGlobalBoardResponse_NodeStat `protobuf:"bytes,33,rep,name=topNodeStats,proto3" json:"topNodeStats,omitempty"`
TopDomainStats []*ComposeFirewallGlobalBoardResponse_DomainStat `protobuf:"bytes,34,rep,name=topDomainStats,proto3" json:"topDomainStats,omitempty"`
} }
func (x *ComposeFirewallGlobalBoardResponse) Reset() { func (x *ComposeFirewallGlobalBoardResponse) Reset() {
@@ -163,6 +165,20 @@ func (x *ComposeFirewallGlobalBoardResponse) GetHourlyStats() []*ComposeFirewall
return nil return nil
} }
func (x *ComposeFirewallGlobalBoardResponse) GetTopNodeStats() []*ComposeFirewallGlobalBoardResponse_NodeStat {
if x != nil {
return x.TopNodeStats
}
return nil
}
func (x *ComposeFirewallGlobalBoardResponse) GetTopDomainStats() []*ComposeFirewallGlobalBoardResponse_DomainStat {
if x != nil {
return x.TopDomainStats
}
return nil
}
// 发送告警(notify)消息 // 发送告警(notify)消息
type NotifyHTTPFirewallEventRequest struct { type NotifyHTTPFirewallEventRequest struct {
state protoimpl.MessageState state protoimpl.MessageState
@@ -440,6 +456,180 @@ func (x *ComposeFirewallGlobalBoardResponse_DailyStat) GetCountBlocks() int64 {
return 0 return 0
} }
type ComposeFirewallGlobalBoardResponse_NodeStat struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
NodeName string `protobuf:"bytes,2,opt,name=nodeName,proto3" json:"nodeName,omitempty"`
CountRequests int64 `protobuf:"varint,3,opt,name=countRequests,proto3" json:"countRequests,omitempty"`
Bytes int64 `protobuf:"varint,4,opt,name=bytes,proto3" json:"bytes,omitempty"`
CountAttackRequests int64 `protobuf:"varint,6,opt,name=countAttackRequests,proto3" json:"countAttackRequests,omitempty"`
AttackBytes int64 `protobuf:"varint,7,opt,name=attackBytes,proto3" json:"attackBytes,omitempty"`
}
func (x *ComposeFirewallGlobalBoardResponse_NodeStat) Reset() {
*x = ComposeFirewallGlobalBoardResponse_NodeStat{}
if protoimpl.UnsafeEnabled {
mi := &file_service_firewall_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ComposeFirewallGlobalBoardResponse_NodeStat) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ComposeFirewallGlobalBoardResponse_NodeStat) ProtoMessage() {}
func (x *ComposeFirewallGlobalBoardResponse_NodeStat) ProtoReflect() protoreflect.Message {
mi := &file_service_firewall_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ComposeFirewallGlobalBoardResponse_NodeStat.ProtoReflect.Descriptor instead.
func (*ComposeFirewallGlobalBoardResponse_NodeStat) Descriptor() ([]byte, []int) {
return file_service_firewall_proto_rawDescGZIP(), []int{1, 3}
}
func (x *ComposeFirewallGlobalBoardResponse_NodeStat) GetNodeId() int64 {
if x != nil {
return x.NodeId
}
return 0
}
func (x *ComposeFirewallGlobalBoardResponse_NodeStat) GetNodeName() string {
if x != nil {
return x.NodeName
}
return ""
}
func (x *ComposeFirewallGlobalBoardResponse_NodeStat) GetCountRequests() int64 {
if x != nil {
return x.CountRequests
}
return 0
}
func (x *ComposeFirewallGlobalBoardResponse_NodeStat) GetBytes() int64 {
if x != nil {
return x.Bytes
}
return 0
}
func (x *ComposeFirewallGlobalBoardResponse_NodeStat) GetCountAttackRequests() int64 {
if x != nil {
return x.CountAttackRequests
}
return 0
}
func (x *ComposeFirewallGlobalBoardResponse_NodeStat) GetAttackBytes() int64 {
if x != nil {
return x.AttackBytes
}
return 0
}
type ComposeFirewallGlobalBoardResponse_DomainStat struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"`
Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
CountRequests int64 `protobuf:"varint,3,opt,name=countRequests,proto3" json:"countRequests,omitempty"`
Bytes int64 `protobuf:"varint,4,opt,name=bytes,proto3" json:"bytes,omitempty"`
CountAttackRequests int64 `protobuf:"varint,6,opt,name=countAttackRequests,proto3" json:"countAttackRequests,omitempty"`
AttackBytes int64 `protobuf:"varint,7,opt,name=attackBytes,proto3" json:"attackBytes,omitempty"`
}
func (x *ComposeFirewallGlobalBoardResponse_DomainStat) Reset() {
*x = ComposeFirewallGlobalBoardResponse_DomainStat{}
if protoimpl.UnsafeEnabled {
mi := &file_service_firewall_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ComposeFirewallGlobalBoardResponse_DomainStat) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ComposeFirewallGlobalBoardResponse_DomainStat) ProtoMessage() {}
func (x *ComposeFirewallGlobalBoardResponse_DomainStat) ProtoReflect() protoreflect.Message {
mi := &file_service_firewall_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ComposeFirewallGlobalBoardResponse_DomainStat.ProtoReflect.Descriptor instead.
func (*ComposeFirewallGlobalBoardResponse_DomainStat) Descriptor() ([]byte, []int) {
return file_service_firewall_proto_rawDescGZIP(), []int{1, 4}
}
func (x *ComposeFirewallGlobalBoardResponse_DomainStat) GetServerId() int64 {
if x != nil {
return x.ServerId
}
return 0
}
func (x *ComposeFirewallGlobalBoardResponse_DomainStat) GetDomain() string {
if x != nil {
return x.Domain
}
return ""
}
func (x *ComposeFirewallGlobalBoardResponse_DomainStat) GetCountRequests() int64 {
if x != nil {
return x.CountRequests
}
return 0
}
func (x *ComposeFirewallGlobalBoardResponse_DomainStat) GetBytes() int64 {
if x != nil {
return x.Bytes
}
return 0
}
func (x *ComposeFirewallGlobalBoardResponse_DomainStat) GetCountAttackRequests() int64 {
if x != nil {
return x.CountAttackRequests
}
return 0
}
func (x *ComposeFirewallGlobalBoardResponse_DomainStat) GetAttackBytes() int64 {
if x != nil {
return x.AttackBytes
}
return 0
}
var File_service_firewall_proto protoreflect.FileDescriptor var File_service_firewall_proto protoreflect.FileDescriptor
var file_service_firewall_proto_rawDesc = []byte{ var file_service_firewall_proto_rawDesc = []byte{
@@ -451,7 +641,7 @@ var file_service_firewall_proto_rawDesc = []byte{
0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x23, 0x0a, 0x21, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x46, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x23, 0x0a, 0x21, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x46,
0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61,
0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x85, 0x07, 0x0a, 0x22, 0x43, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xd9, 0x0b, 0x0a, 0x22, 0x43, 0x6f,
0x6d, 0x70, 0x6f, 0x73, 0x65, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f,
0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x4c, 0x6f, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x4c, 0x6f,
@@ -483,6 +673,17 @@ var file_service_firewall_proto_rawDesc = []byte{
0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72,
0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x6f, 0x75, 0x72, 0x6c, 0x79, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x6f, 0x75, 0x72, 0x6c, 0x79,
0x53, 0x74, 0x61, 0x74, 0x52, 0x0b, 0x68, 0x6f, 0x75, 0x72, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x53, 0x74, 0x61, 0x74, 0x52, 0x0b, 0x68, 0x6f, 0x75, 0x72, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74,
0x73, 0x12, 0x53, 0x0a, 0x0c, 0x74, 0x6f, 0x70, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74,
0x73, 0x18, 0x21, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d,
0x70, 0x6f, 0x73, 0x65, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x62,
0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e,
0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x52, 0x0c, 0x74, 0x6f, 0x70, 0x4e, 0x6f, 0x64,
0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x59, 0x0a, 0x0e, 0x74, 0x6f, 0x70, 0x44, 0x6f, 0x6d,
0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x18, 0x22, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31,
0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x46, 0x69, 0x72, 0x65, 0x77,
0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61,
0x74, 0x52, 0x0e, 0x74, 0x6f, 0x70, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74,
0x73, 0x1a, 0x82, 0x01, 0x0a, 0x19, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x73, 0x1a, 0x82, 0x01, 0x0a, 0x19, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61,
0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x12, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x12,
0x4f, 0x0a, 0x15, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x4f, 0x0a, 0x15, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52,
@@ -508,37 +709,63 @@ var file_service_firewall_proto_rawDesc = []byte{
0x03, 0x52, 0x0c, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x12, 0x03, 0x52, 0x0c, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x12,
0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x04,
0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b,
0x73, 0x22, 0xfe, 0x01, 0x0a, 0x1e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x48, 0x54, 0x54, 0x50, 0x73, 0x1a, 0xce, 0x01, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x12, 0x16,
0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61,
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61,
0x12, 0x32, 0x0a, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65,
0x63, 0x79, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x17, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x30,
0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x0a, 0x13, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71,
0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x63, 0x6f, 0x75,
0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x34, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73,
0x0a, 0x15, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18,
0x6c, 0x65, 0x53, 0x65, 0x74, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x68, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x42, 0x79, 0x74,
0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x65, 0x73, 0x1a, 0xd0, 0x01, 0x0a, 0x0a, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61,
0x65, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20,
0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a,
0x41, 0x74, 0x32, 0xcd, 0x01, 0x0a, 0x0f, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x53, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65,
0x65, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x6f,
0x6f, 0x61, 0x72, 0x64, 0x12, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x62,
0x65, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65,
0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x70, 0x62, 0x73, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b,
0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13,
0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65,
0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x17, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x48, 0x54, 0x54, 0x73, 0x74, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x42, 0x79, 0x74,
0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x22, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6b,
0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0xfe, 0x01, 0x0a, 0x1e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79,
0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x45, 0x76, 0x65, 0x6e,
0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76,
0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76,
0x6f, 0x33, 0x65, 0x72, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65,
0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x03, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x17, 0x68, 0x74, 0x74, 0x70,
0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75,
0x70, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x68, 0x74, 0x74, 0x70, 0x46,
0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70,
0x49, 0x64, 0x12, 0x34, 0x0a, 0x15, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61,
0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28,
0x03, 0x52, 0x15, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52,
0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61,
0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65,
0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x32, 0xcd, 0x01, 0x0a, 0x0f, 0x46, 0x69, 0x72, 0x65, 0x77,
0x61, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x1a, 0x63, 0x6f,
0x6d, 0x70, 0x6f, 0x73, 0x65, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f,
0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x12, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f,
0x6d, 0x70, 0x6f, 0x73, 0x65, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f,
0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x26, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x46, 0x69, 0x72, 0x65,
0x77, 0x61, 0x6c, 0x6c, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x17, 0x6e, 0x6f, 0x74, 0x69, 0x66,
0x79, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x45, 0x76, 0x65,
0x6e, 0x74, 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x48, 0x54,
0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53,
0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@@ -553,7 +780,7 @@ func file_service_firewall_proto_rawDescGZIP() []byte {
return file_service_firewall_proto_rawDescData return file_service_firewall_proto_rawDescData
} }
var file_service_firewall_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_service_firewall_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_service_firewall_proto_goTypes = []interface{}{ var file_service_firewall_proto_goTypes = []interface{}{
(*ComposeFirewallGlobalBoardRequest)(nil), // 0: pb.ComposeFirewallGlobalBoardRequest (*ComposeFirewallGlobalBoardRequest)(nil), // 0: pb.ComposeFirewallGlobalBoardRequest
(*ComposeFirewallGlobalBoardResponse)(nil), // 1: pb.ComposeFirewallGlobalBoardResponse (*ComposeFirewallGlobalBoardResponse)(nil), // 1: pb.ComposeFirewallGlobalBoardResponse
@@ -561,23 +788,27 @@ var file_service_firewall_proto_goTypes = []interface{}{
(*ComposeFirewallGlobalBoardResponse_HTTPFirewallRuleGroupStat)(nil), // 3: pb.ComposeFirewallGlobalBoardResponse.HTTPFirewallRuleGroupStat (*ComposeFirewallGlobalBoardResponse_HTTPFirewallRuleGroupStat)(nil), // 3: pb.ComposeFirewallGlobalBoardResponse.HTTPFirewallRuleGroupStat
(*ComposeFirewallGlobalBoardResponse_HourlyStat)(nil), // 4: pb.ComposeFirewallGlobalBoardResponse.HourlyStat (*ComposeFirewallGlobalBoardResponse_HourlyStat)(nil), // 4: pb.ComposeFirewallGlobalBoardResponse.HourlyStat
(*ComposeFirewallGlobalBoardResponse_DailyStat)(nil), // 5: pb.ComposeFirewallGlobalBoardResponse.DailyStat (*ComposeFirewallGlobalBoardResponse_DailyStat)(nil), // 5: pb.ComposeFirewallGlobalBoardResponse.DailyStat
(*HTTPFirewallRuleGroup)(nil), // 6: pb.HTTPFirewallRuleGroup (*ComposeFirewallGlobalBoardResponse_NodeStat)(nil), // 6: pb.ComposeFirewallGlobalBoardResponse.NodeStat
(*RPCSuccess)(nil), // 7: pb.RPCSuccess (*ComposeFirewallGlobalBoardResponse_DomainStat)(nil), // 7: pb.ComposeFirewallGlobalBoardResponse.DomainStat
(*HTTPFirewallRuleGroup)(nil), // 8: pb.HTTPFirewallRuleGroup
(*RPCSuccess)(nil), // 9: pb.RPCSuccess
} }
var file_service_firewall_proto_depIdxs = []int32{ var file_service_firewall_proto_depIdxs = []int32{
3, // 0: pb.ComposeFirewallGlobalBoardResponse.httpFirewallRuleGroups:type_name -> pb.ComposeFirewallGlobalBoardResponse.HTTPFirewallRuleGroupStat 3, // 0: pb.ComposeFirewallGlobalBoardResponse.httpFirewallRuleGroups:type_name -> pb.ComposeFirewallGlobalBoardResponse.HTTPFirewallRuleGroupStat
5, // 1: pb.ComposeFirewallGlobalBoardResponse.dailyStats:type_name -> pb.ComposeFirewallGlobalBoardResponse.DailyStat 5, // 1: pb.ComposeFirewallGlobalBoardResponse.dailyStats:type_name -> pb.ComposeFirewallGlobalBoardResponse.DailyStat
4, // 2: pb.ComposeFirewallGlobalBoardResponse.hourlyStats:type_name -> pb.ComposeFirewallGlobalBoardResponse.HourlyStat 4, // 2: pb.ComposeFirewallGlobalBoardResponse.hourlyStats:type_name -> pb.ComposeFirewallGlobalBoardResponse.HourlyStat
6, // 3: pb.ComposeFirewallGlobalBoardResponse.HTTPFirewallRuleGroupStat.httpFirewallRuleGroup:type_name -> pb.HTTPFirewallRuleGroup 6, // 3: pb.ComposeFirewallGlobalBoardResponse.topNodeStats:type_name -> pb.ComposeFirewallGlobalBoardResponse.NodeStat
0, // 4: pb.FirewallService.composeFirewallGlobalBoard:input_type -> pb.ComposeFirewallGlobalBoardRequest 7, // 4: pb.ComposeFirewallGlobalBoardResponse.topDomainStats:type_name -> pb.ComposeFirewallGlobalBoardResponse.DomainStat
2, // 5: pb.FirewallService.notifyHTTPFirewallEvent:input_type -> pb.NotifyHTTPFirewallEventRequest 8, // 5: pb.ComposeFirewallGlobalBoardResponse.HTTPFirewallRuleGroupStat.httpFirewallRuleGroup:type_name -> pb.HTTPFirewallRuleGroup
1, // 6: pb.FirewallService.composeFirewallGlobalBoard:output_type -> pb.ComposeFirewallGlobalBoardResponse 0, // 6: pb.FirewallService.composeFirewallGlobalBoard:input_type -> pb.ComposeFirewallGlobalBoardRequest
7, // 7: pb.FirewallService.notifyHTTPFirewallEvent:output_type -> pb.RPCSuccess 2, // 7: pb.FirewallService.notifyHTTPFirewallEvent:input_type -> pb.NotifyHTTPFirewallEventRequest
6, // [6:8] is the sub-list for method output_type 1, // 8: pb.FirewallService.composeFirewallGlobalBoard:output_type -> pb.ComposeFirewallGlobalBoardResponse
4, // [4:6] is the sub-list for method input_type 9, // 9: pb.FirewallService.notifyHTTPFirewallEvent:output_type -> pb.RPCSuccess
4, // [4:4] is the sub-list for extension type_name 8, // [8:10] is the sub-list for method output_type
4, // [4:4] is the sub-list for extension extendee 6, // [6:8] is the sub-list for method input_type
0, // [0:4] is the sub-list for field type_name 6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
} }
func init() { file_service_firewall_proto_init() } func init() { file_service_firewall_proto_init() }
@@ -660,6 +891,30 @@ func file_service_firewall_proto_init() {
return nil return nil
} }
} }
file_service_firewall_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ComposeFirewallGlobalBoardResponse_NodeStat); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_firewall_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ComposeFirewallGlobalBoardResponse_DomainStat); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
} }
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
@@ -667,7 +922,7 @@ func file_service_firewall_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_firewall_proto_rawDesc, RawDescriptor: file_service_firewall_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 6, NumMessages: 8,
NumExtensions: 0, NumExtensions: 0,
NumServices: 1, NumServices: 1,
}, },

View File

@@ -29,6 +29,8 @@ message ComposeFirewallGlobalBoardResponse {
repeated HTTPFirewallRuleGroupStat httpFirewallRuleGroups = 30; repeated HTTPFirewallRuleGroupStat httpFirewallRuleGroups = 30;
repeated DailyStat dailyStats = 31; repeated DailyStat dailyStats = 31;
repeated HourlyStat hourlyStats = 32; repeated HourlyStat hourlyStats = 32;
repeated NodeStat topNodeStats = 33;
repeated DomainStat topDomainStats = 34;
message HTTPFirewallRuleGroupStat { message HTTPFirewallRuleGroupStat {
HTTPFirewallRuleGroup httpFirewallRuleGroup = 1; HTTPFirewallRuleGroup httpFirewallRuleGroup = 1;
@@ -48,6 +50,24 @@ message ComposeFirewallGlobalBoardResponse {
int64 countCaptcha = 3; int64 countCaptcha = 3;
int64 countBlocks = 4; int64 countBlocks = 4;
} }
message NodeStat {
int64 nodeId = 1;
string nodeName = 2;
int64 countRequests = 3;
int64 bytes = 4;
int64 countAttackRequests = 6;
int64 attackBytes = 7;
}
message DomainStat {
int64 serverId = 1;
string domain = 2;
int64 countRequests = 3;
int64 bytes = 4;
int64 countAttackRequests = 6;
int64 attackBytes = 7;
}
} }
// 发送告警(notify)消息 // 发送告警(notify)消息