From d28115c9f89f69252bb659f80259dfe8ca555bb1 Mon Sep 17 00:00:00 2001 From: vgilc Date: Thu, 16 Aug 2012 11:23:25 +0000 Subject: [PATCH] 2012-08-16 Vanessa Gil * pandoradb.data.oracle.sql pandoradb.data.postgreSQL.sql pandoradb.data.sql extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: Added example: several communities to recon task. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6864 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 8 ++++++++ .../extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql | 7 +++++++ pandora_console/pandoradb.data.oracle.sql | 5 +++++ pandora_console/pandoradb.data.postgreSQL.sql | 5 +++++ pandora_console/pandoradb_data.sql | 2 +- 5 files changed, 26 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index a85feade3d..9379967cd4 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2012-08-16 Vanessa Gil + + * pandoradb.data.oracle.sql + pandoradb.data.postgreSQL.sql + pandoradb.data.sql + extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql: Added example: + several communities to recon task. + 2012-08-14 Vanessa Gil * godmode/reporting/reporting_builder.php diff --git a/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql index e939cd906c..0ee077bb33 100644 --- a/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql @@ -284,3 +284,10 @@ ALTER TABLE tusuario ADD `metaconsole_access` enum('basic','advanced','custom',' ALTER TABLE tplugin ADD `macros` text; ALTER TABLE tplugin ADD `parameters` text; + +-- ----------------------------------------------------- +-- Table `trecon_script` +-- ----------------------------------------------------- + +UPDATE trecon_script SET `description`='This script is used to automatically detect SNMP Interfaces on devices, used as Recon Custom Script in the recon task. Parameters used are: * custom_field1 = network. i.e.: 192.168.100.0/24 * custom_field2 = several communities separated by comma. For example: snmp_community,public,private * custom_field3 = optative parameter to force process downed interfaces (use: '-a'). Only up interfaces are processed by default See documentation for more information.' +WHERE id_recon_script=1; diff --git a/pandora_console/pandoradb.data.oracle.sql b/pandora_console/pandoradb.data.oracle.sql index 47264a1c12..f86f852daa 100644 --- a/pandora_console/pandoradb.data.oracle.sql +++ b/pandora_console/pandoradb.data.oracle.sql @@ -595,3 +595,8 @@ treport_custom_sql_insert(4, 'Group view','< (select count COMMIT; END;; +INSERT INTO trecon_script VALUES (1,'SNMP Recon Script','This script is used to automatically detect SNMP Interfaces on devices, used as Recon Custom Script in the recon task. Parameters used are: * custom_field1 = network. i.e.: 192.168.100.0/24 * custom_field2 = several communities separated by comma. For example: snmp_community,public,private * custom_field3 = optative parameter to force process downed interfaces (use: '-a'). Only up interfaces are processed by default See documentation for more information.','/usr/share/pandora_server/util/recon_scripts/snmpdevices.pl'); + +INSERT INTO trecon_script VALUES +(2,'IMPI Recon', 'Specific Pandora FMS Intel DCM Discovery (c) Artica ST 2011 Usage: ./ipmi-recon.pl * custom_field1 = network. i.e.: 192.168.100.0/24 * custom_field2 = username * custom_fiedl3 = password ', '/usr/share/pandora_server/util/recon_scripts/ipmi-recon.pl'); + diff --git a/pandora_console/pandoradb.data.postgreSQL.sql b/pandora_console/pandoradb.data.postgreSQL.sql index 5535679afd..a907791dbc 100644 --- a/pandora_console/pandoradb.data.postgreSQL.sql +++ b/pandora_console/pandoradb.data.postgreSQL.sql @@ -436,3 +436,8 @@ INSERT INTO "treport_custom_sql" ("id", "name", "sql") VALUES (3, 'Monitoring&#x INSERT INTO "treport_custom_sql" ("id", "name", "sql") VALUES (4, 'Group view', 'select t1.nombre, (select count(t3.id_agente) from tagente as t3 where t1.id_grupo = t3.id_grupo) as agents, (SELECT COUNT(t4.id_agente) FROM tagente as t4 WHERE t4.id_grupo = t1.id_grupo AND t4.disabled = 0 AND t4.ultimo_contacto < NOW() - (intervalo / (1/2))) as agent_unknown, (SELECT COUNT(tagente_estado.id_agente_estado) FROM tagente_estado, tagente, tagente_modulo WHERE tagente.id_grupo = t1.id_grupo AND tagente.disabled = 0 AND tagente.id_agente = tagente_estado.id_agente AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND utimestamp > 0 AND tagente_modulo.id_tipo_modulo NOT IN(21,22,23,24,100) AND (UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) >= (tagente_estado.current_interval / (1/2))) as monitor_unknow, (SELECT COUNT(tagente_estado.id_agente_estado) FROM tagente_estado, tagente, tagente_modulo WHERE tagente.id_grupo = t1.id_grupo AND tagente.disabled = 0 AND tagente.id_agente = tagente_estado.id_agente AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND tagente_modulo.id_tipo_modulo NOT IN (21,22,23,24) AND utimestamp = 0) as monitor_no_init, (SELECT COUNT(tagente_estado.id_agente_estado) FROM tagente_estado, tagente, tagente_modulo WHERE tagente.id_grupo = t1.id_grupo AND tagente.disabled = 0 AND tagente_estado.id_agente = tagente.id_agente AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND estado = 0 AND ((UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) < (tagente_estado.current_interval / (1/2)) OR (tagente_modulo.id_tipo_modulo IN(21,22,23,24,100))) AND (utimestamp > 0 OR (tagente_modulo.id_tipo_modulo IN(21,22,23,24)))) as monitor_ok, (SELECT COUNT(tagente_estado.id_agente_estado) FROM tagente_estado, tagente, tagente_modulo WHERE tagente.id_grupo = t1.id_grupo AND tagente.disabled = 0 AND tagente_estado.id_agente = tagente.id_agente AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND estado = 1 AND ((UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) < (tagente_estado.current_interval / (1/2)) OR (tagente_modulo.id_tipo_modulo IN(21,22,23,24,100))) AND utimestamp > 0) as monitor_critical, (SELECT COUNT(talert_template_modules.id) FROM talert_template_modules, tagente_modulo, tagente_estado, tagente WHERE tagente.id_grupo = t1.id_grupo AND tagente_modulo.id_agente = tagente.id_agente AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND tagente.disabled = 0 AND talert_template_modules.id_agent_module = tagente_modulo.id_agente_modulo AND times_fired > 0) as monitor_alert_fired from tgrupo as t1 where 0 < (select count(t2.id_agente) from tagente as t2 where t1.id_grupo = t2.id_grupo)'); SELECT setval('treport_custom_sql_id_seq', (SELECT (SELECT MAX(id) FROM treport_custom_sql))); +INSERT INTO "trecon_script" ("id_recon_script", "name", "description", "script") VALUES (1,'SNMP Recon Script','This script is used to automatically detect SNMP Interfaces on devices, used as Recon Custom Script in the recon task. Parameters used are: * custom_field1 = network. i.e.: 192.168.100.0/24 * custom_field2 = several communities separated by comma. For example: snmp_community,public,private * custom_field3 = optative parameter to force process downed interfaces (use: '-a'). Only up interfaces are processed by default See documentation for more information.','/usr/share/pandora_server/util/recon_scripts/snmpdevices.pl'); + +INSERT INTO "trecon_script" ("id_recon_script", "name", "description", "script") VALUES +(2,'IMPI Recon', 'Specific Pandora FMS Intel DCM Discovery (c) Artica ST 2011 Usage: ./ipmi-recon.pl * custom_field1 = network. i.e.: 192.168.100.0/24 * custom_field2 = username * custom_fiedl3 = password ', '/usr/share/pandora_server/util/recon_scripts/ipmi-recon.pl'); + diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index f73d177f19..92d6e73384 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -425,7 +425,7 @@ INSERT INTO `treport_custom_sql` (`id`, `name`, `sql`) VALUES (2, 'Monitoring&#x INSERT INTO `treport_custom_sql` (`id`, `name`, `sql`) VALUES (3, 'Monitoring Report Alerts', 'select t1.nombre as agent_name, t2.nombre as module_name, (select talert_templates.name from talert_templates where talert_templates.id = t3.id_alert_template) as template, (select group_concat(t02.name) from talert_template_module_actions as t01 inner join talert_actions as t02 on t01.id_alert_action = t02.id where t01.id_alert_template_module = t3.id group by t01.id_alert_template_module) as actions from tagente as t1 inner join tagente_modulo as t2 on t1.id_agente = t2.id_agente inner join talert_template_modules as t3 on t2.id_agente_modulo = t3.id_agent_module order by agent_name, module_name;'); INSERT INTO `treport_custom_sql` (`id`, `name`, `sql`) VALUES (4, 'Group view', 'select t1.nombre, (select count(t3.id_agente) from tagente as t3 where t1.id_grupo = t3.id_grupo) as agents, (SELECT COUNT(t4.id_agente) FROM tagente as t4 WHERE t4.id_grupo = t1.id_grupo AND t4.disabled = 0 AND t4.ultimo_contacto < NOW() - (intervalo / (1/2))) as agent_unknown, (SELECT COUNT(tagente_estado.id_agente_estado) FROM tagente_estado, tagente, tagente_modulo WHERE tagente.id_grupo = t1.id_grupo AND tagente.disabled = 0 AND tagente.id_agente = tagente_estado.id_agente AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND utimestamp > 0 AND tagente_modulo.id_tipo_modulo NOT IN(21,22,23,24,100) AND (UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) >= (tagente_estado.current_interval / (1/2))) as monitor_unknow, (SELECT COUNT(tagente_estado.id_agente_estado) FROM tagente_estado, tagente, tagente_modulo WHERE tagente.id_grupo = t1.id_grupo AND tagente.disabled = 0 AND tagente.id_agente = tagente_estado.id_agente AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND tagente_modulo.id_tipo_modulo NOT IN (21,22,23,24) AND utimestamp = 0) as monitor_no_init, (SELECT COUNT(tagente_estado.id_agente_estado) FROM tagente_estado, tagente, tagente_modulo WHERE tagente.id_grupo = t1.id_grupo AND tagente.disabled = 0 AND tagente_estado.id_agente = tagente.id_agente AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND estado = 0 AND ((UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) < (tagente_estado.current_interval / (1/2)) OR (tagente_modulo.id_tipo_modulo IN(21,22,23,24,100))) AND (utimestamp > 0 OR (tagente_modulo.id_tipo_modulo IN(21,22,23,24)))) as monitor_ok, (SELECT COUNT(tagente_estado.id_agente_estado) FROM tagente_estado, tagente, tagente_modulo WHERE tagente.id_grupo = t1.id_grupo AND tagente.disabled = 0 AND tagente_estado.id_agente = tagente.id_agente AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND estado = 1 AND ((UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) < (tagente_estado.current_interval / (1/2)) OR (tagente_modulo.id_tipo_modulo IN(21,22,23,24,100))) AND utimestamp > 0) as monitor_critical, (SELECT COUNT(talert_template_modules.id) FROM talert_template_modules, tagente_modulo, tagente_estado, tagente WHERE tagente.id_grupo = t1.id_grupo AND tagente_modulo.id_agente = tagente.id_agente AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND tagente.disabled = 0 AND talert_template_modules.id_agent_module = tagente_modulo.id_agente_modulo AND times_fired > 0) as monitor_alert_fired from tgrupo as t1 where 0 < (select count(t2.id_agente) from tagente as t2 where t1.id_grupo = t2.id_grupo)'); -INSERT INTO `trecon_script` VALUES (1,'SNMP Recon Script','This script is used to automatically detect SNMP Interfaces on devices, used as Recon Custom Script in the recon task. Parameters used are: * custom_field1 = network. i.e.: 192.168.100.0/24 * custom_field2 = snmp_community. * custom_field3 = optative parameter to force process downed interfaces (use: '-a'). Only up interfaces are processed by default See documentation for more information.','/usr/share/pandora_server/util/recon_scripts/snmpdevices.pl'); +INSERT INTO `trecon_script` VALUES (1,'SNMP Recon Script','This script is used to automatically detect SNMP Interfaces on devices, used as Recon Custom Script in the recon task. Parameters used are: * custom_field1 = network. i.e.: 192.168.100.0/24 * custom_field2 = several communities separated by comma. For example: snmp_community,public,private * custom_field3 = optative parameter to force process downed interfaces (use: '-a'). Only up interfaces are processed by default See documentation for more information.','/usr/share/pandora_server/util/recon_scripts/snmpdevices.pl'); INSERT INTO `trecon_script` VALUES (2,'IMPI Recon', 'Specific Pandora FMS Intel DCM Discovery (c) Artica ST 2011 Usage: ./ipmi-recon.pl * custom_field1 = network. i.e.: 192.168.100.0/24 * custom_field2 = username * custom_fiedl3 = password ', '/usr/share/pandora_server/util/recon_scripts/ipmi-recon.pl');