From 43ecba3bbb13730e9dcd7e1303931a6c807ccbfe Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 20 Nov 2019 10:40:52 +0100 Subject: [PATCH] operator fields for event_rule --- pandora_console/extras/mr/33.sql | 14 ++++++++++++++ .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 14 ++++++++++++++ pandora_console/pandoradb.sql | 13 +++++++++++++ 3 files changed, 41 insertions(+) diff --git a/pandora_console/extras/mr/33.sql b/pandora_console/extras/mr/33.sql index e7396397d5..ee06202af6 100644 --- a/pandora_console/extras/mr/33.sql +++ b/pandora_console/extras/mr/33.sql @@ -12,6 +12,20 @@ ALTER TABLE `tevent_rule` ADD COLUMN `log_content` TEXT; ALTER TABLE `tevent_rule` ADD COLUMN `log_source` TEXT; ALTER TABLE `tevent_rule` ADD COLUMN `log_agent` TEXT; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_agent` text DESC 'Operator for agent'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_id_usuario` text DESC 'Operator for id_usuario'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_id_grupo` text DESC 'Operator for id_grupo'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_evento` text DESC 'Operator for evento'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_event_type` text DESC 'Operator for event_type'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_module` text DESC 'Operator for module'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_alert` text DESC 'Operator for alert'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_criticity` text DESC 'Operator for criticity'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_user_comment` text DESC 'Operator for user_comment'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_id_tag` text DESC 'Operator for id_tag'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_content` text DESC 'Operator for log_content'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_source` text DESC 'Operator for log_source'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_agent` text DESC 'Operator for log_agent'; + CREATE TABLE `tremote_command` ( `id` SERIAL, `name` varchar(150) NOT NULL, diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 9fcd845c6e..1e779797ff 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -567,6 +567,20 @@ ALTER TABLE `tevent_rule` ADD COLUMN `group_recursion` INT(1) unsigned default 0 ALTER TABLE `tevent_rule` ADD COLUMN `log_content` TEXT; ALTER TABLE `tevent_rule` ADD COLUMN `log_source` TEXT; ALTER TABLE `tevent_rule` ADD COLUMN `log_agent` TEXT; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_agent` text DESC 'Operator for agent'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_id_usuario` text DESC 'Operator for id_usuario'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_id_grupo` text DESC 'Operator for id_grupo'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_evento` text DESC 'Operator for evento'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_event_type` text DESC 'Operator for event_type'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_module` text DESC 'Operator for module'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_alert` text DESC 'Operator for alert'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_criticity` text DESC 'Operator for criticity'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_user_comment` text DESC 'Operator for user_comment'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_id_tag` text DESC 'Operator for id_tag'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_content` text DESC 'Operator for log_content'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_source` text DESC 'Operator for log_source'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_agent` text DESC 'Operator for log_agent'; + -- ----------------------------------------------------- -- Table `tevent_alert` diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 28bb83d287..432c54aa1b 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -2785,6 +2785,19 @@ CREATE TABLE IF NOT EXISTS `tevent_rule` ( `log_content` text, `log_source` text, `log_agent` text, + `operator_agent` text DESC 'Operator for agent', + `operator_id_usuario` text DESC 'Operator for id_usuario', + `operator_id_grupo` text DESC 'Operator for id_grupo', + `operator_evento` text DESC 'Operator for evento', + `operator_event_type` text DESC 'Operator for event_type', + `operator_module` text DESC 'Operator for module', + `operator_alert` text DESC 'Operator for alert', + `operator_criticity` text DESC 'Operator for criticity', + `operator_user_comment` text DESC 'Operator for user_comment', + `operator_id_tag` text DESC 'Operator for id_tag', + `operator_log_content` text DESC 'Operator for log_content', + `operator_log_source` text DESC 'Operator for log_source', + `operator_log_agent` text DESC 'Operator for log_agent', PRIMARY KEY (`id_event_rule`), KEY `idx_id_event_alert` (`id_event_alert`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;