From be47ed178bef9f67849721509797495a3a751402 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 5 Feb 2020 12:49:52 +0100 Subject: [PATCH 1/2] Added force apply in policies --- pandora_console/extras/mr/36.sql | 5 +++++ .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 2 ++ pandora_console/pandoradb.sql | 5 +++-- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 pandora_console/extras/mr/36.sql diff --git a/pandora_console/extras/mr/36.sql b/pandora_console/extras/mr/36.sql new file mode 100644 index 0000000000..d3de281be5 --- /dev/null +++ b/pandora_console/extras/mr/36.sql @@ -0,0 +1,5 @@ +START TRANSACTION; + +ALTER TABLE `tpolicies` ADD COLUMN `force_apply` tinyint(1) default 0; + +COMMIT; \ No newline at end of file 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 20451647a1..4adf6abfdf 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 @@ -160,6 +160,8 @@ CREATE TABLE IF NOT EXISTS `tpolicies` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +ALTER TABLE `tpolicies` ADD COLUMN `force_apply` tinyint(1) default 0; + -- ----------------------------------------------------- -- Table `tpolicy_alerts` -- ----------------------------------------------------- diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 741a0dc1d8..23d0661036 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -2375,8 +2375,9 @@ CREATE TABLE IF NOT EXISTS `tpolicies` ( `id` int(10) unsigned NOT NULL auto_increment, `name` text NOT NULL default '', `description` varchar(255) NOT NULL default '', - `id_group` int(10) unsigned default '0', - `status` int(10) unsigned NOT NULL default 0, + `id_group` int(10) unsigned default '0', + `status` int(10) unsigned NOT NULL default 0, + `force_apply` tinyint(1) default 0, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; From 1e4217d1c6829791aadb19b6c737afa66997b740 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 13 Feb 2020 09:22:57 +0100 Subject: [PATCH 2/2] Changed Inserts in tpolicy --- pandora_console/pandoradb_data.sql | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 1cdba8578f..254b4351db 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -1200,15 +1200,15 @@ INSERT INTO `tskin` VALUES (2,'Legacy', 'legacy', 'Skin of the vi -- INSERT INTO `tcollection` VALUES (1,'Apache Enterprise Plugin','apache_plugin',0,'Apache Enterprise Plugin to monitor Apache web server using a Perl script.',0); -INSERT INTO `tpolicies` VALUES (1,'Basic Web Checks','Basic checks to monitoring webs',13,0); -INSERT INTO `tpolicies` VALUES (2,'Basic Windows Local Monitoring','Basic checks to monitoring Windows Systems',2,0); -INSERT INTO `tpolicies` VALUES (3,'Basic Centos/RedHat Local Monitoring','Basic local checks to monitoring Centos/RedHat systems',2,0); -INSERT INTO `tpolicies` VALUES (4,'Basic SuSe Local Monitoring','Basic local checks to monitoring SuSe systems',2,0); -INSERT INTO `tpolicies` VALUES (5,'Basic Debian/Ubuntu Local Monitoring','Basic local checks to monitoring Debian/Ubuntu systems',2,0); -INSERT INTO `tpolicies` VALUES (6,'Basic AIX Local Monitoring','Basic local checks to monitoring AIX systems',2,0); -INSERT INTO `tpolicies` VALUES (7,'Basic HP-UX Local Monitoring','Basic local checks to monitoring HP/UX systems',2,0); -INSERT INTO `tpolicies` VALUES (8,'Basic Solaris Local Monitoring','Basic local checks to monitoring Solaris systems',2,0); -INSERT INTO `tpolicies` VALUES (9,'Basic Remote Checks','Basic Remote Checks (ping, latency, ports..)',2,0); +INSERT INTO `tpolicies` VALUES (1,'Basic Web Checks','Basic checks to monitoring webs',13,0,0); +INSERT INTO `tpolicies` VALUES (2,'Basic Windows Local Monitoring','Basic checks to monitoring Windows Systems',2,0,0); +INSERT INTO `tpolicies` VALUES (3,'Basic Centos/RedHat Local Monitoring','Basic local checks to monitoring Centos/RedHat systems',2,0,0); +INSERT INTO `tpolicies` VALUES (4,'Basic SuSe Local Monitoring','Basic local checks to monitoring SuSe systems',2,0,0); +INSERT INTO `tpolicies` VALUES (5,'Basic Debian/Ubuntu Local Monitoring','Basic local checks to monitoring Debian/Ubuntu systems',2,0,0); +INSERT INTO `tpolicies` VALUES (6,'Basic AIX Local Monitoring','Basic local checks to monitoring AIX systems',2,0,0); +INSERT INTO `tpolicies` VALUES (7,'Basic HP-UX Local Monitoring','Basic local checks to monitoring HP/UX systems',2,0,0); +INSERT INTO `tpolicies` VALUES (8,'Basic Solaris Local Monitoring','Basic local checks to monitoring Solaris systems',2,0,0); +INSERT INTO `tpolicies` VALUES (9,'Basic Remote Checks','Basic Remote Checks (ping, latency, ports..)',2,0,0); INSERT INTO `tpolicy_alerts` VALUES (1,1,2,1,'',0,0,0); INSERT INTO `tpolicy_alerts` VALUES (2,1,1,1,'',0,0,0);