diff --git a/enterprise/v2/monitor/monitor.proto b/enterprise/v2/monitor/monitor.proto new file mode 100644 index 0000000..08f01f8 --- /dev/null +++ b/enterprise/v2/monitor/monitor.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; +package defguard.enterprise.monitor.v2; + +import "google/protobuf/timestamp.proto"; + +enum Direction { + DIRECTION_UNSPECIFIED = 0; + DIRECTION_INBOUND = 1; + DIRECTION_OUTBOUND = 2; +} + +enum Status { + STATUS_UNSPECIFIED = 0; + STATUS_ALLOWED = 1; + STATUS_BLOCKED = 2; +} + +message ConnectionEvent { + google.protobuf.Timestamp timestamp = 1; + Direction direction = 2; + Status status = 3; + // IANA protocol number (e.g. 6 for TCP, 17 for UDP). + uint32 protocol = 4; + // Origin of the traffic. + bytes source_ip_addr = 5; + optional uint32 source_port = 6; + // Target of the traffic. + bytes destination_ip_addr = 7; + optional uint32 destination_port = 8; + // ID of the Defguard ACL rule that matched, or `None` if the default policy applied or the + // traffic is not subject to ACL rules. + optional int64 rule_id = 9; + // Bytes sent by the VPN device. + uint64 upload_bytes = 10; + // Bytes received by the VPN device. + uint64 download_bytes = 11; + // Number of packets of this kind (aggregation). + uint64 count = 12; +} diff --git a/v2/gateway.proto b/v2/gateway.proto index 8b15750..4a3b900 100644 --- a/v2/gateway.proto +++ b/v2/gateway.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package defguard.gateway.v2; import "enterprise/v2/firewall/firewall.proto"; +import "enterprise/v2/monitor/monitor.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; import "v2/common.proto"; @@ -76,6 +77,7 @@ message CoreRequest { oneof payload { PeerStats peer_stats = 2; google.protobuf.Empty config_request = 3; + defguard.enterprise.monitor.v2.ConnectionEvent connection_event = 4; } }