|
|
@ -120,9 +120,34 @@ INSERT INTO ct_event (event_id,event_name) VALUES |
|
|
-- |
|
|
-- |
|
|
|
|
|
|
|
|
CREATE OR REPLACE VIEW view_log AS |
|
|
CREATE OR REPLACE VIEW view_log AS |
|
|
SELECT * FROM ct_logs |
|
|
SELECT |
|
|
INNER JOIN ip_proto ON ct_logs.orig_ip_protocol = ip_proto.proto_id |
|
|
ct_id, |
|
|
INNER JOIN ct_event ON ct_logs.ct_event = ct_event.event_id; |
|
|
flow_start, |
|
|
|
|
|
flow_end, |
|
|
|
|
|
orig_ip_saddr_str as origin_ip_saddr, |
|
|
|
|
|
orig_ip_daddr_str as origin_ip_daddr, |
|
|
|
|
|
orig_ip_protocol, |
|
|
|
|
|
ip_proto1.proto_name as orig_ip_proto_name, |
|
|
|
|
|
orig_l4_sport, |
|
|
|
|
|
orig_l4_dport, |
|
|
|
|
|
orig_raw_pktlen as orig_bytes, |
|
|
|
|
|
orig_raw_pktcount as orig_pktcount, |
|
|
|
|
|
reply_ip_saddr_str as replyin_ip_saddr, |
|
|
|
|
|
reply_ip_daddr_str as replyin_ip_daddr, |
|
|
|
|
|
reply_ip_protocol, |
|
|
|
|
|
ip_proto2.proto_name as reply_ip_proto_name, |
|
|
|
|
|
reply_l4_sport, |
|
|
|
|
|
reply_l4_dport, |
|
|
|
|
|
reply_raw_pktlen as reply_bytes, |
|
|
|
|
|
reply_raw_pktcount as reply_pktcount, |
|
|
|
|
|
icmp_code, |
|
|
|
|
|
icmp_type, |
|
|
|
|
|
ct_event, |
|
|
|
|
|
event_name |
|
|
|
|
|
FROM ct_logs |
|
|
|
|
|
LEFT JOIN ip_proto ip_proto1 ON ct_logs.orig_ip_protocol = ip_proto1.proto_id |
|
|
|
|
|
LEFT JOIN ip_proto ip_proto2 ON ct_logs.reply_ip_protocol = ip_proto2.proto_id |
|
|
|
|
|
LEFT JOIN ct_event ON ct_logs.ct_event = ct_event.event_id; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- |
|
|
-- |
|
|
|