diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 0216e0ae4a..2ed2f5386b 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,6 @@ +2012-01-02 Vanessa Gil + * pandoradb.oracle.sql: Added netflow tables. + 2012-01-02 Vanessa Gil * operation/netflow/nf_view.php include/functions_graph.php diff --git a/pandora_console/pandoradb.oracle.sql b/pandora_console/pandoradb.oracle.sql index 7f19208ebe..f59364dadc 100644 --- a/pandora_console/pandoradb.oracle.sql +++ b/pandora_console/pandoradb.oracle.sql @@ -1474,3 +1474,56 @@ CREATE TABLE ttag_event ( ); CREATE INDEX ttag_event_id_evento_idx ON ttag_event(id_evento); + +-- ----------------------------------------------------- +-- Table "tnetflow_filter" +-- ----------------------------------------------------- + +CREATE TABLE tnetflow_filter ( +id_sg NUMBER(10, 0) NOT NULL PRIMARY KEY, +id_name VARCHAR2(100) NOT NULL, +"group" VARCHAR2(50), +ip_dst VARCHAR2(100), +ip_src VARCHAR2(100), +dst_port VARCHAR2(100), +src_port VARCHAR2(100), +aggregate VARCHAR2(60), +show_packets NUMBER(1, 0) default 0, +show_bytes NUMBER(1, 0) default 0, +show_bps NUMBER(1, 0) default 0, +show_bpp NUMBER(1, 0) default 0 +); + +CREATE SEQUENCE tnetflow_filter_s INCREMENT BY 1 START WITH 1; +CREATE OR REPLACE TRIGGER tnetflow_filter_inc BEFORE INSERT ON tnetflow_filter REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT tnetflow_filter_s.nextval INTO :NEW.ID_SG FROM dual; END tnetflow_filter_inc;; + +-- ----------------------------------------------------- +-- Table "tnetflow_report" +-- ----------------------------------------------------- + +CREATE TABLE tnetflow_report ( +id_report NUMBER(10, 0) NOT NULL PRIMARY KEY, +id_name VARCHAR2(100) NOT NULL, +description CLOB default '', +"group" VARCHAR2(50) +); + +CREATE SEQUENCE tnetflow_report_s INCREMENT BY 1 START WITH 1; +CREATE OR REPLACE TRIGGER tnetflow_report_inc BEFORE INSERT ON tnetflow_report REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT tnetflow_report_s.nextval INTO :NEW.ID_REPORT FROM dual; END tnetflow_report_inc;; + +-- ----------------------------------------------------- +-- Table "tnetflow_report_content" +-- ----------------------------------------------------- + +CREATE TABLE tnetflow_report_content ( +id_rc NUMBER(10, 0) NOT NULL PRIMARY KEY, +id_report NUMBER(10, 0) NOT NULL REFERENCES tnetflow_report(id_report) ON DELETE CASCADE, +id_filter VARCHAR2(100), +"date" NUMBER(20, 0) default 0 NOT NULL, +period NUMBER(11, 0) default 0 NOT NULL, +max NUMBER(11, 0) default 0 NOT NULL, +show_graph VARCHAR2(60) +); + +CREATE SEQUENCE tnetflow_report_content_s INCREMENT BY 1 START WITH 1; +CREATE OR REPLACE TRIGGER tnetflow_report_content_inc BEFORE INSERT ON tnetflow_report_content REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT tnetflow_report_content_s.nextval INTO :NEW.ID_RC FROM dual; END tnetflow_report_content_inc;;