2014-03-19 Vanessa Gil <vanessa.gil@artica.es>

* 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.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9617 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
vgilc 2014-03-19 11:29:56 +00:00
parent 7672ab5f42
commit 4494516a4e
8 changed files with 193 additions and 4 deletions

View File

@ -1,3 +1,14 @@
2014-03-19 Vanessa Gil <vanessa.gil@artica.es>
* 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 <miguel.dedios@artica.es>
* operation/snmpconsole/snmp_view.php,

View File

@ -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;

View File

@ -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 '');

View File

@ -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 '';

View File

@ -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 '</td></tr>';
// Custom OID/Data #11
echo '<tr id="tr-custom_value"><td class="datos" valign="top">'.__('Custom OID/Data #11');
echo '</td><td class="datos">';
html_print_input_text ("custom_oid_data_11", $custom_oid_data_11, '', 60);
echo '</td></tr>';
// Custom OID/Data #12
echo '<tr id="tr-custom_value"><td class="datos" valign="top">'.__('Custom OID/Data #12');
echo '</td><td class="datos">';
html_print_input_text ("custom_oid_data_12", $custom_oid_data_12, '', 60);
echo '</td></tr>';
// Custom OID/Data #13
echo '<tr id="tr-custom_value"><td class="datos" valign="top">'.__('Custom OID/Data #13');
echo '</td><td class="datos">';
html_print_input_text ("custom_oid_data_13", $custom_oid_data_13, '', 60);
echo '</td></tr>';
// Custom OID/Data #14
echo '<tr id="tr-custom_value"><td class="datos" valign="top">'.__('Custom OID/Data #14');
echo '</td><td class="datos">';
html_print_input_text ("custom_oid_data_14", $custom_oid_data_14, '', 60);
echo '</td></tr>';
// Custom OID/Data #15
echo '<tr id="tr-custom_value"><td class="datos" valign="top">'.__('Custom OID/Data #15');
echo '</td><td class="datos">';
html_print_input_text ("custom_oid_data_15", $custom_oid_data_15, '', 60);
echo '</td></tr>';
// Custom OID/Data #16
echo '<tr id="tr-custom_value"><td class="datos" valign="top">'.__('Custom OID/Data #16');
echo '</td><td class="datos">';
html_print_input_text ("custom_oid_data_16", $custom_oid_data_16, '', 60);
echo '</td></tr>';
// Custom OID/Data #17
echo '<tr id="tr-custom_value"><td class="datos" valign="top">'.__('Custom OID/Data #17');
echo '</td><td class="datos">';
html_print_input_text ("custom_oid_data_17", $custom_oid_data_17, '', 60);
echo '</td></tr>';
// Custom OID/Data #18
echo '<tr id="tr-custom_value"><td class="datos" valign="top">'.__('Custom OID/Data #18');
echo '</td><td class="datos">';
html_print_input_text ("custom_oid_data_18", $custom_oid_data_18, '', 60);
echo '</td></tr>';
// Custom OID/Data #19
echo '<tr id="tr-custom_value"><td class="datos" valign="top">'.__('Custom OID/Data #19');
echo '</td><td class="datos">';
html_print_input_text ("custom_oid_data_19", $custom_oid_data_19, '', 60);
echo '</td></tr>';
// Custom OID/Data #20
echo '<tr id="tr-custom_value"><td class="datos" valign="top">'.__('Custom OID/Data #20');
echo '</td><td class="datos">';
html_print_input_text ("custom_oid_data_20", $custom_oid_data_20, '', 60);
echo '</td></tr>';
//Button
//echo '<tr><td></td><td align="right">';

View File

@ -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,

View File

@ -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,

View File

@ -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',