pandorafms/pandora_console/extras/mr/33.sql

35 lines
1.2 KiB
MySQL
Raw Normal View History

2019-10-28 12:18:13 +01:00
START TRANSACTION;
INSERT INTO `ttipo_modulo` VALUES
(34,'remote_cmd', 10, 'Remote execution, numeric data', 'mod_remote_cmd.png'),
(35,'remote_cmd_proc', 10, 'Remote execution, boolean data', 'mod_remote_cmd_proc.png'),
(36,'remote_cmd_string', 10, 'Remote execution, alphanumeric data', 'mod_remote_cmd_string.png'),
(37,'remote_cmd_inc', 10, 'Remote execution, incremental data', 'mod_remote_cmd_inc.png');
2019-10-30 08:04:13 +01:00
CREATE TABLE `tremote_command` (
`id` SERIAL,
`name` varchar(150) NOT NULL,
`timeout` int(10) unsigned NOT NULL default 30,
`retries` int(10) unsigned NOT NULL default 3,
`preconditions` text,
`script` text,
`postconditions` text,
`utimestamp` int(20) unsigned NOT NULL default 0,
`id_group` int(10) unsigned NOT NULL default 0,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `tremote_command_target` (
2019-10-30 14:43:10 +01:00
`id` SERIAL,
`rcmd_id` bigint unsigned NOT NULL unique,
2019-10-30 08:04:13 +01:00
`id_agente` int(10) unsigned NOT NULL,
`utimestamp` int(20) unsigned NOT NULL default 0,
`stdout` text,
`stderr` text,
`errorlevel` int(10) unsigned NOT NULL default 0,
2019-10-30 14:43:10 +01:00
PRIMARY KEY (`id`),
2019-10-30 08:04:13 +01:00
FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`)
ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2019-10-28 12:18:13 +01:00
COMMIT;