From de53544d423f32678e18341107071b1c92e1aca7 Mon Sep 17 00:00:00 2001 From: vgilc Date: Wed, 8 Feb 2012 10:25:57 +0000 Subject: [PATCH] 2012-02-08 Vanessa Gil * pandoradb.sql pandoradb.postgreSQL.sql pandoradb.oracle.sql extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql: Added 'criticity_alert' to tevento table. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5515 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 9 +++++++++ .../extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql | 2 +- .../extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql | 1 + .../extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql | 1 + pandora_console/pandoradb.oracle.sql | 1 + pandora_console/pandoradb.postgreSQL.sql | 3 ++- pandora_console/pandoradb.sql | 1 + 7 files changed, 16 insertions(+), 2 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index c86f7b274d..9f65034661 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,12 @@ +2012-02-08 Vanessa Gil + * pandoradb.sql + pandoradb.postgreSQL.sql + pandoradb.oracle.sql + extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql + extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql + extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql: Added 'criticity_alert' + to tevento table. + 2012-02-08 Vanessa Gil * godmode/events/custom_events.php: Remove comments. diff --git a/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql b/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql index 3b0c5ee433..103980236c 100644 --- a/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql @@ -101,7 +101,7 @@ ON DELETE CASCADE; -- ----------------------------------------------------- ALTER TABLE `tevento` ADD COLUMN (`source` tinytext NOT NULL DEFAULT '', -`id_extra` tinytext NOT NULL DEFAULT ''); +`id_extra` tinytext NOT NULL DEFAULT '', `criticity_alert` int(4) unsigned NOT NULL default '0'); -- ----------------------------------------------------- -- Table `talert_snmp` diff --git a/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql b/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql index 16ea56ca22..ae120810c7 100644 --- a/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql +++ b/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql @@ -108,6 +108,7 @@ references tplanned_downtime (id); alter table tevento add (source VARCHAR2(100) default '' NOT NULL); alter table tevento add (id_extra VARCHAR2(100) default '' NOT NULL); +alter table tevento add (criticity_alert NUMBER(10, 0) default 0 NOT NULL); -- ----------------------------------------------------- -- Table `talert_snmp` diff --git a/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql b/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql index 48abddee6e..e1f2e90047 100644 --- a/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql +++ b/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql @@ -93,6 +93,7 @@ REFERENCES "tplanned_downtime"("id"); ALTER TABLE "tevento" ADD COLUMN "source" text NULL default ''; ALTER TABLE "tevento" ADD COLUMN "id_extra" text NULL default ''; +ALTER TABLE "tevento" ADD COLUMN "criticity" INTEGER NOT NULL default 0; -- ----------------------------------------------------- -- Table `talert_snmp` diff --git a/pandora_console/pandoradb.oracle.sql b/pandora_console/pandoradb.oracle.sql index 91fadbbc2b..6fe3940501 100644 --- a/pandora_console/pandoradb.oracle.sql +++ b/pandora_console/pandoradb.oracle.sql @@ -513,6 +513,7 @@ CREATE TABLE tevento ( tags CLOB, source VARCHAR2(100) default '' NOT NULL, id_extra VARCHAR2(100) default '' NOT NULL, + criticity_alert NUMBER(10, 0) default 0 NOT NULL, CONSTRAINT tevento_event_type_cons CHECK (event_type IN ('unknown','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_down_normal','going_down_critical','going_up_normal', 'configuration_change')) ); CREATE INDEX tevento_id_1_idx ON tevento(id_agente, id_evento); diff --git a/pandora_console/pandoradb.postgreSQL.sql b/pandora_console/pandoradb.postgreSQL.sql index 759e335e2b..3dd327de5f 100644 --- a/pandora_console/pandoradb.postgreSQL.sql +++ b/pandora_console/pandoradb.postgreSQL.sql @@ -404,7 +404,8 @@ CREATE TABLE "tevento" ( "user_comment" text NOT NULL, "tags" text NOT NULL, "source" text NOT NULL default '', - "id_extra" text NOT NULL default '' + "id_extra" text NOT NULL default '', + "criticity_alert" INTEGER NOT NULL default 0 ); CREATE INDEX "tevento_id_1_idx" ON "tevento"("id_agente", "id_evento"); CREATE INDEX "tevento_id_2_idx" ON "tevento"("utimestamp", "id_evento"); diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index bd373609ba..c7c15fc67c 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -449,6 +449,7 @@ CREATE TABLE IF NOT EXISTS `tevento` ( `tags` text NOT NULL, `source` tinytext NOT NULL default '', `id_extra` tinytext NOT NULL default '', + `criticity_alert` int(4) unsigned NOT NULL default '0', PRIMARY KEY (`id_evento`), KEY `indice_1` (`id_agente`,`id_evento`), KEY `indice_2` (`utimestamp`,`id_evento`),