diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 3e08dd0aec..da1c6d4487 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,14 @@ +2014-03-19 Vanessa Gil + + * pandoradb.oracle.sql + pandoradb.postgreSQL.sql + pandoradb.sql + extras/pandoradb_migrate_5.0_to_5.1.mysql.sql + extras/pandoradb_migrate_5.0_to_5.1.oracle.sql + extras/pandoradb_migrate_5.0_to_5.1.postgreSQL.sql + godmode/snmpconsole/snmp_alert.php: Add variables to + SNMP Traps. + 2014-03-19 Miguel de Dios * operation/snmpconsole/snmp_view.php, diff --git a/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql b/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql index 6782f554dc..884d2c1902 100644 --- a/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql @@ -62,3 +62,17 @@ CREATE TABLE IF NOT EXISTS `tmodule_relationship` ( -- Table `talert_snmp` -- --------------------------------------------------------------------- ALTER TABLE `talert_snmp` ADD COLUMN `id_group` int(10) unsigned NOT NULL default '0'; + +-- --------------------------------------------------------------------- +-- Table `talert_snmp` +-- --------------------------------------------------------------------- +ALTER TABLE `talert_snmp` ADD COLUMN `_snmp_f11_` text; +ALTER TABLE `talert_snmp` ADD COLUMN `_snmp_f12_` text; +ALTER TABLE `talert_snmp` ADD COLUMN `_snmp_f13_` text; +ALTER TABLE `talert_snmp` ADD COLUMN `_snmp_f14_` text; +ALTER TABLE `talert_snmp` ADD COLUMN `_snmp_f15_` text; +ALTER TABLE `talert_snmp` ADD COLUMN `_snmp_f16_` text; +ALTER TABLE `talert_snmp` ADD COLUMN `_snmp_f17_` text; +ALTER TABLE `talert_snmp` ADD COLUMN `_snmp_f18_` text; +ALTER TABLE `talert_snmp` ADD COLUMN `_snmp_f19_` text; +ALTER TABLE `talert_snmp` ADD COLUMN `_snmp_f20_` text; diff --git a/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql b/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql index 8faeb2b47b..7f18eae8f6 100644 --- a/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql +++ b/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql @@ -52,3 +52,17 @@ CREATE OR REPLACE TRIGGER tmodule_relationship_inc BEFORE INSERT ON tmodule_rela -- Table `talert_snmp` -- --------------------------------------------------------------------- ALTER TABLE talert_snmp ADD (id_group NUMBER(10, 0) default 0 NOT NULL); + +-- --------------------------------------------------------------------- +-- Table `talert_snmp` +-- --------------------------------------------------------------------- +ALTER TABLE talert_snmp ADD (_snmp_f11_ CLOB default ''); +ALTER TABLE talert_snmp ADD (_snmp_f12_ CLOB default ''); +ALTER TABLE talert_snmp ADD (_snmp_f13_ CLOB default ''); +ALTER TABLE talert_snmp ADD (_snmp_f14_ CLOB default ''); +ALTER TABLE talert_snmp ADD (_snmp_f15_ CLOB default ''); +ALTER TABLE talert_snmp ADD (_snmp_f16_ CLOB default ''); +ALTER TABLE talert_snmp ADD (_snmp_f17_ CLOB default ''); +ALTER TABLE talert_snmp ADD (_snmp_f18_ CLOB default ''); +ALTER TABLE talert_snmp ADD (_snmp_f19_ CLOB default ''); +ALTER TABLE talert_snmp ADD (_snmp_f20_ CLOB default ''); diff --git a/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql b/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql index b279b74d42..deb1ae6b3f 100644 --- a/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql +++ b/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql @@ -49,3 +49,17 @@ CREATE TABLE "tmodule_relationship" ( -- Table "talert_snmp" -- --------------------------------------------------------------------- ALTER TABLE "talert_snmp" ADD COLUMN "id_group" INTEGER NOT NULL default 0; + +-- --------------------------------------------------------------------- +-- Table "talert_snmp" +-- --------------------------------------------------------------------- +ALTER TABLE "talert_snmp" ADD COLUMN "_snmp_f11_" text DEFAULT ''; +ALTER TABLE "talert_snmp" ADD COLUMN "_snmp_f12_" text DEFAULT ''; +ALTER TABLE "talert_snmp" ADD COLUMN "_snmp_f13_" text DEFAULT ''; +ALTER TABLE "talert_snmp" ADD COLUMN "_snmp_f14_" text DEFAULT ''; +ALTER TABLE "talert_snmp" ADD COLUMN "_snmp_f15_" text DEFAULT ''; +ALTER TABLE "talert_snmp" ADD COLUMN "_snmp_f16_" text DEFAULT ''; +ALTER TABLE "talert_snmp" ADD COLUMN "_snmp_f17_" text DEFAULT ''; +ALTER TABLE "talert_snmp" ADD COLUMN "_snmp_f18_" text DEFAULT ''; +ALTER TABLE "talert_snmp" ADD COLUMN "_snmp_f19_" text DEFAULT ''; +ALTER TABLE "talert_snmp" ADD COLUMN "_snmp_f20_" text DEFAULT ''; diff --git a/pandora_console/godmode/snmpconsole/snmp_alert.php b/pandora_console/godmode/snmpconsole/snmp_alert.php index 3568cacc32..93576bdb0e 100644 --- a/pandora_console/godmode/snmpconsole/snmp_alert.php +++ b/pandora_console/godmode/snmpconsole/snmp_alert.php @@ -88,6 +88,16 @@ if ($save_alert || $modify_alert) { $custom_oid_data_8 = (string) get_parameter ("custom_oid_data_8"); $custom_oid_data_9 = (string) get_parameter ("custom_oid_data_9"); $custom_oid_data_10 = (string) get_parameter ("custom_oid_data_10"); + $custom_oid_data_11 = (string) get_parameter ("custom_oid_data_11"); + $custom_oid_data_12 = (string) get_parameter ("custom_oid_data_12"); + $custom_oid_data_13 = (string) get_parameter ("custom_oid_data_13"); + $custom_oid_data_14 = (string) get_parameter ("custom_oid_data_14"); + $custom_oid_data_15 = (string) get_parameter ("custom_oid_data_15"); + $custom_oid_data_16 = (string) get_parameter ("custom_oid_data_16"); + $custom_oid_data_17 = (string) get_parameter ("custom_oid_data_17"); + $custom_oid_data_18 = (string) get_parameter ("custom_oid_data_18"); + $custom_oid_data_19 = (string) get_parameter ("custom_oid_data_19"); + $custom_oid_data_20 = (string) get_parameter ("custom_oid_data_20"); $trap_type = (int) get_parameter ("trap_type", -1); $single_value = (string) get_parameter ("single_value"); $position = (int) get_parameter ("position"); @@ -128,6 +138,16 @@ if ($save_alert || $modify_alert) { '_snmp_f8_' => $custom_oid_data_8, '_snmp_f9_' => $custom_oid_data_9, '_snmp_f10_' => $custom_oid_data_10, + '_snmp_f11_' => $custom_oid_data_11, + '_snmp_f12_' => $custom_oid_data_12, + '_snmp_f13_' => $custom_oid_data_13, + '_snmp_f14_' => $custom_oid_data_14, + '_snmp_f15_' => $custom_oid_data_15, + '_snmp_f16_' => $custom_oid_data_16, + '_snmp_f17_' => $custom_oid_data_17, + '_snmp_f18_' => $custom_oid_data_18, + '_snmp_f19_' => $custom_oid_data_19, + '_snmp_f20_' => $custom_oid_data_20, 'trap_type' => $trap_type, 'single_value' => $single_value, 'position' => $position, @@ -157,8 +177,11 @@ if ($save_alert || $modify_alert) { _snmp_f1_ = '%s', _snmp_f2_ = '%s', _snmp_f3_ = '%s', _snmp_f4_ = '%s', _snmp_f5_ = '%s', _snmp_f6_ = '%s', _snmp_f7_ = '%s', _snmp_f8_ = '%s', _snmp_f9_ = '%s', - _snmp_f10_ = '%s', trap_type = %d, single_value = '%s', - position = '%s', id_group ='%s' + _snmp_f10_ = '%s', _snmp_f11_ = '%s', _snmp_f12_ = '%s', + _snmp_f13_ = '%s', _snmp_f14_ = '%s', _snmp_f15_ = '%s', + _snmp_f16_ = '%s', _snmp_f17_ = '%s', _snmp_f18_ = '%s', + _snmp_f19_ = '%s', _snmp_f20_ = '%s', trap_type = %d, + single_value = '%s', position = '%s', id_group ='%s' WHERE id_as = %d", $priority, $alert_type, $al_field1, $al_field2, $al_field3, $al_field4, $al_field5, $al_field6, $al_field7, $al_field8, @@ -167,8 +190,11 @@ if ($save_alert || $modify_alert) { $max_alerts, $min_alerts, $custom_oid_data_1, $custom_oid_data_2, $custom_oid_data_3, $custom_oid_data_4, $custom_oid_data_5, $custom_oid_data_6, $custom_oid_data_7, $custom_oid_data_8, - $custom_oid_data_9, $custom_oid_data_10, $trap_type, $single_value, - $position, $group, $id_as); + $custom_oid_data_9, $custom_oid_data_10, $custom_oid_data_11, + $custom_oid_data_12, $custom_oid_data_13, $custom_oid_data_14, + $custom_oid_data_15, $custom_oid_data_16, $custom_oid_data_17, + $custom_oid_data_18, $custom_oid_data_19, $custom_oid_data_20, + $trap_type, $single_value, $position, $group, $id_as); $result = db_process_sql ($sql); @@ -219,6 +245,16 @@ if ($update_alert) { $custom_oid_data_8 = $alert["_snmp_f8_"]; $custom_oid_data_9 = $alert["_snmp_f9_"]; $custom_oid_data_10 = $alert["_snmp_f10_"]; + $custom_oid_data_11 = $alert["_snmp_f11_"]; + $custom_oid_data_12 = $alert["_snmp_f12_"]; + $custom_oid_data_13 = $alert["_snmp_f13_"]; + $custom_oid_data_14 = $alert["_snmp_f14_"]; + $custom_oid_data_15 = $alert["_snmp_f15_"]; + $custom_oid_data_16 = $alert["_snmp_f16_"]; + $custom_oid_data_17 = $alert["_snmp_f17_"]; + $custom_oid_data_18 = $alert["_snmp_f18_"]; + $custom_oid_data_19 = $alert["_snmp_f19_"]; + $custom_oid_data_20 = $alert["_snmp_f20_"]; $trap_type = $alert["trap_type"]; $single_value = $alert["single_value"]; $position = $alert["position"]; @@ -256,6 +292,16 @@ elseif ($create_alert) { $custom_oid_data_8 = ''; $custom_oid_data_9 = ''; $custom_oid_data_10 = ''; + $custom_oid_data_11 = ''; + $custom_oid_data_12 = ''; + $custom_oid_data_13 = ''; + $custom_oid_data_14 = ''; + $custom_oid_data_15 = ''; + $custom_oid_data_16 = ''; + $custom_oid_data_17 = ''; + $custom_oid_data_18 = ''; + $custom_oid_data_19 = ''; + $custom_oid_data_20 = ''; $trap_type = -1; $single_value = ''; $position = 0; @@ -455,6 +501,66 @@ if ($create_alert || $update_alert) { html_print_input_text ("custom_oid_data_10", $custom_oid_data_10, '', 60); echo ''; + // Custom OID/Data #11 + echo ''.__('Custom OID/Data #11'); + echo ''; + html_print_input_text ("custom_oid_data_11", $custom_oid_data_11, '', 60); + echo ''; + + // Custom OID/Data #12 + echo ''.__('Custom OID/Data #12'); + echo ''; + html_print_input_text ("custom_oid_data_12", $custom_oid_data_12, '', 60); + echo ''; + + // Custom OID/Data #13 + echo ''.__('Custom OID/Data #13'); + echo ''; + html_print_input_text ("custom_oid_data_13", $custom_oid_data_13, '', 60); + echo ''; + + // Custom OID/Data #14 + echo ''.__('Custom OID/Data #14'); + echo ''; + html_print_input_text ("custom_oid_data_14", $custom_oid_data_14, '', 60); + echo ''; + + // Custom OID/Data #15 + echo ''.__('Custom OID/Data #15'); + echo ''; + html_print_input_text ("custom_oid_data_15", $custom_oid_data_15, '', 60); + echo ''; + + // Custom OID/Data #16 + echo ''.__('Custom OID/Data #16'); + echo ''; + html_print_input_text ("custom_oid_data_16", $custom_oid_data_16, '', 60); + echo ''; + + // Custom OID/Data #17 + echo ''.__('Custom OID/Data #17'); + echo ''; + html_print_input_text ("custom_oid_data_17", $custom_oid_data_17, '', 60); + echo ''; + + // Custom OID/Data #18 + echo ''.__('Custom OID/Data #18'); + echo ''; + html_print_input_text ("custom_oid_data_18", $custom_oid_data_18, '', 60); + echo ''; + + // Custom OID/Data #19 + echo ''.__('Custom OID/Data #19'); + echo ''; + html_print_input_text ("custom_oid_data_19", $custom_oid_data_19, '', 60); + echo ''; + + // Custom OID/Data #20 + echo ''.__('Custom OID/Data #20'); + echo ''; + html_print_input_text ("custom_oid_data_20", $custom_oid_data_20, '', 60); + echo ''; + //Button //echo ''; diff --git a/pandora_console/pandoradb.oracle.sql b/pandora_console/pandoradb.oracle.sql index 31872db22f..ccebfcd2ef 100644 --- a/pandora_console/pandoradb.oracle.sql +++ b/pandora_console/pandoradb.oracle.sql @@ -304,6 +304,16 @@ CREATE TABLE talert_snmp ( _snmp_f8_ CLOB default '', _snmp_f9_ CLOB default '', _snmp_f10_ CLOB default '', + _snmp_f11_ CLOB default '', + _snmp_f12_ CLOB default '', + _snmp_f13_ CLOB default '', + _snmp_f14_ CLOB default '', + _snmp_f15_ CLOB default '', + _snmp_f16_ CLOB default '', + _snmp_f17_ CLOB default '', + _snmp_f18_ CLOB default '', + _snmp_f19_ CLOB default '', + _snmp_f20_ CLOB default '', trap_type NUMBER(10, 0) DEFAULT -1 NOT NULL, single_value VARCHAR2(255) DEFAULT '', "position" NUMBER(10, 0) default 0 NOT NULL, diff --git a/pandora_console/pandoradb.postgreSQL.sql b/pandora_console/pandoradb.postgreSQL.sql index 0966cca543..0a5a811d01 100644 --- a/pandora_console/pandoradb.postgreSQL.sql +++ b/pandora_console/pandoradb.postgreSQL.sql @@ -287,6 +287,16 @@ CREATE TABLE "talert_snmp" ( "_snmp_f8_" text DEFAULT '', "_snmp_f9_" text DEFAULT '', "_snmp_f10_" text DEFAULT '', + "_snmp_f11_" text DEFAULT '', + "_snmp_f12_" text DEFAULT '', + "_snmp_f13_" text DEFAULT '', + "_snmp_f14_" text DEFAULT '', + "_snmp_f15_" text DEFAULT '', + "_snmp_f16_" text DEFAULT '', + "_snmp_f17_" text DEFAULT '', + "_snmp_f18_" text DEFAULT '', + "_snmp_f19_" text DEFAULT '', + "_snmp_f20_" text DEFAULT '', "trap_type" INTEGER NOT NULL DEFAULT '-1', "single_value" varchar(255) DEFAULT '', "position" INTEGER NOT NULL default 0, diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index bc8bdb5aec..f35a967419 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -293,6 +293,16 @@ CREATE TABLE IF NOT EXISTS `talert_snmp` ( `_snmp_f8_` text, `_snmp_f9_` text, `_snmp_f10_` text, + `_snmp_f11_` text, + `_snmp_f12_` text, + `_snmp_f13_` text, + `_snmp_f14_` text, + `_snmp_f15_` text, + `_snmp_f16_` text, + `_snmp_f17_` text, + `_snmp_f18_` text, + `_snmp_f19_` text, + `_snmp_f20_` text, `trap_type` int(11) NOT NULL default '-1', `single_value` varchar(255) default '', `position` int(10) unsigned NOT NULL default '0',