2014-05-11 Junichi Satoh <junichi@rworks.jp>

* extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql: Changed the order
	of 'ALTER TABLE' and 'INSERT INTO' for trecon_script to avoid error.
	Added a missing column for trecon_script.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9915 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
jsatoh 2014-05-11 13:59:42 +00:00
parent b7c1809b80
commit a0be2a7083
2 changed files with 16 additions and 10 deletions

View File

@ -1,3 +1,9 @@
2014-05-11 Junichi Satoh <junichi@rworks.jp>
* extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql: Changed the order
of 'ALTER TABLE' and 'INSERT INTO' for trecon_script to avoid error.
Added a missing column for trecon_script.
2014-05-11 Junichi Satoh <junichi@rworks.jp>
* install.php: Improved to adjust program paths in pandora db for

View File

@ -142,16 +142,6 @@ CREATE TABLE IF NOT EXISTS `talert_snmp_action` (
-- ---------------------------------------------------------------------
ALTER TABLE `treport` ADD COLUMN `non_interactive` tinyint(1) UNSIGNED NOT NULL default 0;
-- ---------------------------------------------------------------------
-- Table `trecon_script`
-- ---------------------------------------------------------------------
INSERT INTO `trecon_script` (`name`, `description`, `script`, `macros`) VALUES ('SNMP&#x20;L2&#x20;Recon','Pandora&#x20;FMS&#x20;SNMP&#x20;Recon&#x20;Plugin&#x20;for&#x20;level&#x20;2&#x20;network&#x20;topology&#x20;discovery.&#x0d;&#x0a;&#40;c&#41;&#x20;Artica&#x20;ST&#x20;2014&#x20;&lt;info@artica.es&gt;&#x0d;&#x0a;&#x0d;&#x0a;Usage:&#x0d;&#x0a;&#x0d;&#x0a;&#x20;&#x20;&#x20;./snmp-recon.pl&#x20;&lt;task_id&gt;&#x20;&lt;group_id&gt;&#x20;&lt;create_incident&gt;&#x20;&lt;custom_field1&gt;&#x20;&lt;custom_field2&gt;&#x20;[custom_field3]&#x20;[custom_field4]&#x0d;&#x0a;&#x0d;&#x0a;&#x20;*&#x20;custom_field1&#x20;=&#x20;comma&#x20;separated&#x20;list&#x20;of&#x20;networks&#x20;&#40;i.e.:&#x20;192.168.1.0/24,192.168.2.0/24&#41;&#x0d;&#x0a;&#x20;*&#x20;custom_field2&#x20;=&#x20;comma&#x20;separated&#x20;list&#x20;of&#x20;snmp&#x20;communities&#x20;to&#x20;try.&#x0d;&#x0a;&#x20;*&#x20;custom_field3&#x20;=&#x20;a&#x20;router&#x20;in&#x20;the&#x20;network.&#x20;Optional&#x20;but&#x20;recommended.&#x0d;&#x0a;&#x0d;&#x0a;&#x20;*&#x20;custom_field4&#x20;=&#x20;set&#x20;to&#x20;-a&#x20;to&#x20;add&#x20;all&#x20;network&#x20;interfaces&#x20;&#40;by&#x20;default&#x20;only&#x20;interfaces&#x20;that&#x20;are&#x20;up&#x20;are&#x20;added&#41;.&#x0d;&#x0a;&#x0d;&#x0a;&#x20;Additional&#x20;information:&#x0d;&#x0a;When&#x20;the&#x20;script&#x20;is&#x20;called&#x20;from&#x20;a&#x20;recon&#x20;task&#x20;the&#x20;task_id,&#x20;group_id&#x20;and&#x20;create_incident&#x20;parameters&#x20;are&#x20;automatically&#x20;filled&#x20;by&#x20;the&#x20;Pandora&#x20;FMS&#x20;Server.','/usr/share/pandora_server/util/recon_scripts/snmp-recon.pl');
INSERT INTO `trecon_script` (`name`, `description`, `script`, `macros`) VALUES ('WMI&#x20;Recon&#x20;Script','This&#x20;script&#x20;is&#x20;used&#x20;to&#x20;automatically&#x20;gather&#x20;host&#x20;information&#x20;via&#x20;WMI.&#x0d;&#x0a;Available&#x20;parameters:&#x0d;&#x0a;&#x0d;&#x0a;*&#x20;Network&#x20;=&#x20;network&#x20;to&#x20;scan&#x20;&#40;e.g.&#x20;192.168.100.0/24&#41;.&#x0d;&#x0a;*&#x20;WMI&#x20;auth&#x20;=&#x20;comma&#x20;separated&#x20;list&#x20;of&#x20;WMI&#x20;authentication&#x20;tokens&#x20;in&#x20;the&#x20;format&#x20;username%password&#x20;&#40;e.g.&#x20;Administrador%pass&#41;.&#x0d;&#x0a;&#x0d;&#x0a;See&#x20;the&#x20;documentation&#x20;for&#x20;more&#x20;information.','/usr/share/pandora_server/util/recon_scripts/wmi-recon.pl','{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Network\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"WMI&#x20;auth\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"}}');
/* 2014/04/10 */
ALTER TABLE `treport_content` ADD COLUMN `name` varchar(150) NULL;
/* 2014/04/11 */
-- ---------------------------------------------------------------------
-- Table `trecon_script` and `trecon_task`
@ -159,6 +149,16 @@ ALTER TABLE `treport_content` ADD COLUMN `name` varchar(150) NULL;
ALTER TABLE `trecon_script` ADD COLUMN `macros` TEXT;
ALTER TABLE `trecon_task` ADD COLUMN `macros` TEXT;
-- ---------------------------------------------------------------------
-- Table `trecon_script`
-- ---------------------------------------------------------------------
INSERT INTO `trecon_script` (`name`, `description`, `script`, `macros`) VALUES ('SNMP&#x20;L2&#x20;Recon','Pandora&#x20;FMS&#x20;SNMP&#x20;Recon&#x20;Plugin&#x20;for&#x20;level&#x20;2&#x20;network&#x20;topology&#x20;discovery.&#x0d;&#x0a;&#40;c&#41;&#x20;Artica&#x20;ST&#x20;2014&#x20;&lt;info@artica.es&gt;&#x0d;&#x0a;&#x0d;&#x0a;Usage:&#x0d;&#x0a;&#x0d;&#x0a;&#x20;&#x20;&#x20;./snmp-recon.pl&#x20;&lt;task_id&gt;&#x20;&lt;group_id&gt;&#x20;&lt;create_incident&gt;&#x20;&lt;custom_field1&gt;&#x20;&lt;custom_field2&gt;&#x20;[custom_field3]&#x20;[custom_field4]&#x0d;&#x0a;&#x0d;&#x0a;&#x20;*&#x20;custom_field1&#x20;=&#x20;comma&#x20;separated&#x20;list&#x20;of&#x20;networks&#x20;&#40;i.e.:&#x20;192.168.1.0/24,192.168.2.0/24&#41;&#x0d;&#x0a;&#x20;*&#x20;custom_field2&#x20;=&#x20;comma&#x20;separated&#x20;list&#x20;of&#x20;snmp&#x20;communities&#x20;to&#x20;try.&#x0d;&#x0a;&#x20;*&#x20;custom_field3&#x20;=&#x20;a&#x20;router&#x20;in&#x20;the&#x20;network.&#x20;Optional&#x20;but&#x20;recommended.&#x0d;&#x0a;&#x0d;&#x0a;&#x20;*&#x20;custom_field4&#x20;=&#x20;set&#x20;to&#x20;-a&#x20;to&#x20;add&#x20;all&#x20;network&#x20;interfaces&#x20;&#40;by&#x20;default&#x20;only&#x20;interfaces&#x20;that&#x20;are&#x20;up&#x20;are&#x20;added&#41;.&#x0d;&#x0a;&#x0d;&#x0a;&#x20;Additional&#x20;information:&#x0d;&#x0a;When&#x20;the&#x20;script&#x20;is&#x20;called&#x20;from&#x20;a&#x20;recon&#x20;task&#x20;the&#x20;task_id,&#x20;group_id&#x20;and&#x20;create_incident&#x20;parameters&#x20;are&#x20;automatically&#x20;filled&#x20;by&#x20;the&#x20;Pandora&#x20;FMS&#x20;Server.','/usr/share/pandora_server/util/recon_scripts/snmp-recon.pl','{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Network\",\"help\":\"Comma&#x20;separated&#x20;list&#x20;of&#x20;networks&#x20;&#40;i.e.:&#x20;192.168.1.0/24,192.168.2.0/24&#41;\",\"value\":\"\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Community\",\"help\":\"Comma&#x20;separated&#x20;list&#x20;of&#x20;snmp&#x20;communities&#x20;to&#x20;try.\",\"value\":\"\",\"hide\":\"\"},\"3\":{\"macro\":\"_field3_\",\"desc\":\"Router\",\"help\":\"A&#x20;router&#x20;in&#x20;the&#x20;network.&#x20;Optional&#x20;but&#x20;recommended.\",\"value\":\"\",\"hide\":\"\"},\"4\":{\"macro\":\"_field4_\",\"desc\":\"Optional&#x20;parameter\",\"help\":\"Set&#x20;to&#x20;-a&#x20;to&#x20;add&#x20;all&#x20;network&#x20;interfaces&#x20;&#40;by&#x20;default&#x20;only&#x20;interfaces&#x20;that&#x20;are&#x20;up&#x20;are&#x20;added&#41;.\",\"value\":\"\",\"hide\":\"\"}}');
INSERT INTO `trecon_script` (`name`, `description`, `script`, `macros`) VALUES ('WMI&#x20;Recon&#x20;Script','This&#x20;script&#x20;is&#x20;used&#x20;to&#x20;automatically&#x20;gather&#x20;host&#x20;information&#x20;via&#x20;WMI.&#x0d;&#x0a;Available&#x20;parameters:&#x0d;&#x0a;&#x0d;&#x0a;*&#x20;Network&#x20;=&#x20;network&#x20;to&#x20;scan&#x20;&#40;e.g.&#x20;192.168.100.0/24&#41;.&#x0d;&#x0a;*&#x20;WMI&#x20;auth&#x20;=&#x20;comma&#x20;separated&#x20;list&#x20;of&#x20;WMI&#x20;authentication&#x20;tokens&#x20;in&#x20;the&#x20;format&#x20;username%password&#x20;&#40;e.g.&#x20;Administrador%pass&#41;.&#x0d;&#x0a;&#x0d;&#x0a;See&#x20;the&#x20;documentation&#x20;for&#x20;more&#x20;information.','/usr/share/pandora_server/util/recon_scripts/wmi-recon.pl','{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Network\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"WMI&#x20;auth\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"}}');
/* 2014/04/10 */
ALTER TABLE `treport_content` ADD COLUMN `name` varchar(150) NULL;
/* 2014/05/05 */
-- ---------------------------------------------------------------------
-- Table `tlink`