From 36afbea8b7eab3f770a75500167a520471bfc814 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Wed, 22 May 2019 11:53:57 +0200 Subject: [PATCH 001/123] Add new search for id source event in metaconsole --- pandora_console/include/functions_events.php | 17 ++++++++ .../operation/events/events_list.php | 42 ++++++++++++++++--- 2 files changed, 54 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 52eb525bc1..7b75906b5e 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -32,6 +32,9 @@ require_once $config['homedir'].'/include/functions.php'; enterprise_include_once('meta/include/functions_events_meta.php'); enterprise_include_once('meta/include/functions_agents_meta.php'); enterprise_include_once('meta/include/functions_modules_meta.php'); +if (is_metaconsole()) { + $id_source_event = get_parameter('id_source_event'); +} /** @@ -228,11 +231,25 @@ function events_get_events_grouped( db_process_sql('SET group_concat_max_len = 9999999'); $event_lj = events_get_secondary_groups_left_join($table); if ($total) { + if (is_metaconsole()) { + $id_source_event = get_parameter('id_source_event'); + if ($id_source_event != '') { + $sql_post .= "AND id_source_event = $id_source_event"; + } + } + $sql = "SELECT COUNT(*) FROM (SELECT id_evento FROM $table te $event_lj WHERE 1=1 ".$sql_post.' GROUP BY estado, evento, id_agente, id_agentmodule'.$groupby_extra.') AS t'; } else { + if (is_metaconsole()) { + $id_source_event = get_parameter('id_source_event'); + if ($id_source_event != '') { + $sql_post .= "AND id_source_event = $id_source_event"; + } + } + $sql = "SELECT *, MAX(id_evento) AS id_evento, GROUP_CONCAT(DISTINCT user_comment SEPARATOR '
') AS user_comment, GROUP_CONCAT(DISTINCT id_evento SEPARATOR ',') AS similar_ids, diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index 8333ca5b0d..728af2f422 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -48,6 +48,9 @@ check_login(); $sort_field = get_parameter('sort_field', 'timestamp'); $sort_order = get_parameter('sort', 'down'); +if (is_metaconsole()) { + $id_source_event = get_parameter('id_source_event'); +} $event_a = check_acl($config['id_user'], 0, 'ER'); $event_w = check_acl($config['id_user'], 0, 'EW'); @@ -125,6 +128,10 @@ if (is_ajax()) { $values['id_extra'] = get_parameter('id_extra'); $values['user_comment'] = get_parameter('user_comment'); + if (is_metaconsole()) { + $values['id_source_event'] = get_parameter('id_source_event'); + } + $exists = (bool) db_get_value_filter( 'id_filter', 'tevent_filter', @@ -172,6 +179,10 @@ if (is_ajax()) { $values['id_extra'] = get_parameter('id_extra'); $values['user_comment'] = get_parameter('user_comment'); + if (is_metaconsole()) { + $values['id_source_event'] = get_parameter('id_source_event'); + } + if (io_safe_output($values['tag_with']) == '["0"]') { $values['tag_with'] = '[]'; } @@ -248,6 +259,10 @@ if ($user_filter != 0 && empty($id_name) && !$update_from_filter_table) { $user_comment = $user_default_filter['user_comment']; $source = $user_default_filter['source']; + if (is_metaconsole()) { + $id_source_event = $user_default_filter['id_source_event']; + } + if ($user_default_filter['search'] != '') { $search = $user_default_filter['search']; } @@ -984,8 +999,12 @@ $data[2] .= html_print_input_text( 255, true ); -$table->data[] = $data; -$table->rowclass[] = ''; +if (is_metaconsole()) { + $data[3] = __('Id source event').$jump; + $data[3] .= html_print_input_text('id_source_event', $id_source_event, '', 11, 255, true); + $table->data[] = $data; + $table->rowclass[] = ''; +} $data = []; $data[0] = ui_toggle( @@ -1335,6 +1354,8 @@ $(document).ready( function() { $("#text-id_extra").val(val); if (i == 'user_comment') $("#text-user_comment").val(val); + if (i == 'id_source_event') + $("#text-id_source_event").val(val); }); reorder_tags_inputs(); // Update the info with the loaded filter @@ -1374,7 +1395,10 @@ $(document).ready( function() { $("#text-source").val(''); $("#text-id_extra").val(''); $("#text-user_comment").val(''); - + + if(is_metaconsole()){ + $("#text-id_source_event").val(''); + } clear_tags_inputs(); // Update the view of filter load with no loaded filters message @@ -1448,6 +1472,10 @@ $(document).ready( function() { $("#text-id_extra").val(val); if (i == 'user_comment') $("#text-user_comment").val(val); + + if(is_metaconsole()){if (i == 'id_source_event') + $("#text-id_source_event").val(val); + } }); reorder_tags_inputs(); // Update the info with the loaded filter @@ -1516,7 +1544,9 @@ $(document).ready( function() { "date_to": $("#text-date_to").val(), "source": $("#text-source").val(), "id_extra": $("#text-id_extra").val(), - "user_comment": $("#text-user_comment").val() + "user_comment": $("#text-user_comment").val(), + "id_source_event": $("#text-id_extra").val() + }, function (data) { $(".info_box").hide(); @@ -1616,7 +1646,9 @@ $(document).ready( function() { "date_to": $("#text-date_to").val(), "source": $("#text-source").val(), "id_extra": $("#text-id_extra").val(), - "user_comment": $("#text-user_comment").val() + "user_comment": $("#text-user_comment").val(), + "id_source_event": $("#text-id_source_event").val() + }, function (data) { $(".info_box").hide(); From a0c6dc69aa41bf691c332500b1fc345fd4f838a0 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Fri, 21 Jun 2019 11:22:06 +0200 Subject: [PATCH 002/123] add element id_source_event to filters events --- .../operation/events/events.build_query.php | 6 ++++ .../operation/events/events_list.php | 34 +++++++++++-------- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/pandora_console/operation/events/events.build_query.php b/pandora_console/operation/events/events.build_query.php index f915a5093b..0d51282b36 100755 --- a/pandora_console/operation/events/events.build_query.php +++ b/pandora_console/operation/events/events.build_query.php @@ -50,6 +50,12 @@ if (!isset($date_to)) { $date_to = ''; } +if ($id_source_event != 0 || $id_source_event != '') { + $filter_resume['id_source_event'] = $id_source_event; +} else { + $id_source_event = ''; +} + if (($date_from === '') && ($date_to === '')) { if ($event_view_hr > 0) { $filter_resume['hours_max'] = $event_view_hr; diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index 728af2f422..e0c5915941 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -258,6 +258,7 @@ if ($user_filter != 0 && empty($id_name) && !$update_from_filter_table) { $id_extra = $user_default_filter['id_extra']; $user_comment = $user_default_filter['user_comment']; $source = $user_default_filter['source']; + $id_source_event = $user_default_filter['id_source_event']; if (is_metaconsole()) { $id_source_event = $user_default_filter['id_source_event']; @@ -1001,9 +1002,14 @@ $data[2] .= html_print_input_text( ); if (is_metaconsole()) { $data[3] = __('Id source event').$jump; - $data[3] .= html_print_input_text('id_source_event', $id_source_event, '', 11, 255, true); - $table->data[] = $data; - $table->rowclass[] = ''; + $data[3] .= html_print_input_text( + 'id_source_event', + $id_source_event, + '', + 5, + 255, + true + ); } $data = []; @@ -1170,12 +1176,14 @@ enterprise_hook( [ $filter_resume, [ - 'status' => $fields, - 'event_type' => $types, - 'severity' => $severities, - 'duplicate' => $repeated_sel, - 'alerts' => $alert_events_titles, - 'groups' => $user_groups_array, + 'status' => $fields, + 'event_type' => $types, + 'severity' => $severities, + 'duplicate' => $repeated_sel, + 'alerts' => $alert_events_titles, + 'groups' => $user_groups_array, + 'id_source_event' => $id_source_event, + ], ] ); @@ -1395,10 +1403,8 @@ $(document).ready( function() { $("#text-source").val(''); $("#text-id_extra").val(''); $("#text-user_comment").val(''); - - if(is_metaconsole()){ $("#text-id_source_event").val(''); - } + clear_tags_inputs(); // Update the view of filter load with no loaded filters message @@ -1473,7 +1479,7 @@ $(document).ready( function() { if (i == 'user_comment') $("#text-user_comment").val(val); - if(is_metaconsole()){if (i == 'id_source_event') + if(i == 'id_source_event') $("#text-id_source_event").val(val); } }); @@ -1545,7 +1551,7 @@ $(document).ready( function() { "source": $("#text-source").val(), "id_extra": $("#text-id_extra").val(), "user_comment": $("#text-user_comment").val(), - "id_source_event": $("#text-id_extra").val() + "id_source_event": $("#text-id_source_event").val() }, function (data) { From 1dc826c9ff178bd1a18966d9b721245081adc961 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Fri, 21 Jun 2019 11:29:51 +0200 Subject: [PATCH 003/123] Added field to tevent_filter (id_source_event) --- pandora_console/extras/mr/29.sql | 5 +++++ .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 1 + pandora_console/pandoradb.sql | 1 + 3 files changed, 7 insertions(+) create mode 100644 pandora_console/extras/mr/29.sql diff --git a/pandora_console/extras/mr/29.sql b/pandora_console/extras/mr/29.sql new file mode 100644 index 0000000000..a140d8bd58 --- /dev/null +++ b/pandora_console/extras/mr/29.sql @@ -0,0 +1,5 @@ +START TRANSACTION; + +ALTER TABLE tevent_filter ADD column id_source_event int(10); + +COMMIT; 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 d5ddbdd740..8846f4b80d 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 @@ -1277,6 +1277,7 @@ ALTER TABLE tevent_filter ADD COLUMN `date_to` date DEFAULT NULL; ALTER TABLE tevent_filter ADD COLUMN `user_comment` text NOT NULL; ALTER TABLE tevent_filter ADD COLUMN `source` tinytext NOT NULL; ALTER TABLE tevent_filter ADD COLUMN `id_extra` tinytext NOT NULL; +ALTER TABLE tevent_filter ADD column id_source_event int(10); -- --------------------------------------------------------------------- -- Table `tusuario` -- --------------------------------------------------------------------- diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 254918026a..8e64d738bc 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1101,6 +1101,7 @@ CREATE TABLE IF NOT EXISTS `tevent_filter` ( `source` tinytext NOT NULL, `id_extra` tinytext NOT NULL, `user_comment` text NOT NULL, + `id_source_event` int(10) default NULL, PRIMARY KEY (`id_filter`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; From 3fd12975aa173b11b1f82be34e79eedcc671bd51 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Fri, 21 Jun 2019 11:34:36 +0200 Subject: [PATCH 004/123] added 2 lines --- pandora_console/operation/events/events_list.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index e0c5915941..32880e420f 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -1012,6 +1012,9 @@ if (is_metaconsole()) { ); } +$table->data[] = $data; +$table->rowclass[] = ''; + $data = []; $data[0] = ui_toggle( html_print_table($table_advanced, true), From 56a7943a06989919fdb434f6a97db8c225ce898c Mon Sep 17 00:00:00 2001 From: Marcos Alconada Date: Fri, 21 Jun 2019 11:35:56 +0200 Subject: [PATCH 005/123] Update pandoradb_migrate_6.0_to_7.0.mysql.sql --- pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 18bad4b86a..2ccdcf423c 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 @@ -1277,7 +1277,7 @@ ALTER TABLE tevent_filter ADD COLUMN `date_to` date DEFAULT NULL; ALTER TABLE tevent_filter ADD COLUMN `user_comment` text NOT NULL; ALTER TABLE tevent_filter ADD COLUMN `source` tinytext NOT NULL; ALTER TABLE tevent_filter ADD COLUMN `id_extra` tinytext NOT NULL; -ALTER TABLE tevent_filter ADD column id_source_event int(10); +ALTER TABLE tevent_filter ADD COLUMN id_source_event int(10); -- --------------------------------------------------------------------- -- Table `tusuario` -- --------------------------------------------------------------------- From fb24d9bf868825cea3c8298094de15adba3499e6 Mon Sep 17 00:00:00 2001 From: Marcos Alconada Date: Fri, 21 Jun 2019 12:08:31 +0200 Subject: [PATCH 006/123] Update 29.sql --- pandora_console/extras/mr/29.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora_console/extras/mr/29.sql b/pandora_console/extras/mr/29.sql index a140d8bd58..65aaee1527 100644 --- a/pandora_console/extras/mr/29.sql +++ b/pandora_console/extras/mr/29.sql @@ -1,5 +1,7 @@ START TRANSACTION; +DELETE FROM `ttipo_modulo` WHERE `nombre` LIKE 'log4x'; + ALTER TABLE tevent_filter ADD column id_source_event int(10); COMMIT; From 31ec8933a2cbd2fe26e3cbe9e6b0f4656c0dfc0f Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Fri, 21 Jun 2019 12:37:32 +0200 Subject: [PATCH 007/123] changed duplicated code with id_souce_event field --- pandora_console/include/functions_events.php | 21 +++++++------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 2e0377769d..54f7ba4da0 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -1309,28 +1309,21 @@ function events_get_events_grouped( $groupby_extra = ''; } + if (is_metaconsole()) { + $id_source_event = get_parameter('id_source_event'); + if ($id_source_event != '') { + $sql_post .= "AND id_source_event = $id_source_event"; + } + } + db_process_sql('SET group_concat_max_len = 9999999'); $event_lj = events_get_secondary_groups_left_join($table); if ($total) { - if (is_metaconsole()) { - $id_source_event = get_parameter('id_source_event'); - if ($id_source_event != '') { - $sql_post .= "AND id_source_event = $id_source_event"; - } - } - $sql = "SELECT COUNT(*) FROM (SELECT id_evento FROM $table te $event_lj WHERE 1=1 ".$sql_post.' GROUP BY estado, evento, id_agente, id_agentmodule'.$groupby_extra.') AS t'; } else { - if (is_metaconsole()) { - $id_source_event = get_parameter('id_source_event'); - if ($id_source_event != '') { - $sql_post .= "AND id_source_event = $id_source_event"; - } - } - $sql = "SELECT *, MAX(id_evento) AS id_evento, GROUP_CONCAT(DISTINCT user_comment SEPARATOR '
') AS user_comment, GROUP_CONCAT(DISTINCT id_evento SEPARATOR ',') AS similar_ids, From b54ece2b70012d24142aeb6b100c03fae1bf3984 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Mon, 28 Oct 2019 10:46:25 +0100 Subject: [PATCH 008/123] Add menu omnishell --- pandora_console/godmode/menu.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index 7175081912..c61405d66d 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -346,6 +346,9 @@ if (check_acl($config['id_user'], 0, 'PM') || check_acl($config['id_user'], 0, ' $sub['godmode/setup/links']['id'] = 'Links'; $sub['extras/pandora_diag']['text'] = __('Diagnostic info'); $sub['extras/pandora_diag']['id'] = 'Diagnostic info'; + + enterprise_hook('omnishell'); + $sub['godmode/setup/news']['text'] = __('Site news'); $sub['godmode/setup/news']['id'] = 'Site news'; $sub['godmode/setup/file_manager']['text'] = __('File manager'); From 3056c6741acc5bf52b785afe12b0aef0b78e59d1 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Mon, 28 Oct 2019 12:20:55 +0100 Subject: [PATCH 009/123] changes bbdd mr34 --- pandora_console/extras/mr/34.sql | 28 +++++++++++++++ .../pandoradb_migrate_6.0_to_7.0.mysql.sql | 35 +++++++++++++++++-- pandora_console/pandoradb.sql | 31 ++++++++++++++++ pandora_console/pandoradb_data.sql | 4 +-- 4 files changed, 94 insertions(+), 4 deletions(-) create mode 100644 pandora_console/extras/mr/34.sql diff --git a/pandora_console/extras/mr/34.sql b/pandora_console/extras/mr/34.sql new file mode 100644 index 0000000000..1e28c01b69 --- /dev/null +++ b/pandora_console/extras/mr/34.sql @@ -0,0 +1,28 @@ +START TRANSACTION; + +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` ( + `rcmd_id` SERIAL, + `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, + PRIMARY KEY (`rcmd_id`), + FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`) + ON UPDATE CASCADE ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +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 6476e79e2b..1cf541d6e5 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 @@ -1247,13 +1247,13 @@ ALTER TABLE titem MODIFY `source_data` int(10) unsigned; INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30'); -INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 32); +INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 34); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png'); UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager'; DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise'; -INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '739'); +INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '741'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp'); UPDATE `tconfig` SET `value` = 'mini_severity,evento,id_agente,estado,timestamp' WHERE `token` LIKE 'event_fields'; DELETE FROM `tconfig` WHERE `token` LIKE 'integria_api_password'; @@ -2293,3 +2293,34 @@ CREATE TABLE `tdeployment_hosts` ( FOREIGN KEY (`target_agent_version_id`) REFERENCES `tagent_repository`(`id`) ON UPDATE CASCADE ON DELETE SET NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- ---------------------------------------------------------------------- +-- Table `tremote_command` +-- ---------------------------------------------------------------------- +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; + +-- ---------------------------------------------------------------------- +-- Table `tremote_command_target` +-- ---------------------------------------------------------------------- +CREATE TABLE `tremote_command_target` ( + `rcmd_id` SERIAL, + `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, + PRIMARY KEY (`rcmd_id`), + FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`) + ON UPDATE CASCADE ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 3786c4dad3..59ee15dd62 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -3657,3 +3657,34 @@ CREATE TABLE `tdeployment_hosts` ( FOREIGN KEY (`target_agent_version_id`) REFERENCES `tagent_repository`(`id`) ON UPDATE CASCADE ON DELETE SET NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- ---------------------------------------------------------------------- +-- Table `tremote_command` +-- ---------------------------------------------------------------------- +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; + +-- ---------------------------------------------------------------------- +-- Table `tremote_command_target` +-- ---------------------------------------------------------------------- +CREATE TABLE `tremote_command_target` ( + `rcmd_id` SERIAL, + `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, + PRIMARY KEY (`rcmd_id`), + FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`) + ON UPDATE CASCADE ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 686f4aa487..0a1be20b03 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -109,10 +109,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_report_front_logo', 'images/pandora_logo_white.jpg'), ('custom_report_front_header', ''), ('custom_report_front_footer', ''), -('MR', 32), +('MR', 34), ('identification_reminder', 1), ('identification_reminder_timestamp', 0), -('current_package_enterprise', '739'), +('current_package_enterprise', '741'), ('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.0009765625":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'), ('custom_docs_logo', 'default_docs.png'), ('custom_support_logo', 'default_support.png'), From 487da50d317adda89b4cac8b28f759079d497cfc Mon Sep 17 00:00:00 2001 From: marcos Date: Tue, 29 Oct 2019 16:56:11 +0100 Subject: [PATCH 010/123] add omnishell.css --- pandora_console/include/styles/omnishell.css | 24 ++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pandora_console/include/styles/omnishell.css diff --git a/pandora_console/include/styles/omnishell.css b/pandora_console/include/styles/omnishell.css new file mode 100644 index 0000000000..8aae0bb3ff --- /dev/null +++ b/pandora_console/include/styles/omnishell.css @@ -0,0 +1,24 @@ +div.modal_form_omnishell { + max-width: 200px; + margin-left: 39px; + margin-top: 10px; + margin-bottom: 10px; + font-weight: bolder; +} +div.btn_section { + max-width: 200px; + margin-left: 39px; + margin-top: 10px; + margin-bottom: 10px; + font-weight: bolder; +} + +.darrow_style { + vertical-align: center; + text-align: center; + width: 100px; +} +.add_agent { + background-image: url("../../images/darrowright.png"); + background-repeat: no-repeat; +} From bb7ba67dab68a0427e009b4aa6afb7fba47d1569 Mon Sep 17 00:00:00 2001 From: marcos Date: Tue, 29 Oct 2019 17:49:04 +0100 Subject: [PATCH 011/123] changes in omnishell.css --- pandora_console/include/styles/omnishell.css | 27 +++++--------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/pandora_console/include/styles/omnishell.css b/pandora_console/include/styles/omnishell.css index 8aae0bb3ff..27a972425b 100644 --- a/pandora_console/include/styles/omnishell.css +++ b/pandora_console/include/styles/omnishell.css @@ -1,24 +1,11 @@ -div.modal_form_omnishell { - max-width: 200px; - margin-left: 39px; - margin-top: 10px; - margin-bottom: 10px; - font-weight: bolder; -} -div.btn_section { - max-width: 200px; - margin-left: 39px; - margin-top: 10px; - margin-bottom: 10px; - font-weight: bolder; -} - -.darrow_style { - vertical-align: center; - text-align: center; - width: 100px; -} .add_agent { background-image: url("../../images/darrowright.png"); background-repeat: no-repeat; + border: none; +} + +.edit_yaml { + margin-left: 39px; + margin-top: 10px; + margin-bottom: 10px; } From b7710a65622909f99a6741d014fffd6b9e719862 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 30 Oct 2019 08:04:13 +0100 Subject: [PATCH 012/123] fix remove mr34 to mr33 --- pandora_console/extras/mr/33.sql | 25 +++++++++++++++++ pandora_console/extras/mr/34.sql | 28 ------------------- .../pandoradb_migrate_6.0_to_7.0.mysql.sql | 2 +- pandora_console/pandoradb_data.sql | 2 +- 4 files changed, 27 insertions(+), 30 deletions(-) delete mode 100644 pandora_console/extras/mr/34.sql diff --git a/pandora_console/extras/mr/33.sql b/pandora_console/extras/mr/33.sql index eeca8ed5d7..61653a12ad 100644 --- a/pandora_console/extras/mr/33.sql +++ b/pandora_console/extras/mr/33.sql @@ -6,4 +6,29 @@ INSERT INTO `ttipo_modulo` VALUES (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'); +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` ( + `rcmd_id` SERIAL, + `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, + PRIMARY KEY (`rcmd_id`), + FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`) + ON UPDATE CASCADE ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + COMMIT; \ No newline at end of file diff --git a/pandora_console/extras/mr/34.sql b/pandora_console/extras/mr/34.sql deleted file mode 100644 index 1e28c01b69..0000000000 --- a/pandora_console/extras/mr/34.sql +++ /dev/null @@ -1,28 +0,0 @@ -START TRANSACTION; - -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` ( - `rcmd_id` SERIAL, - `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, - PRIMARY KEY (`rcmd_id`), - FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`) - ON UPDATE CASCADE ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -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 004611ca91..0a2cfdefb4 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 @@ -1247,7 +1247,7 @@ ALTER TABLE titem MODIFY `source_data` int(10) unsigned; INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30'); -INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 34); +INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 33); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png'); diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 98627a0e3f..c2868a214e 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -109,7 +109,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_report_front_logo', 'images/pandora_logo_white.jpg'), ('custom_report_front_header', ''), ('custom_report_front_footer', ''), -('MR', 34), +('MR', 33), ('identification_reminder', 1), ('identification_reminder_timestamp', 0), ('current_package_enterprise', '741'), From d37410ed8c6043364c30eb664acb82b5d9f0c27a Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 30 Oct 2019 14:43:10 +0100 Subject: [PATCH 013/123] fixed error bbdd --- pandora_console/extras/mr/33.sql | 5 +++-- .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 5 +++-- pandora_console/pandoradb.sql | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/pandora_console/extras/mr/33.sql b/pandora_console/extras/mr/33.sql index 61653a12ad..9f9e857965 100644 --- a/pandora_console/extras/mr/33.sql +++ b/pandora_console/extras/mr/33.sql @@ -20,13 +20,14 @@ CREATE TABLE `tremote_command` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `tremote_command_target` ( - `rcmd_id` SERIAL, + `id` SERIAL, + `rcmd_id` bigint unsigned NOT NULL unique, `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, - PRIMARY KEY (`rcmd_id`), + PRIMARY KEY (`id`), FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 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 0a2cfdefb4..d72c908400 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 @@ -2319,13 +2319,14 @@ CREATE TABLE `tremote_command` ( -- Table `tremote_command_target` -- ---------------------------------------------------------------------- CREATE TABLE `tremote_command_target` ( - `rcmd_id` SERIAL, + `id` SERIAL, + `rcmd_id` bigint unsigned NOT NULL unique, `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, - PRIMARY KEY (`rcmd_id`), + PRIMARY KEY (`id`), FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 59ee15dd62..61eab5f300 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -3678,13 +3678,14 @@ CREATE TABLE `tremote_command` ( -- Table `tremote_command_target` -- ---------------------------------------------------------------------- CREATE TABLE `tremote_command_target` ( - `rcmd_id` SERIAL, + `id` SERIAL, + `rcmd_id` bigint unsigned NOT NULL unique, `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, - PRIMARY KEY (`rcmd_id`), + PRIMARY KEY (`id`), FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file From 334cea472e9e4c45de3b8c22e40c8ea2726df7db Mon Sep 17 00:00:00 2001 From: marcos Date: Wed, 30 Oct 2019 14:47:28 +0100 Subject: [PATCH 014/123] add method ui_progress_extend(work in progress) --- pandora_console/include/functions_ui.php | 107 +++++++++++++++++++ pandora_console/include/styles/omnishell.css | 20 ++++ 2 files changed, 127 insertions(+) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index cc3b40ffbb..1d43cebe28 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -2911,6 +2911,113 @@ function ui_progress( } +/** + * Generates a progress bar CSS based. + * Requires css progress.css + * + * @param integer $progress Progress. + * @param string $width Width. + * @param integer $height Height in 'em'. + * @param string $color Color. + * @param boolean $return Return or paint (if false). + * @param boolean $text Text to be displayed,by default progress %. + * @param array $ajax Ajax: [ 'page' => 'page', 'data' => 'data' ] Sample: + * [ + * 'page' => 'operation/agentes/ver_agente', Target page. + * 'interval' => 100 / $agent["intervalo"], Ask every interval seconds. + * 'data' => [ Data to be sent to target page. + * 'id_agente' => $id_agente, + * 'refresh_contact' => 1, + * ], + * ]. + * + * @return string HTML code. + */ +function ui_progress_extend( + $progress, + $width='100%', + $height='2.5', + $color='#82b92e', + $return=true, + $text='', + $ajax=false +) { + if (!$progress) { + $progress = 0; + } + + if ($progress > 100) { + $progress = 100; + } + + if ($progress < 0) { + $progress = 0; + } + + if (empty($text)) { + $text = $progress.'%'; + } + + ui_require_css_file('progress'); + $output .= ''; + $output .= ''; + $output .= ''; + + if ($ajax !== false && is_array($ajax)) { + $output .= ''; + } + + if (!$return) { + echo $output; + } + + return $output; +} + + /** * Generate needed code to print a datatables jquery plugin. * diff --git a/pandora_console/include/styles/omnishell.css b/pandora_console/include/styles/omnishell.css index 27a972425b..4d41cb3cd5 100644 --- a/pandora_console/include/styles/omnishell.css +++ b/pandora_console/include/styles/omnishell.css @@ -4,8 +4,28 @@ border: none; } +.remove_agent { + background-image: url("../../images/darrowleft.png"); + background-repeat: no-repeat; + border: none; +} + .edit_yaml { margin-left: 39px; margin-top: 10px; margin-bottom: 10px; } + +li > input[type="text"] { + border: 1px solid lightgrey; + border-radius: 0; + font-family: "lato-bolder", "Open Sans", sans-serif; + font-weight: lighter; + padding: 0px 0px 2px 0px; + box-sizing: border-box; + margin-bottom: 4px; +} + +.margin_button { + margin-right: 5px; +} From 7bfa0762635c73d056c1efb07c848e956293e0b6 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 30 Oct 2019 14:52:10 +0100 Subject: [PATCH 015/123] fixed error bbdd --- pandora_console/extras/mr/33.sql | 2 +- pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 2 +- pandora_console/pandoradb.sql | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/extras/mr/33.sql b/pandora_console/extras/mr/33.sql index 9f9e857965..c34209b867 100644 --- a/pandora_console/extras/mr/33.sql +++ b/pandora_console/extras/mr/33.sql @@ -21,7 +21,7 @@ CREATE TABLE `tremote_command` ( CREATE TABLE `tremote_command_target` ( `id` SERIAL, - `rcmd_id` bigint unsigned NOT NULL unique, + `rcmd_id` bigint unsigned NOT NULL, `id_agente` int(10) unsigned NOT NULL, `utimestamp` int(20) unsigned NOT NULL default 0, `stdout` text, 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 d72c908400..d195823d7b 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 @@ -2320,7 +2320,7 @@ CREATE TABLE `tremote_command` ( -- ---------------------------------------------------------------------- CREATE TABLE `tremote_command_target` ( `id` SERIAL, - `rcmd_id` bigint unsigned NOT NULL unique, + `rcmd_id` bigint unsigned NOT NULL, `id_agente` int(10) unsigned NOT NULL, `utimestamp` int(20) unsigned NOT NULL default 0, `stdout` text, diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 61eab5f300..1b235f6d01 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -3679,7 +3679,7 @@ CREATE TABLE `tremote_command` ( -- ---------------------------------------------------------------------- CREATE TABLE `tremote_command_target` ( `id` SERIAL, - `rcmd_id` bigint unsigned NOT NULL unique, + `rcmd_id` bigint unsigned NOT NULL, `id_agente` int(10) unsigned NOT NULL, `utimestamp` int(20) unsigned NOT NULL default 0, `stdout` text, From c72f792d4367cb0ef7a62eac408290306cdedd95 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 31 Oct 2019 18:18:38 +0100 Subject: [PATCH 016/123] SAP discovery task --- pandora_console/include/constants.php | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index 893a4f6202..4c092bad52 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -590,6 +590,7 @@ define('DISCOVERY_CLOUD_AWS_EC2', 6); define('DISCOVERY_CLOUD_AWS_RDS', 7); define('DISCOVERY_CLOUD_AZURE_COMPUTE', 8); define('DISCOVERY_DEPLOY_AGENTS', 9); +define('DISCOVERY_APP_SAP', 10); // Discovery types matching definition. From 5a42e76650cc2f70e7073cea1d124d6258524311 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 31 Oct 2019 18:19:00 +0100 Subject: [PATCH 017/123] SAP discovery task --- pandora_console/include/constants.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index 4c092bad52..886c1f7c20 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -537,7 +537,7 @@ define('NODE_GENERIC', 3); define('STATUS_OK', 0); define('STATUS_ERROR', 1); -// Maps (new networkmaps and new visualmaps). +// Maps new networkmaps and new visualmaps. define('MAP_TYPE_NETWORKMAP', 0); define('MAP_TYPE_VISUALMAP', 1); From 115c884cd4d67c0e3f1d54ce96d24c65ea929962 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 31 Oct 2019 21:13:18 +0100 Subject: [PATCH 018/123] Discovery SAP --- pandora_console/extras/mr/33.sql | 2 ++ .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 2 +- .../godmode/wizards/DiscoveryTaskList.class.php | 3 +++ pandora_console/godmode/wizards/Wizard.main.php | 5 ++++- .../include/class/CredentialStore.class.php | 11 +++++++++-- pandora_console/pandoradb.sql | 2 +- 6 files changed, 20 insertions(+), 5 deletions(-) diff --git a/pandora_console/extras/mr/33.sql b/pandora_console/extras/mr/33.sql index eeca8ed5d7..56357b388b 100644 --- a/pandora_console/extras/mr/33.sql +++ b/pandora_console/extras/mr/33.sql @@ -6,4 +6,6 @@ INSERT INTO `ttipo_modulo` VALUES (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'); +ALTER TABLE `tcredential_store` MODIFY COLUMN `product` enum('CUSTOM', 'AWS', 'AZURE', 'GOOGLE', 'SAP') default 'CUSTOM'; + 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 0b309cfd84..3075c64ddb 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 @@ -2245,7 +2245,7 @@ CREATE TABLE `tvisual_console_elements_cache` ( CREATE TABLE IF NOT EXISTS `tcredential_store` ( `identifier` varchar(100) NOT NULL, `id_group` mediumint(4) unsigned NOT NULL DEFAULT 0, - `product` enum('CUSTOM', 'AWS', 'AZURE', 'GOOGLE') default 'CUSTOM', + `product` enum('CUSTOM', 'AWS', 'AZURE', 'GOOGLE', 'SAP') default 'CUSTOM', `username` text, `password` text, `extra_1` text, diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php index ed523d0b82..d1b98a716d 100644 --- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php +++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php @@ -773,6 +773,9 @@ class DiscoveryTaskList extends Wizard case DISCOVERY_CLOUD_AWS_RDS: return 'wiz=cloud&mode=amazonws&ki='.$task['auth_strings'].'&sub=rds&page=0'; + case DISCOVERY_APP_SAP: + return 'wiz=app&mode=SAP&page=0'; + default: if ($task['description'] == 'console_task') { return 'wiz=ctask'; diff --git a/pandora_console/godmode/wizards/Wizard.main.php b/pandora_console/godmode/wizards/Wizard.main.php index 5ffeb716d9..71115b67ed 100644 --- a/pandora_console/godmode/wizards/Wizard.main.php +++ b/pandora_console/godmode/wizards/Wizard.main.php @@ -806,8 +806,11 @@ class Wizard $padding_left = isset($column['padding-left']) ? 'padding-left: '.$column['padding-left'].';' : 'padding-left: 0;'; $padding_right = isset($column['padding-right']) ? 'padding-right: '.$column['padding-right'].';' : 'padding-right: 0;'; $extra_styles = isset($column['style']) ? $column['style'] : ''; + $class = isset($column['class']) ? $column['class'] : ''; - $output .= '
'; + $output .= '
'; foreach ($column['inputs'] as $input) { if (is_array($input)) { diff --git a/pandora_console/include/class/CredentialStore.class.php b/pandora_console/include/class/CredentialStore.class.php index b453318c4b..cf315d4a5b 100644 --- a/pandora_console/include/class/CredentialStore.class.php +++ b/pandora_console/include/class/CredentialStore.class.php @@ -432,7 +432,7 @@ class CredentialStore extends Wizard return $return; } - return false; + return []; } @@ -866,6 +866,7 @@ class CredentialStore extends Wizard 'CUSTOM' => __('Custom'), 'AWS' => __('Aws'), 'AZURE' => __('Azure'), + 'SAP' => __('SAP'), // 'GOOGLE' => __('Google'), ], 'selected' => (isset($values['product']) ? $values['product'] : 'CUSTOM'), @@ -900,6 +901,7 @@ class CredentialStore extends Wizard case 'GOOGLE': // Need further investigation. case 'CUSTOM': + case 'SAP': $user_label = __('Account ID'); $pass_label = __('Password'); $extra1 = false; @@ -1038,7 +1040,12 @@ class CredentialStore extends Wizard $('#div-extra_2 label').text(''); $('#div-extra_1').show(); $('#div-extra_2').show(); - } + } else if ($('#product :selected').val() == "SAP") { + $('#div-username label').text(''); + $('#div-password label').text(''); + $('#div-extra_1').hide(); + $('#div-extra_2').hide(); + } } /** diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 3786c4dad3..1682da2ec7 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -699,7 +699,7 @@ CREATE TABLE IF NOT EXISTS `tgrupo` ( CREATE TABLE IF NOT EXISTS `tcredential_store` ( `identifier` varchar(100) NOT NULL, `id_group` mediumint(4) unsigned NOT NULL DEFAULT 0, - `product` enum('CUSTOM', 'AWS', 'AZURE', 'GOOGLE') default 'CUSTOM', + `product` enum('CUSTOM', 'AWS', 'AZURE', 'GOOGLE', 'SAP') default 'CUSTOM', `username` text, `password` text, `extra_1` text, From aa30a12f3172d7c9bbea71a86cc0026c14b86d1c Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 31 Oct 2019 21:15:18 +0100 Subject: [PATCH 019/123] wizard doc minor fix --- .../godmode/wizards/Wizard.main.php | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/pandora_console/godmode/wizards/Wizard.main.php b/pandora_console/godmode/wizards/Wizard.main.php index 71115b67ed..6f1d59d56b 100644 --- a/pandora_console/godmode/wizards/Wizard.main.php +++ b/pandora_console/godmode/wizards/Wizard.main.php @@ -436,11 +436,15 @@ class Wizard * * @param array $input Definition of target block to be printed. * @param boolean $return Return as string or direct output. + * @param boolean $direct Avoid encapsulation if input print is direct. * * @return string HTML content. */ - public function printBlock(array $input, bool $return=false, bool $not_direct=false) - { + public function printBlock( + array $input, + bool $return=false, + bool $direct=false + ) { $output = ''; if ($input['hidden'] == 1) { $class = ' hidden'; @@ -453,7 +457,7 @@ class Wizard } if (is_array($input['block_content']) === true) { - $not_direct = (bool) $input['direct']; + $direct = (bool) $input['direct']; // Print independent block of inputs. $output .= '
  • '; @@ -462,17 +466,21 @@ class Wizard $output .= '<'.$input['wrapper'].' id="'.$input['block_id'].'" class="'.$class.'">'; } - if (!$not_direct) { + if (!$direct) { // Avoid encapsulation if input is direct => 1. $output .= '
      '; } foreach ($input['block_content'] as $input) { - $output .= $this->printBlock($input, $return, (bool) $not_direct); + $output .= $this->printBlock( + $input, + $return, + (bool) $direct + ); } // Close block. - if (!$not_direct) { + if (!$direct) { $output .= '
    '; } @@ -483,7 +491,7 @@ class Wizard $output .= '
  • '; } else { if ($input['arguments']['type'] != 'hidden') { - if (!$not_direct) { + if (!$direct) { $output .= '
  • '; } @@ -491,7 +499,7 @@ class Wizard $output .= $this->printInput($input['arguments']); // Allow dynamic content. $output .= $input['extra']; - if (!$not_direct) { + if (!$direct) { $output .= '
  • '; } } else { From a249132fb51700d89703c5829b60d4e872fc7261 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 31 Oct 2019 21:32:34 +0100 Subject: [PATCH 020/123] sap discovery - config --- pandora_console/include/functions_config.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index bab47d6926..4c46daf680 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -455,6 +455,10 @@ function config_update_config() $error_update[] = __('Ipam Ocuppied Manager Warning'); } + if (!config_update_value('sap_license', get_parameter('sap_license'))) { + $error_update[] = __('Deset SAP license'); + } + $inventory_changes_blacklist = get_parameter('inventory_changes_blacklist', []); if (!config_update_value('inventory_changes_blacklist', implode(',', $inventory_changes_blacklist))) { $error_update[] = __('Inventory changes blacklist'); From 84bdc8fc17c1d0763789fea7654ea04af60305b3 Mon Sep 17 00:00:00 2001 From: marcos Date: Mon, 4 Nov 2019 17:39:21 +0100 Subject: [PATCH 021/123] add progress extend --- pandora_console/include/functions_ui.php | 33 +++++++++++++++--------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 1d43cebe28..6122cd12c0 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -2915,10 +2915,10 @@ function ui_progress( * Generates a progress bar CSS based. * Requires css progress.css * - * @param integer $progress Progress. + * @param array $progress Progress. * @param string $width Width. * @param integer $height Height in 'em'. - * @param string $color Color. + * @param array $color status color. * @param boolean $return Return or paint (if false). * @param boolean $text Text to be displayed,by default progress %. * @param array $ajax Ajax: [ 'page' => 'page', 'data' => 'data' ] Sample: @@ -2942,27 +2942,36 @@ function ui_progress_extend( $text='', $ajax=false ) { - if (!$progress) { + if (!$progress['total']) { $progress = 0; } - if ($progress > 100) { - $progress = 100; + if ($progress['total'] > 100) { + $progress['total'] = 100; } - if ($progress < 0) { - $progress = 0; + if ($progress['total'] < 0) { + $progress['total'] = 0; } if (empty($text)) { - $text = $progress.'%'; + $text = $progress['total'].'%'; } + $totalW = ($progress['total'] * 10); + $badW = ($progress['bad'] * 10); + $goodW = ($progress['good'] * 10); + $unknownW = ($progress['unknown'] * 10); ui_require_css_file('progress'); - $output .= ''; - $output .= ''; - $output .= ''; + $output .= '
    '; + $output .= '
    '; + $output .= '
    '; + $output .= '
    '; + $output .= '
    '; if ($ajax !== false && is_array($ajax)) { $output .= ' + - - - From ca9d168e67b035611ecc4e4caf3594a2b615ec7f Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 11 Nov 2019 18:12:43 +0100 Subject: [PATCH 031/123] wip omnishell --- pandora_agents/unix/pandora_agent | 25 +++++++++++++++++---- pandora_server/lib/PandoraFMS/DataServer.pm | 6 ++++- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index c9315a31c8..cd2c293aef 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -281,6 +281,20 @@ sub error ($) { exit 1; } +################################################################################ +# Try to load extra libraries.c +################################################################################ +sub load_libraries() { + # Dynamic load. Avoid unwanted behaviour. + eval {eval 'require YAML::Tiny;1' or die('YAML::Tiny lib not found, commands feature won\'t be available');}; + if ($@) { + $YAML = 0; + print STDERR $@; + } else { + $YAML = 1; + } +} + ################################################################################ # Check a regular expression. Returns 1 if its valid, 0 otherwise. ################################################################################ @@ -1199,14 +1213,14 @@ sub recv_file { }; if ($@) { - log_message ('error', "Error retrieving file: File transfer command is not responding."); + log_message ('error', "Error retrieving file: '.$file.' File transfer command is not responding."); exit 1; } # Get the errorlevel my $rc = $? >> 8; if ($rc != 0) { - log_message ('error', "Error retrieving file: $output"); + log_message ('error', "Error retrieving file: '$file' $output"); } exit $rc; } @@ -1469,7 +1483,7 @@ sub prepare_remote_commands { }; if ($@) { # Failed. - log_message('error', 'Failed to decode command. ' . $@); + log_message('error', 'Failed to decode command. ' . "\n".$@); delete $Conf{'commands'}->{$ref}; next; } @@ -3206,6 +3220,8 @@ my $iter_base_time = time(); $LogFileIdx = -1; # Loop while (1) { + load_libraries(); + if (-e $Conf{'logfile'} && (stat($Conf{'logfile'}))[7] > $Conf{'logsize'}) { rotate_log(); } @@ -3376,9 +3392,10 @@ while (1) { $Xml .= "\n"; $Xml .= " \n"; $Xml .= " {'name'}."]]>\n"; + $Xml .= " \n"; $Xml .= " {'error_level'}."]]>\n"; $Xml .= " {'stdout'}."]]>\n"; - $Xml .= " {'stderr'}."]]>\n"; + $Xml .= " {'stderr'}."]]>\n"; $Xml .= " \n"; $Xml .= "\n"; } diff --git a/pandora_server/lib/PandoraFMS/DataServer.pm b/pandora_server/lib/PandoraFMS/DataServer.pm index df1cbbecfb..38a33fc263 100644 --- a/pandora_server/lib/PandoraFMS/DataServer.pm +++ b/pandora_server/lib/PandoraFMS/DataServer.pm @@ -602,8 +602,12 @@ sub process_xml_data ($$$$$) { # Process events process_events_dataserver($pa_config, $data, $agent_id, $group_id, $dbh); - # Process disovery modules + # Process discovery modules enterprise_hook('process_discovery_data', [$pa_config, $data, $server_id, $dbh]); + + # Process command responses + enterprise_hook('process_rcmd_report', [$pa_config, $data, $server_id, $dbh, $agent_id, $timestamp]); + } ########################################################################## From ec05b52fb4938b48c52f2b4a1fb5ba183c278108 Mon Sep 17 00:00:00 2001 From: marcos Date: Tue, 12 Nov 2019 10:08:35 +0100 Subject: [PATCH 032/123] update omnishell.css --- pandora_console/include/styles/omnishell.css | 44 ++++++++++++++------ 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/pandora_console/include/styles/omnishell.css b/pandora_console/include/styles/omnishell.css index c7379b8069..97dba30836 100644 --- a/pandora_console/include/styles/omnishell.css +++ b/pandora_console/include/styles/omnishell.css @@ -1,15 +1,3 @@ -.add_agent { - background-image: url("../../images/darrowright.png"); - background-repeat: no-repeat; - border: none; -} - -.remove_agent { - background-image: url("../../images/darrowleft.png"); - background-repeat: no-repeat; - border: none; -} - .edit_yaml { margin-left: 39px; margin-top: 10px; @@ -77,3 +65,35 @@ div.container-msg-target-modal pre { border: 3px dashed grey; border-radius: 10px; } + +ul.textarea_script, +.textarea_script { + max-height: 125px; +} + +.add_button { + height: 20%; + margin-bottom: 35px; +} + +.status_table { + margin-top: 20px; +} + +.gr_table { + margin-top: 20px; + margin-left: 75px; +} + +.btn_section { + width: 1px; + align-self: center; +} + +.btn_add_agent { + background-image: url(../../images/darrowright.png); +} + +.btn_del_agent { + background-image: url(../../images/darrowleft.png); +} From 7b06ceaafcbe289b2f8d79cefbcd8c98894c81b0 Mon Sep 17 00:00:00 2001 From: marcos Date: Tue, 12 Nov 2019 10:54:36 +0100 Subject: [PATCH 033/123] add sap menu --- pandora_console/godmode/menu.php | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index edf7be1873..062df046b2 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -56,6 +56,7 @@ if (check_acl($config['id_user'], 0, 'AR') enterprise_hook('applications_menu'); enterprise_hook('cloud_menu'); enterprise_hook('console_task_menu'); + enterprise_hook('SAP_view'); } // Add to menu. From 9d3c9febad228cecf10bc07a24cd8d1fc3e94339 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Tue, 12 Nov 2019 13:16:25 +0100 Subject: [PATCH 034/123] Add alert correlation wizard --- pandora_console/include/functions_html.php | 121 ++++++++++++++++++- pandora_console/include/functions_menu.php | 2 +- pandora_console/include/styles/discovery.css | 1 + pandora_console/include/styles/pandora.css | 12 ++ 4 files changed, 134 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 12a8ecfa88..e329af6013 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1618,6 +1618,89 @@ function html_print_input_email(array $settings):string } +/** + * Render an input number element. + * + * @param array $settings Array with attributes input. + * only name is necessary. + * + * @return string + */ +function html_print_input_number(array $settings):string +{ + // TODO: const. + $valid_attrs = [ + 'accept', + 'disabled', + 'maxlength', + 'name', + 'readonly', + 'placeholder', + 'size', + 'value', + 'accesskey', + 'class', + 'dir', + 'id', + 'lang', + 'style', + 'tabindex', + 'title', + 'xml:lang', + 'onfocus', + 'onblur', + 'onselect', + 'onchange', + 'onclick', + 'ondblclick', + 'onmousedown', + 'onmouseup', + 'onmouseover', + 'onmousemove', + 'onmouseout', + 'onkeypress', + 'onkeydown', + 'onkeyup', + 'required', + 'pattern', + 'autocomplete', + ]; + + $output = ''; + if (isset($settings) === true && is_array($settings) === true) { + // Check Name is necessary. + if (isset($settings['name']) === true) { + $output = ' $attr_value) { + // Check valid attribute. + if (in_array($attribute, $valid_attrs) === false) { + continue; + } + + $output .= $attribute.'="'.$attr_value.'" '; + } + + $output .= $function.'/>'; + } + } + + return $output; +} + + /** * Render an input image element. * @@ -3309,6 +3392,10 @@ function html_print_input($data, $wrapper='div', $input_only=false) $output .= html_print_input_email($data); break; + case 'number': + $output .= html_print_input_number($data); + break; + case 'hidden': $output .= html_print_input_hidden( $data['name'], @@ -3413,7 +3500,8 @@ function html_print_input($data, $wrapper='div', $input_only=false) break; case 'submit': - $output .= '<'.$wrapper.' class="action-buttons" style="width: 100%">'.html_print_submit_button( + $width = (isset($data['width']) === true) ? 'width: '.$data['width'] : 'width: 100%'; + $output .= '<'.$wrapper.' class="action-buttons" style="'.$width.'">'.html_print_submit_button( ((isset($data['label']) === true) ? $data['label'] : 'OK'), ((isset($data['name']) === true) ? $data['name'] : ''), ((isset($data['disabled']) === true) ? $data['disabled'] : false), @@ -3498,6 +3586,10 @@ function html_print_input($data, $wrapper='div', $input_only=false) $output .= html_print_input_email($data); break; + case 'multicheck': + $output .= html_print_input_multicheck($data); + break; + default: // Ignore. break; @@ -3514,6 +3606,33 @@ function html_print_input($data, $wrapper='div', $input_only=false) } +/** + * Print all checkbox in the same row. + * + * @param array $data Array with attributes input. + * only name is necessary. + * + * @return string + */ +function html_print_input_multicheck(array $data):string +{ + $html = ''; + if (isset($data['data']) === true && is_array($data['data']) === true) { + foreach ($data['data'] as $key => $value) { + $html .= $value; + $html .= html_print_checkbox( + 'days_week_'.$key, + 1, + $data['checked'][$key], + true + ); + } + } + + return $html; +} + + /** * Print an autocomplete input filled out with Integria IMS users. * diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index 36785064ef..ee242a1624 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -536,7 +536,7 @@ function menu_add_extras(&$menu) $menu_extra['galertas']['sub']['godmode/alerts/configure_alert_action']['text'] = __('Manage alert actions'); $menu_extra['galertas']['sub']['godmode/alerts/configure_alert_command']['text'] = __('Manage commands'); - $menu_extra['galertas']['sub']['enterprise/godmode/alerts/alert_events']['text'] = __('Manage event alerts'); + $menu_extra['galertas']['sub']['enterprise/godmode/alerts/alert_correlation']['text'] = __('Manage event alerts'); $menu_extra['gservers']['sub']['enterprise/godmode/servers/manage_export_form']['text'] = __('Manage export targets'); diff --git a/pandora_console/include/styles/discovery.css b/pandora_console/include/styles/discovery.css index 2aee23f645..d191357511 100644 --- a/pandora_console/include/styles/discovery.css +++ b/pandora_console/include/styles/discovery.css @@ -204,6 +204,7 @@ label { width: 100%; } +li > input[type="number"], li > input[type="text"], li > input[type="email"], li > input[type="password"], diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index d6a1d97ecf..a7bf928bb5 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -551,6 +551,18 @@ select:-internal-list-box { align-items: center; } +.flex-space-around { + justify-content: space-around; +} + +.flex-end { + justify-content: flex-end; +} + +.flex-start { + justify-content: flex-start; +} + .nowrap { flex-wrap: nowrap; } From 02677849ced33f1ba969a3b1e376aaa09fd342ff Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Tue, 12 Nov 2019 13:17:00 +0100 Subject: [PATCH 035/123] add new css --- pandora_console/include/styles/alert.css | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 pandora_console/include/styles/alert.css diff --git a/pandora_console/include/styles/alert.css b/pandora_console/include/styles/alert.css new file mode 100644 index 0000000000..7ee5545e56 --- /dev/null +++ b/pandora_console/include/styles/alert.css @@ -0,0 +1,47 @@ +li#li-buttons-alert-list > div { + margin-left: 10px; +} + +li#li-buttons-alert-list > label, +li#li-filters-alert-list > label { + width: initial; +} + +form#general_filters_alert ul li label { + width: 150px; +} + +form#conditions_filters_alert ul li label:first-child { + width: 300px; +} + +li#li-name-group input { + margin-right: 50px; +} + +li#li-description textarea { + flex: 1 1 auto; +} + +li#li-from-to-threshold > label:not(:first-child), +li#li-time-from-to > label:not(:first-child) { + width: initial; + margin-right: 15px; +} + +li#li-from-to-threshold > input, +li#li-time-from-to > input { + margin-right: 15px; +} + +#threshold_manual, +#threshold_default { + /*TODO: UGLY*/ + width: initial !important; + margin-right: 10px; +} + +img.handle-alerts { + width: 20px; + cursor: move; +} From 25f879df00786378aa7d1064bcec38f0ae91f84c Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Tue, 12 Nov 2019 18:45:20 +0100 Subject: [PATCH 036/123] add step 3 --- pandora_console/include/styles/alert.css | 68 ++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/pandora_console/include/styles/alert.css b/pandora_console/include/styles/alert.css index 7ee5545e56..b2d1c4f9ce 100644 --- a/pandora_console/include/styles/alert.css +++ b/pandora_console/include/styles/alert.css @@ -45,3 +45,71 @@ img.handle-alerts { width: 20px; cursor: move; } + +.content { + width: 80%; + min-height: 4em; + border: 1px solid #ddd; + padding-top: 1em; + padding-bottom: 1em; +} +ul.sample { + max-width: 50%; + flex-grow: 1; + justify-content: space-between; +} +ul.sample li { + padding-bottom: 1em; +} +ul.sample li:last-child { + padding-bottom: 0; +} +div.target { + flex-grow: 1; + margin-left: 3em; + border: 1px solid #ddd; +} + +.field { + display: inline-block; + border-radius: 10px; + padding: 5px; + padding-left: 8px; + padding-right: 8px; + margin: 3px; + color: #fff; + font-family: "lato-lighter", "Open Sans", sans-serif; + font-weight: 600; + background-color: #333; +} + +.log { + background-color: #638460; +} +.event { + background-color: #587cff; +} + +.operator { + background-color: #908787; +} + +.variable { + background-color: #82b92e; +} + +.modifier { + background-color: #cba9d2; +} + +.nexo { + background-color: #424242; +} + +.rules div { + display: inline-block; +} + +.inEdit { + background-color: #888; +} From d1fbd36a971a87a4ca6578c77b90b72c4f260f32 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 12 Nov 2019 19:31:38 +0100 Subject: [PATCH 037/123] WIP omnishell --- .../godmode/wizards/Wizard.main.php | 29 +- pandora_console/include/styles/discovery.css | 2 +- pandora_console/include/styles/omnishell.css | 430 ++++++++++++++++-- pandora_console/include/styles/pandora.css | 2 +- 4 files changed, 409 insertions(+), 54 deletions(-) diff --git a/pandora_console/godmode/wizards/Wizard.main.php b/pandora_console/godmode/wizards/Wizard.main.php index 5ffeb716d9..6f1d59d56b 100644 --- a/pandora_console/godmode/wizards/Wizard.main.php +++ b/pandora_console/godmode/wizards/Wizard.main.php @@ -436,11 +436,15 @@ class Wizard * * @param array $input Definition of target block to be printed. * @param boolean $return Return as string or direct output. + * @param boolean $direct Avoid encapsulation if input print is direct. * * @return string HTML content. */ - public function printBlock(array $input, bool $return=false, bool $not_direct=false) - { + public function printBlock( + array $input, + bool $return=false, + bool $direct=false + ) { $output = ''; if ($input['hidden'] == 1) { $class = ' hidden'; @@ -453,7 +457,7 @@ class Wizard } if (is_array($input['block_content']) === true) { - $not_direct = (bool) $input['direct']; + $direct = (bool) $input['direct']; // Print independent block of inputs. $output .= '
  • '; @@ -462,17 +466,21 @@ class Wizard $output .= '<'.$input['wrapper'].' id="'.$input['block_id'].'" class="'.$class.'">'; } - if (!$not_direct) { + if (!$direct) { // Avoid encapsulation if input is direct => 1. $output .= '
      '; } foreach ($input['block_content'] as $input) { - $output .= $this->printBlock($input, $return, (bool) $not_direct); + $output .= $this->printBlock( + $input, + $return, + (bool) $direct + ); } // Close block. - if (!$not_direct) { + if (!$direct) { $output .= '
    '; } @@ -483,7 +491,7 @@ class Wizard $output .= '
  • '; } else { if ($input['arguments']['type'] != 'hidden') { - if (!$not_direct) { + if (!$direct) { $output .= '
  • '; } @@ -491,7 +499,7 @@ class Wizard $output .= $this->printInput($input['arguments']); // Allow dynamic content. $output .= $input['extra']; - if (!$not_direct) { + if (!$direct) { $output .= '
  • '; } } else { @@ -806,8 +814,11 @@ class Wizard $padding_left = isset($column['padding-left']) ? 'padding-left: '.$column['padding-left'].';' : 'padding-left: 0;'; $padding_right = isset($column['padding-right']) ? 'padding-right: '.$column['padding-right'].';' : 'padding-right: 0;'; $extra_styles = isset($column['style']) ? $column['style'] : ''; + $class = isset($column['class']) ? $column['class'] : ''; - $output .= '
    '; + $output .= '
    '; foreach ($column['inputs'] as $input) { if (is_array($input)) { diff --git a/pandora_console/include/styles/discovery.css b/pandora_console/include/styles/discovery.css index 2aee23f645..82451e7a1e 100644 --- a/pandora_console/include/styles/discovery.css +++ b/pandora_console/include/styles/discovery.css @@ -31,7 +31,7 @@ li.discovery > a label { } div.data_container > label { - font-family: "lato-bolder", "Open Sans", sans-serif; + font-family: "lato", "Open Sans", sans-serif; font-weight: lighter; } diff --git a/pandora_console/include/styles/omnishell.css b/pandora_console/include/styles/omnishell.css index 97dba30836..e082facc63 100644 --- a/pandora_console/include/styles/omnishell.css +++ b/pandora_console/include/styles/omnishell.css @@ -4,16 +4,6 @@ margin-bottom: 10px; } -li > input[type="text"] { - border: 1px solid lightgrey; - border-radius: 0; - font-family: "lato-bolder", "Open Sans", sans-serif; - font-weight: lighter; - padding: 0px 0px 2px 0px; - box-sizing: border-box; - margin-bottom: 4px; -} - .margin_button { margin-right: 5px; } @@ -41,59 +31,413 @@ li > input[type="text"] { background-color: #8bbbdd; } -h4 { - color: #343434; - font-family: "lato-bolder", "Open Sans", sans-serif; - line-height: 18pt; -} - .container-msg-target-modal { max-height: 400px; overflow: initial; } -div.container-msg-target-modal p { - font-size: 10pt; +ul.wizard li > textarea { + height: 5em; +} + +.label_select { + font-family: "lato-lighter", "Open Sans", sans-serif; font-weight: bolder; - text-align: center; } -div.container-msg-target-modal pre { - padding: 20px; - white-space: pre-wrap; - background-color: #e2e2e2; - border: 3px dashed grey; - border-radius: 10px; +.divided select { + width: 100%; } -ul.textarea_script, -.textarea_script { - max-height: 125px; +.inline { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: space-between; + align-content: center; + align-items: center; } -.add_button { - height: 20%; - margin-bottom: 35px; +.inline label:first-child { + width: 250px; + vertical-align: top; + display: inline-block; } -.status_table { - margin-top: 20px; +.inline label:nth-child(3) { + margin-right: 1em; + margin-left: 1em; } -.gr_table { - margin-top: 20px; - margin-left: 75px; +.inline select { + margin-right: 1em; } -.btn_section { - width: 1px; +.middle { align-self: center; } - -.btn_add_agent { - background-image: url(../../images/darrowright.png); +.edit_discovery_info { + padding-top: 0; } -.btn_del_agent { - background-image: url(../../images/darrowleft.png); +ul.wizard { + width: 100%; +} + +.filter_column { + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-between; + align-content: center; +} + +.filter_column .edit_discovery_input { + flex-grow: 1; + width: 100%; + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: space-between; + align-content: baseline; + margin-left: 2em; +} +.filter_column .edit_discovery_input .label_select { + display: inline; + margin: 0; +} + +.filter_column .edit_discovery_input select { + flex-grow: 1; + margin-left: 2em; +} + +.wizard li { + display: flex; +} + +/* + * Discovery css global + */ + +ul.bigbuttonlist { + min-height: 200px; +} + +li.discovery { + display: inline-block; + float: left; + width: 250px; + margin: 15px; + padding-bottom: 50px; +} + +li.discovery > a { + text-decoration: none; + color: #333; +} +li.discovery > a:hover { + color: #000; +} + +li.discovery img { + height: 90px; +} + +li.discovery > a label { + cursor: pointer; +} + +div.data_container > label { + font-family: "lato", "Open Sans", sans-serif; + font-weight: lighter; +} + +div.data_container { + width: 100%; + height: 100%; + text-align: center; + padding-top: 30px; + padding-bottom: 30px; +} + +div.data_container:hover { + box-shadow: 2px 2px 10px #ddd; +} + +/* + * TODO: This may be at hostdevices.css + */ +.texto { + height: auto; + text-align: center; +} +h1.wizard { + padding: 0; + margin: 0; +} +h1.wizard a { + margin-left: -20px; +} +h1.wizard a:hover { + color: #fff; +} +#text_wizard { + font-weight: bolder; + text-decoration: none; + font-size: 24px; +} +div.arrow_box { + display: inline-block; + position: relative; + color: #888; + padding: 1.3em; + margin-left: 20px; + margin-bottom: 10px; + padding-left: 3em; +} + +.arrow_box.selected { + background: #424242; + color: #ccc; +} + +.arrow_box:after { + left: 0%; + border-left-color: white; + border-width: 20px; + margin-top: -20px; +} + +div.arrow_box:before { + left: 100%; + border-left-color: #ccc; + border-width: 20px; + margin-top: -20px; +} +.arrow_box.selected:before { + border-left-color: #424242; +} + +.arrow_box.selected:hover { + color: #fff; +} +.arrow_box:hover { + color: #000; +} + +/* + * Breadcrum + */ + +#menu_tab_frame_view_bc { + display: flex; + justify-content: space-between; + border-bottom: 2px solid #82b92e; + max-height: 70px; + min-height: 55px; + width: 100%; + padding-right: 0px; + margin-left: 0px; + margin-bottom: 20px; + height: 55px; + box-sizing: border-box; + background-color: #fafafa; + border-top-right-radius: 7px; + border-top-left-radius: 7px; + box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.1); +} + +#menu_tab_frame_view_bc .breadcrumbs_container { + align-self: flex-start; +} + +.breadcrumbs_container { + padding-top: 4px; + text-indent: 0.25em; + padding-left: 2.5em; +} + +.breadcrumb_link { + color: #848484; + font-size: 10pt; + font-family: "lato-bolder", "Open Sans", sans-serif; + text-decoration: none; +} + +span.breadcrumb_link { + color: #d0d0d0; + font-size: 12pt; +} + +.breadcrumb_link.selected { + color: #95b750; +} + +.breadcrumb_link.selected:hover { + color: #95b750; +} +.breadcrumb_link:hover { + color: #95b750; +} + +/* + * Discovery forms structure + */ + +form.discovery * { + font-size: 10pt; +} + +form.discovery .label_select b { + font-family: "lato", "Open Sans", sans-serif; + font-weight: bolder; +} + +.edit_discovery_info { + display: flex; + align-items: flex-start; + padding-top: 25px; +} + +.edit_discovery_input { + align-items: center; + margin-bottom: 25px; +} + +/* + * Discovery text inputs + */ + +.discovery_label_hint { + display: flex; +} + +label { + color: #343434; + font-weight: bold; +} + +.discovery_full_width_input { + width: 100%; +} + +li > input[type="text"], +li > input[type="email"], +li > input[type="password"], +li > input[type="email"], +.discovery_text_input > input[type="password"], +.discovery_text_input > input[type="text"], +#interval_manual > input[type="text"] { + background-color: transparent; + border: none; + border-radius: 0; + border-bottom: 1px solid #ccc; + font-family: "lato-bolder", "Open Sans", sans-serif; + font-weight: lighter; + padding: 0px 0px 2px 0px; + box-sizing: border-box; + margin-bottom: 4px; +} + +#interval_manual > input[type="text"] { + width: 50px; + margin-left: 10px; + margin-right: 10px; +} + +.discovery_list_input { + width: 100%; + border: 1px solid #cbcbcb; + overflow-y: auto; +} + +.discovery_list_input option { + text-align: left; +} + +.discovery_list_input option:checked { + background: #1aab8e -webkit-linear-gradient(bottom, #7db742 0%, #7db742 100%); + color: #fff; +} + +.discovery_textarea_input { + background-color: #fbfbfb; + padding-left: 10px; + width: 100%; + height: 100px; + max-height: 100px; + max-width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + resize: none; +} + +a.tip { + margin-left: 8px; +} + +.inline_switch > label { + float: right; +} + +.discovery_interval_select_width { + width: 90%; +} + +a.ext_link { + margin-left: 1em; + font-size: 8pt; +} + +div.ui-tooltip.ui-corner-all.ui-widget-shadow.ui-widget.ui-widget-content.uitooltip { + background: grey; + opacity: 0.9; + border-radius: 4px; + box-shadow: 6px 5px 9px -9px black; + padding: 6px; +} + +.ui-tooltip-content { + background: transparent; + color: #fff; + font-weight: bold; + font-family: "lato-lighter", "Open Sans", sans-serif; + letter-spacing: 0.03pt; + font-size: 8pt; +} + +.arrow { + width: 70px; + height: 16px; + overflow: hidden; + position: absolute; + left: 50%; + margin-left: -35px; + bottom: -16px; +} +.arrow.top { + top: -16px; + bottom: auto; +} +.arrow.left { + left: 50%; +} +.arrow:after { + background: grey; + content: ""; + position: absolute; + left: 20px; + top: -20px; + width: 25px; + height: 25px; + box-shadow: 6px 5px 9px -9px black; + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} +.arrow.top:after { + bottom: -20px; + top: auto; } diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index d6a1d97ecf..4eaafa9d1b 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -5698,7 +5698,7 @@ div#status_pie { align-items: center; flex-wrap: wrap; padding: 1em; - min-width: fit-content; + min-width: 100%; } .white_table_graph_content { From e7dfd9b968ca187893b441827342e907399b5a27 Mon Sep 17 00:00:00 2001 From: marcos Date: Tue, 12 Nov 2019 19:53:46 +0100 Subject: [PATCH 038/123] Add sap view --- pandora_console/general/sap_view.php | 77 ++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 pandora_console/general/sap_view.php diff --git a/pandora_console/general/sap_view.php b/pandora_console/general/sap_view.php new file mode 100644 index 0000000000..58ee50e563 --- /dev/null +++ b/pandora_console/general/sap_view.php @@ -0,0 +1,77 @@ + '[sap_views]'.$e->getMessage() ]); + exit; + } else { + echo '[sap_views]'.$e->getMessage(); + } + + // Stop this execution, but continue 'globally'. + return; +} + +// Ajax controller. +if (is_ajax()) { + $method = get_parameter('method', ''); + + if (method_exists($sap_views, $method) === true) { + if ($sap_views->ajaxMethod($method) === true) { + $sap_views->{$method}(); + } else { + $sap_views->error('Unavailable method.'); + } + } else { + $sap_views->error('Method not found. ['.$method.']'); + } + + + // Stop any execution. + exit; +} else { + // Run. + $sap_views->run(); +} From 28c9718c265d68eaa9a77c48d1d73e4fd9d0d737 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 13 Nov 2019 12:07:23 +0100 Subject: [PATCH 039/123] WIP alerts-log --- pandora_console/include/styles/alert.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pandora_console/include/styles/alert.css b/pandora_console/include/styles/alert.css index b2d1c4f9ce..3368bf0796 100644 --- a/pandora_console/include/styles/alert.css +++ b/pandora_console/include/styles/alert.css @@ -7,6 +7,7 @@ li#li-filters-alert-list > label { width: initial; } +form#advanced_filters_alert ul li label, form#general_filters_alert ul li label { width: 150px; } @@ -34,6 +35,18 @@ li#li-time-from-to > input { margin-right: 15px; } +form#advanced_filters_alert textarea { + flex: 1 1 auto; + height: 5em; + min-height: 5em; +} + +form#advanced_filters_alert ul li label img { + margin-bottom: -2px; + margin-left: 5px; +} + +/*DRAG DROP*/ #threshold_manual, #threshold_default { /*TODO: UGLY*/ From 5f8ec8f89cd518ea3fdf6bbf245ca0ac2b3091b4 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 13 Nov 2019 13:29:09 +0100 Subject: [PATCH 040/123] fixed errors --- pandora_console/include/styles/omnishell.css | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pandora_console/include/styles/omnishell.css b/pandora_console/include/styles/omnishell.css index e082facc63..8a572388d4 100644 --- a/pandora_console/include/styles/omnishell.css +++ b/pandora_console/include/styles/omnishell.css @@ -34,6 +34,24 @@ .container-msg-target-modal { max-height: 400px; overflow: initial; + padding-right: 20px; + padding-left: 20px; +} + +.container-msg-target-modal p { + font-family: "lato-lighter", "Open Sans", sans-serif; + text-align: center; + margin-bottom: 20px; + font-weight: bolder; +} + +.container-msg-target-modal pre { + font-family: "lato-lighter", "Open Sans", sans-serif; + padding: 15px; + white-space: pre-wrap; + background-color: #f2f6f7; + border: 3px dashed grey; + border-radius: 10px; } ul.wizard li > textarea { From c17328d39d45a386227eced20e9c0f2f9449603f Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 13 Nov 2019 14:21:09 +0100 Subject: [PATCH 041/123] Pandora Agent RCMD --- pandora_agents/unix/pandora_agent | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 7a84c47ce1..63cd9e8374 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -318,8 +318,7 @@ sub read_file { my $path = shift; my $_FILE; - if( !open($_FILE, "<".$path) ) { - print ">> Failed to open $path ".`whoami`."\n"; + if( !open($_FILE, "<", $path) ) { # failed to open, return undef return undef; } @@ -1535,15 +1534,20 @@ sub report_command { sub execute_command_block { my ($commands, $std_files) = @_; - $std_files = '' unless defined ($std_files); - return 0 if ref($commands) ne "ARRAY"; - my $err_level; + $std_files = '' unless defined ($std_files); - foreach my $comm (@{$commands}) { - `($comm) $std_files`; + if (ref($commands) ne "ARRAY") { + `($commands) $std_files`; + print "($commands) $std_files\n"; $err_level = $?>>8; - last unless ($err_level == 0); + } else { + foreach my $comm (@{$commands}) { + `($comm) $std_files`; + print $comm. '=> ' . ($?>>8)."\n"; + $err_level = $?>>8; + last unless ($err_level == 0); + } } return $err_level; From 9b1a3a9cd18d224227bd8174c83d4284996c53b4 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 13 Nov 2019 14:58:53 +0100 Subject: [PATCH 042/123] Firts_task => first_task --- pandora_console/extensions/plugin_registration.php | 4 ++-- .../HA_cluster_builder.php | 4 ++-- .../{firts_task => first_task}/cluster_builder.php | 4 ++-- .../{firts_task => first_task}/collections.php | 2 +- .../{firts_task => first_task}/custom_fields.php | 4 ++-- .../{firts_task => first_task}/custom_graphs.php | 4 ++-- .../{firts_task => first_task}/fields_manager.php | 4 ++-- .../{firts_task => first_task}/incidents.php | 4 ++-- .../{firts_task => first_task}/map_builder.php | 4 ++-- .../{firts_task => first_task}/network_map.php | 4 ++-- .../{firts_task => first_task}/planned_downtime.php | 4 ++-- .../{firts_task => first_task}/recon_view.php | 4 ++-- .../{firts_task => first_task}/service_list.php | 4 ++-- .../{firts_task => first_task}/snmp_filters.php | 4 ++-- .../general/{firts_task => first_task}/tags.php | 4 ++-- .../transactional_list.php | 4 ++-- pandora_console/godmode/agentes/fields_manager.php | 2 +- .../godmode/agentes/planned_downtime.list.php | 2 +- pandora_console/godmode/reporting/graphs.php | 2 +- pandora_console/godmode/reporting/map_builder.php | 2 +- .../godmode/servers/servers.build_table.php | 2 +- pandora_console/godmode/tag/tag.php | 2 +- .../godmode/wizards/DiscoveryTaskList.class.php | 2 +- .../icono-cluster-activo.png | Bin .../images/{firts_task => first_task}/icono_aws.png | Bin .../icono_grande_custom_reporting.png | Bin .../icono_grande_event_alerts.png | Bin .../icono_grande_export.png | Bin .../icono_grande_gestiondetags.png | Bin .../icono_grande_import.png | Bin .../icono_grande_incidencia.png | Bin .../icono_grande_inventario.png | Bin .../icono_grande_licencia.png | Bin .../icono_grande_reconserver.png | Bin .../icono_grande_registro_plugin.png | Bin .../icono_grande_servicios.png | Bin .../icono_grande_topology.png | Bin .../icono_grande_visualconsole.png | Bin .../icono_manage_agents.png | Bin .../op_workspace.menu.png | Bin .../{firts_task => first_task}/slave-mode.png | Bin pandora_console/operation/incidents/incident.php | 2 +- pandora_console/operation/servers/recon_view.php | 2 +- 43 files changed, 40 insertions(+), 40 deletions(-) rename pandora_console/general/{firts_task => first_task}/HA_cluster_builder.php (95%) rename pandora_console/general/{firts_task => first_task}/cluster_builder.php (96%) rename pandora_console/general/{firts_task => first_task}/collections.php (98%) rename pandora_console/general/{firts_task => first_task}/custom_fields.php (94%) rename pandora_console/general/{firts_task => first_task}/custom_graphs.php (94%) rename pandora_console/general/{firts_task => first_task}/fields_manager.php (94%) rename pandora_console/general/{firts_task => first_task}/incidents.php (95%) rename pandora_console/general/{firts_task => first_task}/map_builder.php (95%) rename pandora_console/general/{firts_task => first_task}/network_map.php (95%) rename pandora_console/general/{firts_task => first_task}/planned_downtime.php (94%) rename pandora_console/general/{firts_task => first_task}/recon_view.php (95%) rename pandora_console/general/{firts_task => first_task}/service_list.php (95%) rename pandora_console/general/{firts_task => first_task}/snmp_filters.php (95%) rename pandora_console/general/{firts_task => first_task}/tags.php (94%) rename pandora_console/general/{firts_task => first_task}/transactional_list.php (95%) rename pandora_console/images/{firts_task => first_task}/icono-cluster-activo.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_aws.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_custom_reporting.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_event_alerts.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_export.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_gestiondetags.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_import.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_incidencia.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_inventario.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_licencia.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_reconserver.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_registro_plugin.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_servicios.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_topology.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_visualconsole.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_manage_agents.png (100%) rename pandora_console/images/{firts_task => first_task}/op_workspace.menu.png (100%) rename pandora_console/images/{firts_task => first_task}/slave-mode.png (100%) diff --git a/pandora_console/extensions/plugin_registration.php b/pandora_console/extensions/plugin_registration.php index ef08e34bae..6cf20858ab 100644 --- a/pandora_console/extensions/plugin_registration.php +++ b/pandora_console/extensions/plugin_registration.php @@ -23,12 +23,12 @@ function pluginreg_extension_main() return; } - ui_require_css_file('firts_task'); + ui_require_css_file('first_task'); ui_print_page_header(__('Plugin registration'), 'images/extensions.png', false, '', true, ''); echo '
    '; - echo html_print_image('images/firts_task/icono_grande_import.png', true, ['title' => __('Plugin Registration') ]); + echo html_print_image('images/first_task/icono_grande_import.png', true, ['title' => __('Plugin Registration') ]); echo '
    '; echo '
    '; echo '

    '.__('Plugin registration').'

    '; diff --git a/pandora_console/general/firts_task/HA_cluster_builder.php b/pandora_console/general/first_task/HA_cluster_builder.php similarity index 95% rename from pandora_console/general/firts_task/HA_cluster_builder.php rename to pandora_console/general/first_task/HA_cluster_builder.php index 6d82d94ad0..7ae56a4287 100644 --- a/pandora_console/general/firts_task/HA_cluster_builder.php +++ b/pandora_console/general/first_task/HA_cluster_builder.php @@ -33,13 +33,13 @@ if (! check_acl($config['id_user'], 0, 'PM')) { exit; } -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ui_print_info_message(['no_close' => true, 'message' => __('There are no HA clusters defined yet.') ]); ?>
    - __('Clusters')]); ?> + __('Clusters')]); ?>

    diff --git a/pandora_console/general/firts_task/cluster_builder.php b/pandora_console/general/first_task/cluster_builder.php similarity index 96% rename from pandora_console/general/firts_task/cluster_builder.php rename to pandora_console/general/first_task/cluster_builder.php index ba9d8c311a..e80d4e4b15 100644 --- a/pandora_console/general/firts_task/cluster_builder.php +++ b/pandora_console/general/first_task/cluster_builder.php @@ -24,7 +24,7 @@ if (! check_acl($config['id_user'], 0, 'AR') && ! check_acl($config['id_user'], return; } -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no clusters defined yet.') ]); @@ -32,7 +32,7 @@ ui_print_info_message(['no_close' => true, 'message' => __('There are no cluster
    - __('Clusters')]); ?> + __('Clusters')]); ?>

    diff --git a/pandora_console/general/firts_task/collections.php b/pandora_console/general/first_task/collections.php similarity index 98% rename from pandora_console/general/firts_task/collections.php rename to pandora_console/general/first_task/collections.php index 8e27ce6ee3..2ca4583bb9 100755 --- a/pandora_console/general/firts_task/collections.php +++ b/pandora_console/general/first_task/collections.php @@ -13,7 +13,7 @@ // GNU General Public License for more details. global $config; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no collections defined yet.') ]); ?> diff --git a/pandora_console/general/firts_task/custom_fields.php b/pandora_console/general/first_task/custom_fields.php similarity index 94% rename from pandora_console/general/firts_task/custom_fields.php rename to pandora_console/general/first_task/custom_fields.php index 7d07ff9495..30f5b839c6 100644 --- a/pandora_console/general/firts_task/custom_fields.php +++ b/pandora_console/general/first_task/custom_fields.php @@ -13,7 +13,7 @@ // GNU General Public License for more details. global $config; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no custom fields defined yet.') ]); @@ -21,7 +21,7 @@ ui_print_info_message(['no_close' => true, 'message' => __('There are no custom
    - __('Custom Fields')]); ?> + __('Custom Fields')]); ?>

    diff --git a/pandora_console/general/firts_task/custom_graphs.php b/pandora_console/general/first_task/custom_graphs.php similarity index 94% rename from pandora_console/general/firts_task/custom_graphs.php rename to pandora_console/general/first_task/custom_graphs.php index e22187c6f5..d49001449a 100644 --- a/pandora_console/general/firts_task/custom_graphs.php +++ b/pandora_console/general/first_task/custom_graphs.php @@ -13,7 +13,7 @@ // GNU General Public License for more details. global $config; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no custom graphs defined yet.') ]); @@ -21,7 +21,7 @@ ui_print_info_message(['no_close' => true, 'message' => __('There are no custom

    - __('Custom Graphs')]); ?> + __('Custom Graphs')]); ?>

    diff --git a/pandora_console/general/firts_task/fields_manager.php b/pandora_console/general/first_task/fields_manager.php similarity index 94% rename from pandora_console/general/firts_task/fields_manager.php rename to pandora_console/general/first_task/fields_manager.php index f81de216db..2ef6e70f55 100755 --- a/pandora_console/general/firts_task/fields_manager.php +++ b/pandora_console/general/first_task/fields_manager.php @@ -13,13 +13,13 @@ // GNU General Public License for more details. global $config; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no custom fields defined yet.') ]); ?>

    - __('Fields Manager')]); ?> + __('Fields Manager')]); ?>

    diff --git a/pandora_console/general/firts_task/incidents.php b/pandora_console/general/first_task/incidents.php similarity index 95% rename from pandora_console/general/firts_task/incidents.php rename to pandora_console/general/first_task/incidents.php index daa83588e3..20630ff5e3 100644 --- a/pandora_console/general/firts_task/incidents.php +++ b/pandora_console/general/first_task/incidents.php @@ -15,7 +15,7 @@ global $config; global $incident_w; global $incident_m; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no incidents defined yet.') ]); @@ -25,7 +25,7 @@ if ($incident_w || $incident_m) {

    - __('Incidents')]); ?> + __('Incidents')]); ?>

    diff --git a/pandora_console/general/firts_task/map_builder.php b/pandora_console/general/first_task/map_builder.php similarity index 95% rename from pandora_console/general/firts_task/map_builder.php rename to pandora_console/general/first_task/map_builder.php index 352f7374e5..509f967195 100755 --- a/pandora_console/general/firts_task/map_builder.php +++ b/pandora_console/general/first_task/map_builder.php @@ -15,7 +15,7 @@ global $config; global $vconsoles_write; global $vconsoles_manage; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ui_print_info_message( [ @@ -28,7 +28,7 @@ if ($vconsoles_write || $vconsoles_manage) {

    - __('Visual Console')]); ?> + __('Visual Console')]); ?>

    diff --git a/pandora_console/general/firts_task/network_map.php b/pandora_console/general/first_task/network_map.php similarity index 95% rename from pandora_console/general/firts_task/network_map.php rename to pandora_console/general/first_task/network_map.php index 0526f936aa..f1de76c08b 100755 --- a/pandora_console/general/firts_task/network_map.php +++ b/pandora_console/general/first_task/network_map.php @@ -13,7 +13,7 @@ // GNU General Public License for more details. global $config; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no network map defined yet.') ]); @@ -23,7 +23,7 @@ $networkmap_types = networkmap_get_types($strict_user);

    - __('Network Map')]); ?> + __('Network Map')]); ?>

    diff --git a/pandora_console/general/firts_task/planned_downtime.php b/pandora_console/general/first_task/planned_downtime.php similarity index 94% rename from pandora_console/general/firts_task/planned_downtime.php rename to pandora_console/general/first_task/planned_downtime.php index 21bfb4b083..83c6cd9384 100644 --- a/pandora_console/general/firts_task/planned_downtime.php +++ b/pandora_console/general/first_task/planned_downtime.php @@ -13,13 +13,13 @@ // GNU General Public License for more details. global $config; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no planned downtime defined yet.') ]); ?>

    - __('Planned Downtime')]); ?> + __('Planned Downtime')]); ?>

    diff --git a/pandora_console/general/firts_task/recon_view.php b/pandora_console/general/first_task/recon_view.php similarity index 95% rename from pandora_console/general/firts_task/recon_view.php rename to pandora_console/general/first_task/recon_view.php index 8c59b23f64..9eee373dec 100755 --- a/pandora_console/general/firts_task/recon_view.php +++ b/pandora_console/general/first_task/recon_view.php @@ -13,13 +13,13 @@ // GNU General Public License for more details. global $config; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no discovery tasks defined yet.') ]); ?>

    - __('Discovery server')]); ?> + __('Discovery server')]); ?>

    diff --git a/pandora_console/general/firts_task/service_list.php b/pandora_console/general/first_task/service_list.php similarity index 95% rename from pandora_console/general/firts_task/service_list.php rename to pandora_console/general/first_task/service_list.php index 424bc60400..f4a56a826b 100755 --- a/pandora_console/general/firts_task/service_list.php +++ b/pandora_console/general/first_task/service_list.php @@ -15,14 +15,14 @@ global $config; global $agent_w; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no services defined yet.') ]); ?>

    - __('Services')]); ?> + __('Services')]); ?>

    diff --git a/pandora_console/general/firts_task/snmp_filters.php b/pandora_console/general/first_task/snmp_filters.php similarity index 95% rename from pandora_console/general/firts_task/snmp_filters.php rename to pandora_console/general/first_task/snmp_filters.php index 602702da69..724c9da31f 100755 --- a/pandora_console/general/firts_task/snmp_filters.php +++ b/pandora_console/general/first_task/snmp_filters.php @@ -13,13 +13,13 @@ // GNU General Public License for more details. global $config; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no SNMP filter defined yet.') ]); ?>

    - __('SNMP Filter')]); ?> + __('SNMP Filter')]); ?>

    diff --git a/pandora_console/general/firts_task/tags.php b/pandora_console/general/first_task/tags.php similarity index 94% rename from pandora_console/general/firts_task/tags.php rename to pandora_console/general/first_task/tags.php index 38c006d3b2..ea8086357c 100755 --- a/pandora_console/general/firts_task/tags.php +++ b/pandora_console/general/first_task/tags.php @@ -13,13 +13,13 @@ // GNU General Public License for more details. global $config; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no tags defined yet.') ]); ?>

    - __('Tags')]); ?> + __('Tags')]); ?>

    diff --git a/pandora_console/general/firts_task/transactional_list.php b/pandora_console/general/first_task/transactional_list.php similarity index 95% rename from pandora_console/general/firts_task/transactional_list.php rename to pandora_console/general/first_task/transactional_list.php index 6edc964ad7..40381f2da8 100644 --- a/pandora_console/general/firts_task/transactional_list.php +++ b/pandora_console/general/first_task/transactional_list.php @@ -15,7 +15,7 @@ global $config; global $networkmaps_write; global $networkmaps_manage; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no transactions defined yet.') ]); @@ -25,7 +25,7 @@ if ($networkmaps_write || $networkmaps_manage) {

    - __('Transactions')]); ?> + __('Transactions')]); ?>

    diff --git a/pandora_console/godmode/agentes/fields_manager.php b/pandora_console/godmode/agentes/fields_manager.php index 20a9db547a..1536e5c278 100644 --- a/pandora_console/godmode/agentes/fields_manager.php +++ b/pandora_console/godmode/agentes/fields_manager.php @@ -126,7 +126,7 @@ if ($fields) { $table->size[3] = '8%'; $table->data = []; } else { - include_once $config['homedir'].'/general/firts_task/fields_manager.php'; + include_once $config['homedir'].'/general/first_task/fields_manager.php'; return; } diff --git a/pandora_console/godmode/agentes/planned_downtime.list.php b/pandora_console/godmode/agentes/planned_downtime.list.php index 01f30afba6..f116b2dcd8 100755 --- a/pandora_console/godmode/agentes/planned_downtime.list.php +++ b/pandora_console/godmode/agentes/planned_downtime.list.php @@ -352,7 +352,7 @@ if (!empty($groups)) { // No downtimes cause the user has not anyone. if (!$downtimes && !$filter_performed) { - include_once $config['homedir'].'/general/firts_task/planned_downtime.php'; + include_once $config['homedir'].'/general/first_task/planned_downtime.php'; } // No downtimes cause the user performed a search. else if (!$downtimes) { diff --git a/pandora_console/godmode/reporting/graphs.php b/pandora_console/godmode/reporting/graphs.php index e9f1aef011..155eb560db 100644 --- a/pandora_console/godmode/reporting/graphs.php +++ b/pandora_console/godmode/reporting/graphs.php @@ -337,7 +337,7 @@ $table_aux = new stdClass(); echo '

    '; } else { - include_once $config['homedir'].'/general/firts_task/custom_graphs.php'; + include_once $config['homedir'].'/general/first_task/custom_graphs.php'; } ?> diff --git a/pandora_console/godmode/reporting/map_builder.php b/pandora_console/godmode/reporting/map_builder.php index 8f5774b3a9..96f86191d7 100644 --- a/pandora_console/godmode/reporting/map_builder.php +++ b/pandora_console/godmode/reporting/map_builder.php @@ -395,7 +395,7 @@ if ($own_info['is_admin'] || $vconsoles_read) { if (!$maps && !is_metaconsole()) { $total = count(visual_map_get_user_layouts($config['id_user'], false, false, false)); if (!$total) { - include_once $config['homedir'].'/general/firts_task/map_builder.php'; + include_once $config['homedir'].'/general/first_task/map_builder.php'; } else { ui_print_info_message( [ diff --git a/pandora_console/godmode/servers/servers.build_table.php b/pandora_console/godmode/servers/servers.build_table.php index f0e2a4ad08..0006fc3e9b 100644 --- a/pandora_console/godmode/servers/servers.build_table.php +++ b/pandora_console/godmode/servers/servers.build_table.php @@ -154,7 +154,7 @@ foreach ($servers as $server) { if ($server['type'] == 'recon') { $data[8] .= ''; $data[8] .= html_print_image( - 'images/firts_task/icono_grande_reconserver.png', + 'images/first_task/icono_grande_reconserver.png', true, [ 'title' => __('Manage Discovery tasks'), diff --git a/pandora_console/godmode/tag/tag.php b/pandora_console/godmode/tag/tag.php index 680d0b7a45..cb5fb27ab1 100644 --- a/pandora_console/godmode/tag/tag.php +++ b/pandora_console/godmode/tag/tag.php @@ -304,7 +304,7 @@ if (!empty($result)) { } else if ($filter_performed) { echo $filter_form; } else { - include $config['homedir'].'/general/firts_task/tags.php'; + include $config['homedir'].'/general/first_task/tags.php'; return; } } diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php index ed523d0b82..9b12f2ee36 100644 --- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php +++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php @@ -145,7 +145,7 @@ class DiscoveryTaskList extends Wizard $ret2 = $this->showList(); if ($ret === false && $ret2 === false) { - include_once $config['homedir'].'/general/firts_task/recon_view.php'; + include_once $config['homedir'].'/general/first_task/recon_view.php'; } else { $form = [ 'form' => [ diff --git a/pandora_console/images/firts_task/icono-cluster-activo.png b/pandora_console/images/first_task/icono-cluster-activo.png similarity index 100% rename from pandora_console/images/firts_task/icono-cluster-activo.png rename to pandora_console/images/first_task/icono-cluster-activo.png diff --git a/pandora_console/images/firts_task/icono_aws.png b/pandora_console/images/first_task/icono_aws.png similarity index 100% rename from pandora_console/images/firts_task/icono_aws.png rename to pandora_console/images/first_task/icono_aws.png diff --git a/pandora_console/images/firts_task/icono_grande_custom_reporting.png b/pandora_console/images/first_task/icono_grande_custom_reporting.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_custom_reporting.png rename to pandora_console/images/first_task/icono_grande_custom_reporting.png diff --git a/pandora_console/images/firts_task/icono_grande_event_alerts.png b/pandora_console/images/first_task/icono_grande_event_alerts.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_event_alerts.png rename to pandora_console/images/first_task/icono_grande_event_alerts.png diff --git a/pandora_console/images/firts_task/icono_grande_export.png b/pandora_console/images/first_task/icono_grande_export.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_export.png rename to pandora_console/images/first_task/icono_grande_export.png diff --git a/pandora_console/images/firts_task/icono_grande_gestiondetags.png b/pandora_console/images/first_task/icono_grande_gestiondetags.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_gestiondetags.png rename to pandora_console/images/first_task/icono_grande_gestiondetags.png diff --git a/pandora_console/images/firts_task/icono_grande_import.png b/pandora_console/images/first_task/icono_grande_import.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_import.png rename to pandora_console/images/first_task/icono_grande_import.png diff --git a/pandora_console/images/firts_task/icono_grande_incidencia.png b/pandora_console/images/first_task/icono_grande_incidencia.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_incidencia.png rename to pandora_console/images/first_task/icono_grande_incidencia.png diff --git a/pandora_console/images/firts_task/icono_grande_inventario.png b/pandora_console/images/first_task/icono_grande_inventario.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_inventario.png rename to pandora_console/images/first_task/icono_grande_inventario.png diff --git a/pandora_console/images/firts_task/icono_grande_licencia.png b/pandora_console/images/first_task/icono_grande_licencia.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_licencia.png rename to pandora_console/images/first_task/icono_grande_licencia.png diff --git a/pandora_console/images/firts_task/icono_grande_reconserver.png b/pandora_console/images/first_task/icono_grande_reconserver.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_reconserver.png rename to pandora_console/images/first_task/icono_grande_reconserver.png diff --git a/pandora_console/images/firts_task/icono_grande_registro_plugin.png b/pandora_console/images/first_task/icono_grande_registro_plugin.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_registro_plugin.png rename to pandora_console/images/first_task/icono_grande_registro_plugin.png diff --git a/pandora_console/images/firts_task/icono_grande_servicios.png b/pandora_console/images/first_task/icono_grande_servicios.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_servicios.png rename to pandora_console/images/first_task/icono_grande_servicios.png diff --git a/pandora_console/images/firts_task/icono_grande_topology.png b/pandora_console/images/first_task/icono_grande_topology.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_topology.png rename to pandora_console/images/first_task/icono_grande_topology.png diff --git a/pandora_console/images/firts_task/icono_grande_visualconsole.png b/pandora_console/images/first_task/icono_grande_visualconsole.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_visualconsole.png rename to pandora_console/images/first_task/icono_grande_visualconsole.png diff --git a/pandora_console/images/firts_task/icono_manage_agents.png b/pandora_console/images/first_task/icono_manage_agents.png similarity index 100% rename from pandora_console/images/firts_task/icono_manage_agents.png rename to pandora_console/images/first_task/icono_manage_agents.png diff --git a/pandora_console/images/firts_task/op_workspace.menu.png b/pandora_console/images/first_task/op_workspace.menu.png similarity index 100% rename from pandora_console/images/firts_task/op_workspace.menu.png rename to pandora_console/images/first_task/op_workspace.menu.png diff --git a/pandora_console/images/firts_task/slave-mode.png b/pandora_console/images/first_task/slave-mode.png similarity index 100% rename from pandora_console/images/firts_task/slave-mode.png rename to pandora_console/images/first_task/slave-mode.png diff --git a/pandora_console/operation/incidents/incident.php b/pandora_console/operation/incidents/incident.php index 5057b4d281..62e2f33fee 100755 --- a/pandora_console/operation/incidents/incident.php +++ b/pandora_console/operation/incidents/incident.php @@ -372,7 +372,7 @@ if ($count_total >= 1) { } if ($count_total < 1) { - include_once $config['homedir'].'/general/firts_task/incidents.php'; + include_once $config['homedir'].'/general/first_task/incidents.php'; } else { // TOTAL incidents $url = 'index.php?sec=workspace&sec2=operation/incidents/incident'; diff --git a/pandora_console/operation/servers/recon_view.php b/pandora_console/operation/servers/recon_view.php index 5401f6e307..facf494179 100644 --- a/pandora_console/operation/servers/recon_view.php +++ b/pandora_console/operation/servers/recon_view.php @@ -36,7 +36,7 @@ if ($servers === false) { $recon_task = db_get_all_rows_sql('SELECT * FROM trecon_task'); if ($recon_task === false) { ui_print_page_header(__('Recon View'), 'images/op_recon.png', false, '', false); - include_once $config['homedir'].'/general/firts_task/recon_view.php'; + include_once $config['homedir'].'/general/first_task/recon_view.php'; return; } else { include_once $config['homedir'].'/include/functions_graph.php'; From 672ce6db22ff055802e6a673904866f8944ae22f Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 13 Nov 2019 15:24:44 +0100 Subject: [PATCH 043/123] first task omnishell and minor style checks --- .../general/first_task/omnishell.php | 56 ++++++++++++++++++ .../images/first_task/omnishell.png | Bin 0 -> 54739 bytes .../styles/{firts_task.css => first_task.css} | 9 ++- 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 pandora_console/general/first_task/omnishell.php create mode 100644 pandora_console/images/first_task/omnishell.png rename pandora_console/include/styles/{firts_task.css => first_task.css} (88%) diff --git a/pandora_console/general/first_task/omnishell.php b/pandora_console/general/first_task/omnishell.php new file mode 100644 index 0000000000..948204917c --- /dev/null +++ b/pandora_console/general/first_task/omnishell.php @@ -0,0 +1,56 @@ + + true, 'message' => __('There is no command defined yet.') ]); ?> + +
    +
    + __('Omnishell')]); ?> +
    +
    +

    + '.__( + 'Omnishell is an enterprise feature which allows you to execute a structured command along any agent in your %s. The only requirement is to have remote configuration enabled in your agent.', + io_safe_output(get_product_name()) + ).'

    '; + + echo '

    '.__( + 'You can execute any command on as many agents you need, and check the execution on all of them using the Omnishell Command View' + ).'

    '; + ?> +

    + +
    + +
    + +
    +
    diff --git a/pandora_console/images/first_task/omnishell.png b/pandora_console/images/first_task/omnishell.png new file mode 100644 index 0000000000000000000000000000000000000000..93dffe3918c7f8e5f72aecfa9b9814d31971eac1 GIT binary patch literal 54739 zcmV($K;yrOP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+N`}|F7@*AOGWj#1PVbu{-xc&|Lf=P z;m+sp=l|;b`@Qg=fBpK`Z$y46@z3=42gcve4}QJ;#~=9TJHq>)fBkBIzZ2Wv2mSrV zKOdO<=E%RSe}71RJ^p?@wa({(e3Em$Q8S&WL~cpZ-QD|MSB?NBnPJoc{Gh@jw3t?-~Bv z>-_!i`&RqD{d>ESA5Qf7lc@Xp=XCrt{NT%xr}M`i{;K@1@bC5f)%mO4`kA zY_rd?;z|oMv7S{|TYZfku8pPGd6)g{y4&u1e8}3DzWkN%`Rdoc{*8a#+TX4Ix4-@m zZY})XT0A%9&((k38ozqg`p-uM%}MdjxUrZ6H(tE~1Uhb7Ma( z^i1!B_U-Vb_FcJsVSKHwg6My5+V6WmmGjvjpSvny3 zOP=J)bFbCgZ2N6bNxf7~7abbOPk(B7%l!72%G1B}-Zk^MPY-=_w!B99v~V?b@y0v!k+GR$1gwY{aHx62Duq*M+OSzrH#4d-CO} z?Uu31frE+d4ezraWaf(rad`87YMCMJJ!_hEe9tv>^WP5befTycx!x1K2(i`hJuR*` ze{-~gK%f?T^N?KSMmEamwT&;ot8#KzduRMmh+WX)H#Wql`@rAYm=E+}y|^RX3vU_t z^K&X)SiXppD^HrM?KDTdLQnI1BJYB0c?)mU-=}i3Vf2?H+4sW>-x-VerMh+reQvvhGKYeP!3(uh_~U&V8N4=>c?T{2I!kffXE z>^#Gl#xCy%M4F+@`lQXLhW%w;^y9eZdMi#7w~#x>p0L%ae>mhduTtl`$5>oBM-~SM zlIwo?!59^Y(B@nmLLaE_=qcMIV`K%Zkcf2N^g{{i znxCGk-m$M(00dYO-t5ik9XopY&O5DKr?#GkPUqWL!`u*Jl%=0d7KR#uT_;O44_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Z;9uV zsuzyKCWH1F@_gaNfB||H40yPKQg`D{54>PWdeOU%nzt$rqR;Nl9q61(ywPvo?MaGzyGzB z=OE=vtw&cF>FHmQy|O~@`||C%D=o#pH#*|{M!t-@Ip=px=;`WSuZAOf8b#9M*s-Y9 zaOJg(@8fQ7Agbuajcu;g3!jcVlcu4&E$4-@#lyqnW!vQ95X2f9m=p<_4{`GdzS7!v ziO6S$?qRu}cO&5P_ZLKr_xKF)E{N;ups|XDs+y38F7owx4sR1?qb)5f8+6(H>w>YT zqpNFionr%T?E$!jmYe+7w0}*k5}CQEeT>R$lEjaCpybPiR)rV~aXB9@pMim37E~>f z5eKI>3}jmwcod1Dnz-9y?~i1iuzyeA7Ht`R;l^a@u9z2`MvpII_oLq>61MxNM)SUj3zPmyj*^d*@3 zoG22P5le%JC?P-G#;IM=hcqEcU@W)?YyZ%XHow1zh*y div { .image_task { width: 20%; + min-width: 175px; height: 100%; float: left; } @@ -47,7 +54,7 @@ div.new_task_cluster > div { .text_task { width: 70%; - float: right; + float: left; height: 100%; padding-right: 25px; } From 670df456f59cb7c049bd97b9715f4227dd888d2a Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 13 Nov 2019 16:39:24 +0100 Subject: [PATCH 044/123] wip results omnishell --- pandora_console/include/styles/omnishell.css | 21 ++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/pandora_console/include/styles/omnishell.css b/pandora_console/include/styles/omnishell.css index 8a572388d4..8dab89fd8b 100644 --- a/pandora_console/include/styles/omnishell.css +++ b/pandora_console/include/styles/omnishell.css @@ -40,18 +40,27 @@ .container-msg-target-modal p { font-family: "lato-lighter", "Open Sans", sans-serif; - text-align: center; margin-bottom: 20px; + font-size: 10pt; +} + +span.failed { + color: red; + font-weight: bolder; +} + +span.success { + color: green; font-weight: bolder; } .container-msg-target-modal pre { - font-family: "lato-lighter", "Open Sans", sans-serif; - padding: 15px; + font-family: monospace; + padding: 1em; white-space: pre-wrap; - background-color: #f2f6f7; - border: 3px dashed grey; - border-radius: 10px; + background-color: #222; + color: #fff; + font-size: 1.2em; } ul.wizard li > textarea { From 78443a029d75dfb11135887c34f47a07f2e18656 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 13 Nov 2019 18:10:16 +0100 Subject: [PATCH 045/123] Omnishell rc1 --- pandora_agents/unix/pandora_agent | 53 ++++++++++++++---- .../images/first_task/omnishell.png | Bin 54739 -> 3129 bytes pandora_console/include/styles/omnishell.css | 15 +++-- 3 files changed, 53 insertions(+), 15 deletions(-) diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 63cd9e8374..0dfcf8848a 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -24,6 +24,7 @@ Version 6.0 use strict; use warnings; +use Scalar::Util qw(looks_like_number); use POSIX qw(strftime floor); use Sys::Hostname; use File::Basename; @@ -1523,29 +1524,56 @@ sub report_command { print $R_FILE $err_level; close($R_FILE); + + $return->{'stdout'} = '' unless defined ($return->{'stdout'}); + $return->{'stderr'} = '' unless defined ($return->{'stderr'}); + return $return; } +################################################################################ +# Executes a command using defined timeout. +################################################################################ +sub execute_command_timeout { + my ($command, $timeout) = @_; + + if (!looks_like_number($timeout)) { + `$command`; + } else { + `$command`; + } + + return $?>>8; +} + ################################################################################ # Executes a block of commands, returns error level, leaves output in # redirection set by $std_files. E.g: # $std_files = ' >> /tmp/stdout 2>> /tmp/stderr ################################################################################ sub execute_command_block { - my ($commands, $std_files) = @_; + my ($commands, $std_files, $timeout) = @_; - my $err_level; + return 0 unless defined($commands); + + my $err_level = 0; $std_files = '' unless defined ($std_files); if (ref($commands) ne "ARRAY") { - `($commands) $std_files`; - print "($commands) $std_files\n"; - $err_level = $?>>8; + return 0 if $commands eq ''; + $err_level = execute_command_timeout( + "($commands) $std_files", + $timeout + ); + } else { foreach my $comm (@{$commands}) { - `($comm) $std_files`; - print $comm. '=> ' . ($?>>8)."\n"; - $err_level = $?>>8; + next unless defined($comm); + $err_level = execute_command_timeout( + "($comm) $std_files", + $timeout + ); + last unless ($err_level == 0); } } @@ -1576,7 +1604,8 @@ sub evaluate_command { $err_level = execute_command_block( $cmd->{'preconditions'}, - $std_files + $std_files, + $cmd->{'timeout'} ); # Precondition not satisfied. @@ -1585,7 +1614,8 @@ sub evaluate_command { # Main run. $err_level = execute_command_block( $cmd->{'script'}, - $std_files + $std_files, + $cmd->{'timeout'} ); # Script not success. @@ -1594,7 +1624,8 @@ sub evaluate_command { # Check postconditions $err_level = execute_command_block( $cmd->{'postconditions'}, - $std_files + $std_files, + $cmd->{'timeout'} ); # Return results. diff --git a/pandora_console/images/first_task/omnishell.png b/pandora_console/images/first_task/omnishell.png index 93dffe3918c7f8e5f72aecfa9b9814d31971eac1..8724d322fb21ecbccfb69ac82b9e07ceb73725ba 100644 GIT binary patch literal 3129 zcmV-9494?`P)e92`3<&060O&2||{$g6#jPFf|8={}VjF6TDx|v=T+MEE(HahVCkg z1S~Mpr|wp(-4=p{g@uKMg@uKMg@xr1X*K-^{Px@Lv3$Cbj|g8%<>UFUzy7;Cusz7L zd@SW>q#o_N*uHy6dxoJL2s-lVK|cDHL$>lUk^{2M_zY-2w7i|j$H38kCZFysZ>RYE zD~6$Z7}oMBb{qx+a!Jil2MBum9tDI01YNGOfC@?44FzH70RjkUkD0|Z3=6dHdV&D* z)Rca0H&ij)60d=eFvr=f%MeY9Px~p+K9=nx4-fSeXPb7Y&7BWjKJK_TS_{q(;182M(bv zHpYN;v3+9E0wz4qhN+1h?Ki9$s*{C9^+%q^E(qNHP=v2Rmj693B&xfLe1dls(lw$n*6}NKh z7RuRsutXEf27%H-tC~T8@p%&;`5rMo!&tr9`lappgX4_D?l3o?P8nF1c$EO*0AW<8 zwnPxtVt@ZdNypYNF3m9Uw75({XNS-0T80-KvfBX{A`FzTo>#=%9%~Tw-ft$o*f+Dxq6}Hp>D_@ zj3+;-fNX23Sycn(6LhK=1fLYVL;La)CkmYZs{zC=596S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&@2<$c~3mWg3xHzOKMZXJm`BqAUGlO7-(AT0M zBa{vO|J+1=p<03Q@axgERZ%g8t0UBqk`mTbWPI)R`SSTQalsYf0I1A3a!ZIr>{{yp zXq7_gIJ)@+MMP*JPzvmyAqLL!qnRfz_Y{W~u=xM`dDrR2IjCbGU$a|I@F0{VZ;9uV zsuzyKCWH1F@_gaNfB||H40yPKQg`D{54>PWdeOU%nzt$rqR;Nl9q61(ywPvo?MaGzyGzB z=OE=vtw&cF>FHmQy|O~@`||C%D=o#pH#*|{M!t-@Ip=px=;`WSuZAOf8b#9M*s-Y9 zaOJg(@8fQ7Agbuajcu;g3!jcVlcu4&E$4-@#lyqnW!vQ95X2f9m=p<_4{`GdzS7!v ziO6S$?qRu}cO&5P_ZLKr_xKF)E{N;ups|XDs+y38F7owx4sR1?qb)5f8+6(H>w>YT zqpNFionr%T?E$!jmYe+7w0}*k5}CQEeT>R$lEjaCpybPiR)rV~aXB9@pMim37E~>f z5eKI>3}jmwcod1Dnz-9y?~i1iuzyeA7Ht`R;l^a@u9z2`MvpII_oLq>61MxNM)SUj3zPmyj*^d*@3 zoG22P5le%JC?P-G#;IM=hcqEcU@W)?YyZ%XHow1zh*y textarea { From a8b6f40ca1a5c7177dcff9de2047efa922f51187 Mon Sep 17 00:00:00 2001 From: marcos Date: Thu, 14 Nov 2019 10:51:00 +0100 Subject: [PATCH 046/123] change sap view menu position --- pandora_console/godmode/menu.php | 1 - pandora_console/operation/menu.php | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index 062df046b2..edf7be1873 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -56,7 +56,6 @@ if (check_acl($config['id_user'], 0, 'AR') enterprise_hook('applications_menu'); enterprise_hook('cloud_menu'); enterprise_hook('console_task_menu'); - enterprise_hook('SAP_view'); } // Add to menu. diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index 58213ed8ee..dfa52551fc 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -155,6 +155,8 @@ if (!empty($sub2)) { enterprise_hook('cluster_menu'); enterprise_hook('aws_menu'); +enterprise_hook('SAP_view'); + if (!empty($sub)) { $menu_operation['estado']['text'] = __('Monitoring'); From 17f324ef8ddddc008dc95c8ad491b75566029df9 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 14 Nov 2019 17:04:47 +0100 Subject: [PATCH 047/123] Agent remote cmd fixes --- pandora_agents/unix/pandora_agent | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 0dfcf8848a..b1aeb52f03 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -979,6 +979,9 @@ sub read_config (;$) { $Conf{'secondary_server_opts'} = '-x \'' . $Conf{'secondary_server_pwd'} . '\' ' . $Conf{'secondary_server_opts'} if ($Conf{'secondary_server_pwd'} ne ''); $Conf{'secondary_server_opts'} = '-c ' . $Conf{'secondary_server_opts'} if ($Conf{'secondary_server_ssl'} eq '1'); } + + # Check remote commands + prepare_commands(); } ################################################################################# @@ -1421,7 +1424,7 @@ sub check_collections () { ################################################################################ # Check for remote commands defined. ################################################################################ -sub prepare_remote_commands { +sub prepare_commands { if ($YAML == 0) { log_message( 'error', @@ -3272,21 +3275,25 @@ while (1) { check_collections () unless ($Conf{'debug'} eq '1'); if ($Conf{'debug'} ne '1') { - # Check remote commands - prepare_remote_commands (); - - # Cleanup old .rcmd.done files. - my %registered = map { $_.'.rcmd.done' => 1 } keys %{$Conf{'commands'}}; + # Cleanup old .rcmd and .rcmd.done files. + my %registered = map { $_.'.rcmd' => 1 } keys %{$Conf{'commands'}}; if(opendir(my $dir, $ConfDir.'/commands/')) { while (my $item = readdir($dir)) { # Skip other files. - next if ($item !~ /\.rcmd\.done$/); - + next if ($item !~ /\.rcmd$/); # Clean .rcmd.done file if its command is not referenced in conf. if (!defined($registered{$item})) { - unlink ($item); + if (-e $item) { + unlink ($item); + } + if (-e $item.'.done') { + unlink ($item.'.done'); + } } } + + # Close dir. + closedir($dir); } } From 14128590d67e943b0abc1701be0745993c581ace Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 14 Nov 2019 17:05:01 +0100 Subject: [PATCH 048/123] Minor corrections&fixes --- pandora_console/include/class/HelpFeedBack.class.php | 4 ++-- pandora_console/operation/search_agents.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/class/HelpFeedBack.class.php b/pandora_console/include/class/HelpFeedBack.class.php index 825d3c923f..fbee53e0b7 100644 --- a/pandora_console/include/class/HelpFeedBack.class.php +++ b/pandora_console/include/class/HelpFeedBack.class.php @@ -143,7 +143,7 @@ class HelpFeedBack extends Wizard 'block_content' => [ [ 'arguments' => [ - 'label' => __('Sugesstion'), + 'label' => __('Suggestion'), 'type' => 'radio_button', 'attributes' => 'class="btn"', 'name' => 'suggestion', @@ -154,7 +154,7 @@ class HelpFeedBack extends Wizard ], [ 'arguments' => [ - 'label' => __('Something is not quite right'), + 'label' => __('Something is wrong'), 'type' => 'radio_button', 'attributes' => 'class="btn"', 'name' => 'report', diff --git a/pandora_console/operation/search_agents.php b/pandora_console/operation/search_agents.php index 7edd7be878..05383df31a 100755 --- a/pandora_console/operation/search_agents.php +++ b/pandora_console/operation/search_agents.php @@ -30,6 +30,7 @@ if (!$agents || !$searchAgents) { echo "
    ".__('Zero results found')."
    \n"; } } else { + $table = new StdClass(); $table->cellpadding = 4; $table->cellspacing = 4; $table->width = '98%'; From 0d3817d64d97a49b01b5e2b139d7fbb05415d38a Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 14 Nov 2019 17:45:45 +0100 Subject: [PATCH 049/123] dynamic toggle in wizard input printForm --- pandora_console/extensions/quick_shell.php | 44 +++++++++++-------- .../godmode/wizards/Wizard.main.php | 30 +++++++++++-- pandora_console/include/functions_ui.php | 17 +++++-- pandora_console/include/styles/pandora.css | 4 ++ 4 files changed, 70 insertions(+), 25 deletions(-) diff --git a/pandora_console/extensions/quick_shell.php b/pandora_console/extensions/quick_shell.php index 13924f56e2..a286ce4b95 100644 --- a/pandora_console/extensions/quick_shell.php +++ b/pandora_console/extensions/quick_shell.php @@ -442,25 +442,31 @@ function quickShellSettings() ], ], [ - 'label' => __('Gotty user').ui_print_help_tip( - __('Optional, set a user to access gotty service'), - true - ), - 'arguments' => [ - 'type' => 'text', - 'name' => 'gotty_user', - 'value' => $config['gotty_user'], - ], - ], - [ - 'label' => __('Gotty password').ui_print_help_tip( - __('Optional, set a password to access gotty service'), - true - ), - 'arguments' => [ - 'type' => 'password', - 'name' => 'gotty_pass', - 'value' => io_output_password($config['gotty_pass']), + 'toggle' => true, + 'toggle_name' => 'Advanced', + 'block_content' => [ + [ + 'label' => __('Gotty user').ui_print_help_tip( + __('Optional, set a user to access gotty service'), + true + ), + 'arguments' => [ + 'type' => 'text', + 'name' => 'gotty_user', + 'value' => $config['gotty_user'], + ], + ], + [ + 'label' => __('Gotty password').ui_print_help_tip( + __('Optional, set a password to access gotty service'), + true + ), + 'arguments' => [ + 'type' => 'password', + 'name' => 'gotty_pass', + 'value' => io_output_password($config['gotty_pass']), + ], + ], ], ], [ diff --git a/pandora_console/godmode/wizards/Wizard.main.php b/pandora_console/godmode/wizards/Wizard.main.php index 6f1d59d56b..30b0706342 100644 --- a/pandora_console/godmode/wizards/Wizard.main.php +++ b/pandora_console/godmode/wizards/Wizard.main.php @@ -458,6 +458,7 @@ class Wizard if (is_array($input['block_content']) === true) { $direct = (bool) $input['direct']; + $toggle = (bool) $input['toggle']; // Print independent block of inputs. $output .= '
  • " + + settings.emptyli + + "
  • "; + $("#ul-al-" + settings.id_alert).append(emptyli); + } + }, + error: function(error) { + console.log(error); + } + }); + } + }); +} From 8811095a3e171bdd9c63e97185abf1d5e0ae4518 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Date: Mon, 18 Nov 2019 15:25:35 +0100 Subject: [PATCH 069/123] WIP ALerts --- pandora_console/include/javascript/alert.js | 56 +++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/pandora_console/include/javascript/alert.js b/pandora_console/include/javascript/alert.js index d293e247d8..435649833d 100644 --- a/pandora_console/include/javascript/alert.js +++ b/pandora_console/include/javascript/alert.js @@ -116,3 +116,59 @@ function delete_alert_action(settings) { } }); } + +function standby_alert(settings) { + confirmDialog({ + title: settings.title, + message: settings.msg, + onAccept: function() { + $.ajax({ + method: "post", + url: settings.url, + data: { + page: settings.page, + method: "standByAlert", + id_alert: settings.id_alert, + standby: settings.standby + }, + dataType: "html", + success: function(data) { + $("#standby-alert-" + settings.id_alert).empty(); + $("#standby-alert-" + settings.id_alert).append(data); + }, + error: function(error) { + console.log(error); + } + }); + } + }); +} + +function disabled_alert(settings) { + confirmDialog({ + title: settings.title, + message: settings.msg, + onAccept: function() { + $.ajax({ + method: "post", + url: settings.url, + data: { + page: settings.page, + method: "disabledAlert", + id_alert: settings.id_alert, + disabled: settings.disabled + }, + dataType: "json", + success: function(data) { + $("#disabled-alert-" + settings.id_alert).empty(); + $("#disabled-alert-" + settings.id_alert).append(data.disabled); + $("#status-alert-" + settings.id_alert).empty(); + $("#status-alert-" + settings.id_alert).append(data.status); + }, + error: function(error) { + console.log(error); + } + }); + } + }); +} From 83e7d5a70122c9955a0aa7ca091820b0f5b5b942 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 18 Nov 2019 19:32:57 +0100 Subject: [PATCH 070/123] Minor fixes --- pandora_server/lib/PandoraFMS/Recon/Base.pm | 2 +- pandora_server/lib/PandoraFMS/Tools.pm | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Recon/Base.pm b/pandora_server/lib/PandoraFMS/Recon/Base.pm index b444e92672..9b2a725ae2 100644 --- a/pandora_server/lib/PandoraFMS/Recon/Base.pm +++ b/pandora_server/lib/PandoraFMS/Recon/Base.pm @@ -1531,7 +1531,7 @@ sub database_scan($$$) { && "$dbObjCfg->{'scan_databases'}" eq "1") { # Skip database scan in Oracle tasks - next if $self->{'type'} == DISCOVERY_APP_ORACLE; + next if defined($self->{'type'}) && $self->{'type'} == DISCOVERY_APP_ORACLE; my $__data = $obj->scan_databases(); diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index 05adbf79d1..f81b228eea 100755 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -21,7 +21,6 @@ use warnings; use Time::Local; use POSIX qw(setsid strftime); use POSIX; -use PandoraFMS::Sendmail; use HTML::Entities; use Encode; use Socket qw(inet_ntoa inet_aton); @@ -31,6 +30,9 @@ use LWP::UserAgent; use threads; use threads::shared; +use lib '/usr/lib/perl5'; +use PandoraFMS::Sendmail; + # New in 3.2. Used to sendmail internally, without external scripts # use Module::Loaded; @@ -824,6 +826,11 @@ sub enterprise_hook ($$) { # Try to call the function my $output = eval { &$func (@args); }; + # Discomment to debug. + # if ($@) { + # print STDERR $@; + # } + # Check for errors #return undef if ($@); return '' unless defined ($output); From 0fd95647ea1bc34849c23b7fdefbf30a89c59437 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 19 Nov 2019 11:56:11 +0100 Subject: [PATCH 071/123] log_window --- pandora_server/conf/pandora_server.conf.new | 6 +++++- pandora_server/lib/PandoraFMS/Config.pm | 4 ++++ pandora_server/lib/PandoraFMS/Tools.pm | 6 +++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pandora_server/conf/pandora_server.conf.new b/pandora_server/conf/pandora_server.conf.new index 16a4a51b62..2eb9fad569 100644 --- a/pandora_server/conf/pandora_server.conf.new +++ b/pandora_server/conf/pandora_server.conf.new @@ -449,10 +449,14 @@ export_threads 1 eventserver 0 -# Event Server event window in seconds (3600 by default) (PANDORA FMS ENTERPRISE ONLY). +# Correlated alerts, event window in seconds (3600 by default) (PANDORA FMS ENTERPRISE ONLY). event_window 3600 +# Correlated Alerts, log window in seconds (3600 by default) (PANDORA FMS ENTERPRISE ONLY). + +log_window 3600 + # If set to 1, an alert will not be fired if the last event it generated is in 'in-process' status. event_inhibit_alerts 0 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 06790c7c87..64804cca4e 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -303,6 +303,7 @@ sub pandora_load_config { $pa_config->{'openstreetmaps_description'} = 0; $pa_config->{"eventserver"} = 1; # 4.0 $pa_config->{"event_window"} = 3600; # 4.0 + $pa_config->{"log_window"} = 3600; # 7.741 $pa_config->{"icmpserver"} = 0; # 4.0 $pa_config->{"icmp_threads"} = 3; # 4.0 $pa_config->{"snmpserver"} = 0; # 4.0 @@ -980,6 +981,9 @@ sub pandora_load_config { elsif ($parametro =~ m/^event_window\s+([0-9]*)/i) { $pa_config->{'event_window'}= clean_blank($1); } + elsif ($parametro =~ m/^log_window\s+([0-9]*)/i) { + $pa_config->{'log_window'}= clean_blank($1); + } elsif ($parametro =~ m/^snmp_threads\s+([0-9]*)/i) { $pa_config->{'snmp_threads'}= clean_blank($1); } diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index f81b228eea..92bf78c04d 100755 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -827,9 +827,9 @@ sub enterprise_hook ($$) { my $output = eval { &$func (@args); }; # Discomment to debug. - # if ($@) { - # print STDERR $@; - # } + if ($@) { + print STDERR $@; + } # Check for errors #return undef if ($@); From 9cea1313782cd97b819d77a29c97f74519d40a8e Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 19 Nov 2019 23:35:29 +0100 Subject: [PATCH 072/123] WIP CorrelatedAlerts --- pandora_server/lib/PandoraFMS/Core.pm | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 263ce5722c..48a6cbe4d9 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -448,8 +448,9 @@ B: =cut ########################################################################## -sub pandora_evaluate_alert ($$$$$$$;$$$) { - my ($pa_config, $agent, $data, $last_status, $alert, $utimestamp, $dbh, $last_data_value, $events, $event) = @_; +sub pandora_evaluate_alert ($$$$$$$;$$$$) { + my ($pa_config, $agent, $data, $last_status, $alert, $utimestamp, $dbh, + $last_data_value, $correlatedItems, $event, $log) = @_; if (defined ($agent)) { logger ($pa_config, "Evaluating alert '" . safe_output($alert->{'name'}) . "' for agent '" . safe_output ($agent->{'nombre'}) . "'.", 10); @@ -592,9 +593,20 @@ sub pandora_evaluate_alert ($$$$$$$;$$$) { return $status if ($last_status != 3 && $alert->{'type'} eq 'unknown'); return $status if ($last_status == 0 && $alert->{'type'} eq 'not_normal'); } - # Event alert + # Correlated alert else { - my $rc = enterprise_hook ('evaluate_event_alert', [$pa_config, $dbh, $alert, $events, $event]); + my $rc = enterprise_hook ( + 'evaluate_correlated_alert', + [ + $pa_config, + $dbh, + $alert, + $correlatedItems, + $event, + $log + ] + ); + return $status unless (defined ($rc) && $rc == 1); } From cd8f52fd92d3a76a042144e4cb1f8182d557429f Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 20 Nov 2019 09:11:03 +0100 Subject: [PATCH 073/123] WIP alert correlations --- pandora_console/include/javascript/alert.js | 94 ++++++++++++++++++++- pandora_console/include/styles/alert.css | 5 ++ 2 files changed, 98 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/javascript/alert.js b/pandora_console/include/javascript/alert.js index 435649833d..a3a3311a76 100644 --- a/pandora_console/include/javascript/alert.js +++ b/pandora_console/include/javascript/alert.js @@ -11,12 +11,104 @@ function drag(ev) { function drop(ev) { ev.preventDefault(); - var data = document.createElement("span"); + + // Source Element. var content = ev.dataTransfer.getData("html"); + + // Extract ID. + var id = $(content).attr("id"); + + // Extract clas type. + var classType = $(content) + .attr("class") + .split(/\s+/)[0]; + + // Input hidden. + var valueHidden = $("#hidden-json-rule").val(); + + // Initialize stack. + var stack = []; + // Check first. + if (valueHidden != 0) { + // Value decode. + stack = JSON.parse(valueHidden); + } + + // Add stack. + stack.push({ + type: classType, + value: id + }); + + // Convert to json tring for value input hidden. + var stackString = JSON.stringify(stack); + + // Set input hidden. + $("#hidden-json-rule").val(stackString); + + // Source class type action. + switch (classType) { + case "fields": + $(".fields").addClass("opacityElements"); + $(".fields").attr("draggable", false); + + $(".operators").removeClass("opacityElements"); + $(".operators").attr("draggable", true); + break; + + case "operators": + $(".operators").addClass("opacityElements"); + $(".operators").attr("draggable", false); + + $(".variable").removeClass("opacityElements"); + $(".variable").attr("draggable", true); + break; + + case "variable": + $(".variable").addClass("opacityElements"); + $(".variable").attr("draggable", false); + + $(".modifier").removeClass("opacityElements"); + $(".modifier").attr("draggable", true); + $(".nexo").removeClass("opacityElements"); + $(".nexo").attr("draggable", true); + break; + + case "modifier": + $(".modifier").addClass("opacityElements"); + $(".modifier").attr("draggable", false); + $(".nexo").addClass("opacityElements"); + $(".nexo").attr("draggable", false); + + $(".variable").removeClass("opacityElements"); + $(".variable").attr("draggable", true); + break; + + case "nexo": + $(".modifier").addClass("opacityElements"); + $(".modifier").attr("draggable", false); + $(".nexo").addClass("opacityElements"); + $(".nexo").attr("draggable", false); + + $(".fields").removeClass("opacityElements"); + $(".fields").attr("draggable", true); + break; + default: + break; + } + + // Create content. + var data = document.createElement("span"); + + // If content nexo line break. if (content.includes("nexo")) { content = "
    " + content; } + + // Add source element in content. data.innerHTML = content; + + // Add content to target. document.getElementById(ev.target.id).appendChild(data); } diff --git a/pandora_console/include/styles/alert.css b/pandora_console/include/styles/alert.css index 3368bf0796..c2d4c84b2b 100644 --- a/pandora_console/include/styles/alert.css +++ b/pandora_console/include/styles/alert.css @@ -96,6 +96,11 @@ div.target { background-color: #333; } +.field.opacityElements { + opacity: 0.2; + cursor: not-allowed; +} + .log { background-color: #638460; } From 43ecba3bbb13730e9dcd7e1303931a6c807ccbfe Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 20 Nov 2019 10:40:52 +0100 Subject: [PATCH 074/123] 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; From 79a135b07762e2e259a187dd554f645fcad86fb1 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 20 Nov 2019 11:36:15 +0100 Subject: [PATCH 075/123] Fix errata DESC => COMMENT --- pandora_console/extras/mr/33.sql | 26 +++++++++---------- .../pandoradb_migrate_6.0_to_7.0.mysql.sql | 26 +++++++++---------- pandora_console/pandoradb.sql | 26 +++++++++---------- 3 files changed, 39 insertions(+), 39 deletions(-) diff --git a/pandora_console/extras/mr/33.sql b/pandora_console/extras/mr/33.sql index ee06202af6..c6dcd70dec 100644 --- a/pandora_console/extras/mr/33.sql +++ b/pandora_console/extras/mr/33.sql @@ -12,19 +12,19 @@ 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'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_agent` text COMMENT 'Operator for agent'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_id_usuario` text COMMENT 'Operator for id_usuario'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_id_grupo` text COMMENT 'Operator for id_grupo'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_evento` text COMMENT 'Operator for evento'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_event_type` text COMMENT 'Operator for event_type'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_module` text COMMENT 'Operator for module'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_alert` text COMMENT 'Operator for alert'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_criticity` text COMMENT 'Operator for criticity'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_user_comment` text COMMENT 'Operator for user_comment'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_id_tag` text COMMENT 'Operator for id_tag'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_content` text COMMENT 'Operator for log_content'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_source` text COMMENT 'Operator for log_source'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_agent` text COMMENT 'Operator for log_agent'; CREATE TABLE `tremote_command` ( `id` SERIAL, 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 1e779797ff..5aed467ab7 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,19 +567,19 @@ 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'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_agent` text COMMENT 'Operator for agent'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_id_usuario` text COMMENT 'Operator for id_usuario'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_id_grupo` text COMMENT 'Operator for id_grupo'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_evento` text COMMENT 'Operator for evento'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_event_type` text COMMENT 'Operator for event_type'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_module` text COMMENT 'Operator for module'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_alert` text COMMENT 'Operator for alert'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_criticity` text COMMENT 'Operator for criticity'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_user_comment` text COMMENT 'Operator for user_comment'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_id_tag` text COMMENT 'Operator for id_tag'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_content` text COMMENT 'Operator for log_content'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_source` text COMMENT 'Operator for log_source'; +ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_agent` text COMMENT 'Operator for log_agent'; -- ----------------------------------------------------- diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 432c54aa1b..412ff3bcfd 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -2785,19 +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', + `operator_agent` text COMMENT 'Operator for agent', + `operator_id_usuario` text COMMENT 'Operator for id_usuario', + `operator_id_grupo` text COMMENT 'Operator for id_grupo', + `operator_evento` text COMMENT 'Operator for evento', + `operator_event_type` text COMMENT 'Operator for event_type', + `operator_module` text COMMENT 'Operator for module', + `operator_alert` text COMMENT 'Operator for alert', + `operator_criticity` text COMMENT 'Operator for criticity', + `operator_user_comment` text COMMENT 'Operator for user_comment', + `operator_id_tag` text COMMENT 'Operator for id_tag', + `operator_log_content` text COMMENT 'Operator for log_content', + `operator_log_source` text COMMENT 'Operator for log_source', + `operator_log_agent` text COMMENT 'Operator for log_agent', PRIMARY KEY (`id_event_rule`), KEY `idx_id_event_alert` (`id_event_alert`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; From 4d7f92e3f0082f591863c74e2d32718823f6282b Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 20 Nov 2019 13:25:16 +0100 Subject: [PATCH 076/123] Add button diagnostic --- .../include/class/Diagnostics.class.php | 31 ++++++++++++++++++- pandora_console/tools/diagnostics.php | 2 +- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/class/Diagnostics.class.php b/pandora_console/include/class/Diagnostics.class.php index 94acbc4ba2..c062793b9d 100644 --- a/pandora_console/include/class/Diagnostics.class.php +++ b/pandora_console/include/class/Diagnostics.class.php @@ -68,6 +68,10 @@ class Diagnostics extends Wizard // Check access. check_login(); + $this->url = ui_get_full_url( + 'index.php?sec=gextensions&sec2=tools/diagnostics' + ); + $this->ajaxController = $page; $this->pdf = $pdf; $this->product_name = io_safe_output(get_product_name()); @@ -123,15 +127,34 @@ class Diagnostics extends Wizard { global $config; + if ($this->pdf === true) { + $this->exportPDF(); + exit; + } + ui_require_css_file('diagnostics'); + $pdf_url = $this->url.'&pdf=true'; + $pdf_img = html_print_image( + 'images/pdf.png', + true, + ['title' => __('Export to PDF')] + ); + $header_buttons = [ + 'csv' => [ + 'active' => false, + 'text' => ''.$pdf_img.'', + ], + ]; + // Header. ui_print_page_header( __('%s Diagnostic tool', $this->product_name), 'images/gm_massive_operations.png', false, 'diagnostic_tool_tab', - true + true, + $header_buttons ); // Print all Methods Diagnostic Info. @@ -2080,6 +2103,10 @@ class Diagnostics extends Wizard enterprise_include_once('/include/class/Pdf.class.php'); $mpdf = new Pdf([]); + // Ignore pending HTML outputs. + while (@ob_end_clean()) { + } + // ADD style. $mpdf->addStyle($config['homedir'].'/include/styles/diagnostics.css'); @@ -2112,6 +2139,8 @@ class Diagnostics extends Wizard // Write html filename. $mpdf->writePDFfile($filename); + + exit; } diff --git a/pandora_console/tools/diagnostics.php b/pandora_console/tools/diagnostics.php index 30be89efc4..fc2b2fecd2 100644 --- a/pandora_console/tools/diagnostics.php +++ b/pandora_console/tools/diagnostics.php @@ -32,7 +32,7 @@ global $config; require_once $config['homedir'].'/include/class/Diagnostics.class.php'; $ajaxPage = 'tools/diagnostics'; -$pdf = false; +$pdf = get_parameter('pdf', false); // Control call flow. From 61568ee3b7d760a13398e4382b3f4872d1db9181 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 20 Nov 2019 13:26:02 +0100 Subject: [PATCH 077/123] Add button diagnostic --- pandora_console/include/class/Diagnostics.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_console/include/class/Diagnostics.class.php b/pandora_console/include/class/Diagnostics.class.php index c062793b9d..ee61ec743d 100644 --- a/pandora_console/include/class/Diagnostics.class.php +++ b/pandora_console/include/class/Diagnostics.class.php @@ -2105,6 +2105,7 @@ class Diagnostics extends Wizard // Ignore pending HTML outputs. while (@ob_end_clean()) { + $ignore_me; } // ADD style. From fb6013bd6271d7daaaf04250eb664a56c89a3c89 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 20 Nov 2019 15:55:08 +0100 Subject: [PATCH 078/123] Wip alert correlation --- pandora_console/include/javascript/alert.js | 85 +++++++++++++++------ 1 file changed, 63 insertions(+), 22 deletions(-) diff --git a/pandora_console/include/javascript/alert.js b/pandora_console/include/javascript/alert.js index a3a3311a76..811ce42ada 100644 --- a/pandora_console/include/javascript/alert.js +++ b/pandora_console/include/javascript/alert.js @@ -9,6 +9,35 @@ function drag(ev) { ev.dataTransfer.setData("html", ev.target.outerHTML); } +function edit(id, str) { + // If not defined id return. + console.log(id); + + if (id == "variable-text") { + return; + } + + // Value input hidden. + var valueHidden = $("#hidden-json-rule").val(); + + // Convert to array. + var arrayValueHidden = JSON.parse(valueHidden); + + // Extract to id number row. + var numberField = id.replace("element-", ""); + + // Check do no undefined. + if (arrayValueHidden[numberField] != undefined) { + // Change value. + arrayValueHidden[numberField].value = str; + + // Update value json-rule. + $("#hidden-json-rule").val(JSON.stringify(arrayValueHidden)); + } + + return; +} + function drop(ev) { ev.preventDefault(); @@ -23,6 +52,9 @@ function drop(ev) { .attr("class") .split(/\s+/)[0]; + // Remove Class. + content = $(content).removeClass(classType); + // Input hidden. var valueHidden = $("#hidden-json-rule").val(); @@ -34,10 +66,14 @@ function drop(ev) { stack = JSON.parse(valueHidden); } + // Change ID for non repeat and use variable change text. + content = $(content).attr("id", "element-" + stack.length); + // Add stack. stack.push({ type: classType, - value: id + element: id.replace(classType + "-", ""), + value: $(content).text() }); // Convert to json tring for value input hidden. @@ -46,6 +82,9 @@ function drop(ev) { // Set input hidden. $("#hidden-json-rule").val(stackString); + // Next button to submit is disabled + $("#submit-rule").attr("disabled", true); + // Source class type action. switch (classType) { case "fields": @@ -60,35 +99,36 @@ function drop(ev) { $(".operators").addClass("opacityElements"); $(".operators").attr("draggable", false); - $(".variable").removeClass("opacityElements"); - $(".variable").attr("draggable", true); + $(".variables").removeClass("opacityElements"); + $(".variables").attr("draggable", true); break; - case "variable": - $(".variable").addClass("opacityElements"); - $(".variable").attr("draggable", false); + case "variables": + $(".variables").addClass("opacityElements"); + $(".variables").attr("draggable", false); - $(".modifier").removeClass("opacityElements"); - $(".modifier").attr("draggable", true); - $(".nexo").removeClass("opacityElements"); - $(".nexo").attr("draggable", true); + $(".modifiers").removeClass("opacityElements"); + $(".modifiers").attr("draggable", true); + $(".nexos").removeClass("opacityElements"); + $(".nexos").attr("draggable", true); + $("#submit-rule").attr("disabled", false); break; - case "modifier": - $(".modifier").addClass("opacityElements"); - $(".modifier").attr("draggable", false); - $(".nexo").addClass("opacityElements"); - $(".nexo").attr("draggable", false); + case "modifiers": + $(".modifiers").addClass("opacityElements"); + $(".modifiers").attr("draggable", false); + $(".nexos").addClass("opacityElements"); + $(".nexos").attr("draggable", false); - $(".variable").removeClass("opacityElements"); - $(".variable").attr("draggable", true); + $(".variables").removeClass("opacityElements"); + $(".variables").attr("draggable", true); break; - case "nexo": - $(".modifier").addClass("opacityElements"); - $(".modifier").attr("draggable", false); - $(".nexo").addClass("opacityElements"); - $(".nexo").attr("draggable", false); + case "nexos": + $(".modifiers").addClass("opacityElements"); + $(".modifiers").attr("draggable", false); + $(".nexos").addClass("opacityElements"); + $(".nexos").attr("draggable", false); $(".fields").removeClass("opacityElements"); $(".fields").attr("draggable", true); @@ -100,6 +140,7 @@ function drop(ev) { // Create content. var data = document.createElement("span"); + content = $(content).prop("outerHTML"); // If content nexo line break. if (content.includes("nexo")) { content = "
    " + content; From 624a1e0086852fda27b3a730bdd60f31fede2473 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 20 Nov 2019 18:17:43 +0100 Subject: [PATCH 079/123] WIP alert correlation --- .../godmode/wizards/Wizard.main.php | 12 +- pandora_console/include/javascript/alert.js | 193 ++++++++++++++++-- 2 files changed, 190 insertions(+), 15 deletions(-) diff --git a/pandora_console/godmode/wizards/Wizard.main.php b/pandora_console/godmode/wizards/Wizard.main.php index 30b0706342..65a76191b9 100644 --- a/pandora_console/godmode/wizards/Wizard.main.php +++ b/pandora_console/godmode/wizards/Wizard.main.php @@ -514,7 +514,9 @@ class Wizard $output .= ''; } else { - if ($input['arguments']['type'] != 'hidden') { + if ($input['arguments']['type'] != 'hidden' + && $input['arguments']['type'] != 'hidden_extended' + ) { if (!$direct) { $output .= '
  • '; } @@ -572,7 +574,9 @@ class Wizard $output .= '
  • '; } else { - if ($input['arguments']['type'] != 'hidden') { + if ($input['arguments']['type'] != 'hidden' + && $input['arguments']['type'] != 'hidden_extended' + ) { if ($input['arguments']['inline'] != 'true') { $output .= '
    '; } else { @@ -675,7 +679,9 @@ class Wizard $output .= ''; } else { - if ($input['arguments']['type'] != 'hidden') { + if ($input['arguments']['type'] != 'hidden' + && $input['arguments']['type'] != 'hidden_extended' + ) { $output .= '
  • '; $output .= ''; $output .= $this->printInput($input['arguments']); diff --git a/pandora_console/include/javascript/alert.js b/pandora_console/include/javascript/alert.js index 811ce42ada..a051eb6ede 100644 --- a/pandora_console/include/javascript/alert.js +++ b/pandora_console/include/javascript/alert.js @@ -18,7 +18,7 @@ function edit(id, str) { } // Value input hidden. - var valueHidden = $("#hidden-json-rule").val(); + var valueHidden = $("#rule-stack").val(); // Convert to array. var arrayValueHidden = JSON.parse(valueHidden); @@ -31,13 +31,182 @@ function edit(id, str) { // Change value. arrayValueHidden[numberField].value = str; - // Update value json-rule. - $("#hidden-json-rule").val(JSON.stringify(arrayValueHidden)); + // Update value rule-stack. + $("#rule-stack").val(JSON.stringify(arrayValueHidden)); } return; } +function getStack() { + return JSON.parse($("#rule-stack").val()); +} + +function setStack(stack) { + return $("#rule-stack").val(JSON.stringify(stack)); +} + +function addStack(stack, item) { + console.log("voy a meterla bien al fondo"); + console.log(item); + stack.push(item); + setStack(stack); + console.log(stack); +} + +function prevStack(stack) { + return stack[stack.length - 1]; +} + +function getBlockState() { + return $("#block-status").val(); +} + +function setBlockState(st) { + return $("#block-status").val(st); +} + +function getBlockOrder() { + return $("#block-order").val(); +} + +function increaseBlockOrder(order) { + return $("#block-order").val(parseInt($("#block-order").val()) + 1); +} + +function gramaticRules(content) { + console.log($(content)); + var stack = getStack(); + var id = $(content).attr("id"); + var latest = prevStack(stack); + + console.log("ME LLAMAN CON " + id); + var classType = $(content) + .attr("class") + .split(/\s+/)[0]; + + var item; + + item = { + type: classType, + id: id, + value: $(content).text(), + order: getBlockOrder() + }; + + // Control block start. + if (id == "block-start") { + if (getBlockState() == "1") { + console.log("Block already opened"); + return false; + } + + if (stack.length > 0) { + if (latest.type == "nexos") { + // Can add a block start after a nexus. + addStack(stack, item); + setBlockState("1"); + return true; + } + } + + if (stack.length == 0) { + addStack(stack, item); + setBlockState("1"); + return true; + } + } + + // Control block end. + if (id == "block-end") { + if (getBlockState() == "0") { + console.log("Block already closed"); + return false; + } + + if (stack.length > 0) { + // We can only close a block after add a variable. + if (latest.type == "variables") { + // Can add a block start after a nexus. + addStack(stack, item); + setBlockState("0"); + increaseBlockOrder(); + return true; + } + } + } + + // Control field. + if (classType == "fields") { + if ( + stack.length == 0 || + latest.id == "block-start" || + latest.type == "nexos" + ) { + // We can add a field after a block start or a nexo + addStack(stack, item); + return true; + } + } + + console.log(latest); + // Control operator. + if (classType == "operators") { + if (latest.type == "fields" || latest.type == "variables") { + // We can add a operator after a field or a variable. + addStack(stack, item); + return true; + } + } + + // Control variables. + if (classType == "variables") { + if (latest.type == "operators" || latest.type == "modifiers") { + // We can add a operator after a field or a variable. + addStack(stack, item); + return true; + } + } + + // Control modifiers. + if (classType == "modifiers") { + // TODO: Could not be repeated per block!! + if (latest.type == "variables") { + // We can add a operator after a field or a variable. + addStack(stack, item); + return true; + } + } + + // Control nexos. + if (classType == "nexos") { + if (latest.type == "variables" && getBlockState() == "0") { + // After a variable and at the end of a block (rule). + // Could be anything. + addStack(stack, item); + increaseBlockOrder(); + return true; + } + + if (latest.id == "block-end" && getBlockState() == "0") { + // After a block-end could be anything. + addStack(stack, item); + increaseBlockOrder(); + return true; + } + + if (getBlockState() == "1") { + // I'm inside a block. Coul only use AND nexos. + if (id == "nexo-and") { + addStack(stack, item); + return true; + } + } + } + + return false; +} + function drop(ev) { ev.preventDefault(); @@ -47,6 +216,13 @@ function drop(ev) { // Extract ID. var id = $(content).attr("id"); + console.log("Moving: " + id); + + // Ensure rules. + if (gramaticRules(content) != true) { + return; + } + // Extract clas type. var classType = $(content) .attr("class") @@ -56,7 +232,7 @@ function drop(ev) { content = $(content).removeClass(classType); // Input hidden. - var valueHidden = $("#hidden-json-rule").val(); + var valueHidden = $("#rule-stack").val(); // Initialize stack. var stack = []; @@ -69,18 +245,11 @@ function drop(ev) { // Change ID for non repeat and use variable change text. content = $(content).attr("id", "element-" + stack.length); - // Add stack. - stack.push({ - type: classType, - element: id.replace(classType + "-", ""), - value: $(content).text() - }); - // Convert to json tring for value input hidden. var stackString = JSON.stringify(stack); // Set input hidden. - $("#hidden-json-rule").val(stackString); + $("#rule-stack").val(stackString); // Next button to submit is disabled $("#submit-rule").attr("disabled", true); From 17e7710f45d33109ccc301321661dbe098b98389 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Date: Thu, 21 Nov 2019 09:05:34 +0100 Subject: [PATCH 080/123] add datepicker alert correlation --- pandora_console/include/javascript/alert.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pandora_console/include/javascript/alert.js b/pandora_console/include/javascript/alert.js index a051eb6ede..fa185691d4 100644 --- a/pandora_console/include/javascript/alert.js +++ b/pandora_console/include/javascript/alert.js @@ -474,3 +474,23 @@ function disabled_alert(settings) { } }); } + +function datetime_picker_callback(set) { + $("#text-time_from, #text-time_to").timepicker({ + showSecond: true, + timeFormat: set.timeFormat, + timeOnlyTitle: set.timeOnlyTitle, + timeText: set.timeText, + hourText: set.hourText, + minuteText: set.minuteText, + secondText: set.secondText, + currentText: set.currentText, + closeText: set.closeText + }); + + $("#text-date_from, #text-date_to").datepicker({ + dateFormat: set.dateFormat + }); + + $.datepicker.setDefaults($.datepicker.regional[set.regional]); +} From 0f2b8a55a564f963daf4be5b93614fdf1cbc7f21 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 21 Nov 2019 12:05:14 +0100 Subject: [PATCH 081/123] wip alert correlation --- pandora_console/include/javascript/alert.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/javascript/alert.js b/pandora_console/include/javascript/alert.js index fa185691d4..2d9399389a 100644 --- a/pandora_console/include/javascript/alert.js +++ b/pandora_console/include/javascript/alert.js @@ -67,7 +67,7 @@ function setBlockState(st) { } function getBlockOrder() { - return $("#block-order").val(); + return parseInt($("#block-order").val()); } function increaseBlockOrder(order) { @@ -130,7 +130,6 @@ function gramaticRules(content) { // Can add a block start after a nexus. addStack(stack, item); setBlockState("0"); - increaseBlockOrder(); return true; } } @@ -183,15 +182,17 @@ function gramaticRules(content) { if (latest.type == "variables" && getBlockState() == "0") { // After a variable and at the end of a block (rule). // Could be anything. - addStack(stack, item); increaseBlockOrder(); + item.order = item.order + 1; + addStack(stack, item); return true; } if (latest.id == "block-end" && getBlockState() == "0") { // After a block-end could be anything. - addStack(stack, item); increaseBlockOrder(); + item.order += 1; + addStack(stack, item); return true; } From 5195d6a7543750489396e1c07c3ecb1495c5b303 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 21 Nov 2019 12:42:06 +0100 Subject: [PATCH 082/123] Allow single quotes hidden_extended --- pandora_console/include/functions_html.php | 25 ++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index e329af6013..c66924d27a 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1828,11 +1828,18 @@ function html_print_input_hidden($name, $value, $return=false, $class=false) * @param string $id Input value. * @param boolean $return Whether to return an output string or echo now (optional, echo by default). * @param string $class Set the class of input. + * @param boolean $quotes Use simple quotes or double quotes. * * @return string HTML code if return parameter is true. */ -function html_print_input_hidden_extended($name, $value, $id, $return=false, $class=false) -{ +function html_print_input_hidden_extended( + $name, + $value, + $id, + $return=false, + $class=false, + $quotes=false +) { if ($class !== false) { $classText = 'class="'.$class.'"'; } else { @@ -1845,7 +1852,16 @@ function html_print_input_hidden_extended($name, $value, $id, $return=false, $cl $ouput_id = $id; } - $output = ''; + $quote = '"'; + if ($quotes === true) { + $quote = "'"; + } + + $output = ' Date: Thu, 21 Nov 2019 13:12:17 +0100 Subject: [PATCH 083/123] moved alert.js to correlated_alerts.js --- pandora_console/include/javascript/alert.js | 497 -------------------- 1 file changed, 497 deletions(-) delete mode 100644 pandora_console/include/javascript/alert.js diff --git a/pandora_console/include/javascript/alert.js b/pandora_console/include/javascript/alert.js deleted file mode 100644 index 2d9399389a..0000000000 --- a/pandora_console/include/javascript/alert.js +++ /dev/null @@ -1,497 +0,0 @@ -/* eslint-disable no-unused-vars */ -/* global $, load_modal, generalShowMsg, confirmDialog */ - -function allowDrop(ev) { - ev.preventDefault(); -} - -function drag(ev) { - ev.dataTransfer.setData("html", ev.target.outerHTML); -} - -function edit(id, str) { - // If not defined id return. - console.log(id); - - if (id == "variable-text") { - return; - } - - // Value input hidden. - var valueHidden = $("#rule-stack").val(); - - // Convert to array. - var arrayValueHidden = JSON.parse(valueHidden); - - // Extract to id number row. - var numberField = id.replace("element-", ""); - - // Check do no undefined. - if (arrayValueHidden[numberField] != undefined) { - // Change value. - arrayValueHidden[numberField].value = str; - - // Update value rule-stack. - $("#rule-stack").val(JSON.stringify(arrayValueHidden)); - } - - return; -} - -function getStack() { - return JSON.parse($("#rule-stack").val()); -} - -function setStack(stack) { - return $("#rule-stack").val(JSON.stringify(stack)); -} - -function addStack(stack, item) { - console.log("voy a meterla bien al fondo"); - console.log(item); - stack.push(item); - setStack(stack); - console.log(stack); -} - -function prevStack(stack) { - return stack[stack.length - 1]; -} - -function getBlockState() { - return $("#block-status").val(); -} - -function setBlockState(st) { - return $("#block-status").val(st); -} - -function getBlockOrder() { - return parseInt($("#block-order").val()); -} - -function increaseBlockOrder(order) { - return $("#block-order").val(parseInt($("#block-order").val()) + 1); -} - -function gramaticRules(content) { - console.log($(content)); - var stack = getStack(); - var id = $(content).attr("id"); - var latest = prevStack(stack); - - console.log("ME LLAMAN CON " + id); - var classType = $(content) - .attr("class") - .split(/\s+/)[0]; - - var item; - - item = { - type: classType, - id: id, - value: $(content).text(), - order: getBlockOrder() - }; - - // Control block start. - if (id == "block-start") { - if (getBlockState() == "1") { - console.log("Block already opened"); - return false; - } - - if (stack.length > 0) { - if (latest.type == "nexos") { - // Can add a block start after a nexus. - addStack(stack, item); - setBlockState("1"); - return true; - } - } - - if (stack.length == 0) { - addStack(stack, item); - setBlockState("1"); - return true; - } - } - - // Control block end. - if (id == "block-end") { - if (getBlockState() == "0") { - console.log("Block already closed"); - return false; - } - - if (stack.length > 0) { - // We can only close a block after add a variable. - if (latest.type == "variables") { - // Can add a block start after a nexus. - addStack(stack, item); - setBlockState("0"); - return true; - } - } - } - - // Control field. - if (classType == "fields") { - if ( - stack.length == 0 || - latest.id == "block-start" || - latest.type == "nexos" - ) { - // We can add a field after a block start or a nexo - addStack(stack, item); - return true; - } - } - - console.log(latest); - // Control operator. - if (classType == "operators") { - if (latest.type == "fields" || latest.type == "variables") { - // We can add a operator after a field or a variable. - addStack(stack, item); - return true; - } - } - - // Control variables. - if (classType == "variables") { - if (latest.type == "operators" || latest.type == "modifiers") { - // We can add a operator after a field or a variable. - addStack(stack, item); - return true; - } - } - - // Control modifiers. - if (classType == "modifiers") { - // TODO: Could not be repeated per block!! - if (latest.type == "variables") { - // We can add a operator after a field or a variable. - addStack(stack, item); - return true; - } - } - - // Control nexos. - if (classType == "nexos") { - if (latest.type == "variables" && getBlockState() == "0") { - // After a variable and at the end of a block (rule). - // Could be anything. - increaseBlockOrder(); - item.order = item.order + 1; - addStack(stack, item); - return true; - } - - if (latest.id == "block-end" && getBlockState() == "0") { - // After a block-end could be anything. - increaseBlockOrder(); - item.order += 1; - addStack(stack, item); - return true; - } - - if (getBlockState() == "1") { - // I'm inside a block. Coul only use AND nexos. - if (id == "nexo-and") { - addStack(stack, item); - return true; - } - } - } - - return false; -} - -function drop(ev) { - ev.preventDefault(); - - // Source Element. - var content = ev.dataTransfer.getData("html"); - - // Extract ID. - var id = $(content).attr("id"); - - console.log("Moving: " + id); - - // Ensure rules. - if (gramaticRules(content) != true) { - return; - } - - // Extract clas type. - var classType = $(content) - .attr("class") - .split(/\s+/)[0]; - - // Remove Class. - content = $(content).removeClass(classType); - - // Input hidden. - var valueHidden = $("#rule-stack").val(); - - // Initialize stack. - var stack = []; - // Check first. - if (valueHidden != 0) { - // Value decode. - stack = JSON.parse(valueHidden); - } - - // Change ID for non repeat and use variable change text. - content = $(content).attr("id", "element-" + stack.length); - - // Convert to json tring for value input hidden. - var stackString = JSON.stringify(stack); - - // Set input hidden. - $("#rule-stack").val(stackString); - - // Next button to submit is disabled - $("#submit-rule").attr("disabled", true); - - // Source class type action. - switch (classType) { - case "fields": - $(".fields").addClass("opacityElements"); - $(".fields").attr("draggable", false); - - $(".operators").removeClass("opacityElements"); - $(".operators").attr("draggable", true); - break; - - case "operators": - $(".operators").addClass("opacityElements"); - $(".operators").attr("draggable", false); - - $(".variables").removeClass("opacityElements"); - $(".variables").attr("draggable", true); - break; - - case "variables": - $(".variables").addClass("opacityElements"); - $(".variables").attr("draggable", false); - - $(".modifiers").removeClass("opacityElements"); - $(".modifiers").attr("draggable", true); - $(".nexos").removeClass("opacityElements"); - $(".nexos").attr("draggable", true); - $("#submit-rule").attr("disabled", false); - break; - - case "modifiers": - $(".modifiers").addClass("opacityElements"); - $(".modifiers").attr("draggable", false); - $(".nexos").addClass("opacityElements"); - $(".nexos").attr("draggable", false); - - $(".variables").removeClass("opacityElements"); - $(".variables").attr("draggable", true); - break; - - case "nexos": - $(".modifiers").addClass("opacityElements"); - $(".modifiers").attr("draggable", false); - $(".nexos").addClass("opacityElements"); - $(".nexos").attr("draggable", false); - - $(".fields").removeClass("opacityElements"); - $(".fields").attr("draggable", true); - break; - default: - break; - } - - // Create content. - var data = document.createElement("span"); - - content = $(content).prop("outerHTML"); - // If content nexo line break. - if (content.includes("nexo")) { - content = "
    " + content; - } - - // Add source element in content. - data.innerHTML = content; - - // Add content to target. - document.getElementById(ev.target.id).appendChild(data); -} - -function add_alert_action(settings) { - load_modal({ - target: $("#modal-add-action-form"), - form: "modal_form_add_actions", - url: settings.url_ajax, - modal: { - title: settings.title, - cancel: settings.btn_cancel, - ok: settings.btn_text - }, - onshow: { - page: settings.url, - method: "addAlertActionForm", - extradata: { - id: settings.id - } - }, - onsubmit: { - page: settings.url, - method: "addAlertAction", - dataType: "json" - }, - ajax_callback: add_alert_action_acept, - idMsgCallback: "msg-add-action" - }); -} - -function add_alert_action_acept(data, idMsg) { - if (data.error === 1) { - console.log(data.text); - return; - } - - if ($("#emptyli-al-" + data.id_alert).length > 0) { - $("#emptyli-al-" + data.id_alert).remove(); - } - - $.ajax({ - method: "post", - url: data.url, - data: { - page: data.page, - method: "addRowActionAjax", - id_alert: data.id_alert, - id_action: data.id_action - }, - dataType: "html", - success: function(li) { - $(".ui-dialog-content").dialog("close"); - $("#ul-al-" + data.id_alert).append(li); - }, - error: function(error) { - console.log(error); - } - }); -} - -function delete_alert_action(settings) { - confirmDialog({ - title: settings.title, - message: settings.msg, - onAccept: function() { - $.ajax({ - method: "post", - url: settings.url, - data: { - page: settings.page, - method: "deleteActionAlert", - id_alert: settings.id_alert, - id_action: settings.id_action - }, - dataType: "json", - success: function(data) { - // Delete row table. - $( - "#li-al-" + settings.id_alert + "-act-" + settings.id_action - ).remove(); - - var num_row = $("#ul-al-" + settings.id_alert + " li").length; - if (num_row === 0) { - var emptyli = - "
  • " + - settings.emptyli + - "
  • "; - $("#ul-al-" + settings.id_alert).append(emptyli); - } - }, - error: function(error) { - console.log(error); - } - }); - } - }); -} - -function standby_alert(settings) { - confirmDialog({ - title: settings.title, - message: settings.msg, - onAccept: function() { - $.ajax({ - method: "post", - url: settings.url, - data: { - page: settings.page, - method: "standByAlert", - id_alert: settings.id_alert, - standby: settings.standby - }, - dataType: "html", - success: function(data) { - $("#standby-alert-" + settings.id_alert).empty(); - $("#standby-alert-" + settings.id_alert).append(data); - }, - error: function(error) { - console.log(error); - } - }); - } - }); -} - -function disabled_alert(settings) { - confirmDialog({ - title: settings.title, - message: settings.msg, - onAccept: function() { - $.ajax({ - method: "post", - url: settings.url, - data: { - page: settings.page, - method: "disabledAlert", - id_alert: settings.id_alert, - disabled: settings.disabled - }, - dataType: "json", - success: function(data) { - $("#disabled-alert-" + settings.id_alert).empty(); - $("#disabled-alert-" + settings.id_alert).append(data.disabled); - $("#status-alert-" + settings.id_alert).empty(); - $("#status-alert-" + settings.id_alert).append(data.status); - }, - error: function(error) { - console.log(error); - } - }); - } - }); -} - -function datetime_picker_callback(set) { - $("#text-time_from, #text-time_to").timepicker({ - showSecond: true, - timeFormat: set.timeFormat, - timeOnlyTitle: set.timeOnlyTitle, - timeText: set.timeText, - hourText: set.hourText, - minuteText: set.minuteText, - secondText: set.secondText, - currentText: set.currentText, - closeText: set.closeText - }); - - $("#text-date_from, #text-date_to").datepicker({ - dateFormat: set.dateFormat - }); - - $.datepicker.setDefaults($.datepicker.regional[set.regional]); -} From 66035a8b67e363020c85c19c4445989ae80c47e6 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Date: Thu, 21 Nov 2019 15:27:47 +0100 Subject: [PATCH 084/123] fixed errors css --- pandora_console/include/styles/alert.css | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/pandora_console/include/styles/alert.css b/pandora_console/include/styles/alert.css index c2d4c84b2b..280ed1decc 100644 --- a/pandora_console/include/styles/alert.css +++ b/pandora_console/include/styles/alert.css @@ -131,3 +131,31 @@ div.target { .inEdit { background-color: #888; } + +.info-container { + width: 100%; + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-around; +} + +.info-item { + width: 25%; +} + +.info-days { + width: 65%; +} + +.info-item table.info_table thead tr th { + text-align: center; +} + +.info-item table.info_table tbody tr { + border-bottom: none; +} + +.info-container table.no-class tbody tr td { + padding: 10px; +} From 93c4793025b98c724f8d0e2cdc06a3fecf1d3913 Mon Sep 17 00:00:00 2001 From: marcos Date: Thu, 21 Nov 2019 17:36:01 +0100 Subject: [PATCH 085/123] add id_source_event 33.sql --- pandora_console/extras/mr/33.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora_console/extras/mr/33.sql b/pandora_console/extras/mr/33.sql index 755ec5f9c4..0d8eda13c6 100644 --- a/pandora_console/extras/mr/33.sql +++ b/pandora_console/extras/mr/33.sql @@ -17,5 +17,7 @@ INSERT INTO `tnetwork_component` (`name`, `description`, `id_group`, `type`, `ma INSERT INTO `tnetwork_component` (`name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES ('Linux available disk /','Available free space in mountpoint /',43,34,0,0,300,0,'df / | tail -n +2 | awk '{print $(NF-1)}' | tr -d '%'','','','',4,2,0,'','','',0,0,1,0.00,0.00,'0.00',0.00,0.00,'',0,'','inherited','',0,0,0.000000000000000,'','nowizard','','nowizard','0','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0); INSERT INTO `tconfig`(`token`, `value`) VALUES ('welcome_state', -1); +ALTER TABLE `tevent_filter` ADD COLUMN `id_source_event` int(10); + COMMIT; From 362837f85609f8839069f2ed2135ffff12bee42f Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 21 Nov 2019 17:47:21 +0100 Subject: [PATCH 086/123] updated default values for tevent_rule, new tokens for correlated alerts --- pandora_console/extras/mr/33.sql | 3 +++ pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 3 ++- pandora_console/pandoradb.sql | 4 ++-- pandora_server/conf/pandora_server.conf.new | 3 +++ pandora_server/lib/PandoraFMS/Config.pm | 4 ++++ 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/pandora_console/extras/mr/33.sql b/pandora_console/extras/mr/33.sql index c6dcd70dec..954fa89a08 100644 --- a/pandora_console/extras/mr/33.sql +++ b/pandora_console/extras/mr/33.sql @@ -8,6 +8,9 @@ INSERT INTO `ttipo_modulo` VALUES (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'); +ALTER TABLE `tevent_rule` MODIFY COLUMN `event_type` enum('','unknown','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_down_normal','going_down_critical','going_up_normal') default ''; +ALTER TABLE `tevent_rule` MODIFY COLUMN `criticity` int(4) unsigned NOT NULL default '99'; + 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; 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 5aed467ab7..388a008b45 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 @@ -580,7 +580,8 @@ ALTER TABLE `tevent_rule` ADD COLUMN `operator_id_tag` text COMMENT 'Operator fo ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_content` text COMMENT 'Operator for log_content'; ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_source` text COMMENT 'Operator for log_source'; ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_agent` text COMMENT 'Operator for log_agent'; - +ALTER TABLE `tevent_rule` MODIFY COLUMN `event_type` enum('','unknown','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_down_normal','going_down_critical','going_up_normal') default ''; +ALTER TABLE `tevent_rule` MODIFY COLUMN `criticity` int(4) unsigned NOT NULL default '99'; -- ----------------------------------------------------- -- Table `tevent_alert` diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 412ff3bcfd..500eeed86f 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -2774,10 +2774,10 @@ CREATE TABLE IF NOT EXISTS `tevent_rule` ( `id_usuario` varchar(100) NOT NULL default '', `id_grupo` mediumint(4) NOT NULL default '0', `evento` text NOT NULL default '', - `event_type` enum('','unknown','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_down_normal','going_down_critical','going_up_normal') default 'unknown', + `event_type` enum('','unknown','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_down_normal','going_down_critical','going_up_normal') default '', `module` text default '', `alert` text default '', - `criticity` int(4) unsigned NOT NULL default '0', + `criticity` int(4) unsigned NOT NULL default '99', `user_comment` text NOT NULL, `id_tag` integer(10) unsigned NOT NULL default '0', `name` text default '', diff --git a/pandora_server/conf/pandora_server.conf.new b/pandora_server/conf/pandora_server.conf.new index 2eb9fad569..d51d1515b2 100644 --- a/pandora_server/conf/pandora_server.conf.new +++ b/pandora_server/conf/pandora_server.conf.new @@ -457,6 +457,9 @@ event_window 3600 log_window 3600 +# Pre-load windows on start with available information. (PANDORA FMS ENTERPRISE ONLY). +#preload_windows 0 + # If set to 1, an alert will not be fired if the last event it generated is in 'in-process' status. event_inhibit_alerts 0 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 64804cca4e..639e915b4d 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -304,6 +304,7 @@ sub pandora_load_config { $pa_config->{"eventserver"} = 1; # 4.0 $pa_config->{"event_window"} = 3600; # 4.0 $pa_config->{"log_window"} = 3600; # 7.741 + $pa_config->{"preload_windows"} = 0; # 7.741 $pa_config->{"icmpserver"} = 0; # 4.0 $pa_config->{"icmp_threads"} = 3; # 4.0 $pa_config->{"snmpserver"} = 0; # 4.0 @@ -984,6 +985,9 @@ sub pandora_load_config { elsif ($parametro =~ m/^log_window\s+([0-9]*)/i) { $pa_config->{'log_window'}= clean_blank($1); } + elsif ($parametro =~ m/^preload_windows\s+([0-9]*)/i) { + $pa_config->{'preload_windows'}= clean_blank($1); + } elsif ($parametro =~ m/^snmp_threads\s+([0-9]*)/i) { $pa_config->{'snmp_threads'}= clean_blank($1); } From 960326b98089963b5e184fc4d92ffa0e7309c258 Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 21 Nov 2019 18:21:46 +0100 Subject: [PATCH 087/123] Add menu omnishell --- pandora_agents/pc/DEBIAN/make_deb_package.sh | 2 + pandora_agents/pc/pandora_agent_installer | 5 + .../unix/DEBIAN/make_deb_package.sh | 2 + pandora_agents/unix/pandora_agent | 498 ++++++++++++++++- pandora_agents/unix/pandora_agent.redhat.spec | 5 + pandora_agents/unix/pandora_agent.spec | 5 + pandora_agents/unix/pandora_agent_installer | 5 + pandora_console/extensions/agents_modules.php | 500 +++++++++-------- .../extensions/plugin_registration.php | 4 +- pandora_console/extensions/quick_shell.php | 54 +- pandora_console/extras/mr/33.sql | 32 ++ .../pandoradb_migrate_6.0_to_7.0.mysql.sql | 36 +- .../HA_cluster_builder.php | 4 +- .../cluster_builder.php | 4 +- .../collections.php | 2 +- .../custom_fields.php | 4 +- .../custom_graphs.php | 4 +- .../fields_manager.php | 4 +- .../{firts_task => first_task}/incidents.php | 4 +- .../map_builder.php | 4 +- .../network_map.php | 4 +- .../general/first_task/omnishell.php | 56 ++ .../planned_downtime.php | 4 +- .../{firts_task => first_task}/recon_view.php | 4 +- .../service_list.php | 4 +- .../snmp_filters.php | 4 +- .../{firts_task => first_task}/tags.php | 4 +- .../transactional_list.php | 4 +- pandora_console/general/sap_view.php | 77 +++ .../godmode/agentes/configurar_agente.php | 43 +- .../godmode/agentes/fields_manager.php | 2 +- .../godmode/agentes/planned_downtime.list.php | 2 +- pandora_console/godmode/menu.php | 4 +- pandora_console/godmode/reporting/graphs.php | 2 +- .../godmode/reporting/map_builder.php | 2 +- pandora_console/godmode/servers/discovery.php | 2 +- .../godmode/servers/servers.build_table.php | 2 +- pandora_console/godmode/tag/tag.php | 2 +- .../wizards/DiscoveryTaskList.class.php | 5 +- .../godmode/wizards/Wizard.main.php | 57 +- .../icono-cluster-activo.png | Bin .../{firts_task => first_task}/icono_aws.png | Bin .../icono_grande_custom_reporting.png | Bin .../icono_grande_event_alerts.png | Bin .../icono_grande_export.png | Bin .../icono_grande_gestiondetags.png | Bin .../icono_grande_import.png | Bin .../icono_grande_incidencia.png | Bin .../icono_grande_inventario.png | Bin .../icono_grande_licencia.png | Bin .../icono_grande_reconserver.png | Bin .../icono_grande_registro_plugin.png | Bin .../icono_grande_servicios.png | Bin .../icono_grande_topology.png | Bin .../icono_grande_visualconsole.png | Bin .../icono_manage_agents.png | Bin .../images/first_task/omnishell.png | Bin 0 -> 3129 bytes .../op_workspace.menu.png | Bin .../{firts_task => first_task}/slave-mode.png | Bin pandora_console/images/sap_icon.png | Bin 0 -> 324 bytes .../include/class/CredentialStore.class.php | 11 +- .../include/class/Diagnostics.class.php | 32 +- .../include/class/HelpFeedBack.class.php | 9 +- pandora_console/include/constants.php | 3 +- pandora_console/include/functions.php | 24 + pandora_console/include/functions_agents.php | 89 +++ pandora_console/include/functions_config.php | 4 + pandora_console/include/functions_html.php | 121 +++- pandora_console/include/functions_menu.php | 2 +- pandora_console/include/functions_ui.php | 102 +++- pandora_console/include/javascript/alert.js | 174 ++++++ pandora_console/include/javascript/pandora.js | 53 +- .../include/lib/WebSocketServer.php | 22 + pandora_console/include/styles/alert.css | 128 +++++ pandora_console/include/styles/discovery.css | 3 +- .../styles/{firts_task.css => first_task.css} | 9 +- pandora_console/include/styles/omnishell.css | 515 ++++++++++++++++++ pandora_console/include/styles/pandora.css | 18 +- pandora_console/include/styles/progress.css | 10 + .../operation/agentes/ver_agente.php | 34 +- .../operation/incidents/incident.php | 2 +- pandora_console/operation/menu.php | 2 + pandora_console/operation/search_agents.php | 1 + .../operation/servers/recon_view.php | 2 +- pandora_console/pandoradb.sql | 37 +- pandora_console/pandoradb_data.sql | 4 +- pandora_console/tools/diagnostics.php | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 4 +- pandora_server/conf/pandora_server.conf.new | 10 +- pandora_server/conf/tentacle_server.conf.new | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 12 + pandora_server/lib/PandoraFMS/DataServer.pm | 6 +- .../lib/PandoraFMS/DiscoveryServer.pm | 45 +- pandora_server/lib/PandoraFMS/Recon/Base.pm | 211 ++++--- pandora_server/lib/PandoraFMS/Tools.pm | 28 + pandora_server/pandora_server.redhat.spec | 4 + pandora_server/pandora_server.spec | 2 + pandora_server/pandora_server_installer | 2 + 98 files changed, 2754 insertions(+), 447 deletions(-) rename pandora_console/general/{firts_task => first_task}/HA_cluster_builder.php (95%) rename pandora_console/general/{firts_task => first_task}/cluster_builder.php (96%) rename pandora_console/general/{firts_task => first_task}/collections.php (98%) rename pandora_console/general/{firts_task => first_task}/custom_fields.php (94%) rename pandora_console/general/{firts_task => first_task}/custom_graphs.php (94%) rename pandora_console/general/{firts_task => first_task}/fields_manager.php (94%) rename pandora_console/general/{firts_task => first_task}/incidents.php (95%) rename pandora_console/general/{firts_task => first_task}/map_builder.php (95%) rename pandora_console/general/{firts_task => first_task}/network_map.php (95%) create mode 100644 pandora_console/general/first_task/omnishell.php rename pandora_console/general/{firts_task => first_task}/planned_downtime.php (94%) rename pandora_console/general/{firts_task => first_task}/recon_view.php (95%) rename pandora_console/general/{firts_task => first_task}/service_list.php (95%) rename pandora_console/general/{firts_task => first_task}/snmp_filters.php (95%) rename pandora_console/general/{firts_task => first_task}/tags.php (94%) rename pandora_console/general/{firts_task => first_task}/transactional_list.php (95%) create mode 100644 pandora_console/general/sap_view.php rename pandora_console/images/{firts_task => first_task}/icono-cluster-activo.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_aws.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_custom_reporting.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_event_alerts.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_export.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_gestiondetags.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_import.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_incidencia.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_inventario.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_licencia.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_reconserver.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_registro_plugin.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_servicios.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_topology.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_grande_visualconsole.png (100%) rename pandora_console/images/{firts_task => first_task}/icono_manage_agents.png (100%) create mode 100644 pandora_console/images/first_task/omnishell.png rename pandora_console/images/{firts_task => first_task}/op_workspace.menu.png (100%) rename pandora_console/images/{firts_task => first_task}/slave-mode.png (100%) create mode 100644 pandora_console/images/sap_icon.png create mode 100644 pandora_console/include/javascript/alert.js create mode 100644 pandora_console/include/styles/alert.css rename pandora_console/include/styles/{firts_task.css => first_task.css} (88%) create mode 100644 pandora_console/include/styles/omnishell.css diff --git a/pandora_agents/pc/DEBIAN/make_deb_package.sh b/pandora_agents/pc/DEBIAN/make_deb_package.sh index f44dfec8f4..691918b54e 100644 --- a/pandora_agents/pc/DEBIAN/make_deb_package.sh +++ b/pandora_agents/pc/DEBIAN/make_deb_package.sh @@ -36,6 +36,8 @@ mkdir -p temp_package/usr/bin/ mkdir -p temp_package/usr/sbin/ mkdir -p temp_package/etc/pandora/plugins mkdir -p temp_package/etc/pandora/collections +mkdir -p temp_package/etc/pandora/trans +mkdir -p temp_package/etc/pandora/commands mkdir -p temp_package/etc/init.d/ mkdir -p temp_package/var/log/pandora/ mkdir -p temp_package/usr/share/man/man1/ diff --git a/pandora_agents/pc/pandora_agent_installer b/pandora_agents/pc/pandora_agent_installer index ab2a00877e..469364abf1 100644 --- a/pandora_agents/pc/pandora_agent_installer +++ b/pandora_agents/pc/pandora_agent_installer @@ -324,6 +324,11 @@ install () { cp -r collections $PANDORA_BASE$PANDORA_HOME chmod -R 700 $PANDORA_BASE$PANDORA_HOME/collections ln -s $PANDORA_BASE$PANDORA_HOME/collections $PANDORA_BASE$PANDORA_CFG + + echo "Copying Pandora FMS Agent commands to $PANDORA_BASE$PANDORA_HOME/commands..." + cp -r commands $PANDORA_BASE$PANDORA_HOME + chmod -R 700 $PANDORA_BASE$PANDORA_HOME/commands + ln -s $PANDORA_BASE$PANDORA_HOME/commands $PANDORA_BASE$PANDORA_CFG echo "Copying tentacle server to $PANDORA_BASE$TENTACLE_SERVER" cp tentacle_server $PANDORA_BASE$TENTACLE_SERVER diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index b77eaa48c4..d37d7c3751 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -36,6 +36,8 @@ mkdir -p temp_package/usr/bin/ mkdir -p temp_package/usr/sbin/ mkdir -p temp_package/etc/pandora/plugins mkdir -p temp_package/etc/pandora/collections +mkdir -p temp_package/etc/pandora/trans +mkdir -p temp_package/etc/pandora/commands mkdir -p temp_package/etc/init.d/ mkdir -p temp_package/lib/systemd/system/ mkdir -p temp_package/var/log/pandora/ diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 9625518306..ba2b7c264e 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -24,6 +24,7 @@ Version 6.0 use strict; use warnings; +use Scalar::Util qw(looks_like_number); use POSIX qw(strftime floor); use Sys::Hostname; use File::Basename; @@ -32,6 +33,18 @@ use IO::Socket; use Sys::Syslog; use Time::Local; +my $YAML = 0; +# Dynamic load. Avoid unwanted behaviour. +eval { + eval 'require YAML::Tiny;1' or die('YAML::Tiny lib not found, commands feature won\'t be available'); +}; +if ($@) { + $YAML = 0; + print STDERR $@; +} else { + $YAML = 1; +} + # Agent XML data my $Xml; @@ -187,6 +200,7 @@ my %DefaultConf = ( 'custom_id' => '', 'url_address' => '', 'standby' => 0, + 'cmd_file' => undef, ); my %Conf = %DefaultConf; @@ -268,6 +282,91 @@ sub error ($) { exit 1; } +################################################################################ +# Try to load extra libraries.c +################################################################################ +sub load_libraries() { + # Dynamic load. Avoid unwanted behaviour. + eval {eval 'require YAML::Tiny;1' or die('YAML::Tiny lib not found, commands feature won\'t be available');}; + if ($@) { + $YAML = 0; + print STDERR $@; + } else { + $YAML = 1; + } +} + +################################################################################ +# Erase blank spaces before and after the string +################################################################################ +sub trim { + my $string = shift; + if (empty($string)){ + return ""; + } + + $string =~ s/\r//g; + + chomp($string); + $string =~ s/^\s+//g; + $string =~ s/\s+$//g; + + return $string; +} + +################################################################################ +# Mix hashses +################################################################################ +sub merge_hashes { + my $_h1 = shift; + my $_h2 = shift; + + if (ref($_h1) ne "HASH") { + return \%{$_h2} if (ref($_h2) eq "HASH"); + } + + if (ref($_h2) ne "HASH") { + return \%{$_h1} if (ref($_h1) eq "HASH"); + } + + if ((ref($_h1) ne "HASH") && (ref($_h2) ne "HASH")) { + return {}; + } + + my %ret = (%{$_h1}, %{$_h2}); + + return \%ret; +} + +################################################################################ +# Empty +################################################################################ +sub empty { + my $str = shift; + + if (!(defined($str)) ){ + return 1; + } + + if(looks_like_number($str)){ + return 0; + } + + if (ref($str) eq "ARRAY") { + return (($#{$str}<0)?1:0); + } + + if (ref($str) eq "HASH") { + my @tmp = keys %{$str}; + return (($#tmp<0)?1:0); + } + + if ($str =~ /^\ *[\n\r]{0,2}\ *$/) { + return 1; + } + return 0; +} + ################################################################################ # Check a regular expression. Returns 1 if its valid, 0 otherwise. ################################################################################ @@ -284,6 +383,27 @@ sub valid_regexp ($) { return 1; } +################################################################################ +# Reads a file and returns entire content or undef if error. +################################################################################ +sub read_file { + my $path = shift; + + my $_FILE; + if( !open($_FILE, "<", $path) ) { + # failed to open, return undef + return undef; + } + + # Slurp configuration file content. + my $content = do { local $/; <$_FILE> }; + + # Close file + close($_FILE); + + return $content; +} + ################################################################################ # Recursively delete files and directories. ################################################################################ @@ -776,7 +896,21 @@ sub read_config (;$) { next if ($line =~ /^module\s*\w*/); #Configuration token - if ($line =~ /^\s*(\S+)\s+(.*)$/) { + if ($line =~ /^\s*(\S+)\s+(.*)$/) { + # Reserved keyword. + next if ($1 eq "commands"); + + if ($1 eq "cmd_file") { + # Commands + if (ref ($Conf{'commands'}) ne "HASH") { + $Conf{'commands'} = {}; + } + # Initialize empty command hash. + $Conf{'commands'}->{$2} = {}; + log_message('setup', "Command required $2"); + next; + } + log_message ('setup', "$1 is $2"); $Conf{$1} = $2; @@ -923,6 +1057,7 @@ sub read_config (;$) { $Conf{'secondary_server_opts'} = '-x \'' . $Conf{'secondary_server_pwd'} . '\' ' . $Conf{'secondary_server_opts'} if ($Conf{'secondary_server_pwd'} ne ''); $Conf{'secondary_server_opts'} = '-c ' . $Conf{'secondary_server_opts'} if ($Conf{'secondary_server_ssl'} eq '1'); } + } ################################################################################# @@ -1157,14 +1292,14 @@ sub recv_file { }; if ($@) { - log_message ('error', "Error retrieving file: File transfer command is not responding."); + log_message ('error', "Error retrieving file: '.$file.' File transfer command is not responding."); exit 1; } # Get the errorlevel my $rc = $? >> 8; if ($rc != 0) { - log_message ('error', "Error retrieving file: $output"); + log_message ('error', "Error retrieving file: '$file' $output"); } exit $rc; } @@ -1233,6 +1368,10 @@ sub check_remote_config () { %Collections = (); %Conf = %DefaultConf; + # Supposed to discard current configuration but not. + # Cleanup old commands configuration. + $Conf{'commands'} = {}; + # Reload the new configuration read_config (); @@ -1362,6 +1501,336 @@ sub check_collections () { } } +################################################################################ +# Check for remote commands defined. +################################################################################ +sub prepare_commands { + if ($YAML == 0) { + log_message( + 'error', + 'Cannot use commands without YAML dependency, please install it.' + ); + return; + } + + # Force configuration file read. + my @commands = read_config('cmd_file'); + + if (empty(\@commands)) { + $Conf{'commands'} = {}; + } else { + foreach my $rcmd (@commands) { + $Conf{'commands'}->{trim($rcmd)} = {}; + } + } + + # Cleanup old commands. Not registered. + cleanup_old_commands(); + + foreach my $ref (keys %{$Conf{'commands'}}) { + my $file_content; + my $download = 0; + my $rcmd_file = $ConfDir.'/commands/'.$ref.'.rcmd'; + + # Check for local .rcmd.done files + if (-e $rcmd_file.'.done') { + # Ignore. + delete $Conf{'commands'}->{$ref}; + next; + } + + # Search for local .rcmd file + if (-e $rcmd_file) { + my $remote_md5_file = $Conf{'temporal'}.'/'.$ref.'.md5'; + + $file_content = read_file($rcmd_file); + if (recv_file($ref.'.md5', $remote_md5_file) != 0) { + # Remote file could not be retrieved, skip. + delete $Conf{'commands'}->{$ref}; + next; + } + + my $local_md5 = md5($file_content); + my $remote_md5 = md5(read_file($remote_md5_file)); + + if ($local_md5 ne $remote_md5) { + # Must be downloaded again. + $download = 1; + } + } else { + $download = 1; + } + + # Search for remote .rcmd file + if ($download == 1) { + # Download .rcmd file + if (recv_file($ref.'.rcmd') != 0) { + # Remote file could not be retrieved, skip. + delete $Conf{'commands'}->{$ref}; + next; + } else { + # Success + move($Conf{'temporal'}.'/'.$ref.'.rcmd', $rcmd_file); + } + } + + # Parse and prepare in memory skel. + eval { + $Conf{'commands'}->{$ref} = YAML::Tiny->read($rcmd_file); + }; + if ($@) { + # Failed. + log_message('error', 'Failed to decode command. ' . "\n".$@); + delete $Conf{'commands'}->{$ref}; + next; + } + + } +} + +################################################################################ +# Command report. +################################################################################ +sub report_command { + my ($ref, $err_level) = @_; + + # Retrieve content from .stdout and .stderr + my $stdout_file = $Conf{'temporal'}.'/'.$ref.'.stdout'; + my $stderr_file = $Conf{'temporal'}.'/'.$ref.'.stderr'; + + my $return; + eval { + $return = { + 'error_level' => $err_level, + 'stdout' => read_file($stdout_file), + 'stderr' => read_file($stderr_file), + }; + + $return->{'name'} = $Conf{'commands'}->{$ref}->[0]->{'name'}; + }; + if ($@) { + log_message('error', 'Failed to report command output. ' . $@); + } + + # Cleanup + unlink($stdout_file) if (-e $stdout_file); + unlink($stderr_file) if (-e $stderr_file); + + # Mark command as done. + open (my $R_FILE, '> '.$ConfDir.'/commands/'.$ref.'.rcmd.done'); + print $R_FILE $err_level; + close($R_FILE); + + + $return->{'stdout'} = '' unless defined ($return->{'stdout'}); + $return->{'stderr'} = '' unless defined ($return->{'stderr'}); + + return $return; +} + +################################################################################ +# Cleanup unreferenced rcmd and rcmd.done files. +################################################################################ +sub cleanup_old_commands { + # Cleanup old .rcmd and .rcmd.done files. + my %registered = map { $_.'.rcmd' => 1 } keys %{$Conf{'commands'}}; + if(opendir(my $dir, $ConfDir.'/commands/')) { + while (my $item = readdir($dir)) { + + # Skip other files. + next if ($item !~ /\.rcmd$/); + + # Clean .rcmd.done file if its command is not referenced in conf. + if (!defined($registered{$item})) { + if (-e $ConfDir.'/commands/'.$item) { + unlink($ConfDir.'/commands/'.$item); + } + if (-e $ConfDir.'/commands/'.$item.'.done') { + unlink($ConfDir.'/commands/'.$item.'.done'); + } + } + } + + # Close dir. + closedir($dir); + } + +} + +################################################################################ +# Executes a command using defined timeout. +################################################################################ +sub execute_command_timeout { + my ($cmd, $timeout) = @_; + + if (!defined($timeout) + || !looks_like_number($timeout) + || $timeout <= 0 + ) { + `$cmd`; + return $?>>8; + } + + my $remaining_timeout = $timeout; + + my $RET; + my $output; + + my $pid = open ($RET, "-|"); + if (!defined($pid)) { + # Failed to fork. + log_message('error', '[command] Failed to fork.'); + return undef; + } + if ($pid == 0) { + # Child. + my $ret; + eval { + local $SIG{ALRM} = sub { die "timeout\n" }; + alarm $timeout; + `$cmd`; + alarm 0; + }; + + my $result = ($?>>8); + print $result; + + # Exit child. + # Child finishes. + exit; + + } else { + # Parent waiting. + while( --$remaining_timeout > 0 ){ + if (wait == -1) { + last; + } + # Wait child up to timeout seconds. + sleep 1; + } + } + + if ($remaining_timeout > 0) { + # Retrieve output from child. + $output = do { local $/; <$RET> }; + $output = $output>>8; + } + else { + # Timeout expired. + return 124; + } + + close($RET); + + return $output; +} + +################################################################################ +# Executes a block of commands, returns error level, leaves output in +# redirection set by $std_files. E.g: +# $std_files = ' >> /tmp/stdout 2>> /tmp/stderr +################################################################################ +sub execute_command_block { + my ($commands, $std_files, $timeout, $retry) = @_; + + return 0 unless defined($commands); + + my $retries = $retry; + + $retries = 1 unless looks_like_number($retries) && $retries > 0; + + my $err_level = 0; + $std_files = '' unless defined ($std_files); + + if (ref($commands) ne "ARRAY") { + return 0 if $commands eq ''; + + do { + $err_level = execute_command_timeout( + "($commands) $std_files", + $timeout + ); + + # Do not retry if success. + last if looks_like_number($err_level) && $err_level == 0; + } while ((--$retries) > 0); + + } else { + foreach my $comm (@{$commands}) { + next unless defined($comm); + $retries = $retry; + $retries = 1 unless looks_like_number($retries) && $retries > 0; + + do { + $err_level = execute_command_timeout( + "($comm) $std_files", + $timeout + ); + + # Do not retry if success. + last if looks_like_number($err_level) && $err_level == 0; + + } while ((--$retries) > 0); + + # Do not continue evaluating block if failed. + last unless ($err_level == 0); + } + } + + return $err_level; +} + +################################################################################ +# Evalate given command. +################################################################################ +sub evaluate_command { + my ($ref) = @_; + + # Not found. + return unless defined $Conf{'commands'}->{$ref}; + + # Already completed. + return if (-e $ConfDir.'/commands/'.$ref.'.rcmd.done'); + + # [0] because how library works. + my $cmd = $Conf{'commands'}->{$ref}->[0]; + + my $std_files = ' >> '.$Conf{'temporal'}.'/'.$ref.'.stdout '; + $std_files .= ' 2>> '.$Conf{'temporal'}.'/'.$ref.'.stderr '; + + # Check preconditions + my $err_level; + + $err_level = execute_command_block( + $cmd->{'preconditions'}, + $std_files, + $cmd->{'timeout'} + ); + + # Precondition not satisfied. + return report_command($ref, $err_level) unless ($err_level == 0); + + # Main run. + $err_level = execute_command_block( + $cmd->{'script'}, + $std_files, + $cmd->{'timeout'} + ); + + # Script not success. + return report_command($ref, $err_level) unless ($err_level == 0); + + # Check postconditions + $err_level = execute_command_block( + $cmd->{'postconditions'}, + $std_files, + $cmd->{'timeout'} + ); + + # Return results. + return report_command($ref, $err_level); +} + ################################################################################ # Sleep function ################################################################################ @@ -2985,6 +3454,8 @@ my $iter_base_time = time(); $LogFileIdx = -1; # Loop while (1) { + load_libraries(); + if (-e $Conf{'logfile'} && (stat($Conf{'logfile'}))[7] > $Conf{'logsize'}) { rotate_log(); } @@ -2999,6 +3470,9 @@ while (1) { # Check file collections check_collections () unless ($Conf{'debug'} eq '1'); + # Check scheduled commands + prepare_commands() unless ($Conf{'debug'} eq '1'); + # Launch broker agents @BrokerPid = (); my @broker_agents = read_config ('broker_agent'); @@ -3128,6 +3602,24 @@ while (1) { } } + if (ref ($Conf{'commands'}) eq "HASH") { + foreach my $command (keys %{$Conf{'commands'}}) { + my $result = evaluate_command($command); + if (ref($result) eq "HASH") { + # Process command result. + $Xml .= "\n"; + $Xml .= " \n"; + $Xml .= " {'name'}."]]>\n"; + $Xml .= " \n"; + $Xml .= " {'error_level'}."]]>\n"; + $Xml .= " {'stdout'}."]]>\n"; + $Xml .= " {'stderr'}."]]>\n"; + $Xml .= " \n"; + $Xml .= "\n"; + } + } + } + # Wait for all the threads $ThreadSem->down ($Conf{'agent_threads'}) if (defined ($ThreadSem) && $Conf{'agent_threads'} > 1); $ThreadSem->up ($Conf{'agent_threads'}) if (defined ($ThreadSem) && $Conf{'agent_threads'} > 1); diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index a308bf9350..ed6e3d9af3 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -99,6 +99,11 @@ if [ ! -e /etc/pandora/collections ]; then ln -s /usr/share/pandora_agent/collections /etc/pandora fi +if [ ! -e /etc/pandora/commands ]; then + mkdir -p /usr/share/pandora_agent/commands + ln -s /usr/share/pandora_agent/commands /etc/pandora +fi + mkdir -p /var/spool/pandora/data_out if [ ! -d /var/log/pandora ]; then mkdir -p /var/log/pandora diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 6f71dee5b5..92394da731 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -90,6 +90,11 @@ fi if [ ! -e /etc/pandora/collections ]; then mkdir /etc/pandora/collections fi + +if [ ! -e /etc/pandora/commands ]; then + mkdir /etc/pandora/commands +fi + cp -aRf /usr/share/pandora_agent/pandora_agent_logrotate /etc/logrotate.d/pandora_agent # Enable the service on SystemD diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 099ed7b6ca..e4e0431311 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -400,6 +400,11 @@ install () { mkdir -p $PANDORA_BASE$PANDORA_HOME/collections chmod -R 700 $PANDORA_BASE$PANDORA_HOME/collections ln -s $PANDORA_BASE_REAL$PANDORA_HOME/collections $PANDORA_BASE$PANDORA_CFG + + echo "Creating the commands directory in $PANDORA_BASE$PANDORA_HOME/commands..." + mkdir -p $PANDORA_BASE$PANDORA_HOME/commands + chmod -R 700 $PANDORA_BASE$PANDORA_HOME/commands + ln -s $PANDORA_BASE_REAL$PANDORA_HOME/commands $PANDORA_BASE$PANDORA_CFG if [ $WITHOUT_TENTACLE_SERVER -eq 0 ] then diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index 97657f5189..f492f5e437 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -13,7 +13,264 @@ * GNU General Public License for more details. */ +// Begin. + +/** + * Extra JS. + * + * @return void + */ +function agents_modules_load_js() +{ + $ignored_params['refresh'] = ''; + + ?> + + + + - - - diff --git a/pandora_console/extensions/plugin_registration.php b/pandora_console/extensions/plugin_registration.php index ef08e34bae..6cf20858ab 100644 --- a/pandora_console/extensions/plugin_registration.php +++ b/pandora_console/extensions/plugin_registration.php @@ -23,12 +23,12 @@ function pluginreg_extension_main() return; } - ui_require_css_file('firts_task'); + ui_require_css_file('first_task'); ui_print_page_header(__('Plugin registration'), 'images/extensions.png', false, '', true, ''); echo '
    '; - echo html_print_image('images/firts_task/icono_grande_import.png', true, ['title' => __('Plugin Registration') ]); + echo html_print_image('images/first_task/icono_grande_import.png', true, ['title' => __('Plugin Registration') ]); echo '
    '; echo '
    '; echo '

    '.__('Plugin registration').'

    '; diff --git a/pandora_console/extensions/quick_shell.php b/pandora_console/extensions/quick_shell.php index 13924f56e2..a8cce0b8de 100644 --- a/pandora_console/extensions/quick_shell.php +++ b/pandora_console/extensions/quick_shell.php @@ -218,7 +218,8 @@ function quickShell() if (empty($config['gotty_user']) === false && empty($config['gotty_pass']) === false ) { - $auth_str = $config['gotty_user'].':'.$config['gotty_pass']; + $auth_str = io_safe_output($config['gotty_user']); + $auth_str .= ':'.io_output_password($config['gotty_pass']); $gotty_url = $auth_str.'@'.$host.':'.$port; } @@ -381,7 +382,12 @@ function quickShellSettings() } // Interface. - ui_print_page_header(__('QuickShell settings')); + ui_print_page_header( + __('QuickShell settings'), + '', + false, + 'quickshell_settings' + ); if ($changes > 0) { $msg = __('%d Updated', $changes); @@ -442,25 +448,31 @@ function quickShellSettings() ], ], [ - 'label' => __('Gotty user').ui_print_help_tip( - __('Optional, set a user to access gotty service'), - true - ), - 'arguments' => [ - 'type' => 'text', - 'name' => 'gotty_user', - 'value' => $config['gotty_user'], - ], - ], - [ - 'label' => __('Gotty password').ui_print_help_tip( - __('Optional, set a password to access gotty service'), - true - ), - 'arguments' => [ - 'type' => 'password', - 'name' => 'gotty_pass', - 'value' => io_output_password($config['gotty_pass']), + 'toggle' => true, + 'toggle_name' => 'Advanced', + 'block_content' => [ + [ + 'label' => __('Gotty user').ui_print_help_tip( + __('Optional, set a user to access gotty service'), + true + ), + 'arguments' => [ + 'type' => 'text', + 'name' => 'gotty_user', + 'value' => $config['gotty_user'], + ], + ], + [ + 'label' => __('Gotty password').ui_print_help_tip( + __('Optional, set a password to access gotty service'), + true + ), + 'arguments' => [ + 'type' => 'password', + 'name' => 'gotty_pass', + 'value' => io_output_password($config['gotty_pass']), + ], + ], ], ], [ diff --git a/pandora_console/extras/mr/33.sql b/pandora_console/extras/mr/33.sql index 755ec5f9c4..bfe1777e63 100644 --- a/pandora_console/extras/mr/33.sql +++ b/pandora_console/extras/mr/33.sql @@ -16,6 +16,38 @@ INSERT INTO `tnetwork_component` (`name`, `description`, `id_group`, `type`, `ma INSERT INTO `tnetwork_component` (`name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES ('Linux available memory percent','Available memory %',43,34,0,0,300,0,'free | grep Mem | awk '{print $NF/$2 * 100}'','','','',4,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'%','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0); INSERT INTO `tnetwork_component` (`name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES ('Linux available disk /','Available free space in mountpoint /',43,34,0,0,300,0,'df / | tail -n +2 | awk '{print $(NF-1)}' | tr -d '%'','','','',4,2,0,'','','',0,0,1,0.00,0.00,'0.00',0.00,0.00,'',0,'','inherited','',0,0,0.000000000000000,'','nowizard','','nowizard','0','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,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; + +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` ( + `id` SERIAL, + `rcmd_id` bigint unsigned NOT NULL, + `id_agent` int(10) unsigned NOT NULL, + `utimestamp` int(20) unsigned NOT NULL default 0, + `stdout` MEDIUMTEXT, + `stderr` MEDIUMTEXT, + `errorlevel` int(10) unsigned NOT NULL default 0, + PRIMARY KEY (`id`), + FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`) + ON UPDATE CASCADE ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + INSERT INTO `tconfig`(`token`, `value`) VALUES ('welcome_state', -1); +ALTER TABLE `tcredential_store` MODIFY COLUMN `product` enum('CUSTOM', 'AWS', 'AZURE', 'GOOGLE', 'SAP') default 'CUSTOM'; + COMMIT; 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 44e73b2efa..9d182b0a54 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 @@ -1291,13 +1291,13 @@ ALTER TABLE `tmap` MODIFY COLUMN `id_user` varchar(250) NOT NULL DEFAULT ''; INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30'); -INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 32); +INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 33); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png'); UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager'; DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise'; -INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '739'); +INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '741'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp'); UPDATE `tconfig` SET `value` = 'mini_severity,evento,id_agente,estado,timestamp' WHERE `token` LIKE 'event_fields'; DELETE FROM `tconfig` WHERE `token` LIKE 'integria_api_password'; @@ -2411,6 +2411,38 @@ CREATE TABLE `tdeployment_hosts` ( ON UPDATE CASCADE ON DELETE SET NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- ---------------------------------------------------------------------- +-- Table `tremote_command` +-- ---------------------------------------------------------------------- +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; + +-- ---------------------------------------------------------------------- +-- Table `tremote_command_target` +-- ---------------------------------------------------------------------- +CREATE TABLE `tremote_command_target` ( + `id` SERIAL, + `rcmd_id` bigint unsigned NOT NULL, + `id_agent` int(10) unsigned NOT NULL, + `utimestamp` int(20) unsigned NOT NULL default 0, + `stdout` MEDIUMTEXT, + `stderr` MEDIUMTEXT, + `errorlevel` int(10) unsigned NOT NULL default 0, + PRIMARY KEY (`id`), + FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`) + ON UPDATE CASCADE ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +========= -- --------------------------------------------------------------------- -- Table `trecon_script` -- --------------------------------------------------------------------- diff --git a/pandora_console/general/firts_task/HA_cluster_builder.php b/pandora_console/general/first_task/HA_cluster_builder.php similarity index 95% rename from pandora_console/general/firts_task/HA_cluster_builder.php rename to pandora_console/general/first_task/HA_cluster_builder.php index 6d82d94ad0..7ae56a4287 100644 --- a/pandora_console/general/firts_task/HA_cluster_builder.php +++ b/pandora_console/general/first_task/HA_cluster_builder.php @@ -33,13 +33,13 @@ if (! check_acl($config['id_user'], 0, 'PM')) { exit; } -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ui_print_info_message(['no_close' => true, 'message' => __('There are no HA clusters defined yet.') ]); ?>
    - __('Clusters')]); ?> + __('Clusters')]); ?>

    diff --git a/pandora_console/general/firts_task/cluster_builder.php b/pandora_console/general/first_task/cluster_builder.php similarity index 96% rename from pandora_console/general/firts_task/cluster_builder.php rename to pandora_console/general/first_task/cluster_builder.php index ba9d8c311a..e80d4e4b15 100644 --- a/pandora_console/general/firts_task/cluster_builder.php +++ b/pandora_console/general/first_task/cluster_builder.php @@ -24,7 +24,7 @@ if (! check_acl($config['id_user'], 0, 'AR') && ! check_acl($config['id_user'], return; } -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no clusters defined yet.') ]); @@ -32,7 +32,7 @@ ui_print_info_message(['no_close' => true, 'message' => __('There are no cluster
    - __('Clusters')]); ?> + __('Clusters')]); ?>

    diff --git a/pandora_console/general/firts_task/collections.php b/pandora_console/general/first_task/collections.php similarity index 98% rename from pandora_console/general/firts_task/collections.php rename to pandora_console/general/first_task/collections.php index 8e27ce6ee3..2ca4583bb9 100755 --- a/pandora_console/general/firts_task/collections.php +++ b/pandora_console/general/first_task/collections.php @@ -13,7 +13,7 @@ // GNU General Public License for more details. global $config; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no collections defined yet.') ]); ?> diff --git a/pandora_console/general/firts_task/custom_fields.php b/pandora_console/general/first_task/custom_fields.php similarity index 94% rename from pandora_console/general/firts_task/custom_fields.php rename to pandora_console/general/first_task/custom_fields.php index 7d07ff9495..30f5b839c6 100644 --- a/pandora_console/general/firts_task/custom_fields.php +++ b/pandora_console/general/first_task/custom_fields.php @@ -13,7 +13,7 @@ // GNU General Public License for more details. global $config; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no custom fields defined yet.') ]); @@ -21,7 +21,7 @@ ui_print_info_message(['no_close' => true, 'message' => __('There are no custom
    - __('Custom Fields')]); ?> + __('Custom Fields')]); ?>

    diff --git a/pandora_console/general/firts_task/custom_graphs.php b/pandora_console/general/first_task/custom_graphs.php similarity index 94% rename from pandora_console/general/firts_task/custom_graphs.php rename to pandora_console/general/first_task/custom_graphs.php index e22187c6f5..d49001449a 100644 --- a/pandora_console/general/firts_task/custom_graphs.php +++ b/pandora_console/general/first_task/custom_graphs.php @@ -13,7 +13,7 @@ // GNU General Public License for more details. global $config; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no custom graphs defined yet.') ]); @@ -21,7 +21,7 @@ ui_print_info_message(['no_close' => true, 'message' => __('There are no custom

    - __('Custom Graphs')]); ?> + __('Custom Graphs')]); ?>

    diff --git a/pandora_console/general/firts_task/fields_manager.php b/pandora_console/general/first_task/fields_manager.php similarity index 94% rename from pandora_console/general/firts_task/fields_manager.php rename to pandora_console/general/first_task/fields_manager.php index f81de216db..2ef6e70f55 100755 --- a/pandora_console/general/firts_task/fields_manager.php +++ b/pandora_console/general/first_task/fields_manager.php @@ -13,13 +13,13 @@ // GNU General Public License for more details. global $config; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no custom fields defined yet.') ]); ?>

    - __('Fields Manager')]); ?> + __('Fields Manager')]); ?>

    diff --git a/pandora_console/general/firts_task/incidents.php b/pandora_console/general/first_task/incidents.php similarity index 95% rename from pandora_console/general/firts_task/incidents.php rename to pandora_console/general/first_task/incidents.php index daa83588e3..20630ff5e3 100644 --- a/pandora_console/general/firts_task/incidents.php +++ b/pandora_console/general/first_task/incidents.php @@ -15,7 +15,7 @@ global $config; global $incident_w; global $incident_m; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no incidents defined yet.') ]); @@ -25,7 +25,7 @@ if ($incident_w || $incident_m) {

    - __('Incidents')]); ?> + __('Incidents')]); ?>

    diff --git a/pandora_console/general/firts_task/map_builder.php b/pandora_console/general/first_task/map_builder.php similarity index 95% rename from pandora_console/general/firts_task/map_builder.php rename to pandora_console/general/first_task/map_builder.php index 352f7374e5..509f967195 100755 --- a/pandora_console/general/firts_task/map_builder.php +++ b/pandora_console/general/first_task/map_builder.php @@ -15,7 +15,7 @@ global $config; global $vconsoles_write; global $vconsoles_manage; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ui_print_info_message( [ @@ -28,7 +28,7 @@ if ($vconsoles_write || $vconsoles_manage) {

    - __('Visual Console')]); ?> + __('Visual Console')]); ?>

    diff --git a/pandora_console/general/firts_task/network_map.php b/pandora_console/general/first_task/network_map.php similarity index 95% rename from pandora_console/general/firts_task/network_map.php rename to pandora_console/general/first_task/network_map.php index 0526f936aa..f1de76c08b 100755 --- a/pandora_console/general/firts_task/network_map.php +++ b/pandora_console/general/first_task/network_map.php @@ -13,7 +13,7 @@ // GNU General Public License for more details. global $config; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no network map defined yet.') ]); @@ -23,7 +23,7 @@ $networkmap_types = networkmap_get_types($strict_user);

    - __('Network Map')]); ?> + __('Network Map')]); ?>

    diff --git a/pandora_console/general/first_task/omnishell.php b/pandora_console/general/first_task/omnishell.php new file mode 100644 index 0000000000..948204917c --- /dev/null +++ b/pandora_console/general/first_task/omnishell.php @@ -0,0 +1,56 @@ + + true, 'message' => __('There is no command defined yet.') ]); ?> + +

    +
    + __('Omnishell')]); ?> +
    +
    +

    + '.__( + 'Omnishell is an enterprise feature which allows you to execute a structured command along any agent in your %s. The only requirement is to have remote configuration enabled in your agent.', + io_safe_output(get_product_name()) + ).'

    '; + + echo '

    '.__( + 'You can execute any command on as many agents you need, and check the execution on all of them using the Omnishell Command View' + ).'

    '; + ?> +

    + +
    + +
    + +
    +
    diff --git a/pandora_console/general/firts_task/planned_downtime.php b/pandora_console/general/first_task/planned_downtime.php similarity index 94% rename from pandora_console/general/firts_task/planned_downtime.php rename to pandora_console/general/first_task/planned_downtime.php index 21bfb4b083..83c6cd9384 100644 --- a/pandora_console/general/firts_task/planned_downtime.php +++ b/pandora_console/general/first_task/planned_downtime.php @@ -13,13 +13,13 @@ // GNU General Public License for more details. global $config; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no planned downtime defined yet.') ]); ?>
    - __('Planned Downtime')]); ?> + __('Planned Downtime')]); ?>

    diff --git a/pandora_console/general/firts_task/recon_view.php b/pandora_console/general/first_task/recon_view.php similarity index 95% rename from pandora_console/general/firts_task/recon_view.php rename to pandora_console/general/first_task/recon_view.php index 8c59b23f64..9eee373dec 100755 --- a/pandora_console/general/firts_task/recon_view.php +++ b/pandora_console/general/first_task/recon_view.php @@ -13,13 +13,13 @@ // GNU General Public License for more details. global $config; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no discovery tasks defined yet.') ]); ?>

    - __('Discovery server')]); ?> + __('Discovery server')]); ?>

    diff --git a/pandora_console/general/firts_task/service_list.php b/pandora_console/general/first_task/service_list.php similarity index 95% rename from pandora_console/general/firts_task/service_list.php rename to pandora_console/general/first_task/service_list.php index 424bc60400..f4a56a826b 100755 --- a/pandora_console/general/firts_task/service_list.php +++ b/pandora_console/general/first_task/service_list.php @@ -15,14 +15,14 @@ global $config; global $agent_w; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no services defined yet.') ]); ?>

    - __('Services')]); ?> + __('Services')]); ?>

    diff --git a/pandora_console/general/firts_task/snmp_filters.php b/pandora_console/general/first_task/snmp_filters.php similarity index 95% rename from pandora_console/general/firts_task/snmp_filters.php rename to pandora_console/general/first_task/snmp_filters.php index 602702da69..724c9da31f 100755 --- a/pandora_console/general/firts_task/snmp_filters.php +++ b/pandora_console/general/first_task/snmp_filters.php @@ -13,13 +13,13 @@ // GNU General Public License for more details. global $config; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no SNMP filter defined yet.') ]); ?>

    - __('SNMP Filter')]); ?> + __('SNMP Filter')]); ?>

    diff --git a/pandora_console/general/firts_task/tags.php b/pandora_console/general/first_task/tags.php similarity index 94% rename from pandora_console/general/firts_task/tags.php rename to pandora_console/general/first_task/tags.php index 38c006d3b2..ea8086357c 100755 --- a/pandora_console/general/firts_task/tags.php +++ b/pandora_console/general/first_task/tags.php @@ -13,13 +13,13 @@ // GNU General Public License for more details. global $config; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no tags defined yet.') ]); ?>

    - __('Tags')]); ?> + __('Tags')]); ?>

    diff --git a/pandora_console/general/firts_task/transactional_list.php b/pandora_console/general/first_task/transactional_list.php similarity index 95% rename from pandora_console/general/firts_task/transactional_list.php rename to pandora_console/general/first_task/transactional_list.php index 6edc964ad7..40381f2da8 100644 --- a/pandora_console/general/firts_task/transactional_list.php +++ b/pandora_console/general/first_task/transactional_list.php @@ -15,7 +15,7 @@ global $config; global $networkmaps_write; global $networkmaps_manage; check_login(); -ui_require_css_file('firts_task'); +ui_require_css_file('first_task'); ?> true, 'message' => __('There are no transactions defined yet.') ]); @@ -25,7 +25,7 @@ if ($networkmaps_write || $networkmaps_manage) {

    - __('Transactions')]); ?> + __('Transactions')]); ?>

    diff --git a/pandora_console/general/sap_view.php b/pandora_console/general/sap_view.php new file mode 100644 index 0000000000..58ee50e563 --- /dev/null +++ b/pandora_console/general/sap_view.php @@ -0,0 +1,77 @@ + '[sap_views]'.$e->getMessage() ]); + exit; + } else { + echo '[sap_views]'.$e->getMessage(); + } + + // Stop this execution, but continue 'globally'. + return; +} + +// Ajax controller. +if (is_ajax()) { + $method = get_parameter('method', ''); + + if (method_exists($sap_views, $method) === true) { + if ($sap_views->ajaxMethod($method) === true) { + $sap_views->{$method}(); + } else { + $sap_views->error('Unavailable method.'); + } + } else { + $sap_views->error('Method not found. ['.$method.']'); + } + + + // Stop any execution. + exit; +} else { + // Run. + $sap_views->run(); +} diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 61d33193d3..b48590074c 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -486,6 +486,7 @@ if ($id_agente) { $agent_wizard['active'] = false; } + $total_incidents = agents_get_count_incidents($id_agente); // Incident tab. @@ -546,6 +547,7 @@ if ($id_agente) { 'group' => $grouptab, 'gis' => $gistab, 'agent_wizard' => $agent_wizard, + ]; } @@ -696,25 +698,28 @@ if ($id_agente) { break; } - ui_print_page_header( - agents_get_alias($id_agente), - 'images/setup.png', - false, - $help_header, - true, - $onheader, - false, - '', - $config['item_title_size_text'], - '', - ui_print_breadcrums( - [ - __('Resources'), - __('Manage agents'), - ''.$tab_name.'', - ] - ) - ); + $pure = get_parameter('pure', 0); + if (!$pure) { + ui_print_page_header( + agents_get_alias($id_agente), + 'images/setup.png', + false, + $help_header, + true, + $onheader, + false, + '', + $config['item_title_size_text'], + '', + ui_print_breadcrums( + [ + __('Resources'), + __('Manage agents'), + ''.$tab_name.'', + ] + ) + ); + } } else { // Create agent. ui_print_page_header( diff --git a/pandora_console/godmode/agentes/fields_manager.php b/pandora_console/godmode/agentes/fields_manager.php index 20a9db547a..1536e5c278 100644 --- a/pandora_console/godmode/agentes/fields_manager.php +++ b/pandora_console/godmode/agentes/fields_manager.php @@ -126,7 +126,7 @@ if ($fields) { $table->size[3] = '8%'; $table->data = []; } else { - include_once $config['homedir'].'/general/firts_task/fields_manager.php'; + include_once $config['homedir'].'/general/first_task/fields_manager.php'; return; } diff --git a/pandora_console/godmode/agentes/planned_downtime.list.php b/pandora_console/godmode/agentes/planned_downtime.list.php index 01f30afba6..f116b2dcd8 100755 --- a/pandora_console/godmode/agentes/planned_downtime.list.php +++ b/pandora_console/godmode/agentes/planned_downtime.list.php @@ -352,7 +352,7 @@ if (!empty($groups)) { // No downtimes cause the user has not anyone. if (!$downtimes && !$filter_performed) { - include_once $config['homedir'].'/general/firts_task/planned_downtime.php'; + include_once $config['homedir'].'/general/first_task/planned_downtime.php'; } // No downtimes cause the user performed a search. else if (!$downtimes) { diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index edf7be1873..af09d9ff0d 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -28,7 +28,7 @@ if (check_acl($config['id_user'], 0, 'AR') || check_acl($config['id_user'], 0, 'PM') ) { $sub = []; - $sub['godmode/servers/discovery&wiz=main']['text'] = __('Main'); + $sub['godmode/servers/discovery&wiz=main']['text'] = __('Start'); $sub['godmode/servers/discovery&wiz=main']['id'] = 'Discovery'; $sub['godmode/servers/discovery&wiz=tasklist']['text'] = __('Task list'); $sub['godmode/servers/discovery&wiz=tasklist']['id'] = 'tasklist'; @@ -346,6 +346,8 @@ if (check_acl($config['id_user'], 0, 'PM') || check_acl($config['id_user'], 0, ' $sub['godmode/setup/links']['id'] = 'Links'; $sub['tools/diagnostics']['text'] = __('Diagnostic info'); $sub['tools/diagnostics']['id'] = 'Diagnostic info'; + enterprise_hook('omnishell'); + $sub['godmode/setup/news']['text'] = __('Site news'); $sub['godmode/setup/news']['id'] = 'Site news'; $sub['godmode/setup/file_manager']['text'] = __('File manager'); diff --git a/pandora_console/godmode/reporting/graphs.php b/pandora_console/godmode/reporting/graphs.php index e9f1aef011..155eb560db 100644 --- a/pandora_console/godmode/reporting/graphs.php +++ b/pandora_console/godmode/reporting/graphs.php @@ -337,7 +337,7 @@ $table_aux = new stdClass(); echo '

    '; } else { - include_once $config['homedir'].'/general/firts_task/custom_graphs.php'; + include_once $config['homedir'].'/general/first_task/custom_graphs.php'; } ?> diff --git a/pandora_console/godmode/reporting/map_builder.php b/pandora_console/godmode/reporting/map_builder.php index 8f5774b3a9..96f86191d7 100644 --- a/pandora_console/godmode/reporting/map_builder.php +++ b/pandora_console/godmode/reporting/map_builder.php @@ -395,7 +395,7 @@ if ($own_info['is_admin'] || $vconsoles_read) { if (!$maps && !is_metaconsole()) { $total = count(visual_map_get_user_layouts($config['id_user'], false, false, false)); if (!$total) { - include_once $config['homedir'].'/general/firts_task/map_builder.php'; + include_once $config['homedir'].'/general/first_task/map_builder.php'; } else { ui_print_info_message( [ diff --git a/pandora_console/godmode/servers/discovery.php b/pandora_console/godmode/servers/discovery.php index 2d0fcec8a1..7215ee7dfb 100755 --- a/pandora_console/godmode/servers/discovery.php +++ b/pandora_console/godmode/servers/discovery.php @@ -54,7 +54,7 @@ function get_wiz_class($str) __('Discovery'), '', false, - '', + 'discovery', true, '', false, diff --git a/pandora_console/godmode/servers/servers.build_table.php b/pandora_console/godmode/servers/servers.build_table.php index f0e2a4ad08..0006fc3e9b 100644 --- a/pandora_console/godmode/servers/servers.build_table.php +++ b/pandora_console/godmode/servers/servers.build_table.php @@ -154,7 +154,7 @@ foreach ($servers as $server) { if ($server['type'] == 'recon') { $data[8] .= ''; $data[8] .= html_print_image( - 'images/firts_task/icono_grande_reconserver.png', + 'images/first_task/icono_grande_reconserver.png', true, [ 'title' => __('Manage Discovery tasks'), diff --git a/pandora_console/godmode/tag/tag.php b/pandora_console/godmode/tag/tag.php index 680d0b7a45..cb5fb27ab1 100644 --- a/pandora_console/godmode/tag/tag.php +++ b/pandora_console/godmode/tag/tag.php @@ -304,7 +304,7 @@ if (!empty($result)) { } else if ($filter_performed) { echo $filter_form; } else { - include $config['homedir'].'/general/firts_task/tags.php'; + include $config['homedir'].'/general/first_task/tags.php'; return; } } diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php index ed523d0b82..da6f4e572e 100644 --- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php +++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php @@ -145,7 +145,7 @@ class DiscoveryTaskList extends Wizard $ret2 = $this->showList(); if ($ret === false && $ret2 === false) { - include_once $config['homedir'].'/general/firts_task/recon_view.php'; + include_once $config['homedir'].'/general/first_task/recon_view.php'; } else { $form = [ 'form' => [ @@ -773,6 +773,9 @@ class DiscoveryTaskList extends Wizard case DISCOVERY_CLOUD_AWS_RDS: return 'wiz=cloud&mode=amazonws&ki='.$task['auth_strings'].'&sub=rds&page=0'; + case DISCOVERY_APP_SAP: + return 'wiz=app&mode=SAP&page=0'; + default: if ($task['description'] == 'console_task') { return 'wiz=ctask'; diff --git a/pandora_console/godmode/wizards/Wizard.main.php b/pandora_console/godmode/wizards/Wizard.main.php index 5ffeb716d9..3e43f0bf69 100644 --- a/pandora_console/godmode/wizards/Wizard.main.php +++ b/pandora_console/godmode/wizards/Wizard.main.php @@ -436,11 +436,15 @@ class Wizard * * @param array $input Definition of target block to be printed. * @param boolean $return Return as string or direct output. + * @param boolean $direct Avoid encapsulation if input print is direct. * * @return string HTML content. */ - public function printBlock(array $input, bool $return=false, bool $not_direct=false) - { + public function printBlock( + array $input, + bool $return=false, + bool $direct=false + ) { $output = ''; if ($input['hidden'] == 1) { $class = ' hidden'; @@ -453,7 +457,8 @@ class Wizard } if (is_array($input['block_content']) === true) { - $not_direct = (bool) $input['direct']; + $direct = (bool) $input['direct']; + $toggle = (bool) $input['toggle']; // Print independent block of inputs. $output .= '
  • '; @@ -462,17 +467,44 @@ class Wizard $output .= '<'.$input['wrapper'].' id="'.$input['block_id'].'" class="'.$class.'">'; } - if (!$not_direct) { + if (!$direct) { // Avoid encapsulation if input is direct => 1. $output .= '
      '; } - foreach ($input['block_content'] as $input) { - $output .= $this->printBlock($input, $return, (bool) $not_direct); + $html = ''; + + foreach ($input['block_content'] as $in) { + $html .= $this->printBlock( + $in, + $return, + (bool) $direct + ); + } + + if ($toggle === true) { + $output .= ui_print_toggle( + [ + 'name' => (isset($input['toggle_name']) ? $input['toggle_name'] : 'toggle_'.uniqid()), + 'content' => $html, + 'title' => $input['toggle_title'], + 'id' => $input['toggle_id'], + 'hidden_default' => $input['toggle_hidden_default'], + 'return' => (isset($input['toggle_return']) ? $input['toggle_return'] : true), + 'toggle_class' => $input['toggle_toggle_class'], + 'main_class' => $input['toggle_main_class'], + 'container_class' => $input['toggle_container_class'], + 'img_a' => $input['toggle_img_a'], + 'img_b' => $input['toggle_img_b'], + 'clean' => (isset($input['toggle_clean']) ? $input['toggle_clean'] : true), + ] + ); + } else { + $output .= $html; } // Close block. - if (!$not_direct) { + if (!$direct) { $output .= '
    '; } @@ -483,7 +515,7 @@ class Wizard $output .= '
  • '; } else { if ($input['arguments']['type'] != 'hidden') { - if (!$not_direct) { + if (!$direct) { $output .= '
  • '; } @@ -491,7 +523,7 @@ class Wizard $output .= $this->printInput($input['arguments']); // Allow dynamic content. $output .= $input['extra']; - if (!$not_direct) { + if (!$direct) { $output .= '
  • '; } } else { @@ -799,15 +831,18 @@ class Wizard $first_block_printed = true; } - $output .= '
    '; + $output .= '
    '; foreach ($row['columns'] as $column) { $width = isset($column['width']) ? 'width: '.$column['width'].';' : 'width: 100%;'; $padding_left = isset($column['padding-left']) ? 'padding-left: '.$column['padding-left'].';' : 'padding-left: 0;'; $padding_right = isset($column['padding-right']) ? 'padding-right: '.$column['padding-right'].';' : 'padding-right: 0;'; $extra_styles = isset($column['style']) ? $column['style'] : ''; + $class = isset($column['class']) ? $column['class'] : ''; - $output .= '
    '; + $output .= '
    '; foreach ($column['inputs'] as $input) { if (is_array($input)) { diff --git a/pandora_console/images/firts_task/icono-cluster-activo.png b/pandora_console/images/first_task/icono-cluster-activo.png similarity index 100% rename from pandora_console/images/firts_task/icono-cluster-activo.png rename to pandora_console/images/first_task/icono-cluster-activo.png diff --git a/pandora_console/images/firts_task/icono_aws.png b/pandora_console/images/first_task/icono_aws.png similarity index 100% rename from pandora_console/images/firts_task/icono_aws.png rename to pandora_console/images/first_task/icono_aws.png diff --git a/pandora_console/images/firts_task/icono_grande_custom_reporting.png b/pandora_console/images/first_task/icono_grande_custom_reporting.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_custom_reporting.png rename to pandora_console/images/first_task/icono_grande_custom_reporting.png diff --git a/pandora_console/images/firts_task/icono_grande_event_alerts.png b/pandora_console/images/first_task/icono_grande_event_alerts.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_event_alerts.png rename to pandora_console/images/first_task/icono_grande_event_alerts.png diff --git a/pandora_console/images/firts_task/icono_grande_export.png b/pandora_console/images/first_task/icono_grande_export.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_export.png rename to pandora_console/images/first_task/icono_grande_export.png diff --git a/pandora_console/images/firts_task/icono_grande_gestiondetags.png b/pandora_console/images/first_task/icono_grande_gestiondetags.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_gestiondetags.png rename to pandora_console/images/first_task/icono_grande_gestiondetags.png diff --git a/pandora_console/images/firts_task/icono_grande_import.png b/pandora_console/images/first_task/icono_grande_import.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_import.png rename to pandora_console/images/first_task/icono_grande_import.png diff --git a/pandora_console/images/firts_task/icono_grande_incidencia.png b/pandora_console/images/first_task/icono_grande_incidencia.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_incidencia.png rename to pandora_console/images/first_task/icono_grande_incidencia.png diff --git a/pandora_console/images/firts_task/icono_grande_inventario.png b/pandora_console/images/first_task/icono_grande_inventario.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_inventario.png rename to pandora_console/images/first_task/icono_grande_inventario.png diff --git a/pandora_console/images/firts_task/icono_grande_licencia.png b/pandora_console/images/first_task/icono_grande_licencia.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_licencia.png rename to pandora_console/images/first_task/icono_grande_licencia.png diff --git a/pandora_console/images/firts_task/icono_grande_reconserver.png b/pandora_console/images/first_task/icono_grande_reconserver.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_reconserver.png rename to pandora_console/images/first_task/icono_grande_reconserver.png diff --git a/pandora_console/images/firts_task/icono_grande_registro_plugin.png b/pandora_console/images/first_task/icono_grande_registro_plugin.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_registro_plugin.png rename to pandora_console/images/first_task/icono_grande_registro_plugin.png diff --git a/pandora_console/images/firts_task/icono_grande_servicios.png b/pandora_console/images/first_task/icono_grande_servicios.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_servicios.png rename to pandora_console/images/first_task/icono_grande_servicios.png diff --git a/pandora_console/images/firts_task/icono_grande_topology.png b/pandora_console/images/first_task/icono_grande_topology.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_topology.png rename to pandora_console/images/first_task/icono_grande_topology.png diff --git a/pandora_console/images/firts_task/icono_grande_visualconsole.png b/pandora_console/images/first_task/icono_grande_visualconsole.png similarity index 100% rename from pandora_console/images/firts_task/icono_grande_visualconsole.png rename to pandora_console/images/first_task/icono_grande_visualconsole.png diff --git a/pandora_console/images/firts_task/icono_manage_agents.png b/pandora_console/images/first_task/icono_manage_agents.png similarity index 100% rename from pandora_console/images/firts_task/icono_manage_agents.png rename to pandora_console/images/first_task/icono_manage_agents.png diff --git a/pandora_console/images/first_task/omnishell.png b/pandora_console/images/first_task/omnishell.png new file mode 100644 index 0000000000000000000000000000000000000000..8724d322fb21ecbccfb69ac82b9e07ceb73725ba GIT binary patch literal 3129 zcmV-9494?`P)e92`3<&060O&2||{$g6#jPFf|8={}VjF6TDx|v=T+MEE(HahVCkg z1S~Mpr|wp(-4=p{g@uKMg@uKMg@xr1X*K-^{Px@Lv3$Cbj|g8%<>UFUzy7;Cusz7L zd@SW>q#o_N*uHy6dxoJL2s-lVK|cDHL$>lUk^{2M_zY-2w7i|j$H38kCZFysZ>RYE zD~6$Z7}oMBb{qx+a!Jil2MBum9tDI01YNGOfC@?44FzH70RjkUkD0|Z3=6dHdV&D* z)Rca0H&ij)60d=eFvr=f%MeY9Px~p+K9=nx4-fSeXPb7Y&7BWjKJK_TS_{q(;182M(bv zHpYN;v3+9E0wz4qhN+1h?Ki9$s*{C9^+%q^E(qNHP=v2Rmj693B&xfLe1dls(lw$n*6}NKh z7RuRsutXEf27%H-tC~T8@p%&;`5rMo!&tr9`lappgX4_D?l3o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Gz^J$ce)Kx9sk-F2HVZPrU->;a}pkl;3Ua2Mp>8Sr`o05y6Ld(`>)QS zcd-tXZbG4S(Gqt#Ri@N8V^Tro*~ImJ1*Z$~p&>Z-xH9Z#O?cO8!uMj6l<*-=RrH&~ z$EYFSu%z%C{;$8kyMa7bi+Q!Y|EATAC?YG1HvcK;E$|m_7|=s?-2h8v0;l49MVZa4 zn~_gM_7?a9=2jG4QTS@;jhR8-_V@y50GFgK4JbgZLHgR|sa$xP(-vSkJu;MU2-=-|AD%Q=RH@_@;>zCl~$ov-{^zdQ~e^fAB-}} zLqc1@q#je6yv<{q--lFx;DDOfMohI#sa;_V;7!dL2!00ejZnMKz}eA%{IkTOoKelE!leONSXcs-{|hhx%Xv^( Tj(pQf00000NkvXXu0mjfv>2@* literal 0 HcmV?d00001 diff --git a/pandora_console/images/firts_task/op_workspace.menu.png b/pandora_console/images/first_task/op_workspace.menu.png similarity index 100% rename from pandora_console/images/firts_task/op_workspace.menu.png rename to pandora_console/images/first_task/op_workspace.menu.png diff --git a/pandora_console/images/firts_task/slave-mode.png b/pandora_console/images/first_task/slave-mode.png similarity index 100% rename from pandora_console/images/firts_task/slave-mode.png rename to pandora_console/images/first_task/slave-mode.png diff --git a/pandora_console/images/sap_icon.png b/pandora_console/images/sap_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..536c43b28b8bc6407d4197fc7db3abab6b170229 GIT binary patch literal 324 zcmV-K0lWT*P) __('Custom'), 'AWS' => __('Aws'), 'AZURE' => __('Azure'), + 'SAP' => __('SAP'), // 'GOOGLE' => __('Google'), ], 'selected' => (isset($values['product']) ? $values['product'] : 'CUSTOM'), @@ -900,6 +901,7 @@ class CredentialStore extends Wizard case 'GOOGLE': // Need further investigation. case 'CUSTOM': + case 'SAP': $user_label = __('Account ID'); $pass_label = __('Password'); $extra1 = false; @@ -1038,7 +1040,12 @@ class CredentialStore extends Wizard $('#div-extra_2 label').text(''); $('#div-extra_1').show(); $('#div-extra_2').show(); - } + } else if ($('#product :selected').val() == "SAP") { + $('#div-username label').text(''); + $('#div-password label').text(''); + $('#div-extra_1').hide(); + $('#div-extra_2').hide(); + } } /** diff --git a/pandora_console/include/class/Diagnostics.class.php b/pandora_console/include/class/Diagnostics.class.php index 94acbc4ba2..ee61ec743d 100644 --- a/pandora_console/include/class/Diagnostics.class.php +++ b/pandora_console/include/class/Diagnostics.class.php @@ -68,6 +68,10 @@ class Diagnostics extends Wizard // Check access. check_login(); + $this->url = ui_get_full_url( + 'index.php?sec=gextensions&sec2=tools/diagnostics' + ); + $this->ajaxController = $page; $this->pdf = $pdf; $this->product_name = io_safe_output(get_product_name()); @@ -123,15 +127,34 @@ class Diagnostics extends Wizard { global $config; + if ($this->pdf === true) { + $this->exportPDF(); + exit; + } + ui_require_css_file('diagnostics'); + $pdf_url = $this->url.'&pdf=true'; + $pdf_img = html_print_image( + 'images/pdf.png', + true, + ['title' => __('Export to PDF')] + ); + $header_buttons = [ + 'csv' => [ + 'active' => false, + 'text' => ''.$pdf_img.'', + ], + ]; + // Header. ui_print_page_header( __('%s Diagnostic tool', $this->product_name), 'images/gm_massive_operations.png', false, 'diagnostic_tool_tab', - true + true, + $header_buttons ); // Print all Methods Diagnostic Info. @@ -2080,6 +2103,11 @@ class Diagnostics extends Wizard enterprise_include_once('/include/class/Pdf.class.php'); $mpdf = new Pdf([]); + // Ignore pending HTML outputs. + while (@ob_end_clean()) { + $ignore_me; + } + // ADD style. $mpdf->addStyle($config['homedir'].'/include/styles/diagnostics.css'); @@ -2112,6 +2140,8 @@ class Diagnostics extends Wizard // Write html filename. $mpdf->writePDFfile($filename); + + exit; } diff --git a/pandora_console/include/class/HelpFeedBack.class.php b/pandora_console/include/class/HelpFeedBack.class.php index 825d3c923f..e97e84ddd9 100644 --- a/pandora_console/include/class/HelpFeedBack.class.php +++ b/pandora_console/include/class/HelpFeedBack.class.php @@ -93,12 +93,13 @@ class HelpFeedBack extends Wizard ui_require_css_File('discovery'); ui_require_css_file('help_feedback'); - $help_url = get_parameter('url', null); + $help_url = get_parameter('b', null); + $help_url = base64_decode($help_url); if ($help_url === null) { echo __('Page not found'); } else { ?> - @@ -143,7 +144,7 @@ class HelpFeedBack extends Wizard 'block_content' => [ [ 'arguments' => [ - 'label' => __('Sugesstion'), + 'label' => __('Suggestion'), 'type' => 'radio_button', 'attributes' => 'class="btn"', 'name' => 'suggestion', @@ -154,7 +155,7 @@ class HelpFeedBack extends Wizard ], [ 'arguments' => [ - 'label' => __('Something is not quite right'), + 'label' => __('Something is wrong'), 'type' => 'radio_button', 'attributes' => 'class="btn"', 'name' => 'report', diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index df171efbca..318496cfa8 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -537,7 +537,7 @@ define('NODE_GENERIC', 3); define('STATUS_OK', 0); define('STATUS_ERROR', 1); -// Maps (new networkmaps and new visualmaps). +// Maps new networkmaps and new visualmaps. define('MAP_TYPE_NETWORKMAP', 0); define('MAP_TYPE_VISUALMAP', 1); @@ -590,6 +590,7 @@ define('DISCOVERY_CLOUD_AWS_EC2', 6); define('DISCOVERY_CLOUD_AWS_RDS', 7); define('DISCOVERY_CLOUD_AZURE_COMPUTE', 8); define('DISCOVERY_DEPLOY_AGENTS', 9); +define('DISCOVERY_APP_SAP', 10); // Discovery types matching definition. diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index a7d94d43bc..720caefc58 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -5416,6 +5416,14 @@ function get_help_info($section_name) } break; + case 'omnishell': + if ($es) { + $result .= 'Omnishell&printable=yes'; + } else { + $result .= 'Omnishell&printable=yes'; + } + break; + case 'module_type_tab': if ($es) { $result .= 'Operacion&printable=yes#Tipos_de_m.C3.B3dulos'; @@ -5431,6 +5439,22 @@ function get_help_info($section_name) $result .= 'GIS&printable=yes#Operation'; } break; + + case 'quickshell_settings': + if ($es) { + $result .= 'Configuracion_Consola&printable=yes#Websocket_Engine'; + } else { + $result .= 'Console_Setup&printable=yes#Websocket_engine'; + } + break; + + case 'discovery': + if ($es) { + $result .= 'Discovery&printable=yes'; + } else { + $result .= 'Discovery&printable=yes'; + } + break; } return $result; diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 826ca971c5..e85798cfde 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -132,6 +132,32 @@ function agents_get_agent_id_by_alias($alias) } +/** + * Return seconds left to contact again with agent. + * + * @param integer $id_agente Target agent + * + * @return integer|null Seconds left. + */ +function agents_get_next_contact_time_left(int $id_agente) +{ + $last_contact = false; + + if ($id_agente > 0) { + $last_contact = db_get_value_sql( + sprintf( + 'SELECT format(intervalo,2) - (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(IF(ultimo_contacto > ultimo_contacto_remoto, ultimo_contacto, ultimo_contacto_remoto))) as "val" + FROM `tagente` + WHERE id_agente = %d ', + $id_agente + ) + ); + } + + return $last_contact; +} + + /** * Creates an agent. * @@ -3481,3 +3507,66 @@ function agents_get_status_animation($up=true) ); } } + + +/** + * Return if an agent is SAP or or an a agent SAP list. + * If function receive false, you will return all SAP agents, + * but if you receive an id agent, check if it is a sap agent + * and return true or false. + * + * @param integer $id_agent + * @return boolean + */ +function agents_get_sap_agents($id_agent) +{ + // Available modules. + // If you add more modules, please update SAP.pm. + $sap_modules = [ + 160 => __('SAP Login OK'), + 109 => __('SAP Dumps'), + 111 => __('SAP List lock'), + 113 => __('SAP Cancel Jobs'), + 121 => __('SAP Batch input erroneus'), + 104 => __('SAP Idoc erroneus'), + 105 => __('SAP IDOC OK'), + 150 => __('SAP WP without active restart'), + 151 => __('SAP WP stopped'), + 102 => __('Average time of SAPGUI response '), + 180 => __('Dialog response time'), + 103 => __('Dialog Logged users '), + 192 => __('SYSFAIL, delivery attempts tRFC wrong entries number'), + 195 => __('SYSFAIL, queue qRFC INPUT, wrong entries number '), + 116 => __('Number of Update WPs in error'), + ]; + + $array_agents = []; + foreach ($sap_modules as $module => $key) { + $array_agents = array_merge( + $array_agents, + db_get_all_rows_sql( + 'SELECT ta.id_agente,ta.alias + FROM tagente ta + INNER JOIN tagente_modulo tam + ON tam.id_agente = ta.id_agente + WHERE tam.nombre + LIKE "%SAP%" + GROUP BY ta.id_agente' + ) + ); + } + + $indexed_agents = index_array($array_agents, 'id_agente', false); + + if ($id_agent === false) { + return $indexed_agents; + } + + foreach ($indexed_agents as $agent => $key) { + if ($agent === $id_agent) { + return true; + } + } + + return false; +} diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 89b3c03de2..4ee9e682b8 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -455,6 +455,10 @@ function config_update_config() $error_update[] = __('Ipam Ocuppied Manager Warning'); } + if (!config_update_value('sap_license', get_parameter('sap_license'))) { + $error_update[] = __('Deset SAP license'); + } + $inventory_changes_blacklist = get_parameter('inventory_changes_blacklist', []); if (!config_update_value('inventory_changes_blacklist', implode(',', $inventory_changes_blacklist))) { $error_update[] = __('Inventory changes blacklist'); diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 12a8ecfa88..e329af6013 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1618,6 +1618,89 @@ function html_print_input_email(array $settings):string } +/** + * Render an input number element. + * + * @param array $settings Array with attributes input. + * only name is necessary. + * + * @return string + */ +function html_print_input_number(array $settings):string +{ + // TODO: const. + $valid_attrs = [ + 'accept', + 'disabled', + 'maxlength', + 'name', + 'readonly', + 'placeholder', + 'size', + 'value', + 'accesskey', + 'class', + 'dir', + 'id', + 'lang', + 'style', + 'tabindex', + 'title', + 'xml:lang', + 'onfocus', + 'onblur', + 'onselect', + 'onchange', + 'onclick', + 'ondblclick', + 'onmousedown', + 'onmouseup', + 'onmouseover', + 'onmousemove', + 'onmouseout', + 'onkeypress', + 'onkeydown', + 'onkeyup', + 'required', + 'pattern', + 'autocomplete', + ]; + + $output = ''; + if (isset($settings) === true && is_array($settings) === true) { + // Check Name is necessary. + if (isset($settings['name']) === true) { + $output = ' $attr_value) { + // Check valid attribute. + if (in_array($attribute, $valid_attrs) === false) { + continue; + } + + $output .= $attribute.'="'.$attr_value.'" '; + } + + $output .= $function.'/>'; + } + } + + return $output; +} + + /** * Render an input image element. * @@ -3309,6 +3392,10 @@ function html_print_input($data, $wrapper='div', $input_only=false) $output .= html_print_input_email($data); break; + case 'number': + $output .= html_print_input_number($data); + break; + case 'hidden': $output .= html_print_input_hidden( $data['name'], @@ -3413,7 +3500,8 @@ function html_print_input($data, $wrapper='div', $input_only=false) break; case 'submit': - $output .= '<'.$wrapper.' class="action-buttons" style="width: 100%">'.html_print_submit_button( + $width = (isset($data['width']) === true) ? 'width: '.$data['width'] : 'width: 100%'; + $output .= '<'.$wrapper.' class="action-buttons" style="'.$width.'">'.html_print_submit_button( ((isset($data['label']) === true) ? $data['label'] : 'OK'), ((isset($data['name']) === true) ? $data['name'] : ''), ((isset($data['disabled']) === true) ? $data['disabled'] : false), @@ -3498,6 +3586,10 @@ function html_print_input($data, $wrapper='div', $input_only=false) $output .= html_print_input_email($data); break; + case 'multicheck': + $output .= html_print_input_multicheck($data); + break; + default: // Ignore. break; @@ -3514,6 +3606,33 @@ function html_print_input($data, $wrapper='div', $input_only=false) } +/** + * Print all checkbox in the same row. + * + * @param array $data Array with attributes input. + * only name is necessary. + * + * @return string + */ +function html_print_input_multicheck(array $data):string +{ + $html = ''; + if (isset($data['data']) === true && is_array($data['data']) === true) { + foreach ($data['data'] as $key => $value) { + $html .= $value; + $html .= html_print_checkbox( + 'days_week_'.$key, + 1, + $data['checked'][$key], + true + ); + } + } + + return $html; +} + + /** * Print an autocomplete input filled out with Integria IMS users. * diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index 36785064ef..ee242a1624 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -536,7 +536,7 @@ function menu_add_extras(&$menu) $menu_extra['galertas']['sub']['godmode/alerts/configure_alert_action']['text'] = __('Manage alert actions'); $menu_extra['galertas']['sub']['godmode/alerts/configure_alert_command']['text'] = __('Manage commands'); - $menu_extra['galertas']['sub']['enterprise/godmode/alerts/alert_events']['text'] = __('Manage event alerts'); + $menu_extra['galertas']['sub']['enterprise/godmode/alerts/alert_correlation']['text'] = __('Manage event alerts'); $menu_extra['gservers']['sub']['enterprise/godmode/servers/manage_export_form']['text'] = __('Manage export targets'); diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index a430f02fdc..dd1cc5443e 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1404,14 +1404,19 @@ function ui_print_help_icon( } $url = get_help_info($help_id); + $b = base64_encode($url); + $help_handler = 'index.php?sec=view&sec2=general/help_feedback'; + // Needs to use url encoded to avoid anchor lost. + $help_handler .= '&b='.$b; + $help_handler .= '&pure=1&url='.$url; $output = html_print_image( $image, true, [ 'class' => 'img_help', 'title' => __('Help'), - 'onclick' => "open_help ('".ui_get_full_url('index.php?sec=view&sec2=general/help_feedback&pure=1&url='.$url)."')", + 'onclick' => "open_help ('".ui_get_full_url($help_handler)."')", 'id' => $id, ], false, @@ -2911,6 +2916,84 @@ function ui_progress( } +/** + * Generates a progress bar CSS based. + * Requires css progress.css + * + * @param array $data With following content: + * + * 'slices' => [ + * 'label' => [ // Name of the slice + * 'value' => value + * 'color' => color of the slice. + * ] + * ], + * 'width' => Width + * 'height' => Height in 'em' + * 'return' => Boolean, return or paint. + * + * @return string HTML code. + */ +function ui_progress_extend( + array $data +) { + if (is_array($data) === false) { + // Failed. + return false; + } + + if (is_array($data['slices']) === false) { + // Failed. + return false; + } + + if (isset($data['width']) === false) { + $data['width'] = '100'; + } + + if (isset($data['height']) === false) { + $data['height'] = '1.3'; + } + + $total = array_reduce( + $data['slices'], + function ($carry, $item) { + $carry += $item['value']; + return $carry; + } + ); + if ($total == 0) { + return null; + } + + ui_require_css_file('progress'); + + // Main container. + $output .= '
    '; + + foreach ($data['slices'] as $label => $def) { + $width = ($def['value'] * 100 / $total); + $output .= '
    '; - $output .= '
    '.html_print_image( + $output .= '
    '.html_print_image( $original, true, [ @@ -3643,7 +3736,8 @@ function ui_print_toggle($data) (isset($data['container_class']) === true) ? $data['container_class'] : 'white-box-content', (isset($data['main_class']) === true) ? $data['main_class'] : 'box-shadow white_table_graph', (isset($data['img_a']) === true) ? $data['img_a'] : 'images/arrow_down_green.png', - (isset($data['img_b']) === true) ? $data['img_b'] : 'images/arrow_right_green.png' + (isset($data['img_b']) === true) ? $data['img_b'] : 'images/arrow_right_green.png', + (isset($data['clean']) === true) ? $data['clean'] : false ); } diff --git a/pandora_console/include/javascript/alert.js b/pandora_console/include/javascript/alert.js new file mode 100644 index 0000000000..435649833d --- /dev/null +++ b/pandora_console/include/javascript/alert.js @@ -0,0 +1,174 @@ +/* eslint-disable no-unused-vars */ +/* global $, load_modal, generalShowMsg, confirmDialog */ + +function allowDrop(ev) { + ev.preventDefault(); +} + +function drag(ev) { + ev.dataTransfer.setData("html", ev.target.outerHTML); +} + +function drop(ev) { + ev.preventDefault(); + var data = document.createElement("span"); + var content = ev.dataTransfer.getData("html"); + if (content.includes("nexo")) { + content = "
    " + content; + } + data.innerHTML = content; + document.getElementById(ev.target.id).appendChild(data); +} + +function add_alert_action(settings) { + load_modal({ + target: $("#modal-add-action-form"), + form: "modal_form_add_actions", + url: settings.url_ajax, + modal: { + title: settings.title, + cancel: settings.btn_cancel, + ok: settings.btn_text + }, + onshow: { + page: settings.url, + method: "addAlertActionForm", + extradata: { + id: settings.id + } + }, + onsubmit: { + page: settings.url, + method: "addAlertAction", + dataType: "json" + }, + ajax_callback: add_alert_action_acept, + idMsgCallback: "msg-add-action" + }); +} + +function add_alert_action_acept(data, idMsg) { + if (data.error === 1) { + console.log(data.text); + return; + } + + if ($("#emptyli-al-" + data.id_alert).length > 0) { + $("#emptyli-al-" + data.id_alert).remove(); + } + + $.ajax({ + method: "post", + url: data.url, + data: { + page: data.page, + method: "addRowActionAjax", + id_alert: data.id_alert, + id_action: data.id_action + }, + dataType: "html", + success: function(li) { + $(".ui-dialog-content").dialog("close"); + $("#ul-al-" + data.id_alert).append(li); + }, + error: function(error) { + console.log(error); + } + }); +} + +function delete_alert_action(settings) { + confirmDialog({ + title: settings.title, + message: settings.msg, + onAccept: function() { + $.ajax({ + method: "post", + url: settings.url, + data: { + page: settings.page, + method: "deleteActionAlert", + id_alert: settings.id_alert, + id_action: settings.id_action + }, + dataType: "json", + success: function(data) { + // Delete row table. + $( + "#li-al-" + settings.id_alert + "-act-" + settings.id_action + ).remove(); + + var num_row = $("#ul-al-" + settings.id_alert + " li").length; + if (num_row === 0) { + var emptyli = + "
  • " + + settings.emptyli + + "
  • "; + $("#ul-al-" + settings.id_alert).append(emptyli); + } + }, + error: function(error) { + console.log(error); + } + }); + } + }); +} + +function standby_alert(settings) { + confirmDialog({ + title: settings.title, + message: settings.msg, + onAccept: function() { + $.ajax({ + method: "post", + url: settings.url, + data: { + page: settings.page, + method: "standByAlert", + id_alert: settings.id_alert, + standby: settings.standby + }, + dataType: "html", + success: function(data) { + $("#standby-alert-" + settings.id_alert).empty(); + $("#standby-alert-" + settings.id_alert).append(data); + }, + error: function(error) { + console.log(error); + } + }); + } + }); +} + +function disabled_alert(settings) { + confirmDialog({ + title: settings.title, + message: settings.msg, + onAccept: function() { + $.ajax({ + method: "post", + url: settings.url, + data: { + page: settings.page, + method: "disabledAlert", + id_alert: settings.id_alert, + disabled: settings.disabled + }, + dataType: "json", + success: function(data) { + $("#disabled-alert-" + settings.id_alert).empty(); + $("#disabled-alert-" + settings.id_alert).append(data.disabled); + $("#status-alert-" + settings.id_alert).empty(); + $("#status-alert-" + settings.id_alert).append(data.status); + }, + error: function(error) { + console.log(error); + } + }); + } + }); +} diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index c3ed855213..6a29b6b552 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -1885,12 +1885,35 @@ function load_modal(settings) { } data.append("page", settings.onshow.page); data.append("method", settings.onshow.method); + if (settings.onshow.extradata != undefined) { + data.append("extradata", JSON.stringify(settings.onshow.extradata)); + } + + if (settings.target == undefined) { + var uniq = uniqId(); + var div = document.createElement("div"); + div.id = "div-modal-" + uniq; + div.style.display = "none"; + + document.getElementById("main").append(div); + + var id_modal_target = "#div-modal-" + uniq; + + settings.target = $(id_modal_target); + } var width = 630; if (settings.onshow.width) { width = settings.onshow.width; } + if (settings.modal.overlay == undefined) { + settings.modal.overlay = { + opacity: 0.5, + background: "black" + }; + } + settings.target.html("Loading modal..."); settings.target .dialog({ @@ -2081,14 +2104,16 @@ function load_modal(settings) { modal: true, title: settings.modal.title, width: width, - overlay: { - opacity: 0.5, - background: "black" - }, + overlay: settings.modal.overlay, buttons: required_buttons, closeOnEscape: false, open: function() { $(".ui-dialog-titlebar-close").hide(); + }, + close: function() { + if (id_modal_target != undefined) { + $(id_modal_target).remove(); + } } }); }, @@ -2100,13 +2125,7 @@ function load_modal(settings) { //Function that shows a dialog box to confirm closures of generic manners. The modal id is random function confirmDialog(settings) { - var randomStr = - Math.random() - .toString(36) - .substring(2, 15) + - Math.random() - .toString(36) - .substring(2, 15); + var randomStr = uniqId(); $("body").append( '
    ' + settings.message + "
    " @@ -2142,6 +2161,18 @@ function confirmDialog(settings) { .show(); } +function uniqId() { + var randomStr = + Math.random() + .toString(36) + .substring(2, 15) + + Math.random() + .toString(36) + .substring(2, 15); + + return randomStr; +} + /** * Function to show modal with message Validation. * diff --git a/pandora_console/include/lib/WebSocketServer.php b/pandora_console/include/lib/WebSocketServer.php index 2d9eb1d9fd..dfdc81d075 100644 --- a/pandora_console/include/lib/WebSocketServer.php +++ b/pandora_console/include/lib/WebSocketServer.php @@ -439,6 +439,9 @@ abstract class WebSocketServer if ((time() - $this->lastTickTimestamp) > $this->tickInterval) { $this->lastTickTimestamp = time(); $this->tick(); + + // Keep connection with DB active. + $this->dbHearthbeat(); } socket_select($read, $write, $except, 0, $this->timeout); @@ -1530,4 +1533,23 @@ abstract class WebSocketServer } + /** + * Keeps db connection opened. + * + * @return void + */ + public function dbHearthbeat() + { + global $config; + + if (isset($config['dbconnection']) === false + || mysqli_ping($config['dbconnection']) === false + ) { + // Retry connection. + db_select_engine(); + $config['dbconnection'] = db_connect(); + } + } + + } diff --git a/pandora_console/include/styles/alert.css b/pandora_console/include/styles/alert.css new file mode 100644 index 0000000000..3368bf0796 --- /dev/null +++ b/pandora_console/include/styles/alert.css @@ -0,0 +1,128 @@ +li#li-buttons-alert-list > div { + margin-left: 10px; +} + +li#li-buttons-alert-list > label, +li#li-filters-alert-list > label { + width: initial; +} + +form#advanced_filters_alert ul li label, +form#general_filters_alert ul li label { + width: 150px; +} + +form#conditions_filters_alert ul li label:first-child { + width: 300px; +} + +li#li-name-group input { + margin-right: 50px; +} + +li#li-description textarea { + flex: 1 1 auto; +} + +li#li-from-to-threshold > label:not(:first-child), +li#li-time-from-to > label:not(:first-child) { + width: initial; + margin-right: 15px; +} + +li#li-from-to-threshold > input, +li#li-time-from-to > input { + margin-right: 15px; +} + +form#advanced_filters_alert textarea { + flex: 1 1 auto; + height: 5em; + min-height: 5em; +} + +form#advanced_filters_alert ul li label img { + margin-bottom: -2px; + margin-left: 5px; +} + +/*DRAG DROP*/ +#threshold_manual, +#threshold_default { + /*TODO: UGLY*/ + width: initial !important; + margin-right: 10px; +} + +img.handle-alerts { + width: 20px; + cursor: move; +} + +.content { + width: 80%; + min-height: 4em; + border: 1px solid #ddd; + padding-top: 1em; + padding-bottom: 1em; +} +ul.sample { + max-width: 50%; + flex-grow: 1; + justify-content: space-between; +} +ul.sample li { + padding-bottom: 1em; +} +ul.sample li:last-child { + padding-bottom: 0; +} +div.target { + flex-grow: 1; + margin-left: 3em; + border: 1px solid #ddd; +} + +.field { + display: inline-block; + border-radius: 10px; + padding: 5px; + padding-left: 8px; + padding-right: 8px; + margin: 3px; + color: #fff; + font-family: "lato-lighter", "Open Sans", sans-serif; + font-weight: 600; + background-color: #333; +} + +.log { + background-color: #638460; +} +.event { + background-color: #587cff; +} + +.operator { + background-color: #908787; +} + +.variable { + background-color: #82b92e; +} + +.modifier { + background-color: #cba9d2; +} + +.nexo { + background-color: #424242; +} + +.rules div { + display: inline-block; +} + +.inEdit { + background-color: #888; +} diff --git a/pandora_console/include/styles/discovery.css b/pandora_console/include/styles/discovery.css index 2aee23f645..fc5749b4a8 100644 --- a/pandora_console/include/styles/discovery.css +++ b/pandora_console/include/styles/discovery.css @@ -31,7 +31,7 @@ li.discovery > a label { } div.data_container > label { - font-family: "lato-bolder", "Open Sans", sans-serif; + font-family: "lato", "Open Sans", sans-serif; font-weight: lighter; } @@ -204,6 +204,7 @@ label { width: 100%; } +li > input[type="number"], li > input[type="text"], li > input[type="email"], li > input[type="password"], diff --git a/pandora_console/include/styles/firts_task.css b/pandora_console/include/styles/first_task.css similarity index 88% rename from pandora_console/include/styles/firts_task.css rename to pandora_console/include/styles/first_task.css index be75dd632d..06aa36af82 100755 --- a/pandora_console/include/styles/firts_task.css +++ b/pandora_console/include/styles/first_task.css @@ -1,5 +1,11 @@ +.new_task p, +.new_task div { + font-family: "lato-lighter", "Open Sans", sans-serif; + font-weight: lighter; +} .new_task { margin-top: 30px; + min-width: 600px; left: 20px; width: 60%; height: 300px; @@ -30,6 +36,7 @@ div.new_task_cluster > div { .image_task { width: 20%; + min-width: 175px; height: 100%; float: left; } @@ -47,7 +54,7 @@ div.new_task_cluster > div { .text_task { width: 70%; - float: right; + float: left; height: 100%; padding-right: 25px; } diff --git a/pandora_console/include/styles/omnishell.css b/pandora_console/include/styles/omnishell.css new file mode 100644 index 0000000000..265ca5f445 --- /dev/null +++ b/pandora_console/include/styles/omnishell.css @@ -0,0 +1,515 @@ +.edit_yaml { + margin-left: 39px; + margin-top: 10px; + margin-bottom: 10px; +} + +.margin_button { + margin-right: 5px; +} + +.container-target { + display: flex; + flex-flow: row wrap; +} + +.element-target { + width: 20px; + margin: 2px; + height: 20px; +} + +.element-target-big { + width: 100px; + margin: 2px; + height: 100px; +} + +.element-target-big:hover { + box-shadow: 0 0 10px -5px #424242; +} + +.element-target-big:before { + content: attr(data-label); + position: relative; + text-align: center; + width: 100%; + height: 100%; + color: #373737; + font-weight: bolder; + display: flex; + flex-direction: row; + font-size: 1.8em; + align-items: center; + justify-content: center; + overflow: hidden; + font-family: "lato-bolder", "Open Sans", sans-serif; + text-decoration: none; +} + +.container-target a:hover { + text-decoration: none; +} + +.status-normal { + background-color: #add570; +} + +.status-critical { + background-color: #e3485e; +} + +.status-notinit { + background-color: #8bbbdd; +} + +.container-msg-target-modal { + max-height: 400px; + overflow: initial; + padding-right: 20px; + padding-left: 20px; +} + +.container-msg-target-modal p { + font-family: "lato-lighter", "Open Sans", sans-serif; + margin-bottom: 20px; + font-size: 10pt; +} + +span.failed { + color: #fb4444; + font-weight: bolder; +} + +span.success { + color: #82b92f; + font-weight: bolder; +} + +.container-msg-target-modal pre { + font-family: monospace; + padding: 1em; + white-space: pre-wrap; + background-color: #efefef; + color: #565656; + font-size: 1.2em; + border: 2px solid #ddd; + border-radius: 5px; +} + +.container-msg-target-modal p img { + margin-right: 0.3em; + height: 1.3em; +} + +ul.wizard li > textarea { + height: 5em; +} + +.label_select { + font-family: "lato-lighter", "Open Sans", sans-serif; + font-weight: bolder; +} + +.divided select { + width: 100%; +} + +.inline { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: space-between; + align-content: center; + align-items: center; +} + +.inline label:first-child { + width: 250px; + vertical-align: top; + display: inline-block; +} + +.inline label:nth-child(3) { + margin-right: 1em; + margin-left: 1em; +} + +.inline select { + margin-right: 1em; +} + +.middle { + align-self: center; +} +.edit_discovery_info { + padding-top: 0; +} + +ul.wizard { + width: 100%; +} + +.filter_column { + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-between; + align-content: center; +} + +.filter_column .edit_discovery_input { + flex-grow: 1; + width: 100%; + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: space-between; + align-content: baseline; + margin-left: 2em; +} +.filter_column .edit_discovery_input .label_select { + display: inline; + margin: 0; +} + +.filter_column .edit_discovery_input select { + flex-grow: 1; + margin-left: 2em; +} + +.wizard li { + display: flex; +} + +.no-class.action-buttons.mw120px.textright.sorting_disabled, +.textright { + text-align: right; + padding-right: 2em; +} + +/* + * Discovery css global + */ + +ul.bigbuttonlist { + min-height: 200px; +} + +li.discovery { + display: inline-block; + float: left; + width: 250px; + margin: 15px; + padding-bottom: 50px; +} + +li.discovery > a { + text-decoration: none; + color: #333; +} +li.discovery > a:hover { + color: #000; +} + +li.discovery img { + height: 90px; +} + +li.discovery > a label { + cursor: pointer; +} + +div.data_container > label { + font-family: "lato", "Open Sans", sans-serif; + font-weight: lighter; +} + +div.data_container { + width: 100%; + height: 100%; + text-align: center; + padding-top: 30px; + padding-bottom: 30px; +} + +div.data_container:hover { + box-shadow: 2px 2px 10px #ddd; +} + +/* + * TODO: This may be at hostdevices.css + */ +.texto { + height: auto; + text-align: center; +} +h1.wizard { + padding: 0; + margin: 0; +} +h1.wizard a { + margin-left: -20px; +} +h1.wizard a:hover { + color: #fff; +} +#text_wizard { + font-weight: bolder; + text-decoration: none; + font-size: 24px; +} +div.arrow_box { + display: inline-block; + position: relative; + color: #888; + padding: 1.3em; + margin-left: 20px; + margin-bottom: 10px; + padding-left: 3em; +} + +.arrow_box.selected { + background: #424242; + color: #ccc; +} + +.arrow_box:after { + left: 0%; + border-left-color: white; + border-width: 20px; + margin-top: -20px; +} + +div.arrow_box:before { + left: 100%; + border-left-color: #ccc; + border-width: 20px; + margin-top: -20px; +} +.arrow_box.selected:before { + border-left-color: #424242; +} + +.arrow_box.selected:hover { + color: #fff; +} +.arrow_box:hover { + color: #000; +} + +/* + * Breadcrum + */ + +#menu_tab_frame_view_bc { + display: flex; + justify-content: space-between; + border-bottom: 2px solid #82b92e; + max-height: 70px; + min-height: 55px; + width: 100%; + padding-right: 0px; + margin-left: 0px; + margin-bottom: 20px; + height: 55px; + box-sizing: border-box; + background-color: #fafafa; + border-top-right-radius: 7px; + border-top-left-radius: 7px; + box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.1); +} + +#menu_tab_frame_view_bc .breadcrumbs_container { + align-self: flex-start; +} + +.breadcrumbs_container { + padding-top: 4px; + text-indent: 0.25em; + padding-left: 2.5em; +} + +.breadcrumb_link { + color: #848484; + font-size: 10pt; + font-family: "lato-bolder", "Open Sans", sans-serif; + text-decoration: none; +} + +span.breadcrumb_link { + color: #d0d0d0; + font-size: 12pt; +} + +.breadcrumb_link.selected { + color: #95b750; +} + +.breadcrumb_link.selected:hover { + color: #95b750; +} +.breadcrumb_link:hover { + color: #95b750; +} + +/* + * Discovery forms structure + */ + +form.discovery * { + font-size: 10pt; +} + +form.discovery .label_select b { + font-family: "lato", "Open Sans", sans-serif; + font-weight: bolder; +} + +.edit_discovery_info { + display: flex; + align-items: flex-start; + padding-top: 25px; +} + +.edit_discovery_input { + align-items: center; + margin-bottom: 25px; +} + +/* + * Discovery text inputs + */ + +.discovery_label_hint { + display: flex; +} + +label { + color: #343434; + font-weight: bold; +} + +.discovery_full_width_input { + width: 100%; +} + +li > input[type="text"], +li > input[type="email"], +li > input[type="password"], +li > input[type="email"], +.discovery_text_input > input[type="password"], +.discovery_text_input > input[type="text"], +#interval_manual > input[type="text"] { + background-color: transparent; + border: none; + border-radius: 0; + border-bottom: 1px solid #ccc; + font-family: "lato-bolder", "Open Sans", sans-serif; + font-weight: lighter; + padding: 0px 0px 2px 0px; + box-sizing: border-box; + margin-bottom: 4px; +} + +#interval_manual > input[type="text"] { + width: 50px; + margin-left: 10px; + margin-right: 10px; +} + +.discovery_list_input { + width: 100%; + border: 1px solid #cbcbcb; + overflow-y: auto; +} + +.discovery_list_input option { + text-align: left; +} + +.discovery_list_input option:checked { + background: #1aab8e -webkit-linear-gradient(bottom, #7db742 0%, #7db742 100%); + color: #fff; +} + +.discovery_textarea_input { + background-color: #fbfbfb; + padding-left: 10px; + width: 100%; + height: 100px; + max-height: 100px; + max-width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + resize: none; +} + +a.tip { + margin-left: 8px; +} + +.inline_switch > label { + float: right; +} + +.discovery_interval_select_width { + width: 90%; +} + +a.ext_link { + margin-left: 1em; + font-size: 8pt; +} + +div.ui-tooltip.ui-corner-all.ui-widget-shadow.ui-widget.ui-widget-content.uitooltip { + background: grey; + opacity: 0.9; + border-radius: 4px; + box-shadow: 6px 5px 9px -9px black; + padding: 6px; +} + +.ui-tooltip-content { + background: transparent; + color: #fff; + font-weight: bold; + font-family: "lato-lighter", "Open Sans", sans-serif; + letter-spacing: 0.03pt; + font-size: 8pt; +} + +.arrow { + width: 70px; + height: 16px; + overflow: hidden; + position: absolute; + left: 50%; + margin-left: -35px; + bottom: -16px; +} +.arrow.top { + top: -16px; + bottom: auto; +} +.arrow.left { + left: 50%; +} +.arrow:after { + background: grey; + content: ""; + position: absolute; + left: 20px; + top: -20px; + width: 25px; + height: 25px; + box-shadow: 6px 5px 9px -9px black; + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} +.arrow.top:after { + bottom: -20px; + top: auto; +} diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index ef1d250759..1ecd197ece 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -551,6 +551,18 @@ select:-internal-list-box { align-items: center; } +.flex-space-around { + justify-content: space-around; +} + +.flex-end { + justify-content: flex-end; +} + +.flex-start { + justify-content: flex-start; +} + .nowrap { flex-wrap: nowrap; } @@ -5698,7 +5710,11 @@ div#status_pie { align-items: center; flex-wrap: wrap; padding: 1em; - min-width: fit-content; + min-width: 100%; +} +.white-box-content-clean { + padding-left: 2em; + padding-top: 1em; } .white_table_graph_content { diff --git a/pandora_console/include/styles/progress.css b/pandora_console/include/styles/progress.css index f263e87fcf..bfbb2409ef 100644 --- a/pandora_console/include/styles/progress.css +++ b/pandora_console/include/styles/progress.css @@ -4,7 +4,17 @@ position: relative; width: 100%; display: inline-block; + display: flex; } + +.progress_main_noborder { + height: 2.5em; + position: relative; + width: 100%; + display: inline-block; + display: flex; +} + .progress_main:before { content: attr(data-label); position: absolute; diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index 7444dda595..aa91a09ee6 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -68,14 +68,7 @@ if (is_ajax()) { if ($refresh_contact) { $id_agente = get_parameter('id_agente', 0); if ($id_agente > 0) { - $last_contact = db_get_value_sql( - sprintf( - 'SELECT format(intervalo,2) - (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(IF(ultimo_contacto > ultimo_contacto_remoto, ultimo_contacto, ultimo_contacto_remoto))) as "val" - FROM `tagente` - WHERE id_agente = %d ', - $id_agente - ) - ); + $last_contact = agents_get_next_contact_time_left($id_agente); $progress = agents_get_next_contact($id_agente); if ($progress < 0 || $progress > 100) { @@ -1336,6 +1329,19 @@ if ($config['ehorus_enabled'] && !empty($config['ehorus_custom_field']) } } +$is_sap = agents_get_sap_agents($id_agente); +if ($is_sap) { + $saptab['text'] = ''.html_print_image('images/sap_icon.png', true, ['title' => __('SAP view')]).''; + if ($tab == 'sap_view') { + $saptab['active'] = true; + } else { + $saptab['active'] = false; + } +} else { + $saptab = ''; +} + + $onheader = [ 'manage' => $managetab, 'main' => $maintab, @@ -1349,6 +1355,8 @@ $onheader = [ 'ux_console' => $ux_console_tab, 'wux_console' => $wux_console_tab, 'url_route_analyzer' => $url_route_analyzer_tab, + 'sap_view' => $saptab, + ]; // Added after it exists @@ -1512,6 +1520,12 @@ switch ($tab) { $tab_name = $tab_name_extensions; break; + case 'sap_view': + $tab_description = '- '.__('SAP view'); + $help_header = 'sap_view'; + $tab_name = 'SAP View'; + break; + default: $tab_name = ''; $help_header = ''; @@ -1619,6 +1633,10 @@ switch ($tab) { include 'operation/agentes/ehorus.php'; break; + case 'sap_view': + include 'general/sap_view.php'; + break; + case 'extension': $found = false; foreach ($config['extensions'] as $extension) { diff --git a/pandora_console/operation/incidents/incident.php b/pandora_console/operation/incidents/incident.php index 5057b4d281..62e2f33fee 100755 --- a/pandora_console/operation/incidents/incident.php +++ b/pandora_console/operation/incidents/incident.php @@ -372,7 +372,7 @@ if ($count_total >= 1) { } if ($count_total < 1) { - include_once $config['homedir'].'/general/firts_task/incidents.php'; + include_once $config['homedir'].'/general/first_task/incidents.php'; } else { // TOTAL incidents $url = 'index.php?sec=workspace&sec2=operation/incidents/incident'; diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index 58213ed8ee..dfa52551fc 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -155,6 +155,8 @@ if (!empty($sub2)) { enterprise_hook('cluster_menu'); enterprise_hook('aws_menu'); +enterprise_hook('SAP_view'); + if (!empty($sub)) { $menu_operation['estado']['text'] = __('Monitoring'); diff --git a/pandora_console/operation/search_agents.php b/pandora_console/operation/search_agents.php index 7edd7be878..05383df31a 100755 --- a/pandora_console/operation/search_agents.php +++ b/pandora_console/operation/search_agents.php @@ -30,6 +30,7 @@ if (!$agents || !$searchAgents) { echo "
    ".__('Zero results found')."
    \n"; } } else { + $table = new StdClass(); $table->cellpadding = 4; $table->cellspacing = 4; $table->width = '98%'; diff --git a/pandora_console/operation/servers/recon_view.php b/pandora_console/operation/servers/recon_view.php index 5401f6e307..facf494179 100644 --- a/pandora_console/operation/servers/recon_view.php +++ b/pandora_console/operation/servers/recon_view.php @@ -36,7 +36,7 @@ if ($servers === false) { $recon_task = db_get_all_rows_sql('SELECT * FROM trecon_task'); if ($recon_task === false) { ui_print_page_header(__('Recon View'), 'images/op_recon.png', false, '', false); - include_once $config['homedir'].'/general/firts_task/recon_view.php'; + include_once $config['homedir'].'/general/first_task/recon_view.php'; return; } else { include_once $config['homedir'].'/include/functions_graph.php'; diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 3b11dccb4d..28bb83d287 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -699,7 +699,7 @@ CREATE TABLE IF NOT EXISTS `tgrupo` ( CREATE TABLE IF NOT EXISTS `tcredential_store` ( `identifier` varchar(100) NOT NULL, `id_group` mediumint(4) unsigned NOT NULL DEFAULT 0, - `product` enum('CUSTOM', 'AWS', 'AZURE', 'GOOGLE') default 'CUSTOM', + `product` enum('CUSTOM', 'AWS', 'AZURE', 'GOOGLE', 'SAP') default 'CUSTOM', `username` text, `password` text, `extra_1` text, @@ -2782,6 +2782,9 @@ CREATE TABLE IF NOT EXISTS `tevent_rule` ( `id_tag` integer(10) unsigned NOT NULL default '0', `name` text default '', `group_recursion` INT(1) unsigned default 0, + `log_content` text, + `log_source` text, + `log_agent` text, PRIMARY KEY (`id_event_rule`), KEY `idx_id_event_alert` (`id_event_alert`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -3658,3 +3661,35 @@ CREATE TABLE `tdeployment_hosts` ( FOREIGN KEY (`target_agent_version_id`) REFERENCES `tagent_repository`(`id`) ON UPDATE CASCADE ON DELETE SET NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- ---------------------------------------------------------------------- +-- Table `tremote_command` +-- ---------------------------------------------------------------------- +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; + +-- ---------------------------------------------------------------------- +-- Table `tremote_command_target` +-- ---------------------------------------------------------------------- +CREATE TABLE `tremote_command_target` ( + `id` SERIAL, + `rcmd_id` bigint unsigned NOT NULL, + `id_agent` int(10) unsigned NOT NULL, + `utimestamp` int(20) unsigned NOT NULL default 0, + `stdout` MEDIUMTEXT, + `stderr` MEDIUMTEXT, + `errorlevel` int(10) unsigned NOT NULL default 0, + PRIMARY KEY (`id`), + FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`) + ON UPDATE CASCADE ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index a041f4afab..f5f48bda69 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -109,10 +109,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_report_front_logo', 'images/pandora_logo_white.jpg'), ('custom_report_front_header', ''), ('custom_report_front_footer', ''), -('MR', 32), +('MR', 33), ('identification_reminder', 1), ('identification_reminder_timestamp', 0), -('current_package_enterprise', '740'), +('current_package_enterprise', '741'), ('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.0009765625":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'), ('custom_docs_logo', 'default_docs.png'), ('custom_support_logo', 'default_support.png'), diff --git a/pandora_console/tools/diagnostics.php b/pandora_console/tools/diagnostics.php index 30be89efc4..fc2b2fecd2 100644 --- a/pandora_console/tools/diagnostics.php +++ b/pandora_console/tools/diagnostics.php @@ -32,7 +32,7 @@ global $config; require_once $config['homedir'].'/include/class/Diagnostics.class.php'; $ajaxPage = 'tools/diagnostics'; -$pdf = false; +$pdf = get_parameter('pdf', false); // Control call flow. diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 03ebf6404c..1a2daed397 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -80,7 +80,9 @@ then mkdir -p temp_package/var/spool/pandora/data_in/netflow chmod 770 temp_package/var/spool/pandora/data_in/netflow mkdir -p temp_package/var/spool/pandora/data_in/trans - chmod 770 temp_package/var/spool/pandora/data_in/trans + chmod 770 temp_package/var/spool/pandora/data_in/trans + mkdir -p temp_package/var/spool/pandora/data_in/commands + chmod 770 temp_package/var/spool/pandora/data_in/commands mkdir -p temp_package/var/log/pandora/ chmod 754 temp_package/var/log/pandora/ mkdir -p temp_package/usr/share/pandora_server/conf/ diff --git a/pandora_server/conf/pandora_server.conf.new b/pandora_server/conf/pandora_server.conf.new index 2a2930f7eb..16a4a51b62 100644 --- a/pandora_server/conf/pandora_server.conf.new +++ b/pandora_server/conf/pandora_server.conf.new @@ -130,9 +130,15 @@ networkserver 1 dataserver 1 -# Activate (1) Pandora FMS Recon server +# Activate (1) Pandora FMS Discovery server -reconserver 1 +discoveryserver 1 + +# Discovery SAP (PANDORA FMS ENTERPRISE ONLY) +# java /usr/bin/java + +# Discovery SAP utils (PANDORA FMS ENTERPRISE ONLY) +# sap_utils /usr/share/pandora_server/util/recon_scripts/SAP # pluginserver : 1 or 0. Set to 1 to activate plugin server with this setup diff --git a/pandora_server/conf/tentacle_server.conf.new b/pandora_server/conf/tentacle_server.conf.new index d4ebe4a71f..992a6b1944 100644 --- a/pandora_server/conf/tentacle_server.conf.new +++ b/pandora_server/conf/tentacle_server.conf.new @@ -21,7 +21,7 @@ daemon 1 # insecure 0 # Filters (regexp:dir;regexp:dir...) -filters .*\.conf:conf;.*\.md5:md5;.*\.zip:collections;.*\.lock:trans +filters .*\.conf:conf;.*\.md5:md5;.*\.zip:collections;.*\.lock:trans;.*\.rcmd:commands # [-m] Maximum file size allowed by the server in bytes #max_size 2000000 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 8af432738c..3db1e4b9c3 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -349,6 +349,12 @@ sub pandora_load_config { $pa_config->{"fping"} = "/usr/sbin/fping"; # > 5.1SP2 + # Discovery SAP + $pa_config->{"java"} = "/usr/bin/java"; + + # Discovery SAP utils + $pa_config->{"sap_utils"} = "/usr/share/pandora_server/util/recon_scripts/SAP"; + # braa for enterprise snmp server $pa_config->{"braa"} = "/usr/bin/braa"; @@ -841,6 +847,12 @@ sub pandora_load_config { elsif ($parametro =~ m/^fping\s(.*)/i) { $pa_config->{'fping'}= clean_blank($1); } + elsif ($parametro =~ m/^java\s(.*)/i) { + $pa_config->{'java'}= clean_blank($1); + } + elsif ($parametro =~ m/^sap_utils\s(.*)/i) { + $pa_config->{'sap_utils'}= clean_blank($1); + } elsif ($parametro =~ m/^nmap_timing_template\s+([0-9]*)/i) { $pa_config->{'nmap_timing_template'}= clean_blank($1); } diff --git a/pandora_server/lib/PandoraFMS/DataServer.pm b/pandora_server/lib/PandoraFMS/DataServer.pm index df1cbbecfb..38a33fc263 100644 --- a/pandora_server/lib/PandoraFMS/DataServer.pm +++ b/pandora_server/lib/PandoraFMS/DataServer.pm @@ -602,8 +602,12 @@ sub process_xml_data ($$$$$) { # Process events process_events_dataserver($pa_config, $data, $agent_id, $group_id, $dbh); - # Process disovery modules + # Process discovery modules enterprise_hook('process_discovery_data', [$pa_config, $data, $server_id, $dbh]); + + # Process command responses + enterprise_hook('process_rcmd_report', [$pa_config, $data, $server_id, $dbh, $agent_id, $timestamp]); + } ########################################################################## diff --git a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm index 7d90ff411a..5555f61af1 100644 --- a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm +++ b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm @@ -56,7 +56,25 @@ my $TaskSem :shared; use constant { OS_OTHER => 10, OS_ROUTER => 17, - OS_SWITCH => 18 + OS_SWITCH => 18, + STEP_SCANNING => 1, + STEP_AFT => 2, + STEP_TRACEROUTE => 3, + STEP_GATEWAY => 4, + STEP_STATISTICS => 1, + STEP_APP_SCAN => 2, + STEP_CUSTOM_QUERIES => 3, + DISCOVERY_HOSTDEVICES => 0, + DISCOVERY_HOSTDEVICES_CUSTOM => 1, + DISCOVERY_CLOUD_AWS => 2, + DISCOVERY_APP_VMWARE => 3, + DISCOVERY_APP_MYSQL => 4, + DISCOVERY_APP_ORACLE => 5, + DISCOVERY_CLOUD_AWS_EC2 => 6, + DISCOVERY_CLOUD_AWS_RDS => 7, + DISCOVERY_CLOUD_AZURE_COMPUTE => 8, + DISCOVERY_DEPLOY_AGENTS => 9, + DISCOVERY_APP_SAP => 10, }; ######################################################################################## @@ -196,6 +214,31 @@ sub data_consumer ($$) { return; } + + if ($task->{'type'} == DISCOVERY_APP_SAP) { + # SAP TASK, retrieve license. + $task->{'sap_license'} = pandora_get_config_value( + $dbh, + 'sap_license' + ); + + # Retrieve credentials for task (optional). + if (defined($task->{'auth_strings'}) + && $task->{'auth_strings'} ne '' + ) { + my $key = credential_store_get_key( + $pa_config, + $dbh, + $task->{'auth_strings'} + ); + + # Inside an eval, here it shouln't fail unless bad configured. + $task->{'username'} = $key->{'username'}; + $task->{'password'} = $key->{'password'}; + + } + } + my $recon = new PandoraFMS::Recon::Base( communities => \@communities, dbh => $dbh, diff --git a/pandora_server/lib/PandoraFMS/Recon/Base.pm b/pandora_server/lib/PandoraFMS/Recon/Base.pm index 335504821e..b444e92672 100644 --- a/pandora_server/lib/PandoraFMS/Recon/Base.pm +++ b/pandora_server/lib/PandoraFMS/Recon/Base.pm @@ -22,7 +22,7 @@ use constant { STEP_TRACEROUTE => 3, STEP_GATEWAY => 4, STEP_STATISTICS => 1, - STEP_DATABASE_SCAN => 2, + STEP_APP_SCAN => 2, STEP_CUSTOM_QUERIES => 3, DISCOVERY_HOSTDEVICES => 0, DISCOVERY_HOSTDEVICES_CUSTOM => 1, @@ -34,6 +34,7 @@ use constant { DISCOVERY_CLOUD_AWS_RDS => 7, DISCOVERY_CLOUD_AZURE_COMPUTE => 8, DISCOVERY_DEPLOY_AGENTS => 9, + DISCOVERY_APP_SAP => 10, }; # $DEVNULL @@ -1440,10 +1441,11 @@ sub cloud_scan($) { my $type = ''; - if ($self->{'task_data'}->{'type'} == DISCOVERY_CLOUD_AWS_EC2 - || $self->{'task_data'}->{'type'} == DISCOVERY_CLOUD_AWS_RDS) { + if ( $self->{'task_data'}->{'type'} == DISCOVERY_CLOUD_AWS_EC2 + || $self->{'task_data'}->{'type'} == DISCOVERY_CLOUD_AWS_RDS) { $type = 'Aws'; } else { + # Unrecognized task type. call('message', 'Unrecognized task type', 1); $self->call('update_progress', -1); @@ -1465,9 +1467,11 @@ sub cloud_scan($) { ); if (!$cloudObj) { + # Failed to initialize, check Cloud credentials or anything. call('message', 'Unable to initialize PandoraFMS::Recon::Cloud::'.$type, 3); } else { + # Let Cloud object manage scan. $cloudObj->scan(); } @@ -1479,6 +1483,85 @@ sub cloud_scan($) { } +########################################################################## +# Performs a database scan. +########################################################################## +sub database_scan($$$) { + my ($self, $type, $obj, $global_percent, $targets) = @_; + + my @data; + my @modules; + + my $dbObjCfg = $obj->get_config(); + + $self->{'summary'}->{'discovered'} += 1; + $self->{'summary'}->{'alive'} += 1; + + push @modules, + { + name => $type . ' connection', + type => 'generic_proc', + data => 1, + description => $type . ' availability' + }; + + # Analyze. + $self->{'step'} = STEP_STATISTICS; + $self->{'c_network_percent'} = 30; + $self->call('update_progress', $global_percent + (30 / (scalar @$targets))); + $self->{'c_network_name'} = $obj->get_host(); + + # Retrieve connection statistics. + # Retrieve uptime statistics + # Retrieve query stats + # Retrieve connections + # Retrieve innodb + # Retrieve cache + $self->{'c_network_percent'} = 50; + $self->call('update_progress', $global_percent + (50 / (scalar @$targets))); + push @modules, $obj->get_statistics(); + + # Custom queries. + $self->{'step'} = STEP_CUSTOM_QUERIES; + $self->{'c_network_percent'} = 80; + $self->call('update_progress', $global_percent + (80 / (scalar @$targets))); + push @modules, $obj->execute_custom_queries(); + + if (defined($dbObjCfg->{'scan_databases'}) + && "$dbObjCfg->{'scan_databases'}" eq "1") { + + # Skip database scan in Oracle tasks + next if $self->{'type'} == DISCOVERY_APP_ORACLE; + + my $__data = $obj->scan_databases(); + + if (ref($__data) eq "ARRAY") { + if (defined($dbObjCfg->{'agent_per_database'}) + && $dbObjCfg->{'agent_per_database'} == 1) { + + # Agent per database detected. + push @data, @{$__data}; + + } else { + + # Merge modules into engine agent. + my @_modules = map { + map { $_ } + @{$_->{'module_data'}} + } @{$__data}; + + push @modules, @_modules; + } + } + } + + return { + 'modules' => @modules, + 'data' => @data + }; +} + + ########################################################################## # Perform an Application scan. ########################################################################## @@ -1487,11 +1570,15 @@ sub app_scan($) { my ($progress, $step); my $type = ''; + my $db_scan = 0; + # APP object initialization. if ($self->{'task_data'}->{'type'} == DISCOVERY_APP_MYSQL) { $type = 'MySQL'; } elsif ($self->{'task_data'}->{'type'} == DISCOVERY_APP_ORACLE) { $type = 'Oracle'; + } elsif ($self->{'task_data'}->{'type'} == DISCOVERY_APP_SAP) { + $type = 'SAP'; } else { # Unrecognized task type. call('message', 'Unrecognized task type', 1); @@ -1505,10 +1592,17 @@ sub app_scan($) { my $global_percent = 0; my $i = 0; foreach my $target (@targets) { + if ( !defined($target) + || $target eq '' + || $target =~ /^#/) { + # Ignore empty target or commented one. + next; + } + my @data; my @modules; - $self->{'step'} = STEP_DATABASE_SCAN; + $self->{'step'} = STEP_APP_SCAN; $self->{'c_network_name'} = $target; $self->{'c_network_percent'} = 0; @@ -1524,16 +1618,25 @@ sub app_scan($) { $self->call('update_progress', $global_percent + (10 / (scalar @targets))); # Connect to target. - my $dbObj = PandoraFMS::Recon::Util::enterprise_new( + my $obj = PandoraFMS::Recon::Util::enterprise_new( 'PandoraFMS::Recon::Applications::'.$type, - $self->{'task_data'} + { + %{$self->{'task_data'}}, + 'target' => $target, + 'pa_config' => $self->{'pa_config'}, + 'parent' => $self + }, ); - if (defined($dbObj)) { - if (!$dbObj->is_connected()) { + if (defined($obj)) { + + # Verify if object is connected. If cannot connect to current target + # return with module. + if (!$obj->is_connected()) { call('message', 'Cannot connect to target ' . $target, 3); $global_percent += $global_step; $self->{'c_network_percent'} = 90; + # Update progress $self->call('update_progress', $global_percent + (90 / (scalar @targets))); $self->{'summary'}->{'not_alive'} += 1; @@ -1545,74 +1648,51 @@ sub app_scan($) { }; } else { - my $dbObjCfg = $dbObj->get_config(); + # + # $results is always a hash with: + # @modules => 'global' modules. + # @data => { + # 'agent_data' => {} + # 'module_data' => [] + # } + my $results; - $self->{'summary'}->{'discovered'} += 1; - $self->{'summary'}->{'alive'} += 1; + # Scan connected obj. + if ( $self->{'task_data'}->{'type'} == DISCOVERY_APP_MYSQL + || $self->{'task_data'}->{'type'} == DISCOVERY_APP_ORACLE) { - push @modules, { - name => $type . ' connection', - type => 'generic_proc', - data => 1, - description => $type . ' availability' - }; + # Database. + $results = $self->database_scan($type, $obj, $global_percent, \@targets); - # Analyze. - $self->{'step'} = STEP_STATISTICS; - $self->{'c_network_percent'} = 30; - $self->call('update_progress', $global_percent + (30 / (scalar @targets))); - $self->{'c_network_name'} = $dbObj->get_host(); + } elsif ($self->{'task_data'}->{'type'} == DISCOVERY_APP_SAP) { - # Retrieve connection statistics. - # Retrieve uptime statistics - # Retrieve query stats - # Retrieve connections - # Retrieve innodb - # Retrieve cache - $self->{'c_network_percent'} = 50; - $self->call('update_progress', $global_percent + (50 / (scalar @targets))); - push @modules, $dbObj->get_statistics(); + # SAP scan + $results = $obj->scan(); - # Custom queries. - $self->{'step'} = STEP_CUSTOM_QUERIES; - $self->{'c_network_percent'} = 80; - $self->call('update_progress', $global_percent + (80 / (scalar @targets))); - push @modules, $dbObj->execute_custom_queries(); + } - if (defined($dbObjCfg->{'scan_databases'}) - && "$dbObjCfg->{'scan_databases'}" eq "1") { - # Skip database scan in Oracle tasks - next if $self->{'type'} == DISCOVERY_APP_ORACLE; + # Add results. + if (ref($results) eq 'HASH') { + if (defined($results->{'modules'})) { + push @modules, $results->{'modules'}; + } - my $__data = $dbObj->scan_databases(); - - if (ref($__data) eq "ARRAY") { - if (defined($dbObjCfg->{'agent_per_database'}) - && $dbObjCfg->{'agent_per_database'} == 1) { - # Agent per database detected. - push @data, @{$__data}; - } else { - # Merge modules into engine agent. - my @_modules = map { - map { $_ } @{$_->{'module_data'}} - } @{$__data}; - - push @modules, @_modules; - } + if (defined($results->{'data'})) { + push @data, $results->{'data'}; } } } # Put engine agent at the beginning of the list. - my $version = $dbObj->get_version(); - unshift @data,{ + my $version = $obj->get_version(); + unshift @data, { 'agent_data' => { - 'agent_name' => $dbObj->get_agent_name(), + 'agent_name' => $obj->get_agent_name(), 'os' => $type, 'os_version' => (defined($version) ? $version : 'Discovery'), 'interval' => $self->{'task_data'}->{'interval_sweep'}, 'id_group' => $self->{'task_data'}->{'id_group'}, - 'address' => $dbObj->get_host(), + 'address' => $obj->get_host(), 'description' => '', }, 'module_data' => \@modules, @@ -1621,7 +1701,7 @@ sub app_scan($) { $self->call('create_agents', \@data); # Destroy item. - undef($dbObj); + undef($obj); } $global_percent += $global_step; @@ -1657,9 +1737,11 @@ sub deploy_scan($) { ); if (!$deployer) { + # Failed to initialize, check Cloud credentials or anything. call('message', 'Unable to initialize PandoraFMS::Recon::Deployer', 3); } else { + # Let deployer object manage scan. $deployer->scan(); } @@ -1682,13 +1764,16 @@ sub scan($) { $self->call('update_progress', 1); if (defined($self->{'task_data'})) { - if ($self->{'task_data'}->{'type'} == DISCOVERY_APP_MYSQL - || $self->{'task_data'}->{'type'} == DISCOVERY_APP_ORACLE) { - # Database scan. + if ( $self->{'task_data'}->{'type'} == DISCOVERY_APP_MYSQL + || $self->{'task_data'}->{'type'} == DISCOVERY_APP_ORACLE + || $self->{'task_data'}->{'type'} == DISCOVERY_APP_SAP) { + + # Application scan. return $self->app_scan(); } if ($self->{'task_data'}->{'type'} == DISCOVERY_CLOUD_AWS_RDS) { + # Cloud scan. return $self->cloud_scan(); } diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index 3a3e1904a0..05adbf79d1 100755 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -110,6 +110,7 @@ our @EXPORT = qw( is_offline to_number clean_blank + credential_store_get_key pandora_sendmail pandora_trash_ascii enterprise_hook @@ -487,6 +488,33 @@ sub pandora_daemonize { # Pandora other General functions | # -------------------------------------------+ +######################################################################## +# SUB credential_store_get_key +# Retrieve all information related to target identifier. +# param1 - config hash +# param2 - dbh link +# param3 - string identifier +######################################################################## +sub credential_store_get_key($$$) { + my ($pa_config, $dbh, $identifier) = @_; + + my $sql = 'SELECT * FROM tcredential_store WHERE identifier = ?'; + my $key = PandoraFMS::DB::get_db_single_row($dbh, $sql, $identifier); + + return { + 'username' => PandoraFMS::Core::pandora_output_password( + $pa_config, + $key->{'username'} + ), + 'password' => PandoraFMS::Core::pandora_output_password( + $pa_config, + $key->{'password'} + ), + 'extra_1' => $key->{'extra_1'}, + 'extra_2' => $key->{'extra_2'}, + }; + +} ######################################################################## # SUB pandora_sendmail diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 0dab5db6bd..597049b8c9 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -54,6 +54,8 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/conf mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/md5 mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/collections mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/netflow +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/trans +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/commands mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/pandora/ mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/ mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/ @@ -195,3 +197,5 @@ exit 0 %{_localstatedir}/spool/pandora/data_in/collections %{_localstatedir}/spool/pandora/data_in/conf %{_localstatedir}/spool/pandora/data_in/netflow +%{_localstatedir}/spool/pandora/data_in/trans +%{_localstatedir}/spool/pandora/data_in/commands diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index bcdfb0af1f..5714dcfad8 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -61,6 +61,7 @@ mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/data_in/md5 mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/data_in/collections mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/data_in/netflow mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/data_in/trans +mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/data_in/commands mkdir -p $RPM_BUILD_ROOT/var/log/pandora/ mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/ mkdir -p $RPM_BUILD_ROOT%{prefix}/tentacle/conf/ @@ -198,6 +199,7 @@ rm -Rf /usr/share/man/man1/tentacle_server.1.gz /var/spool/pandora/data_in/netflow /var/spool/pandora/data_in/conf /var/spool/pandora/data_in/trans +/var/spool/pandora/data_in/commands %defattr(-,pandora,root,750) /etc/pandora diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 15903c26e3..03a96b1792 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -315,6 +315,8 @@ install () { chmod 2770 $DESTDIR$PANDORA_SPOOL/data_in/netflow mkdir $DESTDIR$PANDORA_SPOOL/data_in/trans 2> /dev/null chmod 2770 $DESTDIR$PANDORA_SPOOL/data_in/trans + mkdir $DESTDIR$PANDORA_SPOOL/data_in/commands 2> /dev/null + chmod 2770 $DESTDIR$PANDORA_SPOOL/data_in/commands mkdir -p $DESTDIR$PANDORA_LOG 2> /dev/null chown -R pandora $DESTDIR$PANDORA_LOG 2> /dev/null chmod 2774 $DESTDIR$PANDORA_LOG 2> /dev/null From b386da7da6fb86526cda44e3175a0d284b981d15 Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 22 Nov 2019 00:01:10 +0100 Subject: [PATCH 088/123] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index e5cccf6c23..30bb717737 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.740-191121 +Version: 7.0NG.740-191122 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index d37d7c3751..ac1792f927 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.740-191121" +pandora_version="7.0NG.740-191122" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index ba2b7c264e..3296156e53 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.740'; -use constant AGENT_BUILD => '191121'; +use constant AGENT_BUILD => '191122'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index ed6e3d9af3..eebd281636 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.740 -%define release 191121 +%define release 191122 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 92394da731..51ca3872f1 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.740 -%define release 191121 +%define release 191122 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index e4e0431311..d0d49023a3 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.740" -PI_BUILD="191121" +PI_BUILD="191122" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 1bedee5bc5..2fc3287a56 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{191121} +{191122} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 607cbf8e5a..289598ecf3 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.740(Build 191121)") +#define PANDORA_VERSION ("7.0NG.740(Build 191122)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index e5099414d0..5056749b6c 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.740(Build 191121))" + VALUE "ProductVersion", "(7.0NG.740(Build 191122))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 77d4392c10..9fcbbebf3d 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.740-191121 +Version: 7.0NG.740-191122 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index ae2e4c9102..32acc651b2 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.740-191121" +pandora_version="7.0NG.740-191122" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 455ff2b831..21b647c827 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC191121'; +$build_version = 'PC191122'; $pandora_version = 'v7.0NG.740'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 8fb2a75209..ca6c8e2e7e 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 597049b8c9..3ed85e5610 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.740 -%define release 191121 +%define release 191122 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 5714dcfad8..fefe964f8e 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.740 -%define release 191121 +%define release 191122 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 03a96b1792..7415caaf08 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.740" -PI_BUILD="191121" +PI_BUILD="191122" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 061929e609..5dd4858751 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.740 PS191121"; +my $version = "7.0NG.740 PS191122"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 9ce7ce21a5..a88e007507 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.740 PS191121"; +my $version = "7.0NG.740 PS191122"; # save program name for logging my $progname = basename($0); From 561e73d52401757e5d0790ad9c611a384ac60f8e Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 22 Nov 2019 10:03:53 +0100 Subject: [PATCH 089/123] Updated version and build strings. --- pandora_agents/pc/AIX/pandora_agent.conf | 2 +- pandora_agents/pc/FreeBSD/pandora_agent.conf | 2 +- pandora_agents/pc/HP-UX/pandora_agent.conf | 2 +- pandora_agents/pc/Linux/pandora_agent.conf | 2 +- pandora_agents/pc/NT4/pandora_agent.conf | 2 +- pandora_agents/pc/SunOS/pandora_agent.conf | 2 +- pandora_agents/pc/Win32/pandora_agent.conf | 2 +- pandora_agents/shellscript/aix/pandora_agent.conf | 2 +- pandora_agents/shellscript/bsd-ipso/pandora_agent.conf | 2 +- pandora_agents/shellscript/hp-ux/pandora_agent.conf | 2 +- pandora_agents/shellscript/linux/pandora_agent.conf | 2 +- pandora_agents/shellscript/mac_osx/pandora_agent.conf | 2 +- pandora_agents/shellscript/openWRT/pandora_agent.conf | 2 +- pandora_agents/shellscript/solaris/pandora_agent.conf | 2 +- pandora_agents/unix/AIX/pandora_agent.conf | 2 +- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/Darwin/pandora_agent.conf | 2 +- pandora_agents/unix/FreeBSD/pandora_agent.conf | 2 +- pandora_agents/unix/HP-UX/pandora_agent.conf | 2 +- pandora_agents/unix/Linux/pandora_agent.conf | 2 +- pandora_agents/unix/NT4/pandora_agent.conf | 2 +- pandora_agents/unix/NetBSD/pandora_agent.conf | 2 +- pandora_agents/unix/SunOS/pandora_agent.conf | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 4 ++-- pandora_agents/unix/pandora_agent.spec | 4 ++-- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/bin/pandora_agent.conf | 2 +- pandora_agents/win32/installer/pandora.mpi | 4 ++-- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 4 ++-- pandora_console/pandora_console.rhel7.spec | 4 ++-- pandora_console/pandora_console.spec | 4 ++-- pandora_console/pandora_console_install | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/conf/pandora_server.conf.new | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 4 ++-- pandora_server/pandora_server.spec | 4 ++-- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 50 files changed, 58 insertions(+), 58 deletions(-) diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf index f3657d3a7a..bf26d33be8 100644 --- a/pandora_agents/pc/AIX/pandora_agent.conf +++ b/pandora_agents/pc/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.740, AIX version +# Version 7.0NG.741, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/FreeBSD/pandora_agent.conf b/pandora_agents/pc/FreeBSD/pandora_agent.conf index 95fd1090ad..fffddfa142 100644 --- a/pandora_agents/pc/FreeBSD/pandora_agent.conf +++ b/pandora_agents/pc/FreeBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.740, FreeBSD Version +# Version 7.0NG.741, FreeBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/HP-UX/pandora_agent.conf b/pandora_agents/pc/HP-UX/pandora_agent.conf index 04122feb30..3d22eafb0e 100644 --- a/pandora_agents/pc/HP-UX/pandora_agent.conf +++ b/pandora_agents/pc/HP-UX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.740, HP-UX Version +# Version 7.0NG.741, HP-UX Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/Linux/pandora_agent.conf b/pandora_agents/pc/Linux/pandora_agent.conf index b083e7f3aa..01359f33f5 100644 --- a/pandora_agents/pc/Linux/pandora_agent.conf +++ b/pandora_agents/pc/Linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.740, GNU/Linux +# Version 7.0NG.741, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/NT4/pandora_agent.conf b/pandora_agents/pc/NT4/pandora_agent.conf index 4bb88c5b4e..ab8a35f9f8 100644 --- a/pandora_agents/pc/NT4/pandora_agent.conf +++ b/pandora_agents/pc/NT4/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.740, GNU/Linux +# Version 7.0NG.741, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/SunOS/pandora_agent.conf b/pandora_agents/pc/SunOS/pandora_agent.conf index a90b7227ca..90c1ba02a1 100644 --- a/pandora_agents/pc/SunOS/pandora_agent.conf +++ b/pandora_agents/pc/SunOS/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.740, Solaris Version +# Version 7.0NG.741, Solaris Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/Win32/pandora_agent.conf b/pandora_agents/pc/Win32/pandora_agent.conf index d750898b70..61eab4edeb 100644 --- a/pandora_agents/pc/Win32/pandora_agent.conf +++ b/pandora_agents/pc/Win32/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2010 Artica Soluciones Tecnologicas -# Version 7.0NG.740 +# Version 7.0NG.741 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software diff --git a/pandora_agents/shellscript/aix/pandora_agent.conf b/pandora_agents/shellscript/aix/pandora_agent.conf index 6a663d6331..3409d48740 100644 --- a/pandora_agents/shellscript/aix/pandora_agent.conf +++ b/pandora_agents/shellscript/aix/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.740, AIX version +# Version 7.0NG.741, AIX version # General Parameters # ================== diff --git a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf index 99e4c62462..b8306e30c3 100644 --- a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf +++ b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.740 +# Version 7.0NG.741 # FreeBSD/IPSO version # Licenced under GPL licence, 2003-2007 Sancho Lerena diff --git a/pandora_agents/shellscript/hp-ux/pandora_agent.conf b/pandora_agents/shellscript/hp-ux/pandora_agent.conf index 7a9d2c4347..15d2dab2d4 100644 --- a/pandora_agents/shellscript/hp-ux/pandora_agent.conf +++ b/pandora_agents/shellscript/hp-ux/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.740, HPUX Version +# Version 7.0NG.741, HPUX Version # General Parameters # ================== diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf index a55d96a952..dbe433408f 100644 --- a/pandora_agents/shellscript/linux/pandora_agent.conf +++ b/pandora_agents/shellscript/linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.740 +# Version 7.0NG.741 # Licensed under GPL license v2, # (c) 2003-2010 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/mac_osx/pandora_agent.conf b/pandora_agents/shellscript/mac_osx/pandora_agent.conf index a24a24d16e..4ad2f0d8df 100644 --- a/pandora_agents/shellscript/mac_osx/pandora_agent.conf +++ b/pandora_agents/shellscript/mac_osx/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.740 +# Version 7.0NG.741 # Licensed under GPL license v2, # (c) 2003-2009 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/openWRT/pandora_agent.conf b/pandora_agents/shellscript/openWRT/pandora_agent.conf index 74d515cb4e..594f626617 100644 --- a/pandora_agents/shellscript/openWRT/pandora_agent.conf +++ b/pandora_agents/shellscript/openWRT/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.740 +# Version 7.0NG.741 # Licensed under GPL license v2, # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/solaris/pandora_agent.conf b/pandora_agents/shellscript/solaris/pandora_agent.conf index dc915ef18e..eace98cb90 100644 --- a/pandora_agents/shellscript/solaris/pandora_agent.conf +++ b/pandora_agents/shellscript/solaris/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.740, Solaris version +# Version 7.0NG.741, Solaris version # General Parameters # ================== diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf index de7e97911b..2a02b6133f 100644 --- a/pandora_agents/unix/AIX/pandora_agent.conf +++ b/pandora_agents/unix/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.740, AIX version +# Version 7.0NG.741, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 30bb717737..b87a17fb14 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.740-191122 +Version: 7.0NG.741 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index ac1792f927..80d11ebec7 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.740-191122" +pandora_version="7.0NG.741" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/Darwin/pandora_agent.conf b/pandora_agents/unix/Darwin/pandora_agent.conf index 34dd1bf4fc..adf05bac05 100644 --- a/pandora_agents/unix/Darwin/pandora_agent.conf +++ b/pandora_agents/unix/Darwin/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.740, GNU/Linux +# Version 7.0NG.741, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2012 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/FreeBSD/pandora_agent.conf b/pandora_agents/unix/FreeBSD/pandora_agent.conf index e4ad74ffe7..e5e3a2cc1b 100644 --- a/pandora_agents/unix/FreeBSD/pandora_agent.conf +++ b/pandora_agents/unix/FreeBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.740, FreeBSD Version +# Version 7.0NG.741, FreeBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2016 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/HP-UX/pandora_agent.conf b/pandora_agents/unix/HP-UX/pandora_agent.conf index e55445fe13..409f06034b 100644 --- a/pandora_agents/unix/HP-UX/pandora_agent.conf +++ b/pandora_agents/unix/HP-UX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.740, HP-UX Version +# Version 7.0NG.741, HP-UX Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf index 54ace6a811..6340281c06 100644 --- a/pandora_agents/unix/Linux/pandora_agent.conf +++ b/pandora_agents/unix/Linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.740, GNU/Linux +# Version 7.0NG.741, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2014 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/NT4/pandora_agent.conf b/pandora_agents/unix/NT4/pandora_agent.conf index 94e32e8056..c27a3f2da2 100644 --- a/pandora_agents/unix/NT4/pandora_agent.conf +++ b/pandora_agents/unix/NT4/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.740, GNU/Linux +# Version 7.0NG.741, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/NetBSD/pandora_agent.conf b/pandora_agents/unix/NetBSD/pandora_agent.conf index 71e7d14192..ab0ca2ad46 100644 --- a/pandora_agents/unix/NetBSD/pandora_agent.conf +++ b/pandora_agents/unix/NetBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.740, NetBSD Version +# Version 7.0NG.741, NetBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/SunOS/pandora_agent.conf b/pandora_agents/unix/SunOS/pandora_agent.conf index cc89dee501..4b6654b6ef 100644 --- a/pandora_agents/unix/SunOS/pandora_agent.conf +++ b/pandora_agents/unix/SunOS/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.740, Solaris Version +# Version 7.0NG.741, Solaris Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 3296156e53..21e85f888c 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -54,7 +54,7 @@ my $Sem = undef; # Semaphore used to control the number of threads my $ThreadSem = undef; -use constant AGENT_VERSION => '7.0NG.740'; +use constant AGENT_VERSION => '7.0NG.741'; use constant AGENT_BUILD => '191122'; # Agent log default file size maximum and instances diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index eebd281636..76d1c8f828 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -2,8 +2,8 @@ #Pandora FMS Linux Agent # %define name pandorafms_agent_unix -%define version 7.0NG.740 -%define release 191122 +%define version 7.0NG.741 +%define release 1 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 51ca3872f1..f3ec603d95 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -2,8 +2,8 @@ #Pandora FMS Linux Agent # %define name pandorafms_agent_unix -%define version 7.0NG.740 -%define release 191122 +%define version 7.0NG.741 +%define release 1 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index d0d49023a3..3563200937 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -9,7 +9,7 @@ # Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license. # ********************************************************************** -PI_VERSION="7.0NG.740" +PI_VERSION="7.0NG.741" PI_BUILD="191122" OS_NAME=`uname -s` diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index 79660e5b5d..8b51fc94f1 100644 --- a/pandora_agents/win32/bin/pandora_agent.conf +++ b/pandora_agents/win32/bin/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2017 Artica Soluciones Tecnologicas -# Version 7.0NG.740 +# Version 7.0NG.741 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 2fc3287a56..c69f34ab63 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -3,7 +3,7 @@ AllowLanguageSelection {Yes} AppName -{Pandora FMS Windows Agent v7.0NG.740} +{Pandora FMS Windows Agent v7.0NG.741} ApplicationID {17E3D2CF-CA02-406B-8A80-9D31C17BD08F} @@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives {No} Windows,Executable -{<%AppName%>-<%Version%>-Setup<%Ext%>} +{<%AppName%>-Setup<%Ext%>} Windows,FileDescription {<%AppName%> <%Version%> Setup} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 289598ecf3..9553546fc7 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.740(Build 191122)") +#define PANDORA_VERSION ("7.0NG.741(Build 191122)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 5056749b6c..1dec86fe84 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.740(Build 191122))" + VALUE "ProductVersion", "(7.0NG.741(Build 191122))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 9fcbbebf3d..a2c7e362e4 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.740-191122 +Version: 7.0NG.741 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 32acc651b2..0df64d8d55 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.740-191122" +pandora_version="7.0NG.741" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 21b647c827..6332a29284 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -21,7 +21,7 @@ * Pandora build version and version */ $build_version = 'PC191122'; -$pandora_version = 'v7.0NG.740'; +$pandora_version = 'v7.0NG.741'; // Do not overwrite default timezone set if defined. $script_tz = @date_default_timezone_get(); diff --git a/pandora_console/install.php b/pandora_console/install.php index ca6c8e2e7e..81338cc8e8 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -128,7 +128,7 @@
    Date: Fri, 22 Nov 2019 10:24:12 +0100 Subject: [PATCH 090/123] WIP alert correlations --- pandora_console/include/styles/alert.css | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_console/include/styles/alert.css b/pandora_console/include/styles/alert.css index 280ed1decc..5a01300dfa 100644 --- a/pandora_console/include/styles/alert.css +++ b/pandora_console/include/styles/alert.css @@ -2,6 +2,7 @@ li#li-buttons-alert-list > div { margin-left: 10px; } +li#li-filters_show_action_alerts > label, li#li-buttons-alert-list > label, li#li-filters-alert-list > label { width: initial; From de3f8b2a0fab85e6c44385bb323845ec0d701019 Mon Sep 17 00:00:00 2001 From: marcos Date: Fri, 22 Nov 2019 10:56:30 +0100 Subject: [PATCH 091/123] updates --- pandora_console/extras/mr/33.sql | 2 +- pandora_console/include/functions_events.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pandora_console/extras/mr/33.sql b/pandora_console/extras/mr/33.sql index 0d8eda13c6..cb3669979b 100644 --- a/pandora_console/extras/mr/33.sql +++ b/pandora_console/extras/mr/33.sql @@ -17,7 +17,7 @@ INSERT INTO `tnetwork_component` (`name`, `description`, `id_group`, `type`, `ma INSERT INTO `tnetwork_component` (`name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES ('Linux available disk /','Available free space in mountpoint /',43,34,0,0,300,0,'df / | tail -n +2 | awk '{print $(NF-1)}' | tr -d '%'','','','',4,2,0,'','','',0,0,1,0.00,0.00,'0.00',0.00,0.00,'',0,'','inherited','',0,0,0.000000000000000,'','nowizard','','nowizard','0','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0); INSERT INTO `tconfig`(`token`, `value`) VALUES ('welcome_state', -1); -ALTER TABLE `tevent_filter` ADD COLUMN `id_source_event` int(10); +ALTER TABLE tevent_filter ADD COLUMN id_source_event int(10); COMMIT; diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 4c68ff4306..9a3ccacdff 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -37,7 +37,7 @@ enterprise_include_once('meta/include/functions_agents_meta.php'); enterprise_include_once('meta/include/functions_modules_meta.php'); if (is_metaconsole()) { $id_source_event = get_parameter('id_source_event'); -enterprise_include_once('meta/include/functions_events_meta.php'); +} /** @@ -174,7 +174,6 @@ function events_translate_event_criticity($criticity) default: return __('UNKNOWN'); } ->>>>>>> pandora_console/include/functions_events.php } From 35abd1249959b8944960ad3d4d6a3d00df9a706a Mon Sep 17 00:00:00 2001 From: Daniel Barbero Date: Fri, 22 Nov 2019 11:06:55 +0100 Subject: [PATCH 092/123] WIP alert correlations --- pandora_console/extras/mr/33.sql | 3 +++ pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 3 +++ pandora_console/pandoradb.sql | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pandora_console/extras/mr/33.sql b/pandora_console/extras/mr/33.sql index 954fa89a08..afa7a2bb95 100644 --- a/pandora_console/extras/mr/33.sql +++ b/pandora_console/extras/mr/33.sql @@ -29,6 +29,9 @@ ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_content` text COMMENT 'Operat ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_source` text COMMENT 'Operator for log_source'; ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_agent` text COMMENT 'Operator for log_agent'; +ALTER TABLE `tevent_alert` ADD COLUMN `special_days` tinyint(1) default 0; +ALTER TABLE `tevent_alert` MODIFY COLUMN `time_threshold` int(10) NOT NULL default 86400; + 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 388a008b45..6f6f82e866 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 @@ -630,6 +630,9 @@ CREATE TABLE IF NOT EXISTS `tevent_alert` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +ALTER TABLE `tevent_alert` ADD COLUMN `special_days` tinyint(1) default 0; +ALTER TABLE `tevent_alert` MODIFY COLUMN `time_threshold` int(10) NOT NULL default 86400; + -- ----------------------------------------------------- -- Table `tevent_alert_action` -- ----------------------------------------------------- diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 500eeed86f..852244b562 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -2821,7 +2821,7 @@ CREATE TABLE IF NOT EXISTS `tevent_alert` ( `field8` text NOT NULL default '', `field9` text NOT NULL default '', `field10` text NOT NULL default '', - `time_threshold` int(10) NOT NULL default '0', + `time_threshold` int(10) NOT NULL default 86400, `max_alerts` int(4) unsigned NOT NULL default '1', `min_alerts` int(4) unsigned NOT NULL default '0', `time_from` time default '00:00:00', @@ -2846,6 +2846,7 @@ CREATE TABLE IF NOT EXISTS `tevent_alert` ( `priority` tinyint(4) default '0', `force_execution` tinyint(1) default '0', `group_by` enum ('','id_agente','id_agentmodule','id_alert_am','id_grupo') default '', + `special_days` tinyint(1) default 0, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; From fd12c5a009d764dfbea2c4dd3f3d69ab861e2dd3 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 22 Nov 2019 11:57:20 +0100 Subject: [PATCH 093/123] DB update, default values for Alert correlation --- pandora_console/extras/mr/33.sql | 4 +++- pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 3 ++- pandora_console/pandoradb.sql | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pandora_console/extras/mr/33.sql b/pandora_console/extras/mr/33.sql index afa7a2bb95..90cf099656 100644 --- a/pandora_console/extras/mr/33.sql +++ b/pandora_console/extras/mr/33.sql @@ -9,7 +9,9 @@ INSERT INTO `ttipo_modulo` VALUES (37,'remote_cmd_inc', 10, 'Remote execution, incremental data', 'mod_remote_cmd_inc.png'); ALTER TABLE `tevent_rule` MODIFY COLUMN `event_type` enum('','unknown','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_down_normal','going_down_critical','going_up_normal') default ''; -ALTER TABLE `tevent_rule` MODIFY COLUMN `criticity` int(4) unsigned NOT NULL default '99'; +ALTER TABLE `tevent_rule` MODIFY COLUMN `criticity` int(4) unsigned DEFAULT NULL; +ALTER TABLE `tevent_rule` MODIFY COLUMN `id_grupo` mediumint(4) DEFAULT NULL, + ALTER TABLE `tevent_rule` ADD COLUMN `log_content` TEXT; ALTER TABLE `tevent_rule` ADD COLUMN `log_source` TEXT; 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 6f6f82e866..d30f95ba49 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 @@ -581,7 +581,8 @@ ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_content` text COMMENT 'Operat ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_source` text COMMENT 'Operator for log_source'; ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_agent` text COMMENT 'Operator for log_agent'; ALTER TABLE `tevent_rule` MODIFY COLUMN `event_type` enum('','unknown','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_down_normal','going_down_critical','going_up_normal') default ''; -ALTER TABLE `tevent_rule` MODIFY COLUMN `criticity` int(4) unsigned NOT NULL default '99'; +ALTER TABLE `tevent_rule` MODIFY COLUMN `criticity` int(4) unsigned DEFAULT NULL; +ALTER TABLE `tevent_rule` MODIFY COLUMN `id_grupo` mediumint(4) DEFAULT NULL, -- ----------------------------------------------------- -- Table `tevent_alert` diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 852244b562..629276f352 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -2772,12 +2772,12 @@ CREATE TABLE IF NOT EXISTS `tevent_rule` ( `count` int(4) NOT NULL default '1', `agent` text default '', `id_usuario` varchar(100) NOT NULL default '', - `id_grupo` mediumint(4) NOT NULL default '0', + `id_grupo` mediumint(4) default NULL, `evento` text NOT NULL default '', `event_type` enum('','unknown','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_down_normal','going_down_critical','going_up_normal') default '', `module` text default '', `alert` text default '', - `criticity` int(4) unsigned NOT NULL default '99', + `criticity` int(4) unsigned default NULL, `user_comment` text NOT NULL, `id_tag` integer(10) unsigned NOT NULL default '0', `name` text default '', From 1565fee3f46b235aac9baea6a7516f36015bdac0 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 22 Nov 2019 11:59:24 +0100 Subject: [PATCH 094/123] minor fix, errata --- pandora_console/extras/mr/33.sql | 2 +- pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/extras/mr/33.sql b/pandora_console/extras/mr/33.sql index 90cf099656..ebbdf549ac 100644 --- a/pandora_console/extras/mr/33.sql +++ b/pandora_console/extras/mr/33.sql @@ -10,7 +10,7 @@ INSERT INTO `ttipo_modulo` VALUES ALTER TABLE `tevent_rule` MODIFY COLUMN `event_type` enum('','unknown','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_down_normal','going_down_critical','going_up_normal') default ''; ALTER TABLE `tevent_rule` MODIFY COLUMN `criticity` int(4) unsigned DEFAULT NULL; -ALTER TABLE `tevent_rule` MODIFY COLUMN `id_grupo` mediumint(4) DEFAULT NULL, +ALTER TABLE `tevent_rule` MODIFY COLUMN `id_grupo` mediumint(4) DEFAULT NULL; ALTER TABLE `tevent_rule` ADD COLUMN `log_content` TEXT; 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 d30f95ba49..1b5db78cd3 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 @@ -582,7 +582,7 @@ ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_source` text COMMENT 'Operato ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_agent` text COMMENT 'Operator for log_agent'; ALTER TABLE `tevent_rule` MODIFY COLUMN `event_type` enum('','unknown','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_down_normal','going_down_critical','going_up_normal') default ''; ALTER TABLE `tevent_rule` MODIFY COLUMN `criticity` int(4) unsigned DEFAULT NULL; -ALTER TABLE `tevent_rule` MODIFY COLUMN `id_grupo` mediumint(4) DEFAULT NULL, +ALTER TABLE `tevent_rule` MODIFY COLUMN `id_grupo` mediumint(4) DEFAULT NULL; -- ----------------------------------------------------- -- Table `tevent_alert` From 5b5895a6443acadda40f7ac2380f93ee8a5ae366 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 22 Nov 2019 13:30:25 +0100 Subject: [PATCH 095/123] minor fix --- pandora_console/include/functions_agents.php | 23 ++++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index e85798cfde..e15a0a0f97 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -3542,17 +3542,22 @@ function agents_get_sap_agents($id_agent) $array_agents = []; foreach ($sap_modules as $module => $key) { + $new_ones = db_get_all_rows_sql( + 'SELECT ta.id_agente,ta.alias + FROM tagente ta + INNER JOIN tagente_modulo tam + ON tam.id_agente = ta.id_agente + WHERE tam.nombre + LIKE "%SAP%" + GROUP BY ta.id_agente' + ); + if ($new_ones === false) { + continue; + } + $array_agents = array_merge( $array_agents, - db_get_all_rows_sql( - 'SELECT ta.id_agente,ta.alias - FROM tagente ta - INNER JOIN tagente_modulo tam - ON tam.id_agente = ta.id_agente - WHERE tam.nombre - LIKE "%SAP%" - GROUP BY ta.id_agente' - ) + $new_ones ); } From 21bf49c218f0be9dfaa379916c632bf5c7466925 Mon Sep 17 00:00:00 2001 From: marcos Date: Fri, 22 Nov 2019 13:38:08 +0100 Subject: [PATCH 096/123] update id_source_event --- pandora_console/extras/mr/33.sql | 3 ++- .../pandoradb_migrate_6.0_to_7.0.mysql.sql | 2 +- .../godmode/events/event_edit_filter.php | 12 ++++++++++++ pandora_console/include/ajax/events.php | 14 ++++++++++---- pandora_console/include/functions_events.php | 10 ++++++++++ .../operation/events/events.build_query.php | 13 +++++++------ pandora_console/operation/events/events.php | 19 +++++++++++++++++++ .../operation/events/events_list.php | 15 +++++---------- pandora_console/pandoradb.sql | 2 +- 9 files changed, 67 insertions(+), 23 deletions(-) diff --git a/pandora_console/extras/mr/33.sql b/pandora_console/extras/mr/33.sql index 9c343d2cdb..1d912a96b2 100644 --- a/pandora_console/extras/mr/33.sql +++ b/pandora_console/extras/mr/33.sql @@ -47,9 +47,10 @@ CREATE TABLE `tremote_command_target` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `tconfig`(`token`, `value`) VALUES ('welcome_state', -1); -ALTER TABLE tevent_filter ADD COLUMN id_source_event int(10); ALTER TABLE `tcredential_store` MODIFY COLUMN `product` enum('CUSTOM', 'AWS', 'AZURE', 'GOOGLE', 'SAP') default 'CUSTOM'; +ALTER TABLE `tevent_filter` ADD COLUMN `id_source_event` int(10); + COMMIT; 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 3e4c754aac..92e4289ab3 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 @@ -1358,7 +1358,7 @@ ALTER TABLE tevent_filter ADD COLUMN `date_to` date DEFAULT NULL; ALTER TABLE tevent_filter ADD COLUMN `user_comment` text NOT NULL; ALTER TABLE tevent_filter ADD COLUMN `source` tinytext NOT NULL; ALTER TABLE tevent_filter ADD COLUMN `id_extra` tinytext NOT NULL; -ALTER TABLE tevent_filter ADD COLUMN id_source_event int(10); +ALTER TABLE tevent_filter ADD COLUMN `id_source_event` int(10); ALTER TABLE `tevent_filter` MODIFY COLUMN `user_comment` text NOT NULL; -- --------------------------------------------------------------------- diff --git a/pandora_console/godmode/events/event_edit_filter.php b/pandora_console/godmode/events/event_edit_filter.php index e66e1d30b4..41068372d4 100644 --- a/pandora_console/godmode/events/event_edit_filter.php +++ b/pandora_console/godmode/events/event_edit_filter.php @@ -588,6 +588,18 @@ $table->data[23][1] = html_print_input_text('id_extra', $id_extra, '', 11, 255, $table->data[24][0] = ''.__('Comment').''; $table->data[24][1] = html_print_input_text('user_comment', $user_comment, '', 35, 255, true); +if (is_metaconsole()) { + $table->data[25][0] = ''.__('Id souce event').''; + $table->data[25][1] = html_print_input_text( + 'id_source_event', + $id_source_event, + '', + 35, + 255, + true + ); +} + echo '
    '; html_print_table($table); diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index ad9d59a748..af3388ffbf 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -84,7 +84,7 @@ $delete_event = get_parameter('delete_event', 0); $get_event_filters = get_parameter('get_event_filters', 0); $get_comments = get_parameter('get_comments', 0); $get_events_fired = (bool) get_parameter('get_events_fired'); - +$get_id_source_event = get_parameter('get_id_source_event'); if ($get_comments) { $event = get_parameter('event', false); $filter = get_parameter('filter', false); @@ -253,7 +253,7 @@ if ($save_event_filter) { $values['source'] = get_parameter('source'); $values['id_extra'] = get_parameter('id_extra'); $values['user_comment'] = get_parameter('user_comment'); - + $values['id_source_event'] = get_parameter('id_source_event'); $exists = (bool) db_get_value_filter( 'id_filter', 'tevent_filter', @@ -300,6 +300,7 @@ if ($update_event_filter) { $values['source'] = get_parameter('source'); $values['id_extra'] = get_parameter('id_extra'); $values['user_comment'] = get_parameter('user_comment'); + $values['id_source_event'] = get_parameter('id_source_event'); if (io_safe_output($values['tag_with']) == '["0"]') { $values['tag_with'] = '[]'; @@ -465,6 +466,8 @@ function load_form_filter() { $("#text-id_extra").val(val); if (i == 'user_comment') $("#text-user_comment").val(val); + if (i == 'id_source_event') + $("#text-id_source_event").val(val); }); reorder_tags_inputs(); // Update the info with the loaded filter @@ -685,7 +688,8 @@ function save_new_filter() { "date_to": $("#text-date_to").val(), "source": $("#text-source").val(), "id_extra": $("#text-id_extra").val(), - "user_comment": $("#text-user_comment").val() + "user_comment": $("#text-user_comment").val(), + "id_source_event": $("#text-id_source_event").val() }, function (data) { $("#info_box").hide(); @@ -754,7 +758,9 @@ function save_update_filter() { "date_to": $("#text-date_to").val(), "source": $("#text-source").val(), "id_extra": $("#text-id_extra").val(), - "user_comment": $("#text-user_comment").val() + "user_comment": $("#text-user_comment").val(), + "id_source_event": $("#text-id_source_event").val() + }, function (data) { $(".info_box").hide(); diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index fab79f95cb..78770840f1 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -928,6 +928,16 @@ function events_get_all( ); } + if (is_metaconsole()) { + // Id source event. + if (!empty($filter['id_source_event'])) { + $sql_filters[] = sprintf( + ' AND lower(te.id_source_event) like lower("%%%s%%") ', + $filter['id_source_event'] + ); + } + } + // User comment. if (!empty($filter['user_comment'])) { $sql_filters[] = sprintf( diff --git a/pandora_console/operation/events/events.build_query.php b/pandora_console/operation/events/events.build_query.php index da7451ff4c..b1b4051e7f 100755 --- a/pandora_console/operation/events/events.build_query.php +++ b/pandora_console/operation/events/events.build_query.php @@ -50,12 +50,6 @@ if (!isset($date_to)) { $date_to = ''; } -if ($id_source_event != 0 || $id_source_event != '') { - $filter_resume['id_source_event'] = $id_source_event; -} else { - $id_source_event = ''; -} - if (($date_from === '') && ($date_to === '')) { if ($event_view_hr > 0) { $filter_resume['hours_max'] = $event_view_hr; @@ -237,6 +231,13 @@ if ($source != '') { $sql_post .= " AND source LIKE '%$source%'"; } +if (is_metaconsole()) { + if ($id_source_event != '') { + $sql_post .= " AND id_source_event LIKE '%$id_source_event%'"; + } +} + + // In metaconsole mode the agent search is performed by name. if ($meta) { $text_agent = get_parameter('text_agent', ''); diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 527cef8ec5..ea72a6d914 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -197,6 +197,10 @@ $history = get_parameter( ); $section = get_parameter('section', false); +$id_source_event = get_parameter( + 'filter[id_source_event]', + $filter['id_source_event'] +); // Ajax responses. if (is_ajax()) { $get_events = get_parameter('get_events', 0); @@ -396,6 +400,7 @@ if ($user_filter !== false) { $source = $filter['source']; $id_extra = $filter['id_extra']; $user_comment = $filter['user_comment']; + $id_source_event = $filter['id_source_event']; } } @@ -1051,6 +1056,20 @@ $in = '
    '; $in .= $data.'
    '; $adv_inputs[] = $in; +if (is_metaconsole()) { + $data = html_print_input_text( + 'id_source_event', + $id_source_event, + '', + 5, + 255, + true + ); + $in = '
    '; + $in .= $data.'
    '; + $adv_inputs[] = $in; +} + // Gap. $adv_inputs[] = '
    '; diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index 13015fabdf..ae39dabf3b 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -258,11 +258,6 @@ if ($user_filter != 0 && empty($id_name) && !$update_from_filter_table) { $id_extra = $user_default_filter['id_extra']; $user_comment = $user_default_filter['user_comment']; $source = $user_default_filter['source']; - $id_source_event = $user_default_filter['id_source_event']; - - if (is_metaconsole()) { - $id_source_event = $user_default_filter['id_source_event']; - } if ($user_default_filter['search'] != '') { $search = $user_default_filter['search']; @@ -1143,7 +1138,7 @@ if ($group_rep == 0) { $sql = "SELECT DISTINCT te.*, 1 event_rep, (SELECT nombre FROM tagente_modulo WHERE id_agente_modulo = te.id_agentmodule) AS module_name FROM $event_table te $event_lj - WHERE 1=1 ".$sql_post." + WHERE 1=1 '.$sql_post.' $order_sql LIMIT ".$offset.','.$pagination; // Extract the events by filter (or not) from db. @@ -1216,10 +1211,10 @@ if (($config['dbtype'] == 'oracle') && ($result !== false)) { } if ($group_rep == 0) { - $sql = "SELECT COUNT(DISTINCT id_evento) + $sql = 'SELECT COUNT(DISTINCT id_evento) FROM $event_table te $event_lj - WHERE 1=1 $sql_post"; + WHERE 1=1 $sql_post'; $total_events = (int) db_get_sql($sql); } else if ($group_rep == 1) { $total_events = events_get_events_grouped( @@ -1232,10 +1227,10 @@ if ($group_rep == 0) { false ); } else if ($group_rep == 2) { - $sql = "SELECT COUNT(*) FROM (select id_agente as total from $event_table te + $sql = 'SELECT COUNT(*) FROM (select id_agente as total from $event_table te $event_lj WHERE id_agente > 0 - $sql_post GROUP BY id_agente ORDER BY id_agente ) AS t"; + $sql_post GROUP BY id_agente ORDER BY id_agente ) AS t'; $total_events = (int) db_get_sql($sql); } diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index c4854443f3..8c07369228 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1116,7 +1116,7 @@ CREATE TABLE IF NOT EXISTS `tevent_filter` ( `source` tinytext NOT NULL, `id_extra` tinytext NOT NULL, `user_comment` text NOT NULL, - `id_source_event` int(10) default NULL, + `id_source_event` int(10) NULL default 0, PRIMARY KEY (`id_filter`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; From 337e3357db7a339260b78608436da4e1e7ebbade Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Fri, 22 Nov 2019 13:59:22 +0100 Subject: [PATCH 097/123] Non-intensive modules do not need to check a timestamp. Ref pandora_enterprise#4660. --- .../win32/modules/pandora_module.cc | 14 ++++++ pandora_agents/win32/modules/pandora_module.h | 1 + .../win32/pandora_windows_service.cc | 46 +++++++++++-------- 3 files changed, 41 insertions(+), 20 deletions(-) diff --git a/pandora_agents/win32/modules/pandora_module.cc b/pandora_agents/win32/modules/pandora_module.cc index 7cbde21ca7..59e8af0a5b 100644 --- a/pandora_agents/win32/modules/pandora_module.cc +++ b/pandora_agents/win32/modules/pandora_module.cc @@ -1708,3 +1708,17 @@ void Pandora_Module::setExecutions (long executions) { this->executions = executions; } + +/** + * Checks if the module has intensive conditions. + * + * @return true if the module's intensive condition list is not empty, false if it is. + */ +bool +Pandora_Module::isIntensive () { + if (this->intensive_condition_list == NULL || this->intensive_condition_list->size () <= 0) { + return false; + } + + return true; +} diff --git a/pandora_agents/win32/modules/pandora_module.h b/pandora_agents/win32/modules/pandora_module.h index 3b9d6c15a4..f38cac5f80 100644 --- a/pandora_agents/win32/modules/pandora_module.h +++ b/pandora_agents/win32/modules/pandora_module.h @@ -303,6 +303,7 @@ namespace Pandora_Modules { time_t getTimestamp (); void setIntensiveMatch (unsigned char intensive_match); unsigned char getIntensiveMatch (); + bool isIntensive (); }; } diff --git a/pandora_agents/win32/pandora_windows_service.cc b/pandora_agents/win32/pandora_windows_service.cc index b62fc1f70d..73d0a5d482 100644 --- a/pandora_agents/win32/pandora_windows_service.cc +++ b/pandora_agents/win32/pandora_windows_service.cc @@ -1918,16 +1918,19 @@ Pandora_Windows_Service::pandora_run_broker (string config, long executions) { } /* Evaluate intensive conditions */ - intensive_match = module->evaluateIntensiveConditions (); - if (intensive_match == module->getIntensiveMatch () && module->getTimestamp () + module->getInterval () * this->interval_sec > this->run_time) { - module->setNoOutput (); - this->broker_modules->goNext (); - continue; - } - module->setIntensiveMatch (intensive_match); - - if (module->getTimestamp () + module->getInterval () * this->interval_sec <= this->run_time) { - module->setTimestamp (this->run_time); + if (module->isIntensive()) { + intensive_match = module->evaluateIntensiveConditions (); + if (intensive_match == module->getIntensiveMatch () && module->getTimestamp () + module->getInterval () * this->interval_sec > this->run_time) { + module->setNoOutput (); + this->broker_modules->goNext (); + continue; + } + + if (module->getTimestamp () + module->getInterval () * this->interval_sec <= this->run_time) { + module->setTimestamp (this->run_time); + } + + module->setIntensiveMatch (intensive_match); } /* Evaluate module conditions */ @@ -2038,16 +2041,19 @@ Pandora_Windows_Service::pandora_run (int forced_run) { } /* Evaluate intensive conditions */ - intensive_match = module->evaluateIntensiveConditions (); - if (forced_run != 1 && intensive_match == module->getIntensiveMatch () && module->getTimestamp () + module->getInterval () * this->interval_sec > this->run_time) { - module->setNoOutput (); - this->modules->goNext (); - continue; - } - module->setIntensiveMatch (intensive_match); - - if (module->getTimestamp () + module->getInterval () * this->interval_sec <= this->run_time) { - module->setTimestamp (this->run_time); + if (module->isIntensive()) { + intensive_match = module->evaluateIntensiveConditions (); + if (forced_run != 1 && intensive_match == module->getIntensiveMatch () && module->getTimestamp () + module->getInterval () * this->interval_sec > this->run_time) { + module->setNoOutput (); + this->modules->goNext (); + continue; + } + + if (module->getTimestamp () + module->getInterval () * this->interval_sec <= this->run_time) { + module->setTimestamp (this->run_time); + } + + module->setIntensiveMatch (intensive_match); } /* Evaluate module conditions */ From e8812cba953017dd4988360b018b660c3b0dac06 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Date: Fri, 22 Nov 2019 14:50:23 +0100 Subject: [PATCH 098/123] add img --- pandora_console/images/sortable.png | Bin 0 -> 344 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 pandora_console/images/sortable.png diff --git a/pandora_console/images/sortable.png b/pandora_console/images/sortable.png new file mode 100644 index 0000000000000000000000000000000000000000..9b6f09ec346f84234dfa16276d6a280a39470d81 GIT binary patch literal 344 zcmV-e0jK_nP)P0015c1^@s6+3dC30000PbVXQnQ*UN; zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBUy`bk7VRCwBAU>Gidkrc%yCME(v$^eKj zoH=vm163>m8ma)K9DrCKN*f?aKLFwbKztBt=>?)J0UBxmHOwArpaK>{9|EyFR36#V z4``MiK(Pd9_u0?@n( zFiZYpsb(*NXnb`ymbQRB%y8t?#YjYh;RBkb2hiFA=+!oI0|TV~0V4tL8Xy^j3tT`m q^aI)LE~L6!AK6!<$(rf_Aix0DHe Date: Fri, 22 Nov 2019 15:26:30 +0100 Subject: [PATCH 099/123] fixed errors Alert correlation --- pandora_console/include/styles/alert.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pandora_console/include/styles/alert.css b/pandora_console/include/styles/alert.css index 5a01300dfa..14dc0c946d 100644 --- a/pandora_console/include/styles/alert.css +++ b/pandora_console/include/styles/alert.css @@ -160,3 +160,16 @@ div.target { .info-container table.no-class tbody tr td { padding: 10px; } + +.mode_table_firing { + margin-top: 20px; +} + +.mode_table_firing table.info_table thead tr th { + font-weight: bolder; +} + +.mode_table_firing table.info_table thead tr th img { + padding: 10px; + vertical-align: middle; +} From 8001ba0d4140c687645ffe0e662fa95189574e04 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 22 Nov 2019 15:37:32 +0100 Subject: [PATCH 100/123] minor fix --- pandora_console/include/styles/pandora.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 1ecd197ece..866958796c 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -4989,6 +4989,7 @@ input:checked + .p-slider:before { .action_buttons a, .action_buttons input[type="image"] { margin-right: 5px; + display: inline-block; } .action_buttons a:last-child, @@ -4998,7 +4999,6 @@ input:checked + .p-slider:before { .action_buttons a:hover { background-color: #fff; - display: inline-block; border-radius: 4px; } From 4e2bd7ed55b18da8606842c72d3ff8fe244f0bbf Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 22 Nov 2019 20:49:46 +0100 Subject: [PATCH 101/123] minor fixes --- pandora_console/include/functions_html.php | 72 ++++++++++++++++------ pandora_server/lib/PandoraFMS/Core.pm | 2 +- 2 files changed, 53 insertions(+), 21 deletions(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index c66924d27a..9bf4ae2be3 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -2480,19 +2480,27 @@ function html_print_radio_button($name, $value, $label='', $checkedvalue='', $re /** * Render a checkbox button input. Extended version, use html_print_checkbox() to simplify. * - * @param string Input name. - * @param string Input value. - * @param string Set the button to be marked (optional, unmarked by default). - * @param bool Disable the button (optional, button enabled by default). - * @param string Script to execute when onClick event is triggered (optional). - * @param string Optional HTML attributes. It's a free string which will be - inserted into the HTML tag, use it carefully (optional). - * @param bool Whether to return an output string or echo now (optional, echo by default). + * @param string $name Input name. + * @param string $value Input value. + * @param string $checked Set the button to be marked (optional, unmarked by default). + * @param boolean $disabled Disable the button (optional, button enabled by default). + * @param string $script Script to execute when onClick event is triggered (optional). + * @param string $attributes Optional HTML attributes. It's a free string which will be inserted into the HTML tag, use it carefully (optional). + * @param boolean $return Whether to return an output string or echo now (optional, echo by default). + * @param string $id Custom id. * * @return string HTML code if return parameter is true. */ -function html_print_checkbox_extended($name, $value, $checked, $disabled, $script, $attributes, $return=false, $id='') -{ +function html_print_checkbox_extended( + $name, + $value, + $checked, + $disabled, + $script, + $attributes, + $return=false, + $id='' +) { static $idcounter = []; // If duplicate names exist, it will start numbering. Otherwise it won't @@ -2508,7 +2516,7 @@ function html_print_checkbox_extended($name, $value, $checked, $disabled, $scrip if ($id == '') { $output .= ' id="checkbox-'.$id_aux.'"'; } else { - $output .= ' '.$id.'"'; + $output .= ' id="'.$id.'"'; } if ($script != '') { @@ -2534,17 +2542,39 @@ function html_print_checkbox_extended($name, $value, $checked, $disabled, $scrip /** * Render a checkbox button input. * - * @param string Input name. - * @param string Input value. - * @param string Set the button to be marked (optional, unmarked by default). - * @param bool Whether to return an output string or echo now (optional, echo by default). - * @param boolean $disabled Disable the button (optional, button enabled by default). + * @param string $name Input name. + * @param string $value Input value. + * @param string $checked Set the button to be marked (optional, unmarked by default). + * @param boolean $return Whether to return an output string or echo now (optional, echo by default). + * @param boolean $disabled Disable the button (optional, button enabled by default). + * @param string $script Script. + * @param string $disabled_hidden Disabled_hidden. + * @param string $attributes Extra attributes. + * @param string $id Custom ID. * * @return string HTML code if return parameter is true. */ -function html_print_checkbox($name, $value, $checked=false, $return=false, $disabled=false, $script='', $disabled_hidden=false) -{ - $output = html_print_checkbox_extended($name, $value, (bool) $checked, $disabled, $script, '', true); +function html_print_checkbox( + $name, + $value, + $checked=false, + $return=false, + $disabled=false, + $script='', + $disabled_hidden=false, + $attributes='', + $id='' +) { + $output = html_print_checkbox_extended( + $name, + $value, + (bool) $checked, + $disabled, + $script, + $attributes, + true, + $id + ); if (!$disabled_hidden) { $output .= html_print_input_hidden($name.'_sent', 1, true); } @@ -3535,7 +3565,9 @@ function html_print_input($data, $wrapper='div', $input_only=false) ((isset($data['return']) === true) ? $data['return'] : false), ((isset($data['disabled']) === true) ? $data['disabled'] : false), ((isset($data['script']) === true) ? $data['script'] : ''), - ((isset($data['disabled_hidden']) === true) ? $data['disabled_hidden'] : false) + ((isset($data['disabled_hidden']) === true) ? $data['disabled_hidden'] : false), + ((isset($data['attributes']) === true) ? $data['attributes'] : ''), + ((isset($data['id']) === true) ? $data['id'] : '') ); break; diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 48a6cbe4d9..ee005b0622 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -1215,7 +1215,7 @@ sub pandora_execute_action ($$$$$$$$$;$) { my $cid_data = "CID_IMAGE"; my $dataname = "CID_IMAGE.png"; - if ($data =~ /^data:image\/png;base64, /) { + if (defined($data) && $data =~ /^data:image\/png;base64, /) { # macro _data_ substitution in case is image. $attach_data_as_image = 1; my $_cid = ''; From 09e66156115d6dd12020b4b8820bcf7776d55dd0 Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 23 Nov 2019 00:01:09 +0100 Subject: [PATCH 102/123] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 4 ++-- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 26 insertions(+), 26 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index b87a17fb14..df8b2ebfaa 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.741 +Version: 7.0NG.741-191123 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 80d11ebec7..cdfc1fa1f4 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.741" +pandora_version="7.0NG.741-191123" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 21e85f888c..1576d2c4a1 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.741'; -use constant AGENT_BUILD => '191122'; +use constant AGENT_BUILD => '191123'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 76d1c8f828..99266db31d 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.741 -%define release 1 +%define release 191123 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index f3ec603d95..5a158e2de9 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.741 -%define release 1 +%define release 191123 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 3563200937..d3d3d068b9 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.741" -PI_BUILD="191122" +PI_BUILD="191123" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index c69f34ab63..c5d227f69d 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{191122} +{191123} ViewReadme {Yes} @@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives {No} Windows,Executable -{<%AppName%>-Setup<%Ext%>} +{<%AppName%>-<%Version%>-Setup<%Ext%>} Windows,FileDescription {<%AppName%> <%Version%> Setup} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 9553546fc7..bad09b10b7 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.741(Build 191122)") +#define PANDORA_VERSION ("7.0NG.741(Build 191123)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 1dec86fe84..a83469b51f 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.741(Build 191122))" + VALUE "ProductVersion", "(7.0NG.741(Build 191123))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index a2c7e362e4..0fadb3c407 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.741 +Version: 7.0NG.741-191123 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 0df64d8d55..e9b84000c0 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.741" +pandora_version="7.0NG.741-191123" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 6332a29284..61c4c7c53f 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC191122'; +$build_version = 'PC191123'; $pandora_version = 'v7.0NG.741'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 81338cc8e8..b852862fef 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index aa7062cdec..bfa2f7302a 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.741 -%define release 1 +%define release 191123 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index baa899801f..f88b164778 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.741 -%define release 1 +%define release 191123 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 41877b1656..7a27cab255 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.741" -PI_BUILD="191122" +PI_BUILD="191123" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index b5b8fa58fb..c7ac49746d 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.741 PS191122"; +my $version = "7.0NG.741 PS191123"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 738db6bde8..ba45c23582 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.741 PS191122"; +my $version = "7.0NG.741 PS191123"; # save program name for logging my $progname = basename($0); From 64e481187f298a2ef02b923da6f971e5ac98e093 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Sat, 23 Nov 2019 12:48:47 +0100 Subject: [PATCH 103/123] RuleBuilder Style updates --- pandora_console/include/styles/alert.css | 69 +++++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/styles/alert.css b/pandora_console/include/styles/alert.css index 14dc0c946d..810050c301 100644 --- a/pandora_console/include/styles/alert.css +++ b/pandora_console/include/styles/alert.css @@ -2,6 +2,43 @@ li#li-buttons-alert-list > div { margin-left: 10px; } +#rule-builder .rule-builder-actions li { + display: inline; + width: auto; +} + +#rule-builder .rule-builder-actions li label { + width: 0; +} + +div.white_box { + min-width: 800px; +} + +#rules, +ul.sample { + margin-bottom: 2em; + flex: 1 1 300px; +} + +.flex-row label { + flex: 1 1 70px; +} + +.flex-row div { + flex: 10 1 200px; +} + +span.rule-title { + font-family: "lato-lighter", "Open Sans", sans-serif; + font-weight: normal; + font-size: 2em; + text-align: center; + display: block; + margin-bottom: 0.8em; + width: 100%; +} + li#li-filters_show_action_alerts > label, li#li-buttons-alert-list > label, li#li-filters-alert-list > label { @@ -80,10 +117,40 @@ ul.sample li:last-child { } div.target { flex-grow: 1; + flex-basis: auto; margin-left: 3em; - border: 1px solid #ddd; + display: flex; + flex-direction: column; +} +div.target.flex { + display: block; + border: 2px dashed #ddd; + margin-left: 0em; + margin-top: 10px; + padding-top: 1em; } +.fields, +.operators, +.variables, +.modifiers, +.nexos, +.blocks { + cursor: move; +} +div#rules.show::after { + content: "Drop here"; + position: relative; + top: 30%; + display: block; + left: 38%; + font-size: 3em; + color: #aaa; +} +div#rules.show { + box-shadow: 0 0 15px -5px #424242; + border: 1px solid #ddd; +} .field { display: inline-block; border-radius: 10px; From 2f0b2c17666d312c09d0e97aeb571354f6d4c60f Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Sat, 23 Nov 2019 13:06:58 +0100 Subject: [PATCH 104/123] minor fix css --- pandora_console/include/styles/alert.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/styles/alert.css b/pandora_console/include/styles/alert.css index 810050c301..0871853962 100644 --- a/pandora_console/include/styles/alert.css +++ b/pandora_console/include/styles/alert.css @@ -21,11 +21,11 @@ ul.sample { flex: 1 1 300px; } -.flex-row label { +#rules.flex-row label { flex: 1 1 70px; } -.flex-row div { +#rules.flex-row div { flex: 10 1 200px; } From d3b5e7a2b0cf1f37a106f95e0da7ffd5cc678e71 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Sat, 23 Nov 2019 13:13:24 +0100 Subject: [PATCH 105/123] minor style fix rulebuilder --- pandora_console/include/styles/alert.css | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/styles/alert.css b/pandora_console/include/styles/alert.css index 0871853962..8952f98c46 100644 --- a/pandora_console/include/styles/alert.css +++ b/pandora_console/include/styles/alert.css @@ -141,11 +141,16 @@ div.target.flex { div#rules.show::after { content: "Drop here"; position: relative; - top: 30%; + top: 25%; display: block; - left: 38%; + left: 37%; font-size: 3em; color: #aaa; + overflow: hidden; + width: 6em; + background: #fff; + text-align: center; + z-index: 2; } div#rules.show { box-shadow: 0 0 15px -5px #424242; From 9bfe3f3152af6c5928957185e46b7fb2496954c8 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Sat, 23 Nov 2019 13:16:30 +0100 Subject: [PATCH 106/123] minor style fix rulebuilder --- pandora_console/include/styles/alert.css | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/styles/alert.css b/pandora_console/include/styles/alert.css index 8952f98c46..9854ffd09e 100644 --- a/pandora_console/include/styles/alert.css +++ b/pandora_console/include/styles/alert.css @@ -127,7 +127,7 @@ div.target.flex { border: 2px dashed #ddd; margin-left: 0em; margin-top: 10px; - padding-top: 1em; + padding: 1em; } .fields, @@ -160,13 +160,16 @@ div#rules.show { display: inline-block; border-radius: 10px; padding: 5px; - padding-left: 8px; - padding-right: 8px; + font-size: 1.2em; + padding-left: 1em; + padding-right: 1em; margin: 3px; color: #fff; font-family: "lato-lighter", "Open Sans", sans-serif; font-weight: 600; background-color: #333; + word-break: break-all; + break-after: all; } .field.opacityElements { From ae5d7b89443782a35101258d9a4862b31df2ee94 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Sat, 23 Nov 2019 13:20:19 +0100 Subject: [PATCH 107/123] minor style fix rulebuilder --- pandora_console/include/styles/alert.css | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pandora_console/include/styles/alert.css b/pandora_console/include/styles/alert.css index 9854ffd09e..2e6ba6d0ea 100644 --- a/pandora_console/include/styles/alert.css +++ b/pandora_console/include/styles/alert.css @@ -100,8 +100,6 @@ img.handle-alerts { .content { width: 80%; min-height: 4em; - border: 1px solid #ddd; - padding-top: 1em; padding-bottom: 1em; } ul.sample { @@ -163,13 +161,12 @@ div#rules.show { font-size: 1.2em; padding-left: 1em; padding-right: 1em; - margin: 3px; + margin: 0 0.5em 0.5em 0px; color: #fff; font-family: "lato-lighter", "Open Sans", sans-serif; font-weight: 600; background-color: #333; word-break: break-all; - break-after: all; } .field.opacityElements { From 44311c0438e0762e258dee499575eadff97c5ece Mon Sep 17 00:00:00 2001 From: artica Date: Sun, 24 Nov 2019 00:01:07 +0100 Subject: [PATCH 108/123] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index df8b2ebfaa..cf84d428f6 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.741-191123 +Version: 7.0NG.741-191124 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index cdfc1fa1f4..c455bb3eee 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.741-191123" +pandora_version="7.0NG.741-191124" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 1576d2c4a1..d9b4605482 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.741'; -use constant AGENT_BUILD => '191123'; +use constant AGENT_BUILD => '191124'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 99266db31d..442e8e00fe 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.741 -%define release 191123 +%define release 191124 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 5a158e2de9..5a7b592202 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.741 -%define release 191123 +%define release 191124 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index d3d3d068b9..3d7bc459e1 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.741" -PI_BUILD="191123" +PI_BUILD="191124" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index c5d227f69d..54fa704917 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{191123} +{191124} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index bad09b10b7..ccb8fc5742 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.741(Build 191123)") +#define PANDORA_VERSION ("7.0NG.741(Build 191124)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index a83469b51f..7b54910fb7 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.741(Build 191123))" + VALUE "ProductVersion", "(7.0NG.741(Build 191124))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 0fadb3c407..92820f513b 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.741-191123 +Version: 7.0NG.741-191124 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index e9b84000c0..1d5ca8d00e 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.741-191123" +pandora_version="7.0NG.741-191124" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 61c4c7c53f..1b3ba3e035 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC191123'; +$build_version = 'PC191124'; $pandora_version = 'v7.0NG.741'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index b852862fef..1da8f65e18 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index bfa2f7302a..d2b0b1b5ec 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.741 -%define release 191123 +%define release 191124 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index f88b164778..7f510efbab 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.741 -%define release 191123 +%define release 191124 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 7a27cab255..a5bf870331 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.741" -PI_BUILD="191123" +PI_BUILD="191124" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index c7ac49746d..1cfa3a54b1 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.741 PS191123"; +my $version = "7.0NG.741 PS191124"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index ba45c23582..5dd6a6617a 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.741 PS191123"; +my $version = "7.0NG.741 PS191124"; # save program name for logging my $progname = basename($0); From 1592773b46bf88e6700b8d99594e078666fb02fc Mon Sep 17 00:00:00 2001 From: artica Date: Mon, 25 Nov 2019 00:01:07 +0100 Subject: [PATCH 109/123] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index cf84d428f6..31550518ba 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.741-191124 +Version: 7.0NG.741-191125 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index c455bb3eee..b8585d68ec 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.741-191124" +pandora_version="7.0NG.741-191125" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index d9b4605482..37a273d08e 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.741'; -use constant AGENT_BUILD => '191124'; +use constant AGENT_BUILD => '191125'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 442e8e00fe..89b69dda71 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.741 -%define release 191124 +%define release 191125 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 5a7b592202..0444cbff87 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.741 -%define release 191124 +%define release 191125 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 3d7bc459e1..044b3d1be0 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.741" -PI_BUILD="191124" +PI_BUILD="191125" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 54fa704917..c0acfd3486 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{191124} +{191125} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index ccb8fc5742..b039dc6da0 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.741(Build 191124)") +#define PANDORA_VERSION ("7.0NG.741(Build 191125)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 7b54910fb7..eeb912db75 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.741(Build 191124))" + VALUE "ProductVersion", "(7.0NG.741(Build 191125))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 92820f513b..a06e3c1937 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.741-191124 +Version: 7.0NG.741-191125 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 1d5ca8d00e..0244e026f3 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.741-191124" +pandora_version="7.0NG.741-191125" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 1b3ba3e035..a014bcce63 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC191124'; +$build_version = 'PC191125'; $pandora_version = 'v7.0NG.741'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 1da8f65e18..6a87572085 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index d2b0b1b5ec..74acddc5f2 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.741 -%define release 191124 +%define release 191125 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 7f510efbab..d60b1a784a 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.741 -%define release 191124 +%define release 191125 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index a5bf870331..fe9bed1a40 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.741" -PI_BUILD="191124" +PI_BUILD="191125" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 1cfa3a54b1..4c6ccf05dc 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.741 PS191124"; +my $version = "7.0NG.741 PS191125"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 5dd6a6617a..35c7533910 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.741 PS191124"; +my $version = "7.0NG.741 PS191125"; # save program name for logging my $progname = basename($0); From f24034e729233572889fddca4f3926fc842f0e61 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Date: Mon, 25 Nov 2019 09:09:59 +0100 Subject: [PATCH 110/123] Add styles Rules --- pandora_console/include/styles/alert.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pandora_console/include/styles/alert.css b/pandora_console/include/styles/alert.css index 2e6ba6d0ea..f8d8f9c253 100644 --- a/pandora_console/include/styles/alert.css +++ b/pandora_console/include/styles/alert.css @@ -245,3 +245,16 @@ div#rules.show { padding: 10px; vertical-align: middle; } + +#rules select { + border-radius: 0px; + background-color: #424242; + border: 0px; + color: #fff; + font-family: "lato-lighter", "Open Sans", sans-serif; + font-weight: 600; +} + +#rules select:focus { + outline-color: transparent; +} From 1b57b279fb131516b5f53aa109852b2d1c331ac9 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 25 Nov 2019 13:03:55 +0100 Subject: [PATCH 111/123] minor changes --- pandora_console/include/functions_ui.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index dd1cc5443e..a4edeebda9 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1533,6 +1533,9 @@ function ui_require_javascript_file($name, $path='include/javascript/', $echo_ta /** * Add a enteprise javascript file to the HTML head tag. * + * * THIS FUNCTION COULD PRODUCE ISSUES WHILE INCLUDING JS FILES. + * * USE ui_require_javascript_file('file', ENTERPRISE_DIR.'/location') INSTEAD. + * * To make a javascript file available just put it in /include/javascript. The * file name should be like "name.js". The "name" would be the value * needed to pass to this function. From 1b4b59d1c2d0c34407746c5b60a9e6347fe8e9f7 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 25 Nov 2019 13:36:43 +0100 Subject: [PATCH 112/123] Rules migration DB --- pandora_console/extras/mr/33.sql | 14 ++++++++++++++ .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/pandora_console/extras/mr/33.sql b/pandora_console/extras/mr/33.sql index 3f540c3b02..9034e54154 100644 --- a/pandora_console/extras/mr/33.sql +++ b/pandora_console/extras/mr/33.sql @@ -39,6 +39,20 @@ ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_content` text COMMENT 'Operat ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_source` text COMMENT 'Operator for log_source'; ALTER TABLE `tevent_rule` ADD COLUMN `operator_log_agent` text COMMENT 'Operator for log_agent'; +UPDATE `tevent_rule` SET `operator_agent` = "REGEX" WHERE `agent` != ''; +UPDATE `tevent_rule` SET `operator_id_usuario` = "REGEX" WHERE `id_usuario` != ''; +UPDATE `tevent_rule` SET `operator_id_grupo` = "REGEX" WHERE `id_grupo` > 0; +UPDATE `tevent_rule` SET `operator_evento` = "REGEX" WHERE `evento` != ''; +UPDATE `tevent_rule` SET `operator_event_type` = "REGEX" WHERE `event_type` != ''; +UPDATE `tevent_rule` SET `operator_module` = "REGEX" WHERE `module` != ''; +UPDATE `tevent_rule` SET `operator_alert` = "REGEX" WHERE `alert` != ''; +UPDATE `tevent_rule` SET `operator_criticity` = "REGEX" WHERE `criticity` != '99'; +UPDATE `tevent_rule` SET `operator_user_comment` = "REGEX" WHERE `user_comment` != ''; +UPDATE `tevent_rule` SET `operator_id_tag` = "REGEX" WHERE `id_tag` > 0; +UPDATE `tevent_rule` SET `operator_log_content` = "REGEX" WHERE `log_content` != ''; +UPDATE `tevent_rule` SET `operator_log_source` = "REGEX" WHERE `log_source` != ''; +UPDATE `tevent_rule` SET `operator_log_agent` = "REGEX" WHERE `log_agent` != ''; + ALTER TABLE `tevent_alert` ADD COLUMN `special_days` tinyint(1) default 0; ALTER TABLE `tevent_alert` MODIFY COLUMN `time_threshold` int(10) NOT NULL default 86400; 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 69dbdecb84..58536b19de 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 @@ -599,6 +599,20 @@ ALTER TABLE `tevent_rule` MODIFY COLUMN `event_type` enum('','unknown','alert_fi ALTER TABLE `tevent_rule` MODIFY COLUMN `criticity` int(4) unsigned DEFAULT NULL; ALTER TABLE `tevent_rule` MODIFY COLUMN `id_grupo` mediumint(4) DEFAULT NULL; +UPDATE `tevent_rule` SET `operator_agent` = "REGEX" WHERE `agent` != ''; +UPDATE `tevent_rule` SET `operator_id_usuario` = "REGEX" WHERE `id_usuario` != ''; +UPDATE `tevent_rule` SET `operator_id_grupo` = "REGEX" WHERE `id_grupo` > 0; +UPDATE `tevent_rule` SET `operator_evento` = "REGEX" WHERE `evento` != ''; +UPDATE `tevent_rule` SET `operator_event_type` = "REGEX" WHERE `event_type` != ''; +UPDATE `tevent_rule` SET `operator_module` = "REGEX" WHERE `module` != ''; +UPDATE `tevent_rule` SET `operator_alert` = "REGEX" WHERE `alert` != ''; +UPDATE `tevent_rule` SET `operator_criticity` = "REGEX" WHERE `criticity` != '99'; +UPDATE `tevent_rule` SET `operator_user_comment` = "REGEX" WHERE `user_comment` != ''; +UPDATE `tevent_rule` SET `operator_id_tag` = "REGEX" WHERE `id_tag` > 0; +UPDATE `tevent_rule` SET `operator_log_content` = "REGEX" WHERE `log_content` != ''; +UPDATE `tevent_rule` SET `operator_log_source` = "REGEX" WHERE `log_source` != ''; +UPDATE `tevent_rule` SET `operator_log_agent` = "REGEX" WHERE `log_agent` != ''; + -- ----------------------------------------------------- -- Table `tevent_alert` -- ----------------------------------------------------- From 6f8bf104b44377a7d3a0497eea00e3728042a367 Mon Sep 17 00:00:00 2001 From: marcos Date: Mon, 25 Nov 2019 13:50:26 +0100 Subject: [PATCH 113/123] update sap view --- .../operation/agentes/ver_agente.php | 41 ++++++++++--------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index aa91a09ee6..9c8ca5748b 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -1532,25 +1532,28 @@ switch ($tab) { break; } -ui_print_page_header( - agents_get_alias($id_agente), - $icon, - false, - $help_header, - false, - $onheader, - false, - '', - $config['item_title_size_text'], - '', - ui_print_breadcrums( - [ - __('Monitoring'), - __('View'), - ''.$tab_name.'', - ] - ) -); +if (!$config['pure']) { + ui_print_page_header( + agents_get_alias($id_agente), + $icon, + false, + $help_header, + false, + $onheader, + false, + '', + $config['item_title_size_text'], + '', + ui_print_breadcrums( + [ + __('Monitoring'), + __('View'), + ''.$tab_name.'', + ] + ) + ); +} + switch ($tab) { From 0490024abc0b21cab1f4f73e86524057d3e74dcd Mon Sep 17 00:00:00 2001 From: marcos Date: Mon, 25 Nov 2019 15:01:27 +0100 Subject: [PATCH 114/123] add sap view to autorefresh edit my user --- pandora_console/operation/users/user_edit.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandora_console/operation/users/user_edit.php b/pandora_console/operation/users/user_edit.php index fcc719dfaa..7aa3c5f839 100644 --- a/pandora_console/operation/users/user_edit.php +++ b/pandora_console/operation/users/user_edit.php @@ -469,6 +469,9 @@ $autorefresh_list_out['operation/agentes/pandora_networkmap'] = 'Network map'; $autorefresh_list_out['operation/visual_console/render_view'] = 'Visual console'; $autorefresh_list_out['operation/events/events'] = 'Events'; $autorefresh_list_out['enterprise/godmode/reporting/cluster_view'] = 'Cluster view'; +if (enterprise_installed()) { + $autorefresh_list_out['general/sap_view'] = 'SAP view'; +} if (!isset($autorefresh_list)) { $select = db_process_sql("SELECT autorefresh_white_list FROM tusuario WHERE id_user = '".$config['id_user']."'"); From d0aab40fa8bc74112868f8e074e5eb1e626b9724 Mon Sep 17 00:00:00 2001 From: Marcos Alconada Date: Mon, 25 Nov 2019 16:56:59 +0100 Subject: [PATCH 115/123] Update 29.sql --- pandora_console/extras/mr/29.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/pandora_console/extras/mr/29.sql b/pandora_console/extras/mr/29.sql index 57db2d80c3..2bc8b9a8c9 100644 --- a/pandora_console/extras/mr/29.sql +++ b/pandora_console/extras/mr/29.sql @@ -4,7 +4,6 @@ ALTER TABLE `tmetaconsole_agent` ADD INDEX `id_tagente_idx` (`id_tagente`); DELETE FROM `ttipo_modulo` WHERE `nombre` LIKE 'log4x'; -ALTER TABLE tevent_filter ADD column id_source_event int(10); CREATE TABLE IF NOT EXISTS `tcredential_store` ( `identifier` varchar(100) NOT NULL, `id_group` mediumint(4) unsigned NOT NULL DEFAULT 0, From 867f0cfbe9b8c9098dbce94f7dca00bb9f467c00 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Date: Mon, 25 Nov 2019 20:06:42 +0100 Subject: [PATCH 116/123] WIP Rules alert correlation --- pandora_console/include/styles/alert.css | 10 ++++++++-- pandora_console/include/styles/pandora.css | 8 ++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/styles/alert.css b/pandora_console/include/styles/alert.css index f8d8f9c253..b466bca463 100644 --- a/pandora_console/include/styles/alert.css +++ b/pandora_console/include/styles/alert.css @@ -246,7 +246,7 @@ div#rules.show { vertical-align: middle; } -#rules select { +#rules select.click-list-elements { border-radius: 0px; background-color: #424242; border: 0px; @@ -254,7 +254,13 @@ div#rules.show { font-family: "lato-lighter", "Open Sans", sans-serif; font-weight: 600; } +#rules select.click-list-elements.fields-elements-log { + background-color: #638460; +} +#rules select.click-list-elements.fields-elements-event { + background-color: #587cff; +} -#rules select:focus { +#rules select.click-list-elements:focus { outline-color: transparent; } diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 866958796c..6d4deea60d 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -515,6 +515,14 @@ select:-internal-list-box { .no-text-imp { font-size: 0 !important; } +.noselect { + -webkit-touch-callout: none; /* iOS Safari */ + -webkit-user-select: none; /* Safari */ + -khtml-user-select: none; /* Konqueror HTML */ + -moz-user-select: none; /* Old versions of Firefox */ + -ms-user-select: none; /* Internet Explorer/Edge */ + user-select: none; /* Non-prefixed version, currently supported by Chrome, Opera and Firefox */ +} .flex-content-right { display: flex; flex-direction: row; From b3fa4b7b7d94985ca69b9f29480eb01f48a4bce9 Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 26 Nov 2019 00:01:08 +0100 Subject: [PATCH 117/123] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 31550518ba..ff76eb4191 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.741-191125 +Version: 7.0NG.741-191126 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index b8585d68ec..88624df536 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.741-191125" +pandora_version="7.0NG.741-191126" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 37a273d08e..21c63e5fd6 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.741'; -use constant AGENT_BUILD => '191125'; +use constant AGENT_BUILD => '191126'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 89b69dda71..8075ff6a08 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.741 -%define release 191125 +%define release 191126 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 0444cbff87..9726a4815f 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.741 -%define release 191125 +%define release 191126 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 044b3d1be0..c6b7d8c95f 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.741" -PI_BUILD="191125" +PI_BUILD="191126" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index c0acfd3486..0122162984 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{191125} +{191126} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index b039dc6da0..d7cfe70c92 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.741(Build 191125)") +#define PANDORA_VERSION ("7.0NG.741(Build 191126)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index eeb912db75..930c01cc13 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.741(Build 191125))" + VALUE "ProductVersion", "(7.0NG.741(Build 191126))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index a06e3c1937..8bfe081748 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.741-191125 +Version: 7.0NG.741-191126 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 0244e026f3..9b564dfa41 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.741-191125" +pandora_version="7.0NG.741-191126" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index a014bcce63..ef55347cc4 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC191125'; +$build_version = 'PC191126'; $pandora_version = 'v7.0NG.741'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 6a87572085..994b63cc4f 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 74acddc5f2..739dc5b239 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.741 -%define release 191125 +%define release 191126 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index d60b1a784a..b43be82441 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.741 -%define release 191125 +%define release 191126 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index fe9bed1a40..57b7deb1af 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.741" -PI_BUILD="191125" +PI_BUILD="191126" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 4c6ccf05dc..e0cf7766b8 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.741 PS191125"; +my $version = "7.0NG.741 PS191126"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 35c7533910..8662538f40 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.741 PS191125"; +my $version = "7.0NG.741 PS191126"; # save program name for logging my $progname = basename($0); From cf8bae66d119e83c3c40acb4b5472b3e462ce911 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 26 Nov 2019 10:31:57 +0100 Subject: [PATCH 118/123] Added index in MR --- pandora_console/extras/mr/33.sql | 3 +++ pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 2 ++ pandora_console/pandoradb.sql | 2 ++ 3 files changed, 7 insertions(+) diff --git a/pandora_console/extras/mr/33.sql b/pandora_console/extras/mr/33.sql index bfe1777e63..b3092d6423 100644 --- a/pandora_console/extras/mr/33.sql +++ b/pandora_console/extras/mr/33.sql @@ -50,4 +50,7 @@ INSERT INTO `tconfig`(`token`, `value`) VALUES ('welcome_state', -1); ALTER TABLE `tcredential_store` MODIFY COLUMN `product` enum('CUSTOM', 'AWS', 'AZURE', 'GOOGLE', 'SAP') default 'CUSTOM'; +ALTER TABLE `tmetaconsole_agent_secondary_group` ADD INDEX `id_tagente` (`id_tagente`); +ALTER TABLE `tmetaconsole_event` ADD INDEX `server_id` (`server_id`); + COMMIT; 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 9d182b0a54..29dcdac099 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 @@ -931,6 +931,7 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_event` ( ALTER TABLE `tmetaconsole_event` ADD COLUMN `data` double(22,5) default NULL; ALTER TABLE `tmetaconsole_event` ADD COLUMN `module_status` int(4) NOT NULL default '0'; +ALTER TABLE `tmetaconsole_event` ADD INDEX `server_id` (`server_id`); -- --------------------------------------------------------------------- -- Table `tmetaconsole_event_history` @@ -1906,6 +1907,7 @@ create table IF NOT EXISTS `tmetaconsole_agent_secondary_group`( ALTER TABLE tagente ADD COLUMN `update_secondary_groups` tinyint(1) NOT NULL default '0'; ALTER TABLE tmetaconsole_agent ADD COLUMN `update_secondary_groups` tinyint(1) NOT NULL default '0'; ALTER TABLE tusuario_perfil ADD COLUMN `no_hierarchy` tinyint(1) NOT NULL default '0'; +ALTER TABLE `tmetaconsole_agent_secondary_group` ADD INDEX `id_tagente` (`id_tagente`); -- --------------------------------------------------------------------- -- Table `tautoconfig` diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 28bb83d287..9b9301e8e5 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -3109,6 +3109,7 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_event` ( PRIMARY KEY (`id_evento`), KEY `idx_agente` (`id_agente`), KEY `idx_agentmodule` (`id_agentmodule`), + KEY `server_id` (`server_id`), KEY `idx_utimestamp` USING BTREE (`utimestamp`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- Criticity: 0 - Maintance (grey) @@ -3421,6 +3422,7 @@ create table IF NOT EXISTS `tmetaconsole_agent_secondary_group`( `id_tmetaconsole_setup` int(10) NOT NULL, `id_group` mediumint(4) unsigned NOT NULL, PRIMARY KEY(`id`), + KEY `id_tagente` (`id_tagente`), FOREIGN KEY(`id_agent`) REFERENCES tmetaconsole_agent(`id_agente`) ON DELETE CASCADE, FOREIGN KEY(`id_group`) REFERENCES tgrupo(`id_grupo`) From d4b99a03bb7b1aa3aa1dd2a5db494b9a46480502 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 26 Nov 2019 15:46:44 +0100 Subject: [PATCH 119/123] perl-YAML-Tiny RPM spec (agents) --- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 8075ff6a08..e7c21a73e4 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -24,7 +24,7 @@ Requires(preun): chkconfig /bin/rm /usr/sbin/userdel Requires: fileutils textutils unzip Requires: util-linux procps grep Requires: /sbin/ip /bin/awk -Requires: perl perl(Sys::Syslog) perl(IO::Compress::Zip) +Requires: perl perl(Sys::Syslog) perl(IO::Compress::Zip) perl(YAML::Tiny) # Required by plugins #Requires: sh-utils sed passwd net-tools rpm AutoReq: 0 diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 9726a4815f..8567fbc443 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -19,7 +19,7 @@ Prefix: /usr/share BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot BuildArch: noarch PreReq: %fillup_prereq %insserv_prereq /usr/bin/sed /usr/bin/grep /usr/sbin/useradd -Requires: coreutils unzip perl +Requires: coreutils unzip perl perl(Sys::Syslog) perl(IO::Compress::Zip) perl(YAML::Tiny) AutoReq: 0 Provides: %{name}-%{version} From a4db8483d11813cf2439130a37e518b1b1931509 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 26 Nov 2019 15:47:04 +0100 Subject: [PATCH 120/123] Discovery Applications minor fixes - SAP backend --- pandora_server/lib/PandoraFMS/Config.pm | 6 ++++++ pandora_server/lib/PandoraFMS/Recon/Base.pm | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 5b502cd82f..d22cb53edd 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -356,6 +356,9 @@ sub pandora_load_config { # Discovery SAP utils $pa_config->{"sap_utils"} = "/usr/share/pandora_server/util/recon_scripts/SAP"; + + # Discovery SAP Artica environment + $pa_config->{"sap_artica_test"} = 0; # braa for enterprise snmp server $pa_config->{"braa"} = "/usr/bin/braa"; @@ -855,6 +858,9 @@ sub pandora_load_config { elsif ($parametro =~ m/^sap_utils\s(.*)/i) { $pa_config->{'sap_utils'}= clean_blank($1); } + elsif ($parametro =~ m/^sap_artica_test\s(.*)/i) { + $pa_config->{'sap_artica_test'}= clean_blank($1); + } elsif ($parametro =~ m/^nmap_timing_template\s+([0-9]*)/i) { $pa_config->{'nmap_timing_template'}= clean_blank($1); } diff --git a/pandora_server/lib/PandoraFMS/Recon/Base.pm b/pandora_server/lib/PandoraFMS/Recon/Base.pm index 9b2a725ae2..0315634843 100644 --- a/pandora_server/lib/PandoraFMS/Recon/Base.pm +++ b/pandora_server/lib/PandoraFMS/Recon/Base.pm @@ -1556,8 +1556,8 @@ sub database_scan($$$) { } return { - 'modules' => @modules, - 'data' => @data + 'modules' => \@modules, + 'data' => \@data }; } @@ -1671,14 +1671,16 @@ sub app_scan($) { } + print Dumper($results); + # Add results. if (ref($results) eq 'HASH') { if (defined($results->{'modules'})) { - push @modules, $results->{'modules'}; + push @modules, @{$results->{'modules'}}; } if (defined($results->{'data'})) { - push @data, $results->{'data'}; + push @data, @{$results->{'data'}}; } } } From 69b813390d53ba1d01f3af3273d9e4d48da5790f Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 26 Nov 2019 15:49:28 +0100 Subject: [PATCH 121/123] minor fix - removed trace --- pandora_server/lib/PandoraFMS/Recon/Base.pm | 2 -- 1 file changed, 2 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Recon/Base.pm b/pandora_server/lib/PandoraFMS/Recon/Base.pm index 0315634843..fc8148cd30 100644 --- a/pandora_server/lib/PandoraFMS/Recon/Base.pm +++ b/pandora_server/lib/PandoraFMS/Recon/Base.pm @@ -1671,8 +1671,6 @@ sub app_scan($) { } - print Dumper($results); - # Add results. if (ref($results) eq 'HASH') { if (defined($results->{'modules'})) { From bf22ff7a502b7a93c2f5a183fb9926ec58c7e48e Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 26 Nov 2019 17:08:18 +0100 Subject: [PATCH 122/123] minor fixes --- pandora_server/lib/PandoraFMS/Recon/Base.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/Recon/Base.pm b/pandora_server/lib/PandoraFMS/Recon/Base.pm index fc8148cd30..056495238c 100644 --- a/pandora_server/lib/PandoraFMS/Recon/Base.pm +++ b/pandora_server/lib/PandoraFMS/Recon/Base.pm @@ -1767,8 +1767,8 @@ sub scan($) { if ( $self->{'task_data'}->{'type'} == DISCOVERY_APP_MYSQL || $self->{'task_data'}->{'type'} == DISCOVERY_APP_ORACLE || $self->{'task_data'}->{'type'} == DISCOVERY_APP_SAP) { - # Application scan. + $self->call('message', "Scanning application ...", 6); return $self->app_scan(); } From d2fdc0cf9d567de2161d59b266b8c2cf2b36d325 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 27 Nov 2019 00:01:08 +0100 Subject: [PATCH 123/123] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index ff76eb4191..c70ff11f92 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.741-191126 +Version: 7.0NG.741-191127 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 88624df536..9beb6c82e2 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.741-191126" +pandora_version="7.0NG.741-191127" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 21c63e5fd6..4b3e3798a5 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.741'; -use constant AGENT_BUILD => '191126'; +use constant AGENT_BUILD => '191127'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index e7c21a73e4..00709f13c6 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.741 -%define release 191126 +%define release 191127 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 8567fbc443..014c8e56c3 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.741 -%define release 191126 +%define release 191127 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index c6b7d8c95f..fd1890a487 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.741" -PI_BUILD="191126" +PI_BUILD="191127" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 0122162984..4469057ce4 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{191126} +{191127} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index d7cfe70c92..f1b8e2b205 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.741(Build 191126)") +#define PANDORA_VERSION ("7.0NG.741(Build 191127)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 930c01cc13..cc52cfb343 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.741(Build 191126))" + VALUE "ProductVersion", "(7.0NG.741(Build 191127))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 8bfe081748..c2385b21f0 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.741-191126 +Version: 7.0NG.741-191127 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 9b564dfa41..86499e572c 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.741-191126" +pandora_version="7.0NG.741-191127" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index ef55347cc4..f648d15a85 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC191126'; +$build_version = 'PC191127'; $pandora_version = 'v7.0NG.741'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 994b63cc4f..4272cf305e 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
    [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 739dc5b239..3a5fbb170b 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.741 -%define release 191126 +%define release 191127 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index b43be82441..27cf3b8c1c 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.741 -%define release 191126 +%define release 191127 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 57b7deb1af..950ebf4f16 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.741" -PI_BUILD="191126" +PI_BUILD="191127" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index e0cf7766b8..6f93f2df0f 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.741 PS191126"; +my $version = "7.0NG.741 PS191127"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 8662538f40..bb7f537580 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.741 PS191126"; +my $version = "7.0NG.741 PS191127"; # save program name for logging my $progname = basename($0);
  • '; @@ -471,14 +472,37 @@ class Wizard $output .= '
      '; } - foreach ($input['block_content'] as $input) { - $output .= $this->printBlock( - $input, + $html = ''; + + foreach ($input['block_content'] as $in) { + $html .= $this->printBlock( + $in, $return, (bool) $direct ); } + if ($toggle === true) { + $output .= ui_print_toggle( + [ + 'name' => (isset($input['toggle_name']) ? $input['toggle_name'] : 'toggle_'.uniqid()), + 'content' => $html, + 'title' => $input['toggle_title'], + 'id' => $input['toggle_id'], + 'hidden_default' => $input['toggle_hidden_default'], + 'return' => (isset($input['toggle_return']) ? $input['toggle_return'] : true), + 'toggle_class' => $input['toggle_toggle_class'], + 'main_class' => $input['toggle_main_class'], + 'container_class' => $input['toggle_container_class'], + 'img_a' => $input['toggle_img_a'], + 'img_b' => $input['toggle_img_b'], + 'clean' => (isset($input['toggle_clean']) ? $input['toggle_clean'] : true), + ] + ); + } else { + $output .= $html; + } + // Close block. if (!$direct) { $output .= '
    '; diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 0ad31cf931..0e1c9e09c0 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -3667,6 +3667,7 @@ function ui_print_event_priority( * @param string $main_class Main object class. * @param string $img_a Image (closed). * @param string $img_b Image (opened). + * @param string $clean Do not encapsulate with class boxes, clean print. * * @return string HTML. */ @@ -3681,7 +3682,8 @@ function ui_toggle( $container_class='white-box-content', $main_class='box-shadow white_table_graph', $img_a='images/arrow_down_green.png', - $img_b='images/arrow_right_green.png' + $img_b='images/arrow_right_green.png', + $clean=false ) { // Generate unique Id. $uniqid = uniqid(''); @@ -3697,9 +3699,17 @@ function ui_toggle( $original = $img_a; } + $header_class = ''; + if ($clean === false) { + $header_class = 'white_table_graph_header'; + } else { + $main_class = ''; + $container_class = 'white-box-content-clean'; + } + // Link to toggle. $output = '
    '; - $output .= '
    '.html_print_image( + $output .= '
    '.html_print_image( $original, true, [ @@ -3767,7 +3777,8 @@ function ui_print_toggle($data) (isset($data['container_class']) === true) ? $data['container_class'] : 'white-box-content', (isset($data['main_class']) === true) ? $data['main_class'] : 'box-shadow white_table_graph', (isset($data['img_a']) === true) ? $data['img_a'] : 'images/arrow_down_green.png', - (isset($data['img_b']) === true) ? $data['img_b'] : 'images/arrow_right_green.png' + (isset($data['img_b']) === true) ? $data['img_b'] : 'images/arrow_right_green.png', + (isset($data['clean']) === true) ? $data['clean'] : false ); } diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index aba0f03a81..acdfd7a981 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -5700,6 +5700,10 @@ div#status_pie { padding: 1em; min-width: 100%; } +.white-box-content-clean { + padding-left: 2em; + padding-top: 1em; +} .white_table_graph_content { border: 1px solid #e2e2e2; From f348310675f42d8dac2d8989a4515133a5c671e8 Mon Sep 17 00:00:00 2001 From: marcos Date: Thu, 14 Nov 2019 19:01:23 +0100 Subject: [PATCH 050/123] ADD function to get SAP agents and sap view to sap agents --- .../godmode/agentes/configurar_agente.php | 27 ++++++++ pandora_console/include/functions_agents.php | 63 +++++++++++++++++++ 2 files changed, 90 insertions(+) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 61d33193d3..741fb536bb 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -486,6 +486,20 @@ if ($id_agente) { $agent_wizard['active'] = false; } + $is_sap = agents_get_sap_agents($id_agente); + if ($is_sap) { + $saptab['text'] = ''.html_print_image('images/chart_curve.png', true, ['title' => __('SAP view')]).''; + + if ($tab == 'sap_view') { + $saptab['active'] = true; + } else { + $saptab['active'] = false; + } + } else { + $saptab = ''; + } + + $total_incidents = agents_get_count_incidents($id_agente); // Incident tab. @@ -531,6 +545,7 @@ if ($id_agente) { 'group' => $grouptab, 'gis' => $gistab, 'agent_wizard' => $agent_wizard, + 'sap_view' => $saptab, ]; } else { $onheader = [ @@ -546,6 +561,8 @@ if ($id_agente) { 'group' => $grouptab, 'gis' => $gistab, 'agent_wizard' => $agent_wizard, + 'sap_view' => $saptab, + ]; } @@ -691,6 +708,12 @@ if ($id_agente) { } break; + case 'sap_view': + $tab_description = '- '.__('SAP view'); + $help_header = 'sap_view'; + $tab_name = 'SAP View'; + break; + default: // Default. break; @@ -2346,6 +2369,10 @@ switch ($tab) { include 'agent_wizard.php'; break; + case 'sap_view': + include 'general/sap_view.php'; + break; + default: if (enterprise_hook('switch_agent_tab', [$tab])) { // This will make sure that blank pages will have at least some diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 826ca971c5..28940170c7 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -3481,3 +3481,66 @@ function agents_get_status_animation($up=true) ); } } + + +/** + * Return if an agent is SAP or or an a agent SAP list. + * If function receive false, you will return all SAP agents, + * but if you receive an id agent, check if it is a sap agent + * and return true or false. + * + * @param integer $id_agent + * @return boolean + */ +function agents_get_sap_agents($id_agent) +{ + // Available modules. + // If you add more modules, please update SAP.pm. + $sap_modules = [ + 160 => __('SAP Login OK'), + 109 => __('SAP Dumps'), + 111 => __('SAP List lock'), + 113 => __('SAP Cancel Jobs'), + 121 => __('SAP Batch input erroneus'), + 104 => __('SAP Idoc erroneus'), + 105 => __('SAP IDOC OK'), + 150 => __('SAP WP without active restart'), + 151 => __('SAP WP stopped'), + 102 => __('Average time of SAPGUI response '), + 180 => __('Dialog response time'), + 103 => __('Dialog Logged users '), + 192 => __('SYSFAIL, delivery attempts tRFC wrong entries number'), + 195 => __('SYSFAIL, queue qRFC INPUT, wrong entries number '), + 116 => __('Number of Update WPs in error'), + ]; + + $array_agents = []; + foreach ($sap_modules as $module => $key) { + $array_agents = array_merge( + $array_agents, + db_get_all_rows_sql( + 'SELECT ta.id_agente,ta.alias + FROM tagente ta + INNER JOIN tagente_modulo tam + ON tam.id_agente = ta.id_agente + WHERE tam.nombre + LIKE "%SAP%" + GROUP BY ta.id_agente' + ) + ); + } + + $indexed_agents = index_array($array_agents, 'id_agente', false); + + if ($id_agent === false) { + return $indexed_agents; + } + + foreach ($indexed_agents as $agent => $key) { + if ($agent === $id_agent) { + return true; + } + } + + return false; +} From 9dec1709c4c9e686521af501084b2b33ec54c106 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 14 Nov 2019 19:10:31 +0100 Subject: [PATCH 051/123] Fixed help content well printed --- pandora_console/extensions/quick_shell.php | 7 ++++++- pandora_console/include/class/HelpFeedBack.class.php | 5 +++-- pandora_console/include/functions.php | 7 +++++++ pandora_console/include/functions_ui.php | 7 ++++++- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/pandora_console/extensions/quick_shell.php b/pandora_console/extensions/quick_shell.php index a286ce4b95..6d135260d2 100644 --- a/pandora_console/extensions/quick_shell.php +++ b/pandora_console/extensions/quick_shell.php @@ -381,7 +381,12 @@ function quickShellSettings() } // Interface. - ui_print_page_header(__('QuickShell settings')); + ui_print_page_header( + __('QuickShell settings'), + '', + false, + 'quickshell_settings' + ); if ($changes > 0) { $msg = __('%d Updated', $changes); diff --git a/pandora_console/include/class/HelpFeedBack.class.php b/pandora_console/include/class/HelpFeedBack.class.php index 825d3c923f..1132550cff 100644 --- a/pandora_console/include/class/HelpFeedBack.class.php +++ b/pandora_console/include/class/HelpFeedBack.class.php @@ -93,12 +93,13 @@ class HelpFeedBack extends Wizard ui_require_css_File('discovery'); ui_require_css_file('help_feedback'); - $help_url = get_parameter('url', null); + $help_url = get_parameter('b', null); + $help_url = base64_decode($help_url); if ($help_url === null) { echo __('Page not found'); } else { ?> - diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index a7d94d43bc..fbc41ce961 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -5431,6 +5431,13 @@ function get_help_info($section_name) $result .= 'GIS&printable=yes#Operation'; } break; + + case 'quickshell_settings': + if ($es) { + $result .= 'Configuracion_Consola&printable=yes#Websocket_Engine'; + } else { + $result .= 'Console_Setup&printable=yes#Websocket_engine'; + } } return $result; diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 0e1c9e09c0..9179f60aaf 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1404,14 +1404,19 @@ function ui_print_help_icon( } $url = get_help_info($help_id); + $b = base64_encode($url); + $help_handler = 'index.php?sec=view&sec2=general/help_feedback'; + // Needs to use url encoded to avoid anchor lost. + $help_handler .= '&b='.$b; + $help_handler .= '&pure=1&url='.$url; $output = html_print_image( $image, true, [ 'class' => 'img_help', 'title' => __('Help'), - 'onclick' => "open_help ('".ui_get_full_url('index.php?sec=view&sec2=general/help_feedback&pure=1&url='.$url)."')", + 'onclick' => "open_help ('".ui_get_full_url($help_handler)."')", 'id' => $id, ], false, From 546b8dc44821d8757b0edd54f8ef9ab5a52fb7e0 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 14 Nov 2019 20:55:55 +0100 Subject: [PATCH 052/123] omnishell minor changes --- pandora_console/include/functions_ui.php | 148 +++++++------------ pandora_console/include/styles/omnishell.css | 6 + pandora_console/include/styles/progress.css | 1 + 3 files changed, 58 insertions(+), 97 deletions(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 0ad31cf931..d6afa8ffac 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -2915,119 +2915,73 @@ function ui_progress( * Generates a progress bar CSS based. * Requires css progress.css * - * @param array $progress Progress. - * @param string $width Width. - * @param integer $height Height in 'em'. - * @param array $color status color. - * @param boolean $return Return or paint (if false). - * @param boolean $text Text to be displayed,by default progress %. - * @param array $ajax Ajax: [ 'page' => 'page', 'data' => 'data' ] Sample: - * [ - * 'page' => 'operation/agentes/ver_agente', Target page. - * 'interval' => 100 / $agent["intervalo"], Ask every interval seconds. - * 'data' => [ Data to be sent to target page. - * 'id_agente' => $id_agente, - * 'refresh_contact' => 1, - * ], - * ]. + * @param array $data With following content: + * + * 'slices' => [ + * 'label' => [ // Name of the slice + * 'value' => value + * 'color' => color of the slice. + * ] + * ], + * 'width' => Width + * 'height' => Height in 'em' + * 'return' => Boolean, return or paint. * * @return string HTML code. */ function ui_progress_extend( - $progress, - $width='100%', - $height='2.5', - $color='#82b92e', - $return=true, - $text='', - $ajax=false + array $data ) { - if (!$progress['total']) { - $progress = 0; + if (is_array($data) === false) { + // Failed. + return false; } - $totalW = ($progress['total'] * 100); - if ($totalW > 100) { - $totalW = 100; + if (is_array($data['slices']) === false) { + // Failed. + return false; } - if ($totalW < 0) { - $totalW = 0; + if (isset($data['width']) === false) { + $data['width'] = '100'; } - if (empty($text)) { - $text = $totalW.'%'; + if (isset($data['height']) === false) { + $data['height'] = '1.3'; + } + + $total = array_reduce( + $data['slices'], + function ($carry, $item) { + $carry += $item['value']; + return $carry; + } + ); + if ($total == 0) { + return null; } - $badW = (($progress['bad'] * 100 ) / $progress['total']); - $goodW = (($progress['good'] * 100 ) / $progress['total']); - $unknownW = (($progress['unknown'] * 100 ) / $progress['total']); ui_require_css_file('progress'); - $output .= '
    '; - $output .= '
    '; - $output .= '
    '; - $output .= '
    '; + + // Main container. + $output .= '
    '; + + foreach ($data['slices'] as $label => $def) { + $width = ($def['value'] * 100 / $total); + $output .= '
    $value) { - $output .= ' - '.$token.':"'.$value.'",'; - } - } - - $output .= ' - page: "'.$ajax['page'].'" - }, - success: function(data) { - try { - val = JSON.parse(data); - $(".progress_main").attr("data-label", val["last_contact"]+" s"); - $(".progress").width(val["progress"]+"%"); - } catch (e) { - console.error(e); - $(".progress_text").attr("data-label", (last -1) + " s"); - if (width < 100) { - $(".progress").width((width+width_interval) + "%"); - } - } - } - }); - } else { - $(".progress_main").attr("data-label", (last -1) + " s"); - if (width < 100) { - $(".progress").width((width+width_interval) + "%"); - } - } - }, 1000); - }); - '; - } - - if (!$return) { + if (!$data['return']) { echo $output; } diff --git a/pandora_console/include/styles/omnishell.css b/pandora_console/include/styles/omnishell.css index b6dcd37826..e1d1a6ad98 100644 --- a/pandora_console/include/styles/omnishell.css +++ b/pandora_console/include/styles/omnishell.css @@ -19,6 +19,12 @@ height: 20px; } +.element-target-big { + width: 100px; + margin: 2px; + height: 100px; +} + .status-normal { background-color: #add570; } diff --git a/pandora_console/include/styles/progress.css b/pandora_console/include/styles/progress.css index f263e87fcf..c88687a204 100644 --- a/pandora_console/include/styles/progress.css +++ b/pandora_console/include/styles/progress.css @@ -4,6 +4,7 @@ position: relative; width: 100%; display: inline-block; + display: flex; } .progress_main:before { content: attr(data-label); From dcd9467bfb142d2468bdfa70b54b5eff0049bf3c Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 14 Nov 2019 21:10:46 +0100 Subject: [PATCH 053/123] fix symbols in gotty credentials --- pandora_console/extensions/quick_shell.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_console/extensions/quick_shell.php b/pandora_console/extensions/quick_shell.php index 6d135260d2..a8cce0b8de 100644 --- a/pandora_console/extensions/quick_shell.php +++ b/pandora_console/extensions/quick_shell.php @@ -218,7 +218,8 @@ function quickShell() if (empty($config['gotty_user']) === false && empty($config['gotty_pass']) === false ) { - $auth_str = $config['gotty_user'].':'.$config['gotty_pass']; + $auth_str = io_safe_output($config['gotty_user']); + $auth_str .= ':'.io_output_password($config['gotty_pass']); $gotty_url = $auth_str.'@'.$host.':'.$port; } From cb43d06c13be50b86eaa5d606ffc8f9b79b05c0d Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 14 Nov 2019 21:31:07 +0100 Subject: [PATCH 054/123] minor fix --- pandora_agents/unix/pandora_agent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 914896e60d..d9b3d32b3f 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1439,7 +1439,7 @@ sub prepare_commands { my $rcmd_file = $ConfDir.'/commands/'.$ref.'.rcmd'; # Check for local .rcmd.done files - if (-e $Conf{'temporal'}.'/'.$ref.'.rcmd.done') { + if (-e $rcmd_file.'.done') { # Ignore. delete $Conf{'commands'}->{$ref}; next; From 8edbb7435458171caa93b5fd32f15174a7137cc4 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 14 Nov 2019 21:52:02 +0100 Subject: [PATCH 055/123] discovery help link and minor fixes --- pandora_console/godmode/menu.php | 2 +- pandora_console/godmode/servers/discovery.php | 2 +- pandora_console/include/functions.php | 9 +++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index 3a9e3de9c0..af09d9ff0d 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -28,7 +28,7 @@ if (check_acl($config['id_user'], 0, 'AR') || check_acl($config['id_user'], 0, 'PM') ) { $sub = []; - $sub['godmode/servers/discovery&wiz=main']['text'] = __('Main'); + $sub['godmode/servers/discovery&wiz=main']['text'] = __('Start'); $sub['godmode/servers/discovery&wiz=main']['id'] = 'Discovery'; $sub['godmode/servers/discovery&wiz=tasklist']['text'] = __('Task list'); $sub['godmode/servers/discovery&wiz=tasklist']['id'] = 'tasklist'; diff --git a/pandora_console/godmode/servers/discovery.php b/pandora_console/godmode/servers/discovery.php index 2d0fcec8a1..7215ee7dfb 100755 --- a/pandora_console/godmode/servers/discovery.php +++ b/pandora_console/godmode/servers/discovery.php @@ -54,7 +54,7 @@ function get_wiz_class($str) __('Discovery'), '', false, - '', + 'discovery', true, '', false, diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index fbc41ce961..d75570107d 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -5438,6 +5438,15 @@ function get_help_info($section_name) } else { $result .= 'Console_Setup&printable=yes#Websocket_engine'; } + break; + + case 'discovery': + if ($es) { + $result .= 'Discovery&printable=yes'; + } else { + $result .= 'Discovery&printable=yes'; + } + break; } return $result; From 990ad339d3209baa52a6a48b88f8eb5344fbb56e Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 15 Nov 2019 09:45:49 +0100 Subject: [PATCH 056/123] db schema --- pandora_console/extras/mr/33.sql | 4 ++-- pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 4 ++-- pandora_console/pandoradb.sql | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pandora_console/extras/mr/33.sql b/pandora_console/extras/mr/33.sql index 85a38a4fa7..3bc3cb9919 100644 --- a/pandora_console/extras/mr/33.sql +++ b/pandora_console/extras/mr/33.sql @@ -26,8 +26,8 @@ CREATE TABLE `tremote_command_target` ( `rcmd_id` bigint unsigned NOT NULL, `id_agent` int(10) unsigned NOT NULL, `utimestamp` int(20) unsigned NOT NULL default 0, - `stdout` text, - `stderr` text, + `stdout` MEDIUMTEXT, + `stderr` MEDIUMTEXT, `errorlevel` int(10) unsigned NOT NULL default 0, PRIMARY KEY (`id`), FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`) 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 fd51f73668..c3970da228 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 @@ -2324,8 +2324,8 @@ CREATE TABLE `tremote_command_target` ( `rcmd_id` bigint unsigned NOT NULL, `id_agent` int(10) unsigned NOT NULL, `utimestamp` int(20) unsigned NOT NULL default 0, - `stdout` text, - `stderr` text, + `stdout` MEDIUMTEXT, + `stderr` MEDIUMTEXT, `errorlevel` int(10) unsigned NOT NULL default 0, PRIMARY KEY (`id`), FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`) diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 910961ec94..37f31f60bb 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -3683,8 +3683,8 @@ CREATE TABLE `tremote_command_target` ( `rcmd_id` bigint unsigned NOT NULL, `id_agent` int(10) unsigned NOT NULL, `utimestamp` int(20) unsigned NOT NULL default 0, - `stdout` text, - `stderr` text, + `stdout` MEDIUMTEXT, + `stderr` MEDIUMTEXT, `errorlevel` int(10) unsigned NOT NULL default 0, PRIMARY KEY (`id`), FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`) From e561b1f9068773736ecc0c1bb818ec0c73689ba8 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 15 Nov 2019 13:07:23 +0100 Subject: [PATCH 057/123] omnishell multiselect --- pandora_console/include/functions_agents.php | 26 +++++++++++++++ pandora_console/include/styles/omnishell.css | 32 +++++++++++++++++++ .../operation/agentes/ver_agente.php | 9 +----- 3 files changed, 59 insertions(+), 8 deletions(-) diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 826ca971c5..bc5ef43430 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -132,6 +132,32 @@ function agents_get_agent_id_by_alias($alias) } +/** + * Return seconds left to contact again with agent. + * + * @param integer $id_agente Target agent + * + * @return integer|null Seconds left. + */ +function agents_get_next_contact_time_left(int $id_agente) +{ + $last_contact = false; + + if ($id_agente > 0) { + $last_contact = db_get_value_sql( + sprintf( + 'SELECT format(intervalo,2) - (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(IF(ultimo_contacto > ultimo_contacto_remoto, ultimo_contacto, ultimo_contacto_remoto))) as "val" + FROM `tagente` + WHERE id_agente = %d ', + $id_agente + ) + ); + } + + return $last_contact; +} + + /** * Creates an agent. * diff --git a/pandora_console/include/styles/omnishell.css b/pandora_console/include/styles/omnishell.css index e1d1a6ad98..265ca5f445 100644 --- a/pandora_console/include/styles/omnishell.css +++ b/pandora_console/include/styles/omnishell.css @@ -25,6 +25,32 @@ height: 100px; } +.element-target-big:hover { + box-shadow: 0 0 10px -5px #424242; +} + +.element-target-big:before { + content: attr(data-label); + position: relative; + text-align: center; + width: 100%; + height: 100%; + color: #373737; + font-weight: bolder; + display: flex; + flex-direction: row; + font-size: 1.8em; + align-items: center; + justify-content: center; + overflow: hidden; + font-family: "lato-bolder", "Open Sans", sans-serif; + text-decoration: none; +} + +.container-target a:hover { + text-decoration: none; +} + .status-normal { background-color: #add570; } @@ -156,6 +182,12 @@ ul.wizard { display: flex; } +.no-class.action-buttons.mw120px.textright.sorting_disabled, +.textright { + text-align: right; + padding-right: 2em; +} + /* * Discovery css global */ diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index 7444dda595..fa53e1c6ec 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -68,14 +68,7 @@ if (is_ajax()) { if ($refresh_contact) { $id_agente = get_parameter('id_agente', 0); if ($id_agente > 0) { - $last_contact = db_get_value_sql( - sprintf( - 'SELECT format(intervalo,2) - (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(IF(ultimo_contacto > ultimo_contacto_remoto, ultimo_contacto, ultimo_contacto_remoto))) as "val" - FROM `tagente` - WHERE id_agente = %d ', - $id_agente - ) - ); + $last_contact = agents_get_next_contact_time_left($id_agente); $progress = agents_get_next_contact($id_agente); if ($progress < 0 || $progress > 100) { From 91f28384b87a4d3e7b1ff41f554bc2e034b1c66a Mon Sep 17 00:00:00 2001 From: marcos Date: Fri, 15 Nov 2019 16:22:30 +0100 Subject: [PATCH 058/123] changed sap icon button --- .../godmode/agentes/configurar_agente.php | 2 +- pandora_console/images/sap_icon.png | Bin 0 -> 324 bytes 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 pandora_console/images/sap_icon.png diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 741fb536bb..4f6c3e463e 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -488,7 +488,7 @@ if ($id_agente) { $is_sap = agents_get_sap_agents($id_agente); if ($is_sap) { - $saptab['text'] = ''.html_print_image('images/chart_curve.png', true, ['title' => __('SAP view')]).''; + $saptab['text'] = ''.html_print_image('images/sap_icon.png', true, ['title' => __('SAP view')]).''; if ($tab == 'sap_view') { $saptab['active'] = true; diff --git a/pandora_console/images/sap_icon.png b/pandora_console/images/sap_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..536c43b28b8bc6407d4197fc7db3abab6b170229 GIT binary patch literal 324 zcmV-K0lWT*P) Date: Fri, 15 Nov 2019 16:35:25 +0100 Subject: [PATCH 059/123] minor fix omnishell functionality - unix agent --- pandora_agents/unix/pandora_agent | 232 +++++++++++++++++++++++++----- 1 file changed, 194 insertions(+), 38 deletions(-) diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index d9b3d32b3f..d6095d6d24 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -296,6 +296,77 @@ sub load_libraries() { } } +################################################################################ +# Erase blank spaces before and after the string +################################################################################ +sub trim { + my $string = shift; + if (empty($string)){ + return ""; + } + + $string =~ s/\r//g; + + chomp($string); + $string =~ s/^\s+//g; + $string =~ s/\s+$//g; + + return $string; +} + +################################################################################ +# Mix hashses +################################################################################ +sub merge_hashes { + my $_h1 = shift; + my $_h2 = shift; + + if (ref($_h1) ne "HASH") { + return \%{$_h2} if (ref($_h2) eq "HASH"); + } + + if (ref($_h2) ne "HASH") { + return \%{$_h1} if (ref($_h1) eq "HASH"); + } + + if ((ref($_h1) ne "HASH") && (ref($_h2) ne "HASH")) { + return {}; + } + + my %ret = (%{$_h1}, %{$_h2}); + + return \%ret; +} + +################################################################################ +# Empty +################################################################################ +sub empty { + my $str = shift; + + if (!(defined($str)) ){ + return 1; + } + + if(looks_like_number($str)){ + return 0; + } + + if (ref($str) eq "ARRAY") { + return (($#{$str}<0)?1:0); + } + + if (ref($str) eq "HASH") { + my @tmp = keys %{$str}; + return (($#tmp<0)?1:0); + } + + if ($str =~ /^\ *[\n\r]{0,2}\ *$/) { + return 1; + } + return 0; +} + ################################################################################ # Check a regular expression. Returns 1 if its valid, 0 otherwise. ################################################################################ @@ -731,13 +802,6 @@ sub parse_conf_modules($) { # Macros } elsif ($line =~ /^\s*module_macro(\S+)\s+(.*)\s*$/) { $module->{'macros'}{$1} = $2; - # Commands - } elsif ($line =~ /^\s*cmd_file\s+(.+)$/) { - if (ref ($Conf{'commands'}) ne "HASH") { - $Conf{'commands'} = {}; - } - # Initialize empty command hash. - $Conf{'commands'}->{$1} = {}; } } return; @@ -832,7 +896,21 @@ sub read_config (;$) { next if ($line =~ /^module\s*\w*/); #Configuration token - if ($line =~ /^\s*(\S+)\s+(.*)$/) { + if ($line =~ /^\s*(\S+)\s+(.*)$/) { + # Reserved keyword. + next if ($1 eq "commands"); + + if ($1 eq "cmd_file") { + # Commands + if (ref ($Conf{'commands'}) ne "HASH") { + $Conf{'commands'} = {}; + } + # Initialize empty command hash. + $Conf{'commands'}->{$2} = {}; + log_message('setup', "Command required $2"); + next; + } + log_message ('setup', "$1 is $2"); $Conf{$1} = $2; @@ -980,8 +1058,6 @@ sub read_config (;$) { $Conf{'secondary_server_opts'} = '-c ' . $Conf{'secondary_server_opts'} if ($Conf{'secondary_server_ssl'} eq '1'); } - # Check remote commands - prepare_commands(); } ################################################################################# @@ -1292,6 +1368,10 @@ sub check_remote_config () { %Collections = (); %Conf = %DefaultConf; + # Supposed to discard current configuration but not. + # Cleanup old commands configuration. + $Conf{'commands'} = {}; + # Reload the new configuration read_config (); @@ -1433,6 +1513,20 @@ sub prepare_commands { return; } + # Force configuration file read. + my @commands = read_config('cmd_file'); + + if (empty(\@commands)) { + $Conf{'commands'} = {}; + } else { + foreach my $rcmd (@commands) { + $Conf{'commands'}->{trim($rcmd)} = {}; + } + } + + # Cleanup old commands. Not registered. + cleanup_old_commands(); + foreach my $ref (keys %{$Conf{'commands'}}) { my $file_content; my $download = 0; @@ -1534,19 +1628,101 @@ sub report_command { return $return; } +################################################################################ +# Cleanup unreferenced rcmd and rcmd.done files. +################################################################################ +sub cleanup_old_commands { + # Cleanup old .rcmd and .rcmd.done files. + my %registered = map { $_.'.rcmd' => 1 } keys %{$Conf{'commands'}}; + if(opendir(my $dir, $ConfDir.'/commands/')) { + while (my $item = readdir($dir)) { + + # Skip other files. + next if ($item !~ /\.rcmd$/); + + # Clean .rcmd.done file if its command is not referenced in conf. + if (!defined($registered{$item})) { + if (-e $ConfDir.'/commands/'.$item) { + unlink($ConfDir.'/commands/'.$item); + } + if (-e $ConfDir.'/commands/'.$item.'.done') { + unlink($ConfDir.'/commands/'.$item.'.done'); + } + } + } + + # Close dir. + closedir($dir); + } + +} + ################################################################################ # Executes a command using defined timeout. ################################################################################ sub execute_command_timeout { - my ($command, $timeout) = @_; + my ($cmd, $timeout) = @_; - if (!looks_like_number($timeout)) { - `$command`; - } else { - `$command`; + if (!defined($timeout) + || !looks_like_number($timeout) + || $timeout <= 0 + ) { + `$cmd`; + return $?>>8; } - return $?>>8; + my $remaining_timeout = $timeout; + + my $RET; + my $output; + + my $pid = open ($RET, "-|"); + if (!defined($pid)) { + # Failed to fork. + log_message('error', '[command] Failed to fork.'); + return undef; + } + if ($pid == 0) { + # Child. + my $ret; + eval { + local $SIG{ALRM} = sub { die "timeout\n" }; + alarm $timeout; + `$cmd`; + alarm 0; + }; + + my $result = ($?>>8); + print $result; + + # Exit child. + # Child finishes. + exit; + + } else { + # Parent waiting. + while( --$remaining_timeout > 0 ){ + if (wait == -1) { + last; + } + # Wait child up to timeout seconds. + sleep 1; + } + } + + if ($remaining_timeout > 0) { + # Retrieve output from child. + $output = do { local $/; <$RET> }; + $output = $output>>8; + } + else { + # Timeout expired. + return 124; + } + + close($RET); + + return $output; } ################################################################################ @@ -3274,28 +3450,8 @@ while (1) { # Check file collections check_collections () unless ($Conf{'debug'} eq '1'); - if ($Conf{'debug'} ne '1') { - # Cleanup old .rcmd and .rcmd.done files. - my %registered = map { $_.'.rcmd' => 1 } keys %{$Conf{'commands'}}; - if(opendir(my $dir, $ConfDir.'/commands/')) { - while (my $item = readdir($dir)) { - # Skip other files. - next if ($item !~ /\.rcmd$/); - # Clean .rcmd.done file if its command is not referenced in conf. - if (!defined($registered{$item})) { - if (-e $item) { - unlink ($item); - } - if (-e $item.'.done') { - unlink ($item.'.done'); - } - } - } - - # Close dir. - closedir($dir); - } - } + # Check scheduled commands + prepare_commands() unless ($Conf{'debug'} eq '1'); # Launch broker agents @BrokerPid = (); From 17918cd5c6183ac856e25023ff493e172e22c81e Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 15 Nov 2019 16:35:25 +0100 Subject: [PATCH 060/123] minor fix omnishell functionality - unix agent --- pandora_agents/unix/pandora_agent | 232 +++++++++++++++++++++++++----- 1 file changed, 194 insertions(+), 38 deletions(-) diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index d9b3d32b3f..d6095d6d24 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -296,6 +296,77 @@ sub load_libraries() { } } +################################################################################ +# Erase blank spaces before and after the string +################################################################################ +sub trim { + my $string = shift; + if (empty($string)){ + return ""; + } + + $string =~ s/\r//g; + + chomp($string); + $string =~ s/^\s+//g; + $string =~ s/\s+$//g; + + return $string; +} + +################################################################################ +# Mix hashses +################################################################################ +sub merge_hashes { + my $_h1 = shift; + my $_h2 = shift; + + if (ref($_h1) ne "HASH") { + return \%{$_h2} if (ref($_h2) eq "HASH"); + } + + if (ref($_h2) ne "HASH") { + return \%{$_h1} if (ref($_h1) eq "HASH"); + } + + if ((ref($_h1) ne "HASH") && (ref($_h2) ne "HASH")) { + return {}; + } + + my %ret = (%{$_h1}, %{$_h2}); + + return \%ret; +} + +################################################################################ +# Empty +################################################################################ +sub empty { + my $str = shift; + + if (!(defined($str)) ){ + return 1; + } + + if(looks_like_number($str)){ + return 0; + } + + if (ref($str) eq "ARRAY") { + return (($#{$str}<0)?1:0); + } + + if (ref($str) eq "HASH") { + my @tmp = keys %{$str}; + return (($#tmp<0)?1:0); + } + + if ($str =~ /^\ *[\n\r]{0,2}\ *$/) { + return 1; + } + return 0; +} + ################################################################################ # Check a regular expression. Returns 1 if its valid, 0 otherwise. ################################################################################ @@ -731,13 +802,6 @@ sub parse_conf_modules($) { # Macros } elsif ($line =~ /^\s*module_macro(\S+)\s+(.*)\s*$/) { $module->{'macros'}{$1} = $2; - # Commands - } elsif ($line =~ /^\s*cmd_file\s+(.+)$/) { - if (ref ($Conf{'commands'}) ne "HASH") { - $Conf{'commands'} = {}; - } - # Initialize empty command hash. - $Conf{'commands'}->{$1} = {}; } } return; @@ -832,7 +896,21 @@ sub read_config (;$) { next if ($line =~ /^module\s*\w*/); #Configuration token - if ($line =~ /^\s*(\S+)\s+(.*)$/) { + if ($line =~ /^\s*(\S+)\s+(.*)$/) { + # Reserved keyword. + next if ($1 eq "commands"); + + if ($1 eq "cmd_file") { + # Commands + if (ref ($Conf{'commands'}) ne "HASH") { + $Conf{'commands'} = {}; + } + # Initialize empty command hash. + $Conf{'commands'}->{$2} = {}; + log_message('setup', "Command required $2"); + next; + } + log_message ('setup', "$1 is $2"); $Conf{$1} = $2; @@ -980,8 +1058,6 @@ sub read_config (;$) { $Conf{'secondary_server_opts'} = '-c ' . $Conf{'secondary_server_opts'} if ($Conf{'secondary_server_ssl'} eq '1'); } - # Check remote commands - prepare_commands(); } ################################################################################# @@ -1292,6 +1368,10 @@ sub check_remote_config () { %Collections = (); %Conf = %DefaultConf; + # Supposed to discard current configuration but not. + # Cleanup old commands configuration. + $Conf{'commands'} = {}; + # Reload the new configuration read_config (); @@ -1433,6 +1513,20 @@ sub prepare_commands { return; } + # Force configuration file read. + my @commands = read_config('cmd_file'); + + if (empty(\@commands)) { + $Conf{'commands'} = {}; + } else { + foreach my $rcmd (@commands) { + $Conf{'commands'}->{trim($rcmd)} = {}; + } + } + + # Cleanup old commands. Not registered. + cleanup_old_commands(); + foreach my $ref (keys %{$Conf{'commands'}}) { my $file_content; my $download = 0; @@ -1534,19 +1628,101 @@ sub report_command { return $return; } +################################################################################ +# Cleanup unreferenced rcmd and rcmd.done files. +################################################################################ +sub cleanup_old_commands { + # Cleanup old .rcmd and .rcmd.done files. + my %registered = map { $_.'.rcmd' => 1 } keys %{$Conf{'commands'}}; + if(opendir(my $dir, $ConfDir.'/commands/')) { + while (my $item = readdir($dir)) { + + # Skip other files. + next if ($item !~ /\.rcmd$/); + + # Clean .rcmd.done file if its command is not referenced in conf. + if (!defined($registered{$item})) { + if (-e $ConfDir.'/commands/'.$item) { + unlink($ConfDir.'/commands/'.$item); + } + if (-e $ConfDir.'/commands/'.$item.'.done') { + unlink($ConfDir.'/commands/'.$item.'.done'); + } + } + } + + # Close dir. + closedir($dir); + } + +} + ################################################################################ # Executes a command using defined timeout. ################################################################################ sub execute_command_timeout { - my ($command, $timeout) = @_; + my ($cmd, $timeout) = @_; - if (!looks_like_number($timeout)) { - `$command`; - } else { - `$command`; + if (!defined($timeout) + || !looks_like_number($timeout) + || $timeout <= 0 + ) { + `$cmd`; + return $?>>8; } - return $?>>8; + my $remaining_timeout = $timeout; + + my $RET; + my $output; + + my $pid = open ($RET, "-|"); + if (!defined($pid)) { + # Failed to fork. + log_message('error', '[command] Failed to fork.'); + return undef; + } + if ($pid == 0) { + # Child. + my $ret; + eval { + local $SIG{ALRM} = sub { die "timeout\n" }; + alarm $timeout; + `$cmd`; + alarm 0; + }; + + my $result = ($?>>8); + print $result; + + # Exit child. + # Child finishes. + exit; + + } else { + # Parent waiting. + while( --$remaining_timeout > 0 ){ + if (wait == -1) { + last; + } + # Wait child up to timeout seconds. + sleep 1; + } + } + + if ($remaining_timeout > 0) { + # Retrieve output from child. + $output = do { local $/; <$RET> }; + $output = $output>>8; + } + else { + # Timeout expired. + return 124; + } + + close($RET); + + return $output; } ################################################################################ @@ -3274,28 +3450,8 @@ while (1) { # Check file collections check_collections () unless ($Conf{'debug'} eq '1'); - if ($Conf{'debug'} ne '1') { - # Cleanup old .rcmd and .rcmd.done files. - my %registered = map { $_.'.rcmd' => 1 } keys %{$Conf{'commands'}}; - if(opendir(my $dir, $ConfDir.'/commands/')) { - while (my $item = readdir($dir)) { - # Skip other files. - next if ($item !~ /\.rcmd$/); - # Clean .rcmd.done file if its command is not referenced in conf. - if (!defined($registered{$item})) { - if (-e $item) { - unlink ($item); - } - if (-e $item.'.done') { - unlink ($item.'.done'); - } - } - } - - # Close dir. - closedir($dir); - } - } + # Check scheduled commands + prepare_commands() unless ($Conf{'debug'} eq '1'); # Launch broker agents @BrokerPid = (); From 84c6640032732631d34bffee263baef6f980b8ff Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 15 Nov 2019 16:51:53 +0100 Subject: [PATCH 061/123] minor style fix --- pandora_console/include/functions_ui.php | 2 +- pandora_console/include/styles/progress.css | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index d6afa8ffac..c66b96a48e 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -2964,7 +2964,7 @@ function ui_progress_extend( ui_require_css_file('progress'); // Main container. - $output .= '
    '; diff --git a/pandora_console/include/styles/progress.css b/pandora_console/include/styles/progress.css index c88687a204..bfbb2409ef 100644 --- a/pandora_console/include/styles/progress.css +++ b/pandora_console/include/styles/progress.css @@ -6,6 +6,15 @@ display: inline-block; display: flex; } + +.progress_main_noborder { + height: 2.5em; + position: relative; + width: 100%; + display: inline-block; + display: flex; +} + .progress_main:before { content: attr(data-label); position: absolute; From 2f807592273a221a7ee590191fd699f271ca94c3 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 18 Nov 2019 10:04:47 +0100 Subject: [PATCH 062/123] minor updates pandora sap --- pandora_server/conf/pandora_server.conf.new | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pandora_server/conf/pandora_server.conf.new b/pandora_server/conf/pandora_server.conf.new index a5896e6050..ae8b980b14 100644 --- a/pandora_server/conf/pandora_server.conf.new +++ b/pandora_server/conf/pandora_server.conf.new @@ -130,9 +130,15 @@ networkserver 1 dataserver 1 -# Activate (1) Pandora FMS Recon server +# Activate (1) Pandora FMS Discovery server -reconserver 1 +discoveryserver 1 + +# Discovery SAP (PANDORA FMS ENTERPRISE ONLY) +# java /usr/bin/java + +# Discovery SAP utils (PANDORA FMS ENTERPRISE ONLY) +# sap_utils /usr/share/pandora_server/util/recon_scripts/SAP # pluginserver : 1 or 0. Set to 1 to activate plugin server with this setup From 1cacbbc08f62cbf5aef4df7b2c59bd5af7fabac9 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 18 Nov 2019 10:40:02 +0100 Subject: [PATCH 063/123] fix tools --- pandora_server/lib/PandoraFMS/Tools.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index c161a464ed..05adbf79d1 100755 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -499,11 +499,17 @@ sub credential_store_get_key($$$) { my ($pa_config, $dbh, $identifier) = @_; my $sql = 'SELECT * FROM tcredential_store WHERE identifier = ?'; - my $key = get_db_single_row($dbh, $sql, $identifier); + my $key = PandoraFMS::DB::get_db_single_row($dbh, $sql, $identifier); return { - 'username' => pandora_output_password($pa_config, $key->{'username'}), - 'password' => pandora_output_password($pa_config, $key->{'password'}), + 'username' => PandoraFMS::Core::pandora_output_password( + $pa_config, + $key->{'username'} + ), + 'password' => PandoraFMS::Core::pandora_output_password( + $pa_config, + $key->{'password'} + ), 'extra_1' => $key->{'extra_1'}, 'extra_2' => $key->{'extra_2'}, }; From 99b071485062ca7b4029fd8d51ac9654759ff4a5 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 18 Nov 2019 11:06:27 +0100 Subject: [PATCH 064/123] PWE keep db connection up --- .../include/lib/WebSocketServer.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/pandora_console/include/lib/WebSocketServer.php b/pandora_console/include/lib/WebSocketServer.php index 2d9eb1d9fd..5ce45845d5 100644 --- a/pandora_console/include/lib/WebSocketServer.php +++ b/pandora_console/include/lib/WebSocketServer.php @@ -439,6 +439,9 @@ abstract class WebSocketServer if ((time() - $this->lastTickTimestamp) > $this->tickInterval) { $this->lastTickTimestamp = time(); $this->tick(); + + // Keep connection with DB active. + $this->dbHearthbeat(); } socket_select($read, $write, $except, 0, $this->timeout); @@ -1530,4 +1533,25 @@ abstract class WebSocketServer } + /** + * Keeps db connection opened. + * + * @return void + */ + public function dbHearthbeat() + { + global $config; + + \hd($config['dbconnection']); + + if (isset($config['dbconnection']) === false + || mysqli_ping($config['dbconnection']) === false + ) { + // Retry connection. + db_select_engine(); + $config['dbconnection'] = db_connect(); + } + } + + } From 85ca03b054e843c36b3552a98eee1f817934679e Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 18 Nov 2019 11:07:04 +0100 Subject: [PATCH 065/123] fix- removed traces --- pandora_console/include/lib/WebSocketServer.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/pandora_console/include/lib/WebSocketServer.php b/pandora_console/include/lib/WebSocketServer.php index 5ce45845d5..dfdc81d075 100644 --- a/pandora_console/include/lib/WebSocketServer.php +++ b/pandora_console/include/lib/WebSocketServer.php @@ -1542,8 +1542,6 @@ abstract class WebSocketServer { global $config; - \hd($config['dbconnection']); - if (isset($config['dbconnection']) === false || mysqli_ping($config['dbconnection']) === false ) { From a5ab29e90ed409dc9f0891e34413eadeeb730eca Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 18 Nov 2019 11:22:54 +0100 Subject: [PATCH 066/123] omnishell retries --- pandora_agents/unix/pandora_agent | 38 +++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index d6095d6d24..79f8586b15 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1731,28 +1731,48 @@ sub execute_command_timeout { # $std_files = ' >> /tmp/stdout 2>> /tmp/stderr ################################################################################ sub execute_command_block { - my ($commands, $std_files, $timeout) = @_; + my ($commands, $std_files, $timeout, $retry) = @_; return 0 unless defined($commands); + my $retries = $retry; + + $retries = 1 unless looks_like_number($retries) && $retries > 0; + my $err_level = 0; $std_files = '' unless defined ($std_files); if (ref($commands) ne "ARRAY") { return 0 if $commands eq ''; - $err_level = execute_command_timeout( - "($commands) $std_files", - $timeout - ); + + do { + $err_level = execute_command_timeout( + "($commands) $std_files", + $timeout + ); + + # Do not retry if success. + last if looks_like_number($err_level) && $err_level == 0; + } while ((--$retries) > 0); } else { foreach my $comm (@{$commands}) { next unless defined($comm); - $err_level = execute_command_timeout( - "($comm) $std_files", - $timeout - ); + $retries = $retry; + $retries = 1 unless looks_like_number($retries) && $retries > 0; + do { + $err_level = execute_command_timeout( + "($comm) $std_files", + $timeout + ); + + # Do not retry if success. + last if looks_like_number($err_level) && $err_level == 0; + + } while ((--$retries) > 0); + + # Do not continue evaluating block if failed. last unless ($err_level == 0); } } From 61ccd5bdbc108efe865c67f8be3e48aacdf7bb9d Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 18 Nov 2019 12:30:12 +0100 Subject: [PATCH 067/123] help_link omnishell --- pandora_console/include/functions.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index a7d94d43bc..042e27b170 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -5416,6 +5416,14 @@ function get_help_info($section_name) } break; + case 'omnishell': + if ($es) { + $result .= 'Omnishell&printable=yes'; + } else { + $result .= 'Omnishell&printable=yes'; + } + break; + case 'module_type_tab': if ($es) { $result .= 'Operacion&printable=yes#Tipos_de_m.C3.B3dulos'; From 79f5e879cc6f10c5413c11a2188a8a44f1f54ed8 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Date: Mon, 18 Nov 2019 13:37:10 +0100 Subject: [PATCH 068/123] WIP Alerts --- pandora_console/include/javascript/alert.js | 118 ++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 pandora_console/include/javascript/alert.js diff --git a/pandora_console/include/javascript/alert.js b/pandora_console/include/javascript/alert.js new file mode 100644 index 0000000000..d293e247d8 --- /dev/null +++ b/pandora_console/include/javascript/alert.js @@ -0,0 +1,118 @@ +/* eslint-disable no-unused-vars */ +/* global $, load_modal, generalShowMsg, confirmDialog */ + +function allowDrop(ev) { + ev.preventDefault(); +} + +function drag(ev) { + ev.dataTransfer.setData("html", ev.target.outerHTML); +} + +function drop(ev) { + ev.preventDefault(); + var data = document.createElement("span"); + var content = ev.dataTransfer.getData("html"); + if (content.includes("nexo")) { + content = "
    " + content; + } + data.innerHTML = content; + document.getElementById(ev.target.id).appendChild(data); +} + +function add_alert_action(settings) { + load_modal({ + target: $("#modal-add-action-form"), + form: "modal_form_add_actions", + url: settings.url_ajax, + modal: { + title: settings.title, + cancel: settings.btn_cancel, + ok: settings.btn_text + }, + onshow: { + page: settings.url, + method: "addAlertActionForm", + extradata: { + id: settings.id + } + }, + onsubmit: { + page: settings.url, + method: "addAlertAction", + dataType: "json" + }, + ajax_callback: add_alert_action_acept, + idMsgCallback: "msg-add-action" + }); +} + +function add_alert_action_acept(data, idMsg) { + if (data.error === 1) { + console.log(data.text); + return; + } + + if ($("#emptyli-al-" + data.id_alert).length > 0) { + $("#emptyli-al-" + data.id_alert).remove(); + } + + $.ajax({ + method: "post", + url: data.url, + data: { + page: data.page, + method: "addRowActionAjax", + id_alert: data.id_alert, + id_action: data.id_action + }, + dataType: "html", + success: function(li) { + $(".ui-dialog-content").dialog("close"); + $("#ul-al-" + data.id_alert).append(li); + }, + error: function(error) { + console.log(error); + } + }); +} + +function delete_alert_action(settings) { + confirmDialog({ + title: settings.title, + message: settings.msg, + onAccept: function() { + $.ajax({ + method: "post", + url: settings.url, + data: { + page: settings.page, + method: "deleteActionAlert", + id_alert: settings.id_alert, + id_action: settings.id_action + }, + dataType: "json", + success: function(data) { + // Delete row table. + $( + "#li-al-" + settings.id_alert + "-act-" + settings.id_action + ).remove(); + + var num_row = $("#ul-al-" + settings.id_alert + " li").length; + if (num_row === 0) { + var emptyli = + "