From 82db8bd4bda6e6aa4865147bbfbd583a0d2f3bf4 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Fri, 1 Sep 2023 10:28:02 +0200 Subject: [PATCH 01/93] #11077 fix trre view widget style modal --- pandora_console/include/functions_treeview.php | 6 +++--- pandora_console/include/styles/pandora.css | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_treeview.php b/pandora_console/include/functions_treeview.php index 025276ecef..bdc7339b4a 100755 --- a/pandora_console/include/functions_treeview.php +++ b/pandora_console/include/functions_treeview.php @@ -785,7 +785,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false) false, false, '', - 'white-box-content mrgn_top_0 mrgn_btn_0px', + 'white-box-content-no-height mrgn_top_0 mrgn_btn_0px', 'white_table_flex' ); @@ -805,7 +805,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false) true, false, '', - 'white-box-content mrgn_top_0 mrgn_btn_0px border-bottom-gray', + 'white-box-content-no-height mrgn_top_0 mrgn_btn_0px border-bottom-gray', 'white_table_flex' ); } @@ -980,7 +980,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false) true, empty($table_advanced->data), '', - 'white-box-content mrgn_top_0 mrgn_btn_0px border-bottom-gray', + 'white-box-content-no-height mrgn_top_0 mrgn_btn_0px border-bottom-gray', 'white_table_flex' ); diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index abbb50c927..486e3717f2 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -6369,6 +6369,18 @@ div#status_pie { min-width: 100%; } +.white-box-content-no-height { + width: 100%; + background-color: #fff; + box-sizing: border-box; + /*border: 1px solid #e2e2e2;*/ + display: flex; + align-items: center; + flex-wrap: wrap; + padding: 10px; + min-width: 100%; +} + .white-box-content-clean { padding-left: 2em; padding-top: 1em; From f3d2d7f3e63b8e215184c5eba931129d068de6e6 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Fri, 1 Sep 2023 10:48:03 +0200 Subject: [PATCH 02/93] #11854 Fix Create network monitoring from welcome pandora fms agent --- .../include/class/WelcomeWindow.class.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pandora_console/include/class/WelcomeWindow.class.php b/pandora_console/include/class/WelcomeWindow.class.php index 5e66268403..3b49e1a56f 100644 --- a/pandora_console/include/class/WelcomeWindow.class.php +++ b/pandora_console/include/class/WelcomeWindow.class.php @@ -702,7 +702,7 @@ class WelcomeWindow extends Wizard 'next', 'style' => 'margin-top:15px; float:right;']); ?> @@ -1263,14 +1262,18 @@ class WelcomeWindow extends Wizard }); }); - $('#button-create_conectivity').click(function(){ + $('#button-create_conectivity').click(function(e){ + if($("#text-ip_target")[0].checkValidity() == false) { + $("#text-ip_target")[0].reportValidity(); + return false; + } $.ajax({ async: false, type: "POST", url: "include/ajax/task_to_perform.php", data: { check_connectivity: 1, - id_group: $('#id_group :selected').val(), + id_group: $('#id_group1 option:selected').val(), ip_target: $('#text-ip_target').val(), agent_name: $('#text-agent_name').val(), }, From 083043eabae516edf768c55e235cf29afb77dfc2 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Fri, 1 Sep 2023 14:06:48 +0200 Subject: [PATCH 03/93] #11650 Change style for tooltip --- pandora_console/godmode/alerts/alert_templates.php | 9 +++++---- pandora_console/include/functions_ui.php | 7 +++++-- pandora_console/include/styles/pandora.css | 5 +++++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/pandora_console/godmode/alerts/alert_templates.php b/pandora_console/godmode/alerts/alert_templates.php index 003ec45d03..8236d1e69c 100644 --- a/pandora_console/godmode/alerts/alert_templates.php +++ b/pandora_console/godmode/alerts/alert_templates.php @@ -31,13 +31,14 @@ if (is_ajax()) { return; } - echo '

'.$template['name'].'

'; + echo '

'.$template['name'].'

'; + echo html_print_image('images/info.svg', true, ['class' => 'invert_filter']); + echo ui_print_alert_template_example($template['id'], true, true, false); + echo '
'; + echo '
'; echo ''.__('Type').': '; echo alerts_get_alert_templates_type_name($template['type']); - echo '
'; - echo ui_print_alert_template_example($template['id'], true); - echo '
'; if ($template['description'] != '') { diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 4bacf6c920..b843b5ff3e 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1780,11 +1780,14 @@ function ui_print_string_substr($string, $cutoff=16, $return=false, $fontsize=0) * * @return An HTML string if return was true. */ -function ui_print_alert_template_example($id_alert_template, $return=false, $print_values=true) +function ui_print_alert_template_example($id_alert_template, $return=false, $print_values=true, $print_icon=true) { $output = ''; - $output .= html_print_image('images/information.png', true, ['class' => 'invert_filter']); + if ($print_icon === true) { + $output .= html_print_image('images/information.png', true, ['class' => 'invert_filter']); + } + $output .= ''; $template = alerts_get_alert_template($id_alert_template); diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index abbb50c927..eeab657bce 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -12562,3 +12562,8 @@ tr[id^="network_component-plugin-snmp-fields-dynamicMacroRow-"] input { flex-wrap: nowrap; justify-content: flex-start !important; } + +#cluetip-inner > #example { + position: absolute; + margin-left: 5px; +} From 5ca1c547926ddbdf7417ec3e0f05db080af057a2 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Mon, 4 Sep 2023 10:49:29 +0200 Subject: [PATCH 04/93] #9946 Add search filter and change table to datatable --- .../include/ajax/dashboard.ajax.php | 217 ++++++++++++++++++ pandora_console/views/dashboard/list.php | 181 ++++----------- 2 files changed, 262 insertions(+), 136 deletions(-) create mode 100644 pandora_console/include/ajax/dashboard.ajax.php diff --git a/pandora_console/include/ajax/dashboard.ajax.php b/pandora_console/include/ajax/dashboard.ajax.php new file mode 100644 index 0000000000..0c6b36a1df --- /dev/null +++ b/pandora_console/include/ajax/dashboard.ajax.php @@ -0,0 +1,217 @@ +width = '100%'; + $table->class = 'info_table'; + $table->headstyle['name'] = 'text-align: left;'; + $table->headstyle['cells'] = 'text-align: center;'; + $table->headstyle['groups'] = 'text-align: center;'; + $table->headstyle['favorite'] = 'text-align: center;'; + $table->headstyle['full_screen'] = 'text-align: center;'; + + $table->style = []; + $table->style['name'] = 'text-align: left;'; + $table->style['cells'] = 'text-align: center;'; + $table->style['groups'] = 'text-align: center;'; + $table->style['favorite'] = 'text-align: center;'; + $table->style['full_screen'] = 'text-align: center;'; + + $table->size = []; + $table->size['name'] = '40%'; + $table->size['full_screen'] = '30px'; + + $table->head = []; + $table->head['name'] = __('Name'); + $table->head['cells'] = __('Cells'); + $table->head['groups'] = __('Group'); + $table->head['favorite'] = __('Favorite'); + $table->head['full_screen'] = __('Full screen'); + + if ($manageDashboards === 1) { + $table->head['copy'] = __('Copy'); + $table->head['delete'] = __('Delete'); + $table->headstyle['copy'] = 'text-align: center;'; + $table->headstyle['delete'] = 'text-align: center;'; + $table->style['copy'] = 'text-align: center;'; + $table->style['delete'] = 'text-align: center;'; + $table->size['cells'] = '30px'; + $table->size['groups'] = '30px'; + $table->size['favorite'] = '30px'; + $table->size['copy'] = '30px'; + $table->size['delete'] = '30px'; + } else { + $table->size['cells'] = '60px'; + $table->size['groups'] = '60px'; + $table->size['favorite'] = '60px'; + } + + $table->data = []; + + if (strlen($filter['free_search']) > 0) { + $where = 'WHERE name LIKE "%'.$filter['free_search'].'%"'; + } else { + $where = ''; + } + + $sql = 'SELECT * FROM tdashboard '.$where.' ORDER BY id '.$pagination; + $dashboards = db_get_all_rows_sql($sql); + $count = db_get_value_sql('SELECT COUNT(*) FROM tdashboard '.$where); + foreach ($dashboards as $dashboard) { + $data = []; + + $dataQuery = ['dashboardId' => $dashboard['id']]; + + $url = $urlDashboard.'&'.http_build_query($dataQuery); + $data['name'] = ''; + $data['name'] .= $dashboard['name']; + $data['name'] .= ''; + + $data['cells'] = $dashboard['cells']; + + if (empty($dashboard['id_user']) === false) { + $data['groups'] = __( + 'Private for (%s)', + $dashboard['id_user'] + ); + } else { + $data['groups'] = ui_print_group_icon( + $dashboard['id_group'], + true + ); + } + + $data['favorite'] = $dashboard['active']; + + $dataQueryFull = [ + 'dashboardId' => $dashboard['id'], + 'pure' => 1, + ]; + + $urlFull = $urlDashboard; + $urlFull .= '&'.\http_build_query($dataQueryFull); + $data['full_screen'] = ''; + $data['full_screen'] .= \html_print_image( + 'images/fullscreen@svg.svg', + true, + ['class' => 'main_menu_icon invert_filter'] + ); + $data['full_screen'] .= ''; + + if ($manageDashboards === 1) { + $data['copy'] = ''; + $data['delete'] = ''; + } + + if (check_acl_restricted_all($config['id_user'], $dashboard['id_group'], 'RM')) { + $dataQueryCopy = [ + 'dashboardId' => $dashboard['id'], + 'copyDashboard' => 1, + ]; + $urlCopy = $urlDashboard.'&'.\http_build_query($dataQueryCopy); + $data['copy'] = ''; + $data['copy'] .= html_print_image('images/copy.svg', true, ['class' => 'main_menu_icon invert_filter']); + $data['copy'] .= ''; + + $dataQueryDelete = [ + 'dashboardId' => $dashboard['id'], + 'deleteDashboard' => 1, + ]; + $urlDelete = $urlDashboard; + $urlDelete .= '&'.\http_build_query($dataQueryDelete); + $data['delete'] = ''; + $data['delete'] .= \html_print_image( + 'images/delete.svg', + true, + ['class' => 'main_menu_icon invert_filter'] + ); + $data['delete'] .= ''; + } + + $table->cellclass[] = [ + 'full_screen' => 'table_action_buttons', + 'copy' => 'table_action_buttons', + 'delete' => 'table_action_buttons', + ]; + + $table->data[] = $data; + } + + // Datatables format: RecordsTotal && recordsfiltered. + echo json_encode( + [ + 'data' => $table->data, + 'recordsTotal' => $count, + 'recordsFiltered' => $count, + ] + ); + // Capture output. + $response = ob_get_clean(); + } catch (Exception $e) { + echo json_encode(['error' => $e->getMessage()]); + exit; + } + + // If not valid, show error with issue. + json_decode($response); + if (json_last_error() == JSON_ERROR_NONE) { + // If valid dump. + echo $response; + } else { + echo json_encode( + ['error' => $response] + ); + } + + exit; +} diff --git a/pandora_console/views/dashboard/list.php b/pandora_console/views/dashboard/list.php index 2645724a6e..e0cbaec685 100644 --- a/pandora_console/views/dashboard/list.php +++ b/pandora_console/views/dashboard/list.php @@ -75,144 +75,53 @@ if (empty($dashboards) === true) { ] ); } else { - $table = new stdClass(); - $table->width = '100%'; - $table->class = 'info_table'; - $table->headstyle['name'] = 'text-align: left;'; - $table->headstyle['cells'] = 'text-align: center;'; - $table->headstyle['groups'] = 'text-align: center;'; - $table->headstyle['favorite'] = 'text-align: center;'; - $table->headstyle['full_screen'] = 'text-align: center;'; + $id_table = 'dashboards_list'; + $columns = [ + 'name', + 'cells', + 'groups', + 'favorite', + 'full_screen', + ]; - $table->style = []; - $table->style['name'] = 'text-align: left;'; - $table->style['cells'] = 'text-align: center;'; - $table->style['groups'] = 'text-align: center;'; - $table->style['favorite'] = 'text-align: center;'; - $table->style['full_screen'] = 'text-align: center;'; + $column_names = [ + __('Name'), + __('Cells'), + __('Group'), + __('Favorite'), + __('Full screen'), + ]; - $table->size = []; - $table->size['name'] = '40%'; - $table->size['full_screen'] = '30px'; - - $table->head = []; - $table->head['name'] = __('Name'); - $table->head['cells'] = __('Cells'); - $table->head['groups'] = __('Group'); - $table->head['favorite'] = __('Favorite'); - $table->head['full_screen'] = __('Full screen'); - - if ($manageDashboards === 1) { - $table->head['copy'] = __('Copy'); - $table->head['delete'] = __('Delete'); - $table->headstyle['copy'] = 'text-align: center;'; - $table->headstyle['delete'] = 'text-align: center;'; - $table->style['copy'] = 'text-align: center;'; - $table->style['delete'] = 'text-align: center;'; - $table->size['cells'] = '30px'; - $table->size['groups'] = '30px'; - $table->size['favorite'] = '30px'; - $table->size['copy'] = '30px'; - $table->size['delete'] = '30px'; - } else { - $table->size['cells'] = '60px'; - $table->size['groups'] = '60px'; - $table->size['favorite'] = '60px'; - } - - $table->data = []; - - foreach ($dashboards as $dashboard) { - $data = []; - - $dataQuery = ['dashboardId' => $dashboard['id']]; - - $url = $urlDashboard.'&'.http_build_query($dataQuery); - $data['name'] = ''; - $data['name'] .= $dashboard['name']; - $data['name'] .= ''; - - $data['cells'] = $dashboard['cells']; - - if (empty($dashboard['id_user']) === false) { - $data['groups'] = __( - 'Private for (%s)', - $dashboard['id_user'] - ); - } else { - $data['groups'] = ui_print_group_icon( - $dashboard['id_group'], - true - ); - } - - $data['favorite'] = $dashboard['active']; - - $dataQueryFull = [ - 'dashboardId' => $dashboard['id'], - 'pure' => 1, - ]; - - $urlFull = $urlDashboard; - $urlFull .= '&'.\http_build_query($dataQueryFull); - $data['full_screen'] = ''; - $data['full_screen'] .= \html_print_image( - 'images/fullscreen@svg.svg', - true, - ['class' => 'main_menu_icon invert_filter'] - ); - $data['full_screen'] .= ''; - - if ($manageDashboards === 1) { - $data['copy'] = ''; - $data['delete'] = ''; - } - - if (check_acl_restricted_all($config['id_user'], $dashboard['id_group'], 'RM')) { - $dataQueryCopy = [ - 'dashboardId' => $dashboard['id'], - 'copyDashboard' => 1, - ]; - $urlCopy = $urlDashboard.'&'.\http_build_query($dataQueryCopy); - $data['copy'] = ''; - $data['copy'] .= html_print_image('images/copy.svg', true, ['class' => 'main_menu_icon invert_filter']); - $data['copy'] .= ''; - - $dataQueryDelete = [ - 'dashboardId' => $dashboard['id'], - 'deleteDashboard' => 1, - ]; - $urlDelete = $urlDashboard; - $urlDelete .= '&'.\http_build_query($dataQueryDelete); - $data['delete'] = ''; - $data['delete'] .= \html_print_image( - 'images/delete.svg', - true, - ['class' => 'main_menu_icon invert_filter'] - ); - $data['delete'] .= ''; - } - - $table->cellclass[] = [ - 'full_screen' => 'table_action_buttons', - 'copy' => 'table_action_buttons', - 'delete' => 'table_action_buttons', - ]; - - $table->data[] = $data; - } - - \html_print_table($table); - $tablePagination = \ui_pagination( - $count, - false, - $offset, - 0, - true, - 'offset', - false, - '' + ui_print_datatable( + [ + 'id' => $id_table, + 'class' => 'info_table', + 'style' => 'width: 100%', + 'columns' => $columns, + 'column_names' => $column_names, + 'ajax_url' => 'include/ajax/dashboard.ajax', + 'ajax_data' => ['method' => 'draw'], + 'default_pagination' => $config['block_size'], + 'no_sortable_columns' => [], + 'order' => [ + 'field' => 'name', + 'direction' => 'desc', + ], + 'search_button_class' => 'sub filter float-right', + 'form' => [ + 'inputs' => [ + [ + 'label' => __('Free search'), + 'type' => 'text', + 'class' => 'w400px', + 'id' => 'free_search', + 'name' => 'free_search', + ], + ], + ], + 'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar ', + 'csv' => false, + ] ); } From 81610046e3cc3d07ce02231b0af0720c0a11895f Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Mon, 4 Sep 2023 10:58:15 +0200 Subject: [PATCH 05/93] #9946 Fix url --- pandora_console/include/ajax/dashboard.ajax.php | 1 + pandora_console/views/dashboard/list.php | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/ajax/dashboard.ajax.php b/pandora_console/include/ajax/dashboard.ajax.php index 0c6b36a1df..32d509eb8c 100644 --- a/pandora_console/include/ajax/dashboard.ajax.php +++ b/pandora_console/include/ajax/dashboard.ajax.php @@ -31,6 +31,7 @@ global $config; $method = get_parameter('method', null); $filter = get_parameter('filter', ''); +$urlDashboard = get_parameter('urlDashboard', ''); if ($method === 'draw') { // Datatables offset, limit and order. diff --git a/pandora_console/views/dashboard/list.php b/pandora_console/views/dashboard/list.php index e0cbaec685..50e2fe26d8 100644 --- a/pandora_console/views/dashboard/list.php +++ b/pandora_console/views/dashboard/list.php @@ -91,7 +91,6 @@ if (empty($dashboards) === true) { __('Favorite'), __('Full screen'), ]; - ui_print_datatable( [ 'id' => $id_table, @@ -100,7 +99,10 @@ if (empty($dashboards) === true) { 'columns' => $columns, 'column_names' => $column_names, 'ajax_url' => 'include/ajax/dashboard.ajax', - 'ajax_data' => ['method' => 'draw'], + 'ajax_data' => [ + 'method' => 'draw', + 'urlDashboard' => $urlDashboard, + ], 'default_pagination' => $config['block_size'], 'no_sortable_columns' => [], 'order' => [ From dc520df039343547929cba9ca7278c35942ae4db Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Mon, 4 Sep 2023 11:09:58 +0200 Subject: [PATCH 06/93] #9946 Fix delete and copy --- pandora_console/include/ajax/dashboard.ajax.php | 1 + pandora_console/views/dashboard/list.php | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/ajax/dashboard.ajax.php b/pandora_console/include/ajax/dashboard.ajax.php index 32d509eb8c..f07d1aee57 100644 --- a/pandora_console/include/ajax/dashboard.ajax.php +++ b/pandora_console/include/ajax/dashboard.ajax.php @@ -32,6 +32,7 @@ global $config; $method = get_parameter('method', null); $filter = get_parameter('filter', ''); $urlDashboard = get_parameter('urlDashboard', ''); +$manageDashboards = get_parameter('manageDashboards', 1); if ($method === 'draw') { // Datatables offset, limit and order. diff --git a/pandora_console/views/dashboard/list.php b/pandora_console/views/dashboard/list.php index 50e2fe26d8..52b7543304 100644 --- a/pandora_console/views/dashboard/list.php +++ b/pandora_console/views/dashboard/list.php @@ -91,6 +91,13 @@ if (empty($dashboards) === true) { __('Favorite'), __('Full screen'), ]; + if ($manageDashboards === 1) { + $columns[] = 'copy'; + $columns[] = 'delete'; + $column_names[] = __('Copy'); + $column_names[] = __('Delete'); + } + ui_print_datatable( [ 'id' => $id_table, @@ -100,8 +107,9 @@ if (empty($dashboards) === true) { 'column_names' => $column_names, 'ajax_url' => 'include/ajax/dashboard.ajax', 'ajax_data' => [ - 'method' => 'draw', - 'urlDashboard' => $urlDashboard, + 'method' => 'draw', + 'urlDashboard' => $urlDashboard, + 'manageDashboards' => $manageDashboards, ], 'default_pagination' => $config['block_size'], 'no_sortable_columns' => [], From e31a38b08b4230d3743e62eefc66a95d097e4929 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Mon, 4 Sep 2023 12:50:23 +0200 Subject: [PATCH 07/93] #11791 Prevent any user from changing another user's notification settings --- pandora_console/include/functions_notifications.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pandora_console/include/functions_notifications.php b/pandora_console/include/functions_notifications.php index 60a8e6bce0..eb16d5ebc0 100644 --- a/pandora_console/include/functions_notifications.php +++ b/pandora_console/include/functions_notifications.php @@ -653,7 +653,14 @@ function notifications_get_user_label_status($source, $user, $label) */ function notifications_set_user_label_status($source, $user, $label, $value) { + global $config; + + if ((bool) check_acl($config['id_user'], 0, 'PM') === false && $config['id_user'] !== $user) { + return false; + } + $source_info = notifications_get_all_sources(['id' => $source]); + if (!isset($source_info[0]) || !$source_info[0]['enabled'] || !$source_info[0]['user_editable'] From 3327d79ed62b38bc6f63611c57fe4c9f60c49c54 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Wed, 6 Sep 2023 09:35:12 +0200 Subject: [PATCH 08/93] #11442 Change Welcome tips arrows and buttons --- .../include/class/TipsWindow.class.php | 21 +++- .../include/javascript/tipsWindow.js | 101 ++++++++++++++---- pandora_console/include/styles/pandora.css | 22 ++++ .../include/styles/tips_window.css | 3 +- .../views/dashboard/tipsWindow.php | 39 ++++--- 5 files changed, 144 insertions(+), 42 deletions(-) diff --git a/pandora_console/include/class/TipsWindow.class.php b/pandora_console/include/class/TipsWindow.class.php index ae4271fba9..6406c69194 100644 --- a/pandora_console/include/class/TipsWindow.class.php +++ b/pandora_console/include/class/TipsWindow.class.php @@ -47,6 +47,7 @@ class TipsWindow 'renderPreview', 'setShowTipsAtStartup', 'getTips', + 'getTipById', ]; /** @@ -221,8 +222,13 @@ class TipsWindow * * @return array $tip */ - public function getTipById($idTip) + public function getTipById($idTip=false, $return=false) { + if ($idTip === false) { + $idTip = get_parameter('idTip'); + } + + $return = get_parameter('return', false); $tip = db_get_row( 'twelcome_tip', 'id', @@ -232,9 +238,20 @@ class TipsWindow $tip['title'] = io_safe_output($tip['title']); $tip['text'] = io_safe_output($tip['text']); $tip['url'] = io_safe_output($tip['url']); + $tip['files'] = $this->getFilesFromTip($tip['id']); } - return $tip; + if ($return !== false) { + if (empty($tip) === false) { + echo json_encode(['success' => true, 'data' => $tip]); + return; + } else { + echo json_encode(['success' => false]); + return; + } + } else { + return $tip; + } } diff --git a/pandora_console/include/javascript/tipsWindow.js b/pandora_console/include/javascript/tipsWindow.js index 94d28c9339..cb804ecebb 100644 --- a/pandora_console/include/javascript/tipsWindow.js +++ b/pandora_console/include/javascript/tipsWindow.js @@ -81,14 +81,17 @@ function removeInputImage(e) { $("#notices_images").addClass("invisible"); } } -function render({ title, text, url, files }) { +function render({ title, text, url, files, method }) { $("#title_tip").html(title); $("#text_tip").html(text); if (url) { - $("#url_tip").removeClass("invisible"); + $("#button-learn_more").removeAttr("disabled"); + $("#button-learn_more").removeClass("disabled_button"); $("#url_tip").attr("href", url); } else { - $("#url_tip").addClass("invisible"); + $("#button-learn_more").attr("disabled", "disabled"); + $("#button-learn_more").addClass("disabled_button"); + $("#url_tip").attr("href", ""); } $(".carousel").empty(); @@ -110,7 +113,11 @@ function render({ title, text, url, files }) { if (index >= limitRound - 1) { $($(".count-round-tip")[0]).addClass("active"); } else { - $($(".count-round-tip")[index + 1]).addClass("active"); + if (method == "next") { + $($(".count-round-tip")[index + 1]).addClass("active"); + } else { + $($(".count-round-tip")[index - 1]).addClass("active"); + } } return false; } @@ -146,23 +153,79 @@ function render_counter() { function next_tip() { if (idTips.length >= totalTips) { idTips = []; + $("#hidden-tip_position").val(-1); } - $.ajax({ - method: "POST", - url: url, - dataType: "json", - data: { - page: page, - method: "getRandomTip", - exclude: JSON.stringify(idTips) - }, - success: function({ success, data }) { - if (success) { - idTips.push(parseInt(data.id)); - render(data); + let tip_position = parseInt($("#hidden-tip_position").val()) + 1; + let idTip = idTips[tip_position]; + if (idTip === undefined) { + $.ajax({ + method: "POST", + url: url, + dataType: "json", + data: { + page: page, + method: "getRandomTip", + exclude: JSON.stringify(idTips) + }, + success: function({ success, data }) { + if (success) { + let tip_position = parseInt($("#hidden-tip_position").val()) + 1; + $("#hidden-tip_position").val(tip_position); + idTips.push(parseInt(data.id)); + data.method = "next"; + render(data); + } } - } - }); + }); + } else { + $.ajax({ + method: "POST", + url: url, + dataType: "json", + data: { + page: page, + method: "getTipById", + idTip: idTip, + return: true + }, + success: function({ success, data }) { + if (success) { + let tip_position = parseInt($("#hidden-tip_position").val()) + 1; + $("#hidden-tip_position").val(tip_position); + data.method = "next"; + render(data); + } + } + }); + } +} + +function previous_tip() { + let actual_tip_position = parseInt($("#hidden-tip_position").val()); + + if (actual_tip_position != 0) { + let tip_position = parseInt($("#hidden-tip_position").val()) - 1; + let idTip = idTips[tip_position]; + $.ajax({ + method: "POST", + url: url, + dataType: "json", + data: { + page: page, + method: "getTipById", + idTip: idTip, + return: true + }, + success: function({ success, data }) { + if (success) { + let tip_position = parseInt($("#hidden-tip_position").val()) - 1; + $("#hidden-tip_position").val(tip_position); + data.method = "prev"; + render(data); + } + } + }); + } } function load_tips_modal(settings) { diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index d87d959ac5..3bbf8cb16d 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -12566,3 +12566,25 @@ tr[id^="network_component-plugin-snmp-fields-dynamicMacroRow-"] input { .ui-date-range-in > a { background-color: #81b92e3b !important; } + +.ui-dialog .tips_header.ui-dialog-titlebar { + height: fit-content !important; +} + +.arrow_counter:hover { + cursor: pointer; +} + +.disabled_button { + background-color: #ccc !important; + border: 2px solid #444 !important; + color: #444 !important; +} + +.disabled_button:hover { + cursor: not-allowed; +} + +.counter-tips { + margin-right: 20px; +} diff --git a/pandora_console/include/styles/tips_window.css b/pandora_console/include/styles/tips_window.css index 505799949b..53906401a8 100644 --- a/pandora_console/include/styles/tips_window.css +++ b/pandora_console/include/styles/tips_window.css @@ -21,7 +21,7 @@ display: flex !important; padding: 0px 20px; justify-content: space-between; - height: fit-content; + height: fit-content !important; background-color: white; color: #161628; border-top-left-radius: 25px !important; @@ -161,6 +161,7 @@ span.count-round-tip.active { margin-top: 10px; } .arrow_counter { + cursor: pointer; width: 7px; margin: 0px 5px; } diff --git a/pandora_console/views/dashboard/tipsWindow.php b/pandora_console/views/dashboard/tipsWindow.php index b9ff3f2420..573a11abcc 100644 --- a/pandora_console/views/dashboard/tipsWindow.php +++ b/pandora_console/views/dashboard/tipsWindow.php @@ -72,37 +72,36 @@ $output .= '

'.$title.'

'; $output .= '

'; $output .= $text; $output .= '

'; - -$link_class = 'invisible'; +$disabled_class = 'disabled_button'; +$disabled = true; if (empty($url) === false && $url !== '') { - $link_class = ''; + $disabled_class = ''; + $disabled = false; } -$output .= ''.__('See more info').''; - $output .= ''; $output .= '
'; - +$output .= ''; $output .= html_print_button( - __('Maybe later'), + __('Learn more'), + 'learn_more', + $disabled, '', - false, - '', - [ - 'onclick' => 'close_dialog()', - 'class' => 'secondary mini', - ], + ['class' => 'secondary mini '.$disabled_class], true ); +$output .= ''; $output .= '
'; -$output .= html_print_image('images/arrow-left-grey.png', true, ['class' => 'arrow_counter']); -$output .= html_print_image('images/arrow-right-grey.png', true, ['class' => 'arrow_counter']); + +$output .= html_print_image('images/arrow-left-grey.png', true, ['class' => 'arrow_counter', 'onclick' => 'previous_tip()']); +$output .= html_print_image('images/arrow-right-grey.png', true, ['class' => 'arrow_counter', 'onclick' => 'next_tip()']); +$output .= html_print_input_hidden('tip_position', 0, true); $output .= '
'; if ($preview === true) { $output .= html_print_button( - __('Ok'), - 'next_tip', + __('Close'), + 'close_dialog', false, '', [ @@ -113,12 +112,12 @@ if ($preview === true) { ); } else { $output .= html_print_button( - __('Ok'), - 'next_tip', + __('Close'), + 'close_dialog', false, '', [ - 'onclick' => 'next_tip()', + 'onclick' => 'close_dialog()', 'class' => ($totalTips === '1') ? 'mini hide-button' : 'mini', ], true From 0cd43b8315e48c654725564c02a01781a3fee0c7 Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Wed, 6 Sep 2023 15:45:35 +0200 Subject: [PATCH 09/93] fixed web console erratas --- .../godmode/reporting/reporting_builder.list_items.php | 2 +- pandora_console/godmode/setup/setup.php | 2 +- pandora_console/include/functions_reporting_html.php | 2 +- tests/console/Views.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.list_items.php b/pandora_console/godmode/reporting/reporting_builder.list_items.php index d3fd439181..e92e038dfe 100755 --- a/pandora_console/godmode/reporting/reporting_builder.list_items.php +++ b/pandora_console/godmode/reporting/reporting_builder.list_items.php @@ -777,7 +777,7 @@ $table->data[0][0] = html_print_label_input_block( ) ); $table->data[0][1] = html_print_label_input_block( - __('Poisition'), + __('Position'), html_print_input_text_extended( 'position_to_delete', 1, diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index 7e17f9fe4c..84cce309a8 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -370,7 +370,7 @@ switch ($section) { break; default: - $subpage = 'seccion: '.$section; + $subpage = 'seccion: '; // Default. break; } diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index eb7c555fb9..b57ee0e7e1 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -2712,7 +2712,7 @@ function reporting_html_group_report($table, $item, $pdf=0) $out .= ''; $out .= ''; $out .= ''; - $out .= '
'.__('Events per agent').''; + $out .= '
'.__('Events by agent').''; $data = []; $options = []; $labels = []; diff --git a/tests/console/Views.py b/tests/console/Views.py index b4ad48134e..f4967e3db7 100644 --- a/tests/console/Views.py +++ b/tests/console/Views.py @@ -305,7 +305,7 @@ class viewAppear(PandoraWebDriverTestCase): click_menu_element(driver,"CSV import") time.sleep(2) self.assertEqual("Upload file" in driver.page_source,True) - click_menu_element(driver,"CSV import group") + click_menu_element(driver,"Import groups with CSV file") time.sleep(2) self.assertEqual("Upload file" in driver.page_source,True) click_menu_element(driver,"IPAM") From 02e2903b37f4538b59c0ec18cf9134986a4bfe39 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Thu, 7 Sep 2023 17:58:26 +0200 Subject: [PATCH 10/93] #11995 Prevent breaked graphics --- pandora_console/include/graphs/flot/pandora.flot.js | 3 +++ pandora_console/include/styles/pandora.css | 1 + 2 files changed, 4 insertions(+) diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 56cd4a71a1..077a3200e5 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -2223,6 +2223,9 @@ function pandoraFlotArea( } var dataInSelection = ranges.xaxis.to - ranges.xaxis.from; + if (dataInSelection < 35000) { + return; + } var maxticks_zoom = dataInSelection / 3600000 / number_ticks; if (maxticks_zoom < 0.001) { diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index d87d959ac5..bc31c721e5 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -6646,6 +6646,7 @@ table.table_modal_alternate tr td:first-child { white-space: normal; word-break: break-all; line-height: 1.3; + max-width: 40px !important; } table#agent_interface_info .flot-text .flot-x-axis div { From 0e59b56b220630128296e50c15fe507971702360 Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Fri, 15 Sep 2023 12:34:25 +0200 Subject: [PATCH 11/93] Added functionality that allows you to filter table information. --- .../include/lib/Dashboard/Manager.php | 20 +++++- pandora_console/views/dashboard/list.php | 68 +++++++++++++++++++ 2 files changed, 86 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/lib/Dashboard/Manager.php b/pandora_console/include/lib/Dashboard/Manager.php index 40b6d2d1a0..181777b405 100644 --- a/pandora_console/include/lib/Dashboard/Manager.php +++ b/pandora_console/include/lib/Dashboard/Manager.php @@ -731,7 +731,8 @@ class Manager implements PublicLogin int $limit=-1, bool $favourite=false, bool $slideshow=false, - string $id_user='' + string $id_user='', + array $rowFilter=[] ):array { global $config; @@ -749,6 +750,14 @@ class Manager implements PublicLogin $sql_where .= 'AND td.cells_slideshow = 1'; } + if (empty((int) $rowFilter['id_group']) === false) { + $sql_where .= ' AND td.id_group = '.$rowFilter['id_group']; + } + + if (empty($rowFilter['name_filter']) === false) { + $sql_where .= ' AND td.name like "%'.$rowFilter['name_filter'].'%"'; + } + if (empty($id_user) === true) { $id_user = $config['id_user']; } @@ -944,6 +953,13 @@ class Manager implements PublicLogin private function showList() { global $config; + $id_group_filter = \get_parameter_post('id_group', ''); + $name_filter = \get_parameter_post('name', ''); + + $rowFilter = [ + 'id_group' => $id_group_filter, + 'name_filter' => $name_filter, + ]; $limit_sql = $config['block_size']; @@ -957,7 +973,7 @@ class Manager implements PublicLogin $resultCopy = $this->copy(); } - $dashboards = $this->getDashboards($this->offset, $limit_sql); + $dashboards = $this->getDashboards($this->offset, $limit_sql, false, false, '', $rowFilter); $count = $this->getDashboardsCount(); View::render( diff --git a/pandora_console/views/dashboard/list.php b/pandora_console/views/dashboard/list.php index 2645724a6e..fe6802392e 100644 --- a/pandora_console/views/dashboard/list.php +++ b/pandora_console/views/dashboard/list.php @@ -67,6 +67,74 @@ if (isset($resultCopy) === true) { ); } +// Filter table. +$filter_id_group = \get_parameter_post('id_group', ''); +$filter_name = \get_parameter_post('name', ''); + +$filterTable = new stdClass(); +$filterTable->class = 'filter-table-adv w100p'; +$filterTable->size[0] = '20%'; +$filterTable->size[1] = '20%'; +$filterTable->data = []; + +$filterTable->data[0][0] = html_print_label_input_block( + __('Group'), + html_print_select_groups( + false, + 'AR', + true, + 'id_group', + $filter_id_group, + '', + '', + '', + true, + false, + true, + 'w100p', + false, + '' + ) +); + +$filterTable->data[0][1] = html_print_label_input_block( + __('Name'), + html_print_input_text('name', $filter_name, '', 25, 80, true) +); + +$form_html = ''; + +ui_toggle( + $form_html, + ''.__('Filter').'', + 'dashboard_search', + false, + true, + false, + '', + 'white-box-content', + 'box-flat white_table_graph fixed_filter_bar' +); + + if (empty($dashboards) === true) { ui_print_info_message( [ From eed7ff8aba616d89f7e0067e0d0169a15b0dd2b3 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Tue, 19 Sep 2023 16:18:58 +0200 Subject: [PATCH 12/93] #11436 Fix notif access stastics performance --- pandora_console/include/class/ConsoleSupervisor.php | 4 +++- pandora_console/include/styles/tables.css | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index a434a30e7f..f6acd528e5 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -716,7 +716,7 @@ class ConsoleSupervisor $total_agents = db_get_value('count(*)', 'tagente'); - if ($total_agents >= 200) { + if ($total_agents >= 1) { if ((int) $config['agentaccess'] !== 0) { db_process_sql_update('tconfig', ['value' => 0], ['token' => 'agentaccess']); $this->notify( @@ -729,6 +729,8 @@ class ConsoleSupervisor 'url' => '__url__/index.php?sec=general&sec2=godmode/setup/setup§ion=perf', ] ); + } else { + $this->cleanNotifications('NOTIF.ACCESSSTASTICS.PERFORMANCE'); } } else { $this->cleanNotifications('NOTIF.ACCESSSTASTICS.PERFORMANCE'); diff --git a/pandora_console/include/styles/tables.css b/pandora_console/include/styles/tables.css index 7d93624dbb..dde75e8627 100644 --- a/pandora_console/include/styles/tables.css +++ b/pandora_console/include/styles/tables.css @@ -233,6 +233,10 @@ vertical-align: middle; } +#audit_logs > tbody > tr > td > img { + padding-right: 10px; +} + .table_action_buttons > a, .table_action_buttons > img, .table_action_buttons > button, From 746b9e48d032bd2e5f5cdaa6ab1af826188acb47 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Tue, 19 Sep 2023 17:50:04 +0200 Subject: [PATCH 13/93] #11436 Fix total agents --- pandora_console/include/class/ConsoleSupervisor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index f6acd528e5..0c0de4a09a 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -716,7 +716,7 @@ class ConsoleSupervisor $total_agents = db_get_value('count(*)', 'tagente'); - if ($total_agents >= 1) { + if ($total_agents >= 200) { if ((int) $config['agentaccess'] !== 0) { db_process_sql_update('tconfig', ['value' => 0], ['token' => 'agentaccess']); $this->notify( From fece93d38b4a8b7c09d01ee2dc427470b0037e25 Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Wed, 20 Sep 2023 08:49:56 +0200 Subject: [PATCH 14/93] #11691 Added the Show unknowns in graph token in the item editor view when creating the report item. --- pandora_console/extras/mr/67.sql | 5 +++++ .../reporting_builder.item_editor.php | 21 +++++++++++++++++++ .../godmode/reporting/reporting_builder.php | 2 ++ .../include/functions_reporting.php | 2 +- pandora_console/pandoradb.sql | 1 + 5 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 pandora_console/extras/mr/67.sql diff --git a/pandora_console/extras/mr/67.sql b/pandora_console/extras/mr/67.sql new file mode 100644 index 0000000000..3cdcc5b722 --- /dev/null +++ b/pandora_console/extras/mr/67.sql @@ -0,0 +1,5 @@ +START TRANSACTION; + +ALTER TABLE treport_content ADD check_unknowns_graph tinyint DEFAULT 0 NULL; + +COMMIT; diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 6343fabe1d..698cb6c061 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -150,6 +150,7 @@ $fullscale = false; $percentil = false; $image_threshold = false; $time_compare_overlapped = false; +$unknowns_graph = false; // Added for events items. $server_multiple = [0]; @@ -344,6 +345,7 @@ switch ($action) { $percentil = isset($style['percentil']) ? (bool) $style['percentil'] : 0; $image_threshold = (isset($style['image_threshold']) === true) ? (bool) $style['image_threshold'] : false; $graph_render = $item['graph_render']; + $unknowns_graph = $item['check_unknowns_graph']; // The break hasn't be forgotten. case 'simple_baseline_graph': case 'projection_graph': @@ -2799,6 +2801,23 @@ if (is_metaconsole() === true) { + + + + + + + + + ' === 'new'){ diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index eeee7aa1b4..8d449c8235 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -1917,6 +1917,7 @@ switch ($action) { $values['graph_render'] = (int) get_parameter( 'graph_render' ); + $values['check_unknowns_graph'] = get_parameter_switch('unknowns_graph', 0); case 'simple_baseline_graph': // HACK it is saved in show_graph field. $values['show_graph'] = (int) get_parameter( @@ -2800,6 +2801,7 @@ switch ($action) { $values['graph_render'] = (int) get_parameter( 'graph_render' ); + $values['check_unknowns_graph'] = get_parameter_switch('unknowns_graph', 0); case 'simple_baseline_graph': // HACK it is saved in show_graph field. $values['show_graph'] = (int) get_parameter( diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index ee1f04b952..e7ed9a0827 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -11105,7 +11105,7 @@ function reporting_simple_graph( ), 'ttl' => $ttl, 'compare' => $time_compare_overlapped, - 'show_unknown' => true, + 'show_unknown' => $content['check_unknowns_graph'], 'percentil' => ($content['style']['percentil'] == 1) ? $config['percentil'] : null, 'fullscale' => $fullscale, 'server_id' => $id_meta, diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 8b7fcf071a..a5395fbbf1 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1674,6 +1674,7 @@ CREATE TABLE IF NOT EXISTS `treport_content` ( `macros_definition` TEXT, `render_definition` TEXT, `use_prefix_notation` TINYINT UNSIGNED NOT NULL DEFAULT 1, + `check_unknowns_graph` tinyint DEFAULT '0', PRIMARY KEY(`id_rc`), FOREIGN KEY (`id_report`) REFERENCES treport(`id_report`) ON UPDATE CASCADE ON DELETE CASCADE From 478c45963e33eb868260f808924b21dbea85d37e Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Thu, 21 Sep 2023 11:40:32 +0200 Subject: [PATCH 15/93] #12005 Fix service wizard --- pandora_console/include/functions_html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index cd4a00bf4d..0f4499d365 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1745,7 +1745,7 @@ function html_print_select_multiple_modules_filtered(array $data):string 'label' => __('Agents'), 'label_class' => 'font-title-font', 'type' => 'select_from_sql', - 'sql' => 'SELECT `id_agente`,`nombre` FROM tagente', + 'sql' => 'SELECT `id_agente`,`alias` FROM tagente', 'name' => 'filtered-module-agents-'.$uniqId, 'selected' => explode(',', $data['mAgents']), 'return' => true, From 2e6354655094c7a2d8cfeeb28b1c6cf7fb9139eb Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 25 Sep 2023 11:29:38 +0200 Subject: [PATCH 16/93] add new type search status events not in process pandora_enterprise#11760 --- pandora_console/include/constants.php | 1 + pandora_console/include/functions_events.php | 23 +++++++++++++++++++ .../lib/Dashboard/Widgets/events_list.php | 1 + pandora_console/operation/events/events.php | 4 ++++ 4 files changed, 29 insertions(+) diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index 889e32f693..c9644eafcb 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -45,6 +45,7 @@ define('EVENT_NEW', 0); define('EVENT_VALIDATE', 1); define('EVENT_PROCESS', 2); define('EVENT_NO_VALIDATED', 3); +define('EVENT_NO_PROCESS', 4); // Events group by constants. define('EVENT_GROUP_REP_ALL', 0); diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 7068d554e6..87c945ffe0 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -982,6 +982,9 @@ function events_get_all( case EVENT_NO_VALIDATED: $filter['status'][$key] = (EVENT_NEW.', '.EVENT_PROCESS); + + case EVENT_NO_PROCESS: + $filter['status'][$key] = (EVENT_NEW.', '.EVENT_VALIDATE); default: // Ignore. break; @@ -1027,6 +1030,24 @@ function events_get_all( $validatedState ); break; + + case EVENT_NO_PROCESS: + // Show comments in validated events. + $validatedState = ''; + if ($validatedEvents === true) { + $validatedState = sprintf( + 'OR estado = %d', + EVENT_VALIDATE + ); + } + + $sql_filters[] = sprintf( + ' AND (estado = %d OR estado = %d %s)', + EVENT_NEW, + EVENT_VALIDATE, + $validatedState + ); + break; } } } @@ -3211,12 +3232,14 @@ function events_get_all_status($report=false) $fields[1] = __('Only validated'); $fields[2] = __('Only in process'); $fields[3] = __('Only not validated'); + $fields[4] = __('Only not in process'); } else { $fields[-1] = __('All event'); $fields[0] = __('New'); $fields[1] = __('Validated'); $fields[2] = __('In process'); $fields[3] = __('Not Validated'); + $fields[4] = __('Not in process'); } return $fields; diff --git a/pandora_console/include/lib/Dashboard/Widgets/events_list.php b/pandora_console/include/lib/Dashboard/Widgets/events_list.php index b7ad581dc0..7e050d3ee8 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/events_list.php +++ b/pandora_console/include/lib/Dashboard/Widgets/events_list.php @@ -396,6 +396,7 @@ class EventsListWidget extends Widget 0 => \__('Only pending'), 2 => \__('Only in process'), 3 => \__('Only not validated'), + 4 => \__('Only not process'), ]; $inputs['inputs']['row1'][] = [ diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 059c8f90ec..f3fefbddf4 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -2650,6 +2650,10 @@ try { case EVENT_NO_VALIDATED: $active_filters_div .= __('Not validated.'); break; + + case EVENT_NO_PROCESS: + $active_filters_div .= __('Not in process.'); + break; } $active_filters_div .= '
'; From 32c47c97ed8bb0d9445c6996aef8d2a60483354e Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Mon, 25 Sep 2023 12:29:25 +0200 Subject: [PATCH 17/93] The XSS vulnerability is corrected by adding entities to the Subject field --- pandora_console/operation/messages/message_edit.php | 4 ++-- pandora_console/operation/messages/message_list.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/operation/messages/message_edit.php b/pandora_console/operation/messages/message_edit.php index d2d3520b2b..cc197960ed 100644 --- a/pandora_console/operation/messages/message_edit.php +++ b/pandora_console/operation/messages/message_edit.php @@ -38,7 +38,7 @@ $send_mes = (bool) get_parameter('send_mes', false); $new_msg = (string) get_parameter('new_msg'); $dst_user = get_parameter('dst_user'); $dst_group = get_parameter('dst_group'); -$subject = io_safe_html_tags(get_parameter('subject')); +$subject = io_safe_input(get_parameter('subject')); $message = (string) get_parameter('message'); $read_message = (bool) get_parameter('read_message', false); $reply = (bool) get_parameter('reply', false); @@ -132,7 +132,7 @@ if ($read_message) { echo '

Conversation with '.$user_name.'

'; } - echo '

Subject: '.$message['subject'].'

'; + echo '

Subject: '.io_safe_output($message['subject']).'

'; $conversation = messages_get_conversation($message); diff --git a/pandora_console/operation/messages/message_list.php b/pandora_console/operation/messages/message_list.php index d7dc2881da..26ffbc5bfe 100644 --- a/pandora_console/operation/messages/message_list.php +++ b/pandora_console/operation/messages/message_list.php @@ -259,7 +259,7 @@ if (empty($messages) === true) { $pathSubject = 'index.php?sec=message_list&sec2=operation/messages/message_edit&read_message=1&id_message='.$message_id; } - $contentSubject = (empty($message['subject']) === true) ? __('No Subject') : $message['subject']; + $contentSubject = (empty($message['subject']) === true) ? __('No Subject') : io_safe_output($message['subject']); if ((int) $message['read'] !== 1) { $contentSubject = ''.$contentSubject.''; From 3069e1132132b424542b44e8444cc91e1e935ad6 Mon Sep 17 00:00:00 2001 From: rafael Date: Tue, 26 Sep 2023 09:37:13 +0200 Subject: [PATCH 18/93] 12101 change link to new x64 package for community console --- extras/deploy-scripts/pandora_deploy_community.sh | 4 ++-- extras/deploy-scripts/pandora_deploy_community_el8.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extras/deploy-scripts/pandora_deploy_community.sh b/extras/deploy-scripts/pandora_deploy_community.sh index c16729bca0..e99843b059 100644 --- a/extras/deploy-scripts/pandora_deploy_community.sh +++ b/extras/deploy-scripts/pandora_deploy_community.sh @@ -466,14 +466,14 @@ if [ "$PANDORA_LTS" -eq '1' ] ; then [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_agent_linux-7.0NG.noarch.rpm" elif [ "$PANDORA_LTS" -ne '1' ] ; then [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm" - [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.noarch.rpm" + [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.x86_64.rpm" [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm" fi # if beta is enable if [ "$PANDORA_BETA" -eq '1' ] ; then PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm" - PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.noarch.rpm" + PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.x86_64.rpm" PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm" fi diff --git a/extras/deploy-scripts/pandora_deploy_community_el8.sh b/extras/deploy-scripts/pandora_deploy_community_el8.sh index 32422ab98b..ad51db0ec6 100644 --- a/extras/deploy-scripts/pandora_deploy_community_el8.sh +++ b/extras/deploy-scripts/pandora_deploy_community_el8.sh @@ -572,14 +572,14 @@ if [ "$PANDORA_LTS" -eq '1' ] ; then [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_agent_linux-7.0NG.noarch.rpm" elif [ "$PANDORA_LTS" -ne '1' ] ; then [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm" - [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.noarch.rpm" + [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.x86_64.rpm" [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm" fi # if beta is enable if [ "$PANDORA_BETA" -eq '1' ] ; then PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm" - PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.noarch.rpm" + PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.x86_64.rpm" PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm" fi From d6faec76d79f5d1e536bd90a5722d5b1103148a4 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Tue, 26 Sep 2023 09:57:39 +0200 Subject: [PATCH 19/93] #12121 Clear html tag characters to prevent XSS attacks --- pandora_console/godmode/setup/file_manager.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora_console/godmode/setup/file_manager.php b/pandora_console/godmode/setup/file_manager.php index cfcf3c0827..211af66cb7 100644 --- a/pandora_console/godmode/setup/file_manager.php +++ b/pandora_console/godmode/setup/file_manager.php @@ -71,6 +71,8 @@ if (isset($config['filemanager']['message']) === true) { $fallback_directory = 'images'; // Get directory. $directory = (string) get_parameter('directory'); +$directory = str_replace('<', '', $text); +$directory = str_replace('>', '', $text); if (empty($directory) === true) { $directory = $fallback_directory; } else { From 3f41e4f32bf747584e64ba2a23cbcfb94a54a7d2 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Mon, 2 Oct 2023 16:24:23 +0200 Subject: [PATCH 20/93] #12138 delete agent access graph --- pandora_console/godmode/db/db_main.php | 13 --- pandora_console/godmode/setup/performance.php | 13 ++- .../include/class/ConsoleSupervisor.php | 46 ---------- .../include/class/Diagnostics.class.php | 23 ++--- pandora_console/include/functions_config.php | 8 -- pandora_console/include/functions_graph.php | 86 ------------------- .../include/functions_treeview.php | 21 ----- .../agentes/estado_generalagente.php | 56 ------------ pandora_console/pandoradb.sql | 12 +-- pandora_server/lib/PandoraFMS/Config.pm | 4 +- pandora_server/lib/PandoraFMS/Core.pm | 25 +++--- pandora_server/util/pandora_db.pl | 36 ++++---- pandora_server/util/pandora_perf_report.pl | 18 ++-- 13 files changed, 60 insertions(+), 301 deletions(-) diff --git a/pandora_console/godmode/db/db_main.php b/pandora_console/godmode/db/db_main.php index 9979b2c224..3bd4052ba2 100644 --- a/pandora_console/godmode/db/db_main.php +++ b/pandora_console/godmode/db/db_main.php @@ -27,7 +27,6 @@ if (! check_acl($config['id_user'], 0, 'DM')) { // Get some general DB stats (not very heavy) // NOTE: this is not realtime monitoring stats, are more focused on DB sanity -$stat_access = db_get_sql('SELECT COUNT(*) FROM tagent_access WHERE id_agent != 0'); $stat_data = db_get_sql('SELECT COUNT(*) FROM tagente_datos WHERE id_agente_modulo != 0'); $stat_data_log4x = db_get_sql('SELECT COUNT(*) FROM tagente_datos_log4x WHERE id_agente_modulo != 0'); $stat_data_string = db_get_sql('SELECT COUNT(*) FROM tagente_datos_string WHERE id_agente_modulo != 0'); @@ -149,18 +148,6 @@ echo $stat_modules; echo ''; - -echo ''; -echo __('Total agent access records'); -echo ''; -if ($stat_access > $max_access) { - echo "$stat_access"; -} else { - echo $stat_access; -} - -echo ''; - // Sanity echo ''; echo __('Database sanity'); diff --git a/pandora_console/godmode/setup/performance.php b/pandora_console/godmode/setup/performance.php index 51cd554a66..870c4c283a 100644 --- a/pandora_console/godmode/setup/performance.php +++ b/pandora_console/godmode/setup/performance.php @@ -154,8 +154,7 @@ if ($update_config == 1 && $config['history_db_enabled'] == 1) { $performance_variables_control = (array) json_decode(io_safe_output($config['performance_variables_control'])); $total_agents = db_get_value('count(*)', 'tagente'); -$disable_agentaccess = ($total_agents >= 200 && $config['agentaccess'] == 0) ? true : false; - +// $disable_agentaccess = ($total_agents >= 200 && $config['agentaccess'] == 0) ? true : false; $table_status = new StdClass(); $table_status->width = '100%'; $table_status->class = 'databox filters'; @@ -666,8 +665,8 @@ $table_other->data[2][1] = html_print_label_input_block( true ) ); - -$table_other->data[3][0] = html_print_label_input_block( +/* + $table_other->data[3][0] = html_print_label_input_block( __('Use agent access graph'), html_print_checkbox_switch( 'agentaccess', @@ -676,9 +675,9 @@ $table_other->data[3][0] = html_print_label_input_block( true, $disable_agentaccess ) -); - -$table_other->data[3][1] = html_print_label_input_block( + ); +*/ +$table_other->data[3][0] = html_print_label_input_block( __('Max. recommended number of files in attachment directory'), html_print_input_text( 'num_files_attachment', diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index a434a30e7f..6ecd80ec9a 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -270,13 +270,6 @@ class ConsoleSupervisor $this->checkSyncQueueStatus(); } - /* - * Check number of agents is equals and more than 200. - * NOTIF.ACCESSSTASTICS.PERFORMANCE - */ - - $this->checkAccessStatisticsPerformance(); - /* * Checkc agent missing libraries. * NOTIF.AGENT.LIBRARY @@ -570,13 +563,6 @@ class ConsoleSupervisor $this->checkSyncQueueStatus(); } - /* - * Check number of agents is equals and more than 200. - * NOTIF.ACCESSSTASTICS.PERFORMANCE - */ - - $this->checkAccessStatisticsPerformance(); - /* * Checkc agent missing libraries. * NOTIF.AGENT.LIBRARY @@ -704,38 +690,6 @@ class ConsoleSupervisor } - /** - * Check number of agents and disable agentaccess token if number - * is equals and more than 200. - * - * @return void - */ - public function checkAccessStatisticsPerformance() - { - global $config; - - $total_agents = db_get_value('count(*)', 'tagente'); - - if ($total_agents >= 200) { - if ((int) $config['agentaccess'] !== 0) { - db_process_sql_update('tconfig', ['value' => 0], ['token' => 'agentaccess']); - $this->notify( - [ - 'type' => 'NOTIF.ACCESSSTASTICS.PERFORMANCE', - 'title' => __('Access statistics performance'), - 'message' => __( - 'Usage of agent access statistics IS NOT RECOMMENDED on systems with more than 200 agents due performance penalty' - ), - 'url' => '__url__/index.php?sec=general&sec2=godmode/setup/setup§ion=perf', - ] - ); - } - } else { - $this->cleanNotifications('NOTIF.ACCESSSTASTICS.PERFORMANCE'); - } - } - - /** * Update targets for given notification using object targets. * diff --git a/pandora_console/include/class/Diagnostics.class.php b/pandora_console/include/class/Diagnostics.class.php index 7d7532189c..aa5d5995af 100644 --- a/pandora_console/include/class/Diagnostics.class.php +++ b/pandora_console/include/class/Diagnostics.class.php @@ -580,9 +580,6 @@ class Diagnostics extends Wizard $countModuleData = db_get_value_sql( 'SELECT COUNT(*) FROM tagente_datos' ); - $countAgentAccess = db_get_value_sql( - 'SELECT COUNT(*) FROM tagent_access' - ); $countEvents = db_get_value_sql('SELECT COUNT(*) FROM tevento'); if (enterprise_installed() === true) { @@ -595,39 +592,35 @@ class Diagnostics extends Wizard $result = [ 'error' => false, 'data' => [ - 'countAgents' => [ + 'countAgents' => [ 'name' => __('Total agents'), 'value' => $countAgents, ], - 'countModules' => [ + 'countModules' => [ 'name' => __('Total modules'), 'value' => $countModules, ], - 'countGroups' => [ + 'countGroups' => [ 'name' => __('Total groups'), 'value' => $countGroups, ], - 'countModuleData' => [ + 'countModuleData' => [ 'name' => __('Total module data records'), 'value' => $countModuleData, ], - 'countAgentAccess' => [ - 'name' => __('Total agent access record'), - 'value' => $countAgentAccess, - ], - 'countEvents' => [ + 'countEvents' => [ 'name' => __('Total events'), 'value' => $countEvents, ], - 'countTraps' => [ + 'countTraps' => [ 'name' => __('Total traps'), 'value' => $countTraps, ], - 'countUsers' => [ + 'countUsers' => [ 'name' => __('Total users'), 'value' => $countUsers, ], - 'countSessions' => [ + 'countSessions' => [ 'name' => __('Total sessions'), 'value' => $countSessions, ], diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 28f5f695cd..19e3160476 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -913,10 +913,6 @@ function config_update_config() $error_update[] = __('Batch statistics period (secs)'); } - if (config_update_value('agentaccess', (int) get_parameter('agentaccess'), true) === false) { - $error_update[] = __('Use agent access graph'); - } - if (config_update_value('num_files_attachment', (int) get_parameter('num_files_attachment'), true) === false) { $error_update[] = __('Max. recommended number of files in attachment directory'); } @@ -2232,10 +2228,6 @@ function config_process_config() config_update_value('show_qr_code_header', false); } - if (!isset($config['agentaccess'])) { - config_update_value('agentaccess', true); - } - if (!isset($config['timezone'])) { config_update_value('timezone', 'Europe/Berlin'); } diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index e6605a488b..762f04810e 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -2523,92 +2523,6 @@ function combined_graph_summatory_average( } -/** - * Print a graph with access data of agents. - * - * @param integer $id_agent Agent Id. - * @param integer $period Timestamp period graph. - * @param boolean|null $return Type return. - * - * @return string - */ -function graphic_agentaccess( - int $id_agent, - int $period=0, - ?bool $return=false, - ?bool $agent_view=false -) { - global $config; - - // Dates. - $date = get_system_time(); - $datelimit = ($date - $period); - $interval = 3600; - - // Query. - $sql = sprintf( - 'SELECT utimestamp, count(*) as data - FROM tagent_access - WHERE id_agent = %d - AND utimestamp >= %d - AND utimestamp <= %d - GROUP BY TRUNCATE(utimestamp/%d,0)', - $id_agent, - $datelimit, - $date, - $interval - ); - - $data = db_get_all_rows_sql($sql); - - // Array data. - $data_array = []; - $colors = []; - if (isset($data) === true && is_array($data) === true) { - foreach ($data as $value) { - $time = io_safe_output(date('H:m', $value['utimestamp'])); - $labels[] = $time; - $data_array[] = [ - 'y' => (int) $value['data'], - 'x' => $time, - ]; - - $colors[] = '#82b92f'; - } - } - - $options = []; - $options['grid']['hoverable'] = true; - - if ($agent_view === true) { - $options['agent_view'] = true; - } - - $options = [ - 'height' => 125, - 'colors' => $colors, - 'legend' => ['display' => false], - 'scales' => [ - 'x' => [ - 'grid' => ['display' => false], - 'ticks' => [ - 'fonts' => ['size' => 8], - ], - ], - 'y' => [ - 'grid' => ['display' => false], - 'ticks' => [ - 'fonts' => ['size' => 8], - ], - ], - ], - 'labels' => $labels, - ]; - - return vbar_graph($data_array, $options); -} - - /** * Print a pie graph with alerts defined/fired data * diff --git a/pandora_console/include/functions_treeview.php b/pandora_console/include/functions_treeview.php index 47f861314a..bc2271606e 100755 --- a/pandora_console/include/functions_treeview.php +++ b/pandora_console/include/functions_treeview.php @@ -796,27 +796,6 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false) 'white_table_flex' ); - if ($config['agentaccess']) { - $access_graph = '
'; - $access_graph .= graphic_agentaccess( - $id_agente, - SECONDS_1DAY, - false - ); - $access_graph .= '
'; - ui_toggle( - $access_graph, - ''.__('Agent access rate (24h)').'', - '', - '', - true, - false, - '', - 'white-box-content mrgn_top_0 mrgn_btn_0px border-bottom-gray', - 'white_table_flex' - ); - } - // Table network interfaces. $network_interfaces_by_agents = agents_get_network_interfaces([$agent]); diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index 62963f6b29..4a57231242 100755 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -313,55 +313,6 @@ for ($i = 0; $i < $custom_fields_count; $i++) { * END: TABLE DATA BUILD */ -/* - * START: ACCESS RATE GRAPH - */ - -$access_agent = db_get_value_sql( - 'SELECT COUNT(id_agent) - FROM tagent_access - WHERE id_agent = '.$id_agente -); - -if ((bool) $config['agentaccess'] === true && $access_agent > 0) { - $agentAccessRateHeader = html_print_div( - [ - 'class' => 'agent_details_header', - 'content' => ''.__('Agent access rate (Last 24h)').'', - ], - true - ); - - $agentAccessRateContent = html_print_div( - [ - 'class' => 'white-table-graph-content', - 'content' => graphic_agentaccess( - $id_agente, - SECONDS_1DAY, - true, - true - ), - ], - true - ); - - $agentAccessRate = html_print_div( - [ - 'class' => 'box-flat agent_details_col mrgn_lft_20px w50p', - 'id' => 'table_access_rate', - 'content' => $agentAccessRateHeader.$agentAccessRateContent, - ], - true - ); -} else { - $agentAccessRate = ''; -} - -/* - * END: ACCESS RATE GRAPH - */ - - /* * START: TABLE INTERFACES */ @@ -595,13 +546,6 @@ html_print_div( ] ); -html_print_div( - [ - 'class' => 'agent_details_line', - 'content' => $agentEvents.$agentAccessRate, - ] -); - if (empty($agentAdditionalInfo) === false) { html_print_div( [ diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index b44fb54e92..2435813cd1 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -290,12 +290,12 @@ CREATE TABLE IF NOT EXISTS `tagente_modulo` ( -- ----------------------------------------------------- -- Table `tagent_access` -- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `tagent_access` ( - `id_agent` INT UNSIGNED NOT NULL DEFAULT 0, - `utimestamp` BIGINT NOT NULL DEFAULT 0, - KEY `agent_index` (`id_agent`), - KEY `idx_utimestamp` USING BTREE (`utimestamp`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +-- CREATE TABLE IF NOT EXISTS `tagent_access` ( +-- `id_agent` INT UNSIGNED NOT NULL DEFAULT 0, +-- `utimestamp` BIGINT NOT NULL DEFAULT 0, +-- KEY `agent_index` (`id_agent`), +-- KEY `idx_utimestamp` USING BTREE (`utimestamp`) +-- ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- ----------------------------------------------------- -- Table `talert_snmp` diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 8feacb839e..8527d47e27 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -128,7 +128,7 @@ sub pandora_get_sharedconfig ($$) { my ($pa_config, $dbh) = @_; # Agentaccess option - $pa_config->{"agentaccess"} = pandora_get_tconfig_token ($dbh, 'agentaccess', 1); + #$pa_config->{"agentaccess"} = pandora_get_tconfig_token ($dbh, 'agentaccess', 1); # Realtimestats 0 disabled, 1 enabled. # Master servers will generate all the information (global tactical stats). @@ -458,7 +458,7 @@ sub pandora_load_config { # don't get an error later. $pa_config->{"realtimestats"} = 0; $pa_config->{"stats_interval"} = 300; - $pa_config->{"agentaccess"} = 1; + #$pa_config->{"agentaccess"} = 1; $pa_config->{"event_storm_protection"} = 0; $pa_config->{"use_custom_encoding"} = 0; $pa_config->{"node_metaconsole"} = 0; # > 7.0NG diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index ed4e127ade..d079461e01 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -2104,11 +2104,11 @@ sub pandora_access_update ($$$) { my ($pa_config, $agent_id, $dbh) = @_; return if ($agent_id < 0); - - if ($pa_config->{"agentaccess"} == 0){ - return; - } - db_do ($dbh, "INSERT INTO tagent_access (id_agent, utimestamp) VALUES (?, ?)", $agent_id, time ()); + return; + #if ($pa_config->{"agentaccess"} == 0){ + # return; + #} + #db_do ($dbh, "INSERT INTO tagent_access (id_agent, utimestamp) VALUES (?, ?)", $agent_id, time ()); } ########################################################################## @@ -4170,7 +4170,7 @@ sub pandora_delete_agent ($$;$) { db_do ($dbh, 'DELETE FROM tagente WHERE id_agente = ?', $agent_id); # Delete agent access data - db_do ($dbh, 'DELETE FROM tagent_access WHERE id_agent = ?', $agent_id); + #db_do ($dbh, 'DELETE FROM tagent_access WHERE id_agent = ?', $agent_id); # Delete addresses db_do ($dbh, 'DELETE FROM taddress_agent WHERE id_ag = ?', $agent_id); @@ -6593,11 +6593,11 @@ sub pandora_installation_monitoring($$) { undef $module; # Total agent access record - $module->{'name'} = "total_access_data"; - $module->{'description'} = 'Total agent access records'; - $module->{'data'} = get_db_value($dbh, 'SELECT COUNT(id_agent) FROM tagent_access'); - push(@modules, $module); - undef $module; + #$module->{'name'} = "total_access_data"; + #$module->{'description'} = 'Total agent access records'; + #$module->{'data'} = get_db_value($dbh, 'SELECT COUNT(id_agent) FROM tagent_access'); + #push(@modules, $module); + #undef $module; # Total users $module->{'name'} = "total_users"; @@ -6645,8 +6645,7 @@ sub pandora_installation_monitoring($$) { FROM information_schema.tables WHERE - table_schema not in ('information_schema', 'mysql') - AND table_name NOT IN ('tagent_access, tevento')" + table_schema not in ('information_schema', 'mysql')" ); $module->{'unit'} = '%'; push(@modules, $module); diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 048c365ca1..4ef684e5ae 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -276,24 +276,24 @@ sub pandora_purgedb ($$$) { log_message ('PURGE', "Deleting old access data (More than 24hr)"); - $first_mark = get_db_value_limit ($dbh, 'SELECT utimestamp FROM tagent_access ORDER BY utimestamp ASC', 1); - if (defined ($first_mark)) { - $total_time = $ulimit_access_timestamp - $first_mark; - $purge_steps = int( $total_time / $BIG_OPERATION_STEP); - if ($purge_steps > 0) { - for (my $ax = 1; $ax <= $BIG_OPERATION_STEP; $ax++){ - db_do ($dbh, "DELETE FROM tagent_access WHERE utimestamp < ". ( $first_mark + ($purge_steps * $ax)) . " AND utimestamp >= ". $first_mark); - log_message ('PURGE', "Agent access deletion progress %$ax", "\r"); - # Do a nanosleep here for 0,01 sec - usleep (10000); - } - log_message ('', "\n"); - } else { - log_message ('PURGE', "No agent access data to purge."); - } - } else { - log_message ('PURGE', "No agent access data."); - } + #$first_mark = get_db_value_limit ($dbh, 'SELECT utimestamp FROM tagent_access ORDER BY utimestamp ASC', 1); + #if (defined ($first_mark)) { + # $total_time = $ulimit_access_timestamp - $first_mark; + # $purge_steps = int( $total_time / $BIG_OPERATION_STEP); + # if ($purge_steps > 0) { + # for (my $ax = 1; $ax <= $BIG_OPERATION_STEP; $ax++){ + # db_do ($dbh, "DELETE FROM tagent_access WHERE utimestamp < ". ( $first_mark + ($purge_steps * $ax)) . " AND utimestamp >= ". $first_mark); + # log_message ('PURGE', "Agent access deletion progress %$ax", "\r"); + # # Do a nanosleep here for 0,01 sec + # usleep (10000); + # } + # log_message ('', "\n"); + # } else { + # log_message ('PURGE', "No agent access data to purge."); + # } + #} else { + # log_message ('PURGE', "No agent access data."); + #} # Purge the reports if (defined($conf->{'_enterprise_installed'}) && $conf->{'_enterprise_installed'} eq '1' && diff --git a/pandora_server/util/pandora_perf_report.pl b/pandora_server/util/pandora_perf_report.pl index cbc11219c7..2bc9fdf91b 100644 --- a/pandora_server/util/pandora_perf_report.pl +++ b/pandora_server/util/pandora_perf_report.pl @@ -212,7 +212,7 @@ sub stress_agent { sub table_stats { my ($dbh, $conf) = @_; my $stats = { - tagent_access => 'N/A', + #tagent_access => 'N/A', tagente => 'N/A', tagente_datos => 'N/A', tagente_datos_string => 'N/A', @@ -225,8 +225,7 @@ sub table_stats { FROM information_schema.TABLES WHERE TABLE_SCHEMA=? AND TABLE_NAME IN (?, ?, ?, ?, ?, ?, ?)", - $conf->{'dbname'}, - 'tagent_access', + $conf->{'dbname'},, 'tagente', 'tagente_datos', 'tagente_datos_string', @@ -309,7 +308,7 @@ sub generate_optimized_my_cnf { sub table_comments { my ($stats) = @_; my $comments = { - tagent_access => 'OK', + #tagent_access => 'OK', tagente => 'OK', tagente_datos => 'OK', tagente_datos_string => 'OK', @@ -319,11 +318,11 @@ sub table_comments { tsesion => 'OK', }; - if ($stats->{'tagent_access'} > $stats->{'tagente'} * 24 * 250) { - $comments->{'tagent_access'} = 'CRITICAL: Table too big. Please contact our support team at: support@artica.es'; - } elsif ($stats->{'tagent_access'} > $stats->{'tagente'} * 24 * 100) { - $comments->{'tagent_access'} = 'WARNING: Table too big. Please contact our support team at: support@artica.es'; - } + #if ($stats->{'tagent_access'} > $stats->{'tagente'} * 24 * 250) { + # $comments->{'tagent_access'} = 'CRITICAL: Table too big. Please contact our support team at: support@artica.es'; + #} elsif ($stats->{'tagent_access'} > $stats->{'tagente'} * 24 * 100) { + # $comments->{'tagent_access'} = 'WARNING: Table too big. Please contact our support team at: support@artica.es'; + #} if ($stats->{'tagente_datos'} > 5000000) { $comments->{'tagente_datos'} = 'CRITICAL: Table too big. Please use a history database or decrease the purge period.'; @@ -474,7 +473,6 @@ Module table $table_stats->{'tagente_modulo'} $tab Data table $table_stats->{'tagente_datos'} $table_comments->{'tagente_datos'} String data table $table_stats->{'tagente_datos_string'} $table_comments->{'tagente_datos_string'} Event table $table_stats->{'tevento'} $table_comments->{'tevento'} -Access stats $table_stats->{'tagent_access'} $table_comments->{'tagent_access'} Audit information $table_stats->{'tsesion'} $table_comments->{'tsesion'} From 2b416382a4d41b84514b082b915b91434e82f870 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Tue, 3 Oct 2023 10:26:57 +0200 Subject: [PATCH 21/93] #12138 Fix agent main view --- pandora_console/operation/agentes/estado_generalagente.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index 4a57231242..156fc32c3d 100755 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -546,6 +546,13 @@ html_print_div( ] ); +html_print_div( + [ + 'class' => 'agent_details_line', + 'content' => $agentEvents, + ] +); + if (empty($agentAdditionalInfo) === false) { html_print_div( [ From 5b7e1a9c80d9c7a78ecfe9a3fef6512854797f1b Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Tue, 3 Oct 2023 11:36:20 +0200 Subject: [PATCH 22/93] #12122 Entities are added to avoid SQL injection in visual consoles --- pandora_console/godmode/reporting/map_builder.php | 8 ++++---- .../godmode/reporting/visual_console_builder.data.php | 2 +- .../godmode/reporting/visual_console_builder.php | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pandora_console/godmode/reporting/map_builder.php b/pandora_console/godmode/reporting/map_builder.php index 53db920b2b..6fb1ba0955 100644 --- a/pandora_console/godmode/reporting/map_builder.php +++ b/pandora_console/godmode/reporting/map_builder.php @@ -519,9 +519,9 @@ if (!$maps && is_metaconsole() === false) { $data = []; if (is_metaconsole() === false) { - $data[0] = ''.$map['name'].''; + $data[0] = ''.io_safe_output($map['name']).''; } else { - $data[0] = ''.$map['name'].''; + $data[0] = ''.io_safe_output($map['name']).''; } $data[1] = ui_print_group_icon($map['id_group'], true); @@ -541,7 +541,7 @@ if (!$maps && is_metaconsole() === false) { true, ['class' => 'main_menu_icon invert_filter'] ).''; - $data[4] = ''.html_print_image( + $data[4] = ''.html_print_image( 'images/delete.svg', true, ['class' => 'main_menu_icon invert_filter'] @@ -552,7 +552,7 @@ if (!$maps && is_metaconsole() === false) { true, ['class' => 'main_menu_icon invert_filter'] ).''; - $data[4] = ''.html_print_image( + $data[4] = ''.html_print_image( 'images/delete.svg', true, ['class' => 'main_menu_icon invert_filter'] diff --git a/pandora_console/godmode/reporting/visual_console_builder.data.php b/pandora_console/godmode/reporting/visual_console_builder.data.php index 5ce3c3f679..f5cc8d059c 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.data.php +++ b/pandora_console/godmode/reporting/visual_console_builder.data.php @@ -151,7 +151,7 @@ $table->data[0][] = html_print_label_input_block( __('Name'), html_print_input_text( 'name', - $visualConsoleName, + io_safe_output($visualConsoleName), '', 80, 100, diff --git a/pandora_console/godmode/reporting/visual_console_builder.php b/pandora_console/godmode/reporting/visual_console_builder.php index 986dcb423b..694a2a6ea3 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.php +++ b/pandora_console/godmode/reporting/visual_console_builder.php @@ -163,7 +163,7 @@ switch ($activeTab) { $background_color = (string) get_parameter('background_color'); $width = (int) get_parameter('width'); $height = (int) get_parameter('height'); - $visualConsoleName = (string) get_parameter('name'); + $visualConsoleName = (string) io_safe_input(get_parameter('name')); $is_favourite = (int) get_parameter('is_favourite_sent'); $auto_adjust = (int) get_parameter('auto_adjust_sent'); @@ -239,7 +239,7 @@ switch ($activeTab) { if ($uploadOK == 1) { if (move_uploaded_file($_FILES['background_image']['tmp_name'], $target_file)) { $background = $nameImage; - $values['background'] = $background; + $values['background'] = io_safe_input($background); $error2 = chmod($target_file, 0644); $uploadOK = $error2; } else { @@ -872,7 +872,7 @@ $buttons[$activeTab]['active'] = true; $tab_builder = ($activeTab === 'editor') ? 'visual_console_editor_editor_tab' : ''; ui_print_standard_header( - ($visualConsoleName ?? ''), + (io_safe_output($visualConsoleName) ?? ''), 'images/visual_console.png', false, $tab_builder, From 578dba8207d2815b1be21ddb323a96d8e20f5195 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Tue, 3 Oct 2023 11:42:17 +0200 Subject: [PATCH 23/93] #12138 Clean code server --- pandora_server/lib/PandoraFMS/Config.pm | 2 -- pandora_server/lib/PandoraFMS/Core.pm | 36 ++-------------------- pandora_server/util/pandora_db.pl | 20 +----------- pandora_server/util/pandora_perf_report.pl | 8 ----- 4 files changed, 3 insertions(+), 63 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 8527d47e27..0e1889487d 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -128,7 +128,6 @@ sub pandora_get_sharedconfig ($$) { my ($pa_config, $dbh) = @_; # Agentaccess option - #$pa_config->{"agentaccess"} = pandora_get_tconfig_token ($dbh, 'agentaccess', 1); # Realtimestats 0 disabled, 1 enabled. # Master servers will generate all the information (global tactical stats). @@ -458,7 +457,6 @@ sub pandora_load_config { # don't get an error later. $pa_config->{"realtimestats"} = 0; $pa_config->{"stats_interval"} = 300; - #$pa_config->{"agentaccess"} = 1; $pa_config->{"event_storm_protection"} = 0; $pa_config->{"use_custom_encoding"} = 0; $pa_config->{"node_metaconsole"} = 0; # > 7.0NG diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index d079461e01..79b5171912 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -2093,24 +2093,6 @@ sub send_console_notification { } } -########################################################################## -=head2 C<< pandora_access_update (I<$pa_config>, I<$agent_id>, I<$dbh>) >> - -Update agent access table. - -=cut -########################################################################## -sub pandora_access_update ($$$) { - my ($pa_config, $agent_id, $dbh) = @_; - - return if ($agent_id < 0); - return; - #if ($pa_config->{"agentaccess"} == 0){ - # return; - #} - #db_do ($dbh, "INSERT INTO tagent_access (id_agent, utimestamp) VALUES (?, ?)", $agent_id, time ()); -} - ########################################################################## =head2 C<< pandora_process_module (I<$pa_config>, I<$data>, I<$agent>, I<$module>, I<$module_type>, I<$timestamp>, I<$utimestamp>, I<$server_id>, I<$dbh>) >> @@ -3362,14 +3344,10 @@ sub pandora_update_agent ($$$$$$$;$$$) { # No access update for data without interval. # Single modules from network server, for example. This could be very Heavy for Pandora FMS - if ($agent_interval != -1){ - pandora_access_update ($pa_config, $agent_id, $dbh); - } else { - - # Do not update the agent interval + if ($agent_interval == -1){ $agent_interval = undef; } - + # Update tagente my $timestamp = strftime ("%Y-%m-%d %H:%M:%S", localtime()); my ($set, $values) = db_update_get_values ({'agent_version' => $agent_version, @@ -4169,9 +4147,6 @@ sub pandora_delete_agent ($$;$) { # Delete the agent db_do ($dbh, 'DELETE FROM tagente WHERE id_agente = ?', $agent_id); - # Delete agent access data - #db_do ($dbh, 'DELETE FROM tagent_access WHERE id_agent = ?', $agent_id); - # Delete addresses db_do ($dbh, 'DELETE FROM taddress_agent WHERE id_ag = ?', $agent_id); @@ -6592,13 +6567,6 @@ sub pandora_installation_monitoring($$) { push(@modules, $module); undef $module; - # Total agent access record - #$module->{'name'} = "total_access_data"; - #$module->{'description'} = 'Total agent access records'; - #$module->{'data'} = get_db_value($dbh, 'SELECT COUNT(id_agent) FROM tagent_access'); - #push(@modules, $module); - #undef $module; - # Total users $module->{'name'} = "total_users"; $module->{'description'} = 'Total users'; diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 4ef684e5ae..df79d989ec 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -276,25 +276,7 @@ sub pandora_purgedb ($$$) { log_message ('PURGE', "Deleting old access data (More than 24hr)"); - #$first_mark = get_db_value_limit ($dbh, 'SELECT utimestamp FROM tagent_access ORDER BY utimestamp ASC', 1); - #if (defined ($first_mark)) { - # $total_time = $ulimit_access_timestamp - $first_mark; - # $purge_steps = int( $total_time / $BIG_OPERATION_STEP); - # if ($purge_steps > 0) { - # for (my $ax = 1; $ax <= $BIG_OPERATION_STEP; $ax++){ - # db_do ($dbh, "DELETE FROM tagent_access WHERE utimestamp < ". ( $first_mark + ($purge_steps * $ax)) . " AND utimestamp >= ". $first_mark); - # log_message ('PURGE', "Agent access deletion progress %$ax", "\r"); - # # Do a nanosleep here for 0,01 sec - # usleep (10000); - # } - # log_message ('', "\n"); - # } else { - # log_message ('PURGE', "No agent access data to purge."); - # } - #} else { - # log_message ('PURGE', "No agent access data."); - #} - + # Purge the reports if (defined($conf->{'_enterprise_installed'}) && $conf->{'_enterprise_installed'} eq '1' && defined($conf->{'_metaconsole'}) && $conf->{'_metaconsole'} eq '1'){ diff --git a/pandora_server/util/pandora_perf_report.pl b/pandora_server/util/pandora_perf_report.pl index 2bc9fdf91b..cdad51d9ab 100644 --- a/pandora_server/util/pandora_perf_report.pl +++ b/pandora_server/util/pandora_perf_report.pl @@ -212,7 +212,6 @@ sub stress_agent { sub table_stats { my ($dbh, $conf) = @_; my $stats = { - #tagent_access => 'N/A', tagente => 'N/A', tagente_datos => 'N/A', tagente_datos_string => 'N/A', @@ -308,7 +307,6 @@ sub generate_optimized_my_cnf { sub table_comments { my ($stats) = @_; my $comments = { - #tagent_access => 'OK', tagente => 'OK', tagente_datos => 'OK', tagente_datos_string => 'OK', @@ -318,12 +316,6 @@ sub table_comments { tsesion => 'OK', }; - #if ($stats->{'tagent_access'} > $stats->{'tagente'} * 24 * 250) { - # $comments->{'tagent_access'} = 'CRITICAL: Table too big. Please contact our support team at: support@artica.es'; - #} elsif ($stats->{'tagent_access'} > $stats->{'tagente'} * 24 * 100) { - # $comments->{'tagent_access'} = 'WARNING: Table too big. Please contact our support team at: support@artica.es'; - #} - if ($stats->{'tagente_datos'} > 5000000) { $comments->{'tagente_datos'} = 'CRITICAL: Table too big. Please use a history database or decrease the purge period.'; } elsif ($stats->{'tagente_datos'} > 1000000) { From 57d89190e6c6afe6571393664c7f412553c46769 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Tue, 3 Oct 2023 14:49:06 +0200 Subject: [PATCH 24/93] #12135 default api raw_decode --- pandora_console/include/api.php | 3 +-- pandora_console/include/functions_api.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/api.php b/pandora_console/include/api.php index b5f6d44ab7..1002800a11 100644 --- a/pandora_console/include/api.php +++ b/pandora_console/include/api.php @@ -70,8 +70,7 @@ $otherSerialize = get_parameter('other'); $otherMode = get_parameter('other_mode', 'url_encode'); $returnType = get_parameter('return_type', 'string'); $info = get_parameter('info', ''); -$raw_decode = (bool) get_parameter('raw_decode', false); - +$raw_decode = (bool) get_parameter('raw_decode', true); $other = parseOtherParameter($otherSerialize, $otherMode, $raw_decode); $apiPassword = io_output_password( db_get_value_filter( diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 9dfe1c0801..992ac6bec3 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -12950,7 +12950,7 @@ function api_set_create_event($id, $trash1, $other, $returnType) $values = []; if ($other['data'][0] != '') { - $values['event'] = $other['data'][0]; + $values['event'] = io_safe_input(io_safe_output($other['data'][0])); } else { returnError('Event text required.'); return; From b9d08c2e0c56acae34bcae095120ade3b460c299 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Tue, 3 Oct 2023 15:49:19 +0200 Subject: [PATCH 25/93] #12164 Fix inverse interval in remote components --- .../include/javascript/pandora_modules.js | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/pandora_console/include/javascript/pandora_modules.js b/pandora_console/include/javascript/pandora_modules.js index 0770e8521a..4e2f73db28 100644 --- a/pandora_console/include/javascript/pandora_modules.js +++ b/pandora_console/include/javascript/pandora_modules.js @@ -500,16 +500,25 @@ function configure_modules_form() { "checked", data["critical_inverse"] ); - $("#checkbox-warning_inverse").prop("checked", data["warning_inverse"]); - $("#checkbox-percentage_warning").prop( - "uncheck", - data["percentage_warning"] - ); - $("#checkbox-percentage_critical").prop( - "uncheck", - data["percentage_critical"] - ); + $("#label-radius-normal_warning").trigger("click"); + $("#label-radius-normal_critical").trigger("click"); + + if (data["warning_inverse"] == true) { + $("#label-radius-warning_inverse").trigger("click"); + } + + if (data["critical_inverse"] == true) { + $("#label-radius-critical_inverse").trigger("click"); + } + + if (data["percentage_warning"] == true) { + $("#label-radius-percentage_warning").trigger("click"); + } + + if (data["percentage_critical"] == true) { + $("#label-radius-percentage_critical").trigger("click"); + } $("#component_loading").hide(); $("#id_module_type").change(); if ($("#id_category").is("select")) { From 874cb9c52a8ab453100fb653205abdfb2f0262ea Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Wed, 4 Oct 2023 12:41:23 +0200 Subject: [PATCH 26/93] #12153 Create button and ajax request --- pandora_console/include/ajax/events.php | 11 +++ pandora_console/include/functions_events.php | 90 ++++++++++++++++++ pandora_console/operation/events/events.php | 98 +++++++++++++++++++- 3 files changed, 198 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index 593fa9a975..1e9d744739 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -92,6 +92,8 @@ $get_id_source_event = get_parameter('get_id_source_event'); $node_id = (int) get_parameter('node_id', 0); $settings_modal = get_parameter('settings', 0); $parameters_modal = get_parameter('parameters', 0); +$draw_events_graph = get_parameter('drawEventsGraph', false); + // User private filter. $current_filter = get_parameter('current_filter', 0); $private_filter_event = get_parameter('private_filter_event', 0); @@ -2759,3 +2761,12 @@ if ($draw_row_response_info === true) { echo $output; return; } + +if ((bool) $draw_events_graph === true) { + $filter = get_parameter('filter'); + $output = ''; + hd($filter, true); + $output .= '

grafica

'; + echo $output; + return; +} \ No newline at end of file diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index f709fe2b4c..edefd1c187 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -6203,3 +6203,93 @@ function event_get_counter_extraId(array $event, ?array $filters) return $counters; } + + +function event_print_graph( + $filter, + $start_utimestamp, + $end_utimestamp, + $graph_width, + $graph_height, +) { + global $config; + $num_data = 10; + $num_intervals = ($num_data > 75) ? 75 : $num_data; + + $period = ($end_utimestamp - $start_utimestamp); + if ($period <= SECONDS_6HOURS) { + $chart_time_format = 'H:i:s'; + } else if ($period < SECONDS_1DAY) { + $chart_time_format = 'H:i'; + } else if ($period < SECONDS_15DAYS) { + $chart_time_format = 'M d H:i'; + } else if ($period < SECONDS_1MONTH) { + $chart_time_format = 'M d H\h'; + } else { + $chart_time_format = 'M d H\h'; + } + + $interval_length = (int) ($period / $num_intervals); + + $currentutimestamp = $start_utimestamp; + for ($i = 0; $i < $num_intervals; $i++) { + if ($currentutimestamp === $start_utimestamp) { + $filter['aggs']['messages']['filters']['filters'][$i]['range']['utimestamp'] = [ + 'gte' => $currentutimestamp, + 'lte' => ($currentutimestamp + $interval_length), + ]; + } else if ($currentutimestamp === $end_utimestamp) { + $filter['aggs']['messages']['filters']['filters'][$i]['range']['utimestamp'] = [ + 'gt' => $currentutimestamp, + 'lte' => $end_utimestamp, + ]; + } else { + $filter['aggs']['messages']['filters']['filters'][$i]['range']['utimestamp'] = [ + 'gt' => $currentutimestamp, + 'lte' => ($currentutimestamp + $interval_length), + ]; + } + + $currentutimestamp += $interval_length; + } + + $chart = []; + $labels = []; + $color = []; + $currentutimestamp = $start_utimestamp; + for ($i = 0; $i < $num_intervals; $i++,$currentutimestamp += $interval_length) { + $labels[] = date($chart_time_format, $currentutimestamp); + $chart[] = [ + 'y' => 1, + 'x' => date($chart_time_format, $currentutimestamp), + ]; + $color[] = '#82b92f'; + } + + $water_mark = [ + 'file' => $config['homedir'].'/images/logo_vertical_water.png', + 'url' => ui_get_full_url('/images/logo_vertical_water.png'), + ]; + + $options = [ + 'height' => $graph_height, + 'waterMark' => $water_mark, + 'legend' => ['display' => false], + 'colors' => $color, + 'scales' => [ + 'x' => [ + 'grid' => ['display' => false], + ], + 'y' => [ + 'grid' => ['display' => false], + ], + ], + 'labels' => $labels, + ]; + + $graph = '
'; + $graph .= vbar_graph($chart, $options); + $graph .= '
'; + + echo $graph; +} diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 5300bf109a..076d48e60a 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -2609,6 +2609,27 @@ try { // Open current filter quick reference. $active_filters_div = '
'; + $active_filters_div .= '
'; + $active_filters_div .= '
'.__('Show graph').'
'; + + $active_filters_div .= html_print_div( + [ + 'class' => 'content', + 'style' => 'padding-top: 5px !important;', + 'content' => html_print_checkbox_switch_extended( + 'show_event_graph', + 1, + false, + false, + '', + '', + true + ), + ], + true + ); + $active_filters_div .= '
'; + // Current filter. $active_filters_div .= '
'; $active_filters_div .= '
'.__('Current filter').'
'; @@ -2695,6 +2716,43 @@ try { $show_hide_filters = 'invisible'; } + + // Print graphs + $graph_background = ''; + if ($config['style'] === 'pandora') { + $graph_background = ' background-color: #fff;'; + } else if ($config['style'] === 'pandora_black') { + $graph_background = ' background-color: #222;'; + } + + $graph_div = html_print_div( + [ + 'id' => 'events-graph', + 'class' => 'mrgn_top_10px mrg_btt_60 invisible', + 'style' => 'text-align: left;'.$graph_background, + ], + true + ); + + $graph_div .= html_print_div( + [ + 'id' => 'events-graph-loading', + 'class' => 'center invisible', + 'content' => html_print_image( + 'images/spinner.gif', + true, + [ + 'title' => __('Loading'), + 'class' => 'invert_filter', + ] + ), + ], + true + ); + + hd(get_parameter('filter'), true); + + // Print datatable. html_print_div( [ @@ -2718,7 +2776,7 @@ try { 'inputs' => [], 'extra_buttons' => $buttons, ], - 'extra_html' => $active_filters_div, + 'extra_html' => $active_filters_div.$graph_div, 'pagination_options' => [ [ $config['block_size'], @@ -3266,6 +3324,19 @@ function reorder_tags_inputs() { } /* Tag management ends */ $(document).ready( function() { + + let hidden_graph = true; + $('#checkbox-show_event_graph').on('change', function(){ + if (hidden_graph == true) { + hidden_graph = false; + $('#events-graph').removeClass('invisible'); + show_events_graph(); + } else { + hidden_graph = true; + $('#events-graph').html(); + $('#events-graph').addClass('invisible'); + } + }); let refresco = ; $('#refresh option[value='+refresco+']').attr('selected', 'selected'); @@ -3646,4 +3717,29 @@ function show_event_dialo(event, dialog_page) { ); return false; } + +function show_events_graph(){ + var inputs = $("#events_form :input"); + var values = {}; + inputs.each(function() { + values[this.name] = $(this).val(); + }); + + $.ajax({ + method: 'POST', + url: '', + data: { + page: 'include/ajax/events', + drawEventsGraph: true, + filter: values + }, + success: function (data){ + $('#events-graph') + .empty() + .html(data); + console.log('success'); + console.log(data); + } + }); +} From 09cae778c52172af465b1a9cc5c775bf29a2a8a1 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Wed, 4 Oct 2023 16:28:40 +0200 Subject: [PATCH 27/93] #12153 Create event list graph --- pandora_console/include/ajax/events.php | 4 +- pandora_console/include/functions_events.php | 40 ++++++++++++++------ pandora_console/include/graphs/fgraph.php | 6 +++ pandora_console/operation/events/events.php | 11 +++--- 4 files changed, 41 insertions(+), 20 deletions(-) diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index 1e9d744739..fbab653bf7 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -2764,9 +2764,7 @@ if ($draw_row_response_info === true) { if ((bool) $draw_events_graph === true) { $filter = get_parameter('filter'); - $output = ''; - hd($filter, true); - $output .= '

grafica

'; + $output = event_print_graph($filter); echo $output; return; } \ No newline at end of file diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index edefd1c187..76439fd8c4 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -6207,13 +6207,14 @@ function event_get_counter_extraId(array $event, ?array $filters) function event_print_graph( $filter, - $start_utimestamp, - $end_utimestamp, - $graph_width, - $graph_height, + $graph_height=100, ) { global $config; - $num_data = 10; + $events = events_get_all(['te.id_evento', 'te.timestamp', 'te.utimestamp'], $filter, null, null, 'te.utimestamp', true); + $start_utimestamp = $events[0]['utimestamp']; + $end_utimestamp = $events[array_key_last($events)]['utimestamp']; + $num_data = count($events); + $num_intervals = ($num_data > 75) ? 75 : $num_data; $period = ($end_utimestamp - $start_utimestamp); @@ -6256,12 +6257,26 @@ function event_print_graph( $chart = []; $labels = []; $color = []; - $currentutimestamp = $start_utimestamp; - for ($i = 0; $i < $num_intervals; $i++,$currentutimestamp += $interval_length) { - $labels[] = date($chart_time_format, $currentutimestamp); + $count = 0; + $control_timestamp = $start_utimestamp; + $data_events = []; + foreach ($events as $event) { + if ($event['utimestamp'] === $control_timestamp) { + $count++; + } else { + $control_timestamp = $event['utimestamp']; + $count = 1; + } + + $data_events[$control_timestamp] = $count; + } + + $data_events = array_reverse($data_events, true); + foreach ($data_events as $utimestamp => $count) { + $labels[] = date($chart_time_format, $utimestamp); $chart[] = [ - 'y' => 1, - 'x' => date($chart_time_format, $currentutimestamp), + 'y' => $count, + 'x' => date($chart_time_format, $utimestamp), ]; $color[] = '#82b92f'; } @@ -6276,6 +6291,7 @@ function event_print_graph( 'waterMark' => $water_mark, 'legend' => ['display' => false], 'colors' => $color, + 'border' => false, 'scales' => [ 'x' => [ 'grid' => ['display' => false], @@ -6287,9 +6303,9 @@ function event_print_graph( 'labels' => $labels, ]; - $graph = '
'; + $graph = '
'; $graph .= vbar_graph($chart, $options); $graph .= '
'; - echo $graph; + return $graph; } diff --git a/pandora_console/include/graphs/fgraph.php b/pandora_console/include/graphs/fgraph.php index 494ec9c010..d7f3e3ed7b 100644 --- a/pandora_console/include/graphs/fgraph.php +++ b/pandora_console/include/graphs/fgraph.php @@ -1187,6 +1187,12 @@ function get_build_setup_charts($type, $options, $data) ) { $colors = $options['colors']; $borders = $options['colors']; + if (isset($options['border']) === true && (bool) $options['border'] === false) { + $borders = []; + foreach ($colors as $color) { + $borders[] = 'rgba(0, 0, 0, 0)'; + } + } } else { // Colors. $defaultColor = []; diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 076d48e60a..febdb33156 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -2728,8 +2728,8 @@ try { $graph_div = html_print_div( [ 'id' => 'events-graph', - 'class' => 'mrgn_top_10px mrg_btt_60 invisible', - 'style' => 'text-align: left;'.$graph_background, + 'class' => 'invisible', + 'style' => 'margin-bottom: 10px; text-align: left;'.$graph_background, ], true ); @@ -2750,7 +2750,6 @@ try { true ); - hd(get_parameter('filter'), true); // Print datatable. @@ -3502,6 +3501,10 @@ $(document).ready( function() { $("#button-remove_without").click(function() { click_button_remove_tag("without"); }); + + $("#button-events_form_search_bt").click(function(){ + show_events_graph(); + }); //Autorefresh in fullscreen @@ -3737,8 +3740,6 @@ function show_events_graph(){ $('#events-graph') .empty() .html(data); - console.log('success'); - console.log(data); } }); } From 87aa79b176d8209671385456ad389cc84ffb689a Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Thu, 5 Oct 2023 09:45:17 +0200 Subject: [PATCH 28/93] #12153 Fix graph --- pandora_console/include/functions_events.php | 129 ++++++++++++------- 1 file changed, 82 insertions(+), 47 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 76439fd8c4..8e2896c448 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -6207,17 +6207,48 @@ function event_get_counter_extraId(array $event, ?array $filters) function event_print_graph( $filter, - $graph_height=100, + $graph_height=400, ) { global $config; + $show_all_data = false; $events = events_get_all(['te.id_evento', 'te.timestamp', 'te.utimestamp'], $filter, null, null, 'te.utimestamp', true); - $start_utimestamp = $events[0]['utimestamp']; - $end_utimestamp = $events[array_key_last($events)]['utimestamp']; - $num_data = count($events); - $num_intervals = ($num_data > 75) ? 75 : $num_data; + if (empty($filter['date_from']) === false + && empty($filter['time_from']) === false + && empty($filter['date_to']) === false + && empty($filter['time_to']) === false + ) { + $start_utimestamp = strtotime($filter['date_from'].' '.$filter['time_from']); + $end_utimestamp = strtotime($filter['date_to'].' '.$filter['time_to']); + } else if ($filter['event_view_hr'] !== '') { + $start_utimestamp = strtotime('-'.$filter['event_view_hr'].' hours'); + $end_utimestamp = strtotime('now'); + } else { + $show_all_data = true; + $start_utimestamp = $events[0]['utimestamp']; + $end_utimestamp = $events[array_key_last($events)]['utimestamp']; + } + + $data_events = []; + $control_timestamp = $start_utimestamp; + $count = 0; + foreach ($events as $event) { + if ($event['utimestamp'] === $control_timestamp) { + $count++; + } else { + $control_timestamp = $event['utimestamp']; + $count = 1; + } + + $data_events[$control_timestamp] = $count; + } + + $num_data = count($data_events); + + $num_intervals = $num_data; $period = ($end_utimestamp - $start_utimestamp); + if ($period <= SECONDS_6HOURS) { $chart_time_format = 'H:i:s'; } else if ($period < SECONDS_1DAY) { @@ -6230,55 +6261,59 @@ function event_print_graph( $chart_time_format = 'M d H\h'; } - $interval_length = (int) ($period / $num_intervals); - - $currentutimestamp = $start_utimestamp; - for ($i = 0; $i < $num_intervals; $i++) { - if ($currentutimestamp === $start_utimestamp) { - $filter['aggs']['messages']['filters']['filters'][$i]['range']['utimestamp'] = [ - 'gte' => $currentutimestamp, - 'lte' => ($currentutimestamp + $interval_length), - ]; - } else if ($currentutimestamp === $end_utimestamp) { - $filter['aggs']['messages']['filters']['filters'][$i]['range']['utimestamp'] = [ - 'gt' => $currentutimestamp, - 'lte' => $end_utimestamp, - ]; - } else { - $filter['aggs']['messages']['filters']['filters'][$i]['range']['utimestamp'] = [ - 'gt' => $currentutimestamp, - 'lte' => ($currentutimestamp + $interval_length), - ]; - } - - $currentutimestamp += $interval_length; - } - $chart = []; $labels = []; $color = []; $count = 0; - $control_timestamp = $start_utimestamp; - $data_events = []; - foreach ($events as $event) { - if ($event['utimestamp'] === $control_timestamp) { - $count++; - } else { - $control_timestamp = $event['utimestamp']; - $count = 1; + + if ($show_all_data === true) { + foreach ($events as $event) { + if ($event['utimestamp'] === $control_timestamp) { + $count++; + } else { + $control_timestamp = $event['utimestamp']; + $count = 1; + } + + $data_events[$control_timestamp] = $count; } - $data_events[$control_timestamp] = $count; - } + $data_events = array_reverse($data_events, true); - $data_events = array_reverse($data_events, true); - foreach ($data_events as $utimestamp => $count) { - $labels[] = date($chart_time_format, $utimestamp); - $chart[] = [ - 'y' => $count, - 'x' => date($chart_time_format, $utimestamp), - ]; - $color[] = '#82b92f'; + foreach ($data_events as $utimestamp => $count) { + $labels[] = date($chart_time_format, $utimestamp); + $chart[] = [ + 'y' => $count, + 'x' => date($chart_time_format, $utimestamp), + ]; + $color[] = '#82b92f'; + } + } else { + $interval_length = (int) ($period / $num_intervals); + $intervals = []; + $intervals[0] = $start_utimestamp; + for ($i = 0; $i < $num_intervals; $i++) { + $intervals[($i + 1)] = ($intervals[$i] + $interval_length); + } + + $control_data = []; + + foreach ($data_events as $utimestamp => $count_event) { + for ($i = 0; $i < $num_intervals; $i++) { + if ((int) $utimestamp > (int) $intervals[$i] && (int) $utimestamp < (int) $intervals[($i + 1)]) { + $control_data[(string) $intervals[$i]] += $count_event; + } + } + } + + for ($i = 0; $i < $num_intervals; $i++) { + $labels[] = date($chart_time_format, $intervals[$i]); + $chart[] = [ + 'y' => $control_data[$intervals[$i]], + 'x' => date($chart_time_format, $intervals[$i]), + ]; + $color[] = '#82b92f'; + } } $water_mark = [ From 6312804386f9624248f844983297d9cd96e12fce Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Thu, 5 Oct 2023 09:52:52 +0200 Subject: [PATCH 29/93] #12153 Fix graph height --- pandora_console/include/functions_events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 8e2896c448..bd54d61623 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -6207,7 +6207,7 @@ function event_get_counter_extraId(array $event, ?array $filters) function event_print_graph( $filter, - $graph_height=400, + $graph_height=100, ) { global $config; $show_all_data = false; From c20ca271ba430de34e7917fdbfd870a4afaf8b4a Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 6 Oct 2023 13:05:42 +0200 Subject: [PATCH 30/93] fix translate pandora_enterprise#11760 --- pandora_console/include/lib/Dashboard/Widgets/events_list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/lib/Dashboard/Widgets/events_list.php b/pandora_console/include/lib/Dashboard/Widgets/events_list.php index 7e050d3ee8..3706c33d5e 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/events_list.php +++ b/pandora_console/include/lib/Dashboard/Widgets/events_list.php @@ -396,7 +396,7 @@ class EventsListWidget extends Widget 0 => \__('Only pending'), 2 => \__('Only in process'), 3 => \__('Only not validated'), - 4 => \__('Only not process'), + 4 => \__('Only not in process'), ]; $inputs['inputs']['row1'][] = [ From 3a2b56cc4c171616d626362812a707f6494c9d5f Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Tue, 10 Oct 2023 16:50:42 +0200 Subject: [PATCH 31/93] #12204 Fix force check icon --- pandora_console/include/ajax/module.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index 78daacb0a0..3c65200ae6 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -1354,10 +1354,12 @@ if (check_login()) { $additionalLinkAction = '&flag=1'; $linkCaption = __('Force checks'); $imgaction = 'images/force@svg.svg'; + $visibility = ''; } else { $additionalLinkAction = ''; $linkCaption = __('Refresh'); $imgaction = 'images/go-back@svg.svg'; + $visibility = 'visibility: initial;'; } $moduleActionButtons[] = html_print_anchor( @@ -1369,6 +1371,7 @@ if (check_login()) { [ 'title' => __('Force remote check'), 'class' => 'main_menu_icon forced_title', + 'style' => $visibility, ] ), ], From 6793086c855ce7cf90e8cc6fed0c9b738fbb393c Mon Sep 17 00:00:00 2001 From: Rafael Date: Wed, 11 Oct 2023 12:37:37 +0200 Subject: [PATCH 32/93] 12101 adding pandora_gotty --- .../pandora_deploy_community.sh | 33 +++++++-------- .../pandora_deploy_community_el8.sh | 41 ++++++++++--------- .../pandora_deploy_community_ubuntu_2204.sh | 4 ++ 3 files changed, 42 insertions(+), 36 deletions(-) diff --git a/extras/deploy-scripts/pandora_deploy_community.sh b/extras/deploy-scripts/pandora_deploy_community.sh index e99843b059..24d714daea 100644 --- a/extras/deploy-scripts/pandora_deploy_community.sh +++ b/extras/deploy-scripts/pandora_deploy_community.sh @@ -11,7 +11,7 @@ PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf -S_VERSION='2023062901' +S_VERSION='2023101101' LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log" # define default variables @@ -185,7 +185,7 @@ extra_repos=" \ tar \ yum-utils \ https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ -http://rpms.remirepo.net/enterprise/remi-release-7.rpm \ +https://rpms.remirepo.net/enterprise/remi-release-7.rpm \ https://repo.percona.com/yum/percona-release-latest.noarch.rpm" execute_cmd "yum install -y $extra_repos" "Installing extra repositories" @@ -285,6 +285,7 @@ console_dependencies=" \ mod_ssl \ libzstd \ openldap-clients \ + https://firefly.pandorafms.com/centos8/pandora_gotty-1.0-1.el8.x86_64.rpm \ chromium" execute_cmd "yum install -y $console_dependencies" "Installing Pandora FMS Console dependencies" @@ -312,7 +313,7 @@ server_dependencies=" \ bind-utils \ whois \ cpanminus \ - http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm \ + https://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm \ https://firefly.pandorafms.com/centos7/pandorawmic-1.0.0-1.x86_64.rpm" execute_cmd "yum install -y $server_dependencies" "Installing Pandora FMS Server dependencies" @@ -322,13 +323,13 @@ execute_cmd "cpanm -i Thread::Semaphore" "Installing Thread::Semaphore" # SDK VMware perl dependencies vmware_dependencies=" \ - http://firefly.pandorafms.com/centos8/VMware-vSphere-Perl-SDK-6.5.0-4566394.x86_64.rpm \ + https://firefly.pandorafms.com/centos8/VMware-vSphere-Perl-SDK-6.5.0-4566394.x86_64.rpm \ perl-JSON \ perl-Archive-Zip \ openssl-devel \ perl-Crypt-CBC \ perl-Digest-SHA \ - http://firefly.pandorafms.com/centos7/perl-Crypt-OpenSSL-AES-0.02-1.el7.x86_64.rpm" + https://firefly.pandorafms.com/centos7/perl-Crypt-OpenSSL-AES-0.02-1.el7.x86_64.rpm" execute_cmd "yum install -y $vmware_dependencies" "Installing SDK VMware perl dependencies" # Instant client Oracle @@ -410,7 +411,7 @@ skip-character-set-client-handshake # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 # Mysql optimizations for Pandora FMS -# Please check the documentation in http://pandorafms.com for better results +# Please check the documentation in https://pandorafms.com for better results max_allowed_packet = 64M innodb_buffer_pool_size = $POOL_SIZE @@ -461,20 +462,20 @@ export MYSQL_PWD=$DBPASS #Define packages #Define packages if [ "$PANDORA_LTS" -eq '1' ] ; then - [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_server-7.0NG.noarch.rpm" - [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_console-7.0NG.noarch.rpm" - [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_agent_linux-7.0NG.noarch.rpm" + [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_server-7.0NG.noarch.rpm" + [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_console-7.0NG.noarch.rpm" + [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_agent_linux-7.0NG.noarch.rpm" elif [ "$PANDORA_LTS" -ne '1' ] ; then - [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm" - [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.x86_64.rpm" - [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm" + [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm" + [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.x86_64.rpm" + [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm" fi # if beta is enable if [ "$PANDORA_BETA" -eq '1' ] ; then - PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm" - PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.x86_64.rpm" - PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm" + PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm" + PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.x86_64.rpm" + PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm" fi # Downloading Pandora Packages @@ -729,7 +730,7 @@ Welcome to Pandora FMS appliance on CentOS Go to Public http://$ipplublic/pandora_console to login web console $(ip addr | grep -w "inet" | grep -v "127.0.0.1" | grep -v "172.17.0.1" | awk '{print $2}' | awk -F '/' '{print "Go to Local http://"$1"/pandora_console to login web console"}') -You can find more information at http://pandorafms.com +You can find more information at https://pandorafms.com EOF_banner diff --git a/extras/deploy-scripts/pandora_deploy_community_el8.sh b/extras/deploy-scripts/pandora_deploy_community_el8.sh index ad51db0ec6..e1be9519f0 100644 --- a/extras/deploy-scripts/pandora_deploy_community_el8.sh +++ b/extras/deploy-scripts/pandora_deploy_community_el8.sh @@ -14,7 +14,7 @@ PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf -S_VERSION='2023062901' +S_VERSION='2023101101' LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log" # define default variables @@ -264,7 +264,7 @@ if [ "$(grep -Ei 'Red Hat Enterprise' /etc/redhat-release)" ]; then tar \ dnf-utils \ https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm \ - http://rpms.remirepo.net/enterprise/remi-release-8.rpm \ + https://rpms.remirepo.net/enterprise/remi-release-8.rpm \ https://repo.percona.com/yum/percona-release-latest.noarch.rpm" execute_cmd "dnf install -y $extra_repos" "Installing extra repositories" @@ -275,7 +275,7 @@ else tar \ dnf-utils \ epel-release \ - http://rpms.remirepo.net/enterprise/remi-release-8.rpm \ + https://rpms.remirepo.net/enterprise/remi-release-8.rpm \ https://repo.percona.com/yum/percona-release-latest.noarch.rpm" execute_cmd "dnf install -y $extra_repos" "Installing extra repositories" @@ -391,10 +391,11 @@ console_dependencies=" \ mod_ssl \ libzstd \ openldap-clients \ - http://firefly.pandorafms.com/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \ - http://firefly.pandorafms.com/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \ - http://firefly.pandorafms.com/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \ - http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm" + https://firefly.pandorafms.com/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \ + https://firefly.pandorafms.com/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \ + https://firefly.pandorafms.com/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \ + https://firefly.pandorafms.com/centos8/pandora_gotty-1.0-1.el8.x86_64.rpm \ + https://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm" execute_cmd "dnf install -y $console_dependencies" "Installing Pandora FMS Console dependencies" # Server dependencies @@ -421,7 +422,7 @@ server_dependencies=" \ bind-utils \ whois \ libnsl \ - http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm \ + https://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm \ https://firefly.pandorafms.com/centos8/pandorawmic-1.0.0-1.x86_64.rpm" execute_cmd "dnf install -y $server_dependencies" "Installing Pandora FMS Server dependencies" @@ -436,8 +437,8 @@ vmware_dependencies=" \ perl-Math-Random-ISAAC \ perl-JSON \ perl-Crypt-SSLeay \ - http://firefly.pandorafms.com/centos8/perl-Crypt-OpenSSL-AES-0.02-1.el8.x86_64.rpm \ - http://firefly.pandorafms.com/centos8/VMware-vSphere-Perl-SDK-6.5.0-4566394.x86_64.rpm" + https://firefly.pandorafms.com/centos8/perl-Crypt-OpenSSL-AES-0.02-1.el8.x86_64.rpm \ + https://firefly.pandorafms.com/centos8/VMware-vSphere-Perl-SDK-6.5.0-4566394.x86_64.rpm" execute_cmd "dnf install -y $vmware_dependencies" "Installing SDK VMware perl dependencies" # Instant client Oracle @@ -518,7 +519,7 @@ skip-character-set-client-handshake # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 # Mysql optimizations for Pandora FMS -# Please check the documentation in http://pandorafms.com for better results +# Please check the documentation in https://pandorafms.com for better results max_allowed_packet = 64M innodb_buffer_pool_size = $POOL_SIZE @@ -567,20 +568,20 @@ export MYSQL_PWD=$DBPASS #Define packages if [ "$PANDORA_LTS" -eq '1' ] ; then - [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_server-7.0NG.noarch.rpm" - [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_console-7.0NG.noarch.rpm" - [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_agent_linux-7.0NG.noarch.rpm" + [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_server-7.0NG.noarch.rpm" + [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_console-7.0NG.noarch.rpm" + [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_agent_linux-7.0NG.noarch.rpm" elif [ "$PANDORA_LTS" -ne '1' ] ; then - [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm" - [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.x86_64.rpm" - [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm" + [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm" + [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.x86_64.rpm" + [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm" fi # if beta is enable if [ "$PANDORA_BETA" -eq '1' ] ; then - PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm" - PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.x86_64.rpm" - PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm" + PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm" + PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.x86_64.rpm" + PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm" fi # Downloading Pandora Packages diff --git a/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh b/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh index a215808d17..e927526913 100644 --- a/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh +++ b/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh @@ -344,6 +344,10 @@ execute_cmd "apt install -y $server_dependencies" "Installing Pandora FMS Server execute_cmd "installing_docker" "Installing Docker for debug" +# Installing pandora_gotty +execute_cmd "curl --output pandora_gotty.deb https://firefly.pandorafms.com/ubuntu/pandora_gotty_1.0.0.deb" "Downloading pandora_gotty" +execute_cmd "apt install -y ./pandora_gotty.deb" "Intalling pandora_gotty" + # wmic and pandorawmic execute_cmd "curl -O https://firefly.pandorafms.com/pandorafms/utils/bin/wmic" "Downloading wmic" execute_cmd "curl -O https://firefly.pandorafms.com/pandorafms/utils/bin/pandorawmic" "Downloading pandorawmic" From 65c7738bca3a0526cdd6e45cf951c66487dac463 Mon Sep 17 00:00:00 2001 From: Rafael Date: Wed, 11 Oct 2023 15:46:42 +0200 Subject: [PATCH 33/93] 12101 fix url for open server --- extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh b/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh index e927526913..ca7ccf757e 100644 --- a/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh +++ b/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh @@ -526,7 +526,7 @@ elif [ "$PANDORA_LTS" -ne '1' ] ; then fi if [ "$PANDORA_BETA" -eq '1' ] ; then - PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest_x86_64.tar.gz" + PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest.tar.gz" PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.tar.gz" PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz" fi From 2062169f2f26f9e7b81f42f647558f60cc36d879 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Fri, 13 Oct 2023 12:55:58 +0200 Subject: [PATCH 34/93] #12177 Fix upload os icon --- pandora_console/godmode/setup/os.builder.php | 52 +++++++++++++++++--- pandora_console/godmode/setup/os.php | 8 ++- pandora_console/include/functions_html.php | 4 +- 3 files changed, 54 insertions(+), 10 deletions(-) diff --git a/pandora_console/godmode/setup/os.builder.php b/pandora_console/godmode/setup/os.builder.php index d8a2f47d00..0a8c23a08d 100644 --- a/pandora_console/godmode/setup/os.builder.php +++ b/pandora_console/godmode/setup/os.builder.php @@ -46,7 +46,7 @@ if ($idOS > 0) { $description = $os['description']; $icon = $os['icon_name']; } else { - $name = io_safe_input(strip_tags(io_safe_output((string) get_parameter('name')))); + $name = io_safe_input(strip_tags(trim(io_safe_output((string) get_parameter('name'))))); $description = io_safe_input(strip_tags(io_safe_output((string) get_parameter('description')))); $icon = get_parameter('icon', 0); } @@ -87,9 +87,16 @@ if ($is_management_allowed === true) { if (in_array($file_ext, $allowed_extensions) === false) { $message = 9; + } else if (exif_imagetype($file_tmp) === false && $file_ext !== 'svg') { + $message = 10; } else { $message = 8; - move_uploaded_file($file_tmp, $config['homedir'].'/images/os_icons/'.$file_name); + + $file_uploaded = move_uploaded_file($file_tmp, $config['homedir'].'/images/os_icons/'.$file_name); + + if ($file_uploaded !== true) { + $message = 10; + } } } } else { @@ -108,7 +115,7 @@ if ($is_management_allowed === true) { if ($resultOrId === false) { $message = 2; - $tab = 'builder'; + $tab = 'manage_os'; $actionHidden = 'save'; $textButton = __('Create'); $classButton = ['icon' => 'wand']; @@ -144,13 +151,19 @@ if ($is_management_allowed === true) { if (in_array($file_ext, $allowed_extensions) === false) { $message = 9; + } else if (exif_imagetype($file_tmp) === false) { + $message = 10; } else { $message = 8; - move_uploaded_file($file_tmp, $config['homedir'].'/images/os_icons/'.$file_name); + $file_uploaded = move_uploaded_file($file_tmp, $config['homedir'].'/images/os_icons/'.$file_name); + + if ($file_uploaded !== true) { + $message = 10; + } } } } else { - $name = io_safe_input(strip_tags(io_safe_output((string) get_parameter('name')))); + $name = io_safe_input(strip_tags(trim(io_safe_output((string) get_parameter('name'))))); $description = io_safe_input(strip_tags(io_safe_output((string) get_parameter('description')))); $icon = get_parameter('icon', 0); @@ -254,7 +267,7 @@ $table->class = 'databox filter-table-adv'; $table->data[0][] = html_print_label_input_block( __('Name'), - html_print_input_text('name', $name, __('Name'), 20, 30, true, false, false, '', 'w250px') + html_print_input_text('name', $name, __('Name'), 20, 30, true, false, true, '', 'w250px') ); $table->data[0][] = html_print_label_input_block( @@ -290,6 +303,33 @@ html_print_action_buttons( echo ''; +$id_message = get_parameter('id_message', 0); + +if ($id_message !== 0) { + switch ($id_message) { + case 8: + echo ui_print_success_message(__('Icon successfuly uploaded'), '', true); + break; + + case 9: + echo ui_print_error_message(__('File must be of type JPG, JPEG, PNG or SVG'), '', true); + break; + + case 9: + echo ui_print_error_message(__('File must be of type JPG, JPEG, PNG or SVG'), '', true); + break; + + case 10: + echo ui_print_error_message(__('An error ocurrered to load icon'), '', true); + break; + + default: + // Nothing to do. + break; + } +} + + function get_list_os_icons_dir() { global $config; diff --git a/pandora_console/godmode/setup/os.php b/pandora_console/godmode/setup/os.php index 99402ff30a..dcfe95ecdb 100644 --- a/pandora_console/godmode/setup/os.php +++ b/pandora_console/godmode/setup/os.php @@ -162,11 +162,15 @@ if (empty($id_message) === false) { break; case 8: - echo ui_print_success_message(__('Icon successfuly uploaded'), '', true); + header('Location: index.php?sec=gagente&sec2=godmode/setup/os&tab=manage_os&action=edit&id_message=8'); break; case 9: - echo ui_print_error_message(__('File must be of type JPG, JPEG, PNG or SVG'), '', true); + header('Location: index.php?sec=gagente&sec2=godmode/setup/os&tab=manage_os&action=edit&id_message=9'); + break; + + case 10: + header('Location: index.php?sec=gagente&sec2=godmode/setup/os&tab=manage_os&action=edit&id_message=10'); break; default: diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 2552fbcdc1..2dac62a3ee 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -4939,8 +4939,8 @@ function html_print_input_file($name, $return=false, $options=false, $inline_upl $inline_upload_anchor_to_form ), [ - 'mode' => 'link', - 'style' => 'min-width: initial;', + 'class' => 'secondary', + 'style' => 'min-width: initial; position: relative; margin-left: 5%; ', ], true, ); From 35efc20fc78aa9c93de7ad95a827e12d894668ab Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Fri, 13 Oct 2023 12:58:21 +0200 Subject: [PATCH 35/93] #12177 Fix message --- pandora_console/godmode/setup/os.builder.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pandora_console/godmode/setup/os.builder.php b/pandora_console/godmode/setup/os.builder.php index 0a8c23a08d..6313aa3edd 100644 --- a/pandora_console/godmode/setup/os.builder.php +++ b/pandora_console/godmode/setup/os.builder.php @@ -315,12 +315,8 @@ if ($id_message !== 0) { echo ui_print_error_message(__('File must be of type JPG, JPEG, PNG or SVG'), '', true); break; - case 9: - echo ui_print_error_message(__('File must be of type JPG, JPEG, PNG or SVG'), '', true); - break; - case 10: - echo ui_print_error_message(__('An error ocurrered to load icon'), '', true); + echo ui_print_error_message(__('An error ocurrered to upload icon'), '', true); break; default: From 1c609374a83becb228e92bd716704d2579c153e4 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Tue, 17 Oct 2023 09:27:53 +0200 Subject: [PATCH 36/93] #12134 Count total modules --- pandora_console/operation/agentes/status_monitor.php | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 046fbc5222..825fbb01df 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -2348,6 +2348,7 @@ if (empty($result) === false) { array_push($table->data, $data); } + echo '
'.sprintf(__('Total items: %s'), $count).'
'; html_print_table($table); if ($count_modules > $config['block_size']) { From e87790ed037cf55304c0d9b9e43c96a6ddd89850 Mon Sep 17 00:00:00 2001 From: rafael Date: Thu, 19 Oct 2023 10:39:18 +0200 Subject: [PATCH 37/93] 12101 adding binary agent --- extras/deploy-scripts/pandora_deploy_community_el8.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extras/deploy-scripts/pandora_deploy_community_el8.sh b/extras/deploy-scripts/pandora_deploy_community_el8.sh index e1be9519f0..3ad47baf73 100644 --- a/extras/deploy-scripts/pandora_deploy_community_el8.sh +++ b/extras/deploy-scripts/pandora_deploy_community_el8.sh @@ -574,14 +574,14 @@ if [ "$PANDORA_LTS" -eq '1' ] ; then elif [ "$PANDORA_LTS" -ne '1' ] ; then [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm" [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.x86_64.rpm" - [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm" + [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux_bin-7.0NG.x86_64.rpm" fi # if beta is enable if [ "$PANDORA_BETA" -eq '1' ] ; then PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm" PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.x86_64.rpm" - PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm" + PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux_bin-7.0NG.x86_64.rpm" fi # Downloading Pandora Packages From 2f6e0b62be8e9385c5aa62e287d1e1586ec3353b Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Fri, 20 Oct 2023 12:55:26 +0200 Subject: [PATCH 38/93] #12295 Fixed errata --- pandora_console/include/class/WelcomeWindow.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/class/WelcomeWindow.class.php b/pandora_console/include/class/WelcomeWindow.class.php index 5e66268403..2481630130 100644 --- a/pandora_console/include/class/WelcomeWindow.class.php +++ b/pandora_console/include/class/WelcomeWindow.class.php @@ -732,7 +732,7 @@ class WelcomeWindow extends Wizard ) ); echo html_print_label_input_block( - __('Module group'), + __('Agent group'), html_print_select_from_sql( 'SELECT * FROM tgrupo ORDER BY nombre', 'id_group', From 10fcf9fdb3f6e6008f496963a890cef4f4df3f4f Mon Sep 17 00:00:00 2001 From: Jonathan Date: Fri, 20 Oct 2023 13:00:02 +0200 Subject: [PATCH 39/93] #12271 style dashboard widgets --- pandora_console/include/styles/dashboards.css | 4 ++++ pandora_console/views/dashboard/widget.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/styles/dashboards.css b/pandora_console/include/styles/dashboards.css index 2cda2de6f4..b9f15a63a8 100644 --- a/pandora_console/include/styles/dashboards.css +++ b/pandora_console/include/styles/dashboards.css @@ -949,3 +949,7 @@ input.resize_button { bottom: 3%; right: 6%; } + +.new-widget-message .info_box_information .title b { + margin-left: 60px; +} diff --git a/pandora_console/views/dashboard/widget.php b/pandora_console/views/dashboard/widget.php index 2f0bfe7364..cf160ccc76 100644 --- a/pandora_console/views/dashboard/widget.php +++ b/pandora_console/views/dashboard/widget.php @@ -43,7 +43,7 @@ if ((int) $cellData['id_widget'] !== 0 || $widgetId !== 0) { true ); - $output .= '
'; + $output .= '
'; $output .= \ui_print_info_message( __('Please select widget'), '', From 183812635442e492be4481c6c54d555e69539772 Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Tue, 24 Oct 2023 09:57:25 +0200 Subject: [PATCH 40/93] #12298 clear hidden fields --- pandora_console/godmode/alerts/configure_alert_action.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/alerts/configure_alert_action.php b/pandora_console/godmode/alerts/configure_alert_action.php index 4883467c10..65195f466b 100644 --- a/pandora_console/godmode/alerts/configure_alert_action.php +++ b/pandora_console/godmode/alerts/configure_alert_action.php @@ -707,7 +707,7 @@ $(document).ready (function () { name: "id_action", value: "" }); - + jQuery.post (, values, function (data, status) { @@ -739,6 +739,9 @@ $(document).ready (function () { // If the row is empty, hide it if (field_row == '') { + // Clear hidden fields. + $("[name=field" + i + "_value]").val(''); + $("[name=field" + i + "_recovery_value]").val('') $table_macros_field.hide(); continue; } From d5a6411e02af7900e5256244ec548242579bf5f2 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Mon, 30 Oct 2023 16:26:14 +0100 Subject: [PATCH 41/93] #12252 added datatable vulnerabilities --- pandora_console/include/styles/vulnerabilities.css | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/styles/vulnerabilities.css b/pandora_console/include/styles/vulnerabilities.css index 11c05556ec..d724a6b5e5 100644 --- a/pandora_console/include/styles/vulnerabilities.css +++ b/pandora_console/include/styles/vulnerabilities.css @@ -119,7 +119,7 @@ .dt-buttons { display: flex; margin: 10px; - margin-left: 0px; + margin-left: 10px; position: relative; } .dt-buttons button { @@ -148,6 +148,15 @@ .col-md-7 { width: 80%; } + .col-sl-12 { + width: 100%; + display: flex; + } + + .col-sl-4 { + width: 33%; + margin: 10px; + } } @keyframes load { From 325b0a758ac2e30e1aae3448fc50d79341eca726 Mon Sep 17 00:00:00 2001 From: Calvo Date: Tue, 31 Oct 2023 11:33:48 +0100 Subject: [PATCH 42/93] Added name and master server column to servers view --- .../godmode/servers/servers.build_table.php | 111 +++++++++--------- 1 file changed, 57 insertions(+), 54 deletions(-) diff --git a/pandora_console/godmode/servers/servers.build_table.php b/pandora_console/godmode/servers/servers.build_table.php index 101a99d955..80b9ff9c6b 100644 --- a/pandora_console/godmode/servers/servers.build_table.php +++ b/pandora_console/godmode/servers/servers.build_table.php @@ -64,32 +64,33 @@ $table->style = []; // $table->style[0] = 'font-weight: bold'; $table->align = []; $table->align[1] = 'center'; -$table->align[3] = 'center'; -$table->align[8] = 'right'; +$table->align[4] = 'center'; +$table->align[9] = 'right'; $table->headstyle[1] = 'text-align:center'; -$table->headstyle[3] = 'text-align:center'; -$table->headstyle[8] = 'text-align:right;width: 120px;'; +$table->headstyle[4] = 'text-align:center'; +$table->headstyle[9] = 'text-align:right;width: 120px;'; $table->titleclass = 'tabletitle'; $table->titlestyle = 'text-transform:uppercase;'; -$table->style[6] = 'display: flex;align-items: center;'; +$table->style[7] = 'display: flex;align-items: center;'; $table->head = []; $table->head[0] = __('Name'); $table->head[1] = __('Status'); $table->head[2] = __('Type'); -$table->head[3] = __('Version'); -$table->head[4] = __('Modules'); -$table->head[5] = __('Lag').ui_print_help_tip(__('Avg. Delay(sec)/Modules delayed'), true); -$table->head[6] = __('T/Q').ui_print_help_tip(__('Threads / Queued modules currently'), true); +$table->head[3] = __('Master'); +$table->head[4] = __('Version'); +$table->head[5] = __('Modules'); +$table->head[6] = __('Lag').ui_print_help_tip(__('Avg. Delay(sec)/Modules delayed'), true); +$table->head[7] = __('T/Q').ui_print_help_tip(__('Threads / Queued modules currently'), true); // This will have a column of data such as "6 hours". -$table->head[7] = __('Updated'); +$table->head[8] = __('Updated'); // Only Pandora Administrator can delete servers. if ((bool) check_acl($config['id_user'], 0, 'PM') === true) { - $table->head[8] = ''.__('Op.').''; + $table->head[9] = ''.__('Op.').''; } $table->data = []; @@ -143,9 +144,11 @@ foreach ($servers as $server) { } // Type. - $data[2] = ''.$server['img']; + $data[2] = ''.$server['img'].' '.ucfirst($server['type']).' server'; if ($server['master'] == $master) { - $data[2] .= ui_print_help_tip(__('This is a master server'), true); + $data[3] .= __('Yes', true); + } else { + $data[3] .= __('-'); } if ((int) $server['exec_proxy'] === 1) { @@ -157,27 +160,27 @@ foreach ($servers as $server) { case 'event': case 'autoprovision': case 'migration': - $data[3] = $server['version']; - $data[4] = __('N/A'); + $data[4] = $server['version']; $data[5] = __('N/A'); + $data[6] = __('N/A'); break; case 'export': - $data[3] = $server['version']; - $data[4] = $server['modules'].' '.__('of').' '.$server['modules_total']; - $data[5] = __('N/A'); + $data[4] = $server['version']; + $data[5] = $server['modules'].' '.__('of').' '.$server['modules_total']; + $data[6] = __('N/A'); break; default: - $data[3] = $server['version']; - $data[4] = $server['modules'].' '.__('of').' '.$server['modules_total']; - $data[5] = ''.$server['lag_txt'].''; + $data[4] = $server['version']; + $data[5] = $server['modules'].' '.__('of').' '.$server['modules_total']; + $data[6] = ''.$server['lag_txt'].''; break; } - $data[6] = ''; + $data[7] = ''; if ($server['queued_modules'] > 500) { - $data[6] .= '
'.html_print_image( + $data[7] .= '  '; } - $data[6] .= $server['threads'].' : '.$server['queued_modules']; + $data[7] .= $server['threads'].' : '.$server['queued_modules']; - $data[7] = ui_print_timestamp($server['keepalive'], true); + $data[8] = ui_print_timestamp($server['keepalive'], true); if ($server['type'] === 'data') { $ext = '_server'; @@ -208,11 +211,11 @@ foreach ($servers as $server) { // Only Pandora Administrator can delete servers. if ((bool) check_acl($config['id_user'], 0, 'PM') === true) { - $data[8] = ''; + $data[9] = ''; if ($server['type'] === 'recon') { - $data[8] .= ''; - $data[8] .= html_print_image( + $data[9] .= ''; + $data[9] .= html_print_image( 'images/snmp-trap@svg.svg', true, [ @@ -221,12 +224,12 @@ foreach ($servers as $server) { ] ); - $data[8] .= ''; + $data[9] .= ''; } if ($server['type'] === 'data') { - $data[8] .= ''; - $data[8] .= html_print_image( + $data[9] .= ''; + $data[9] .= html_print_image( 'images/force@svg.svg', true, [ @@ -234,10 +237,10 @@ foreach ($servers as $server) { 'class' => 'main_menu_icon invert_filter', ] ); - $data[8] .= ''; + $data[9] .= ''; } else if ($server['type'] === 'enterprise snmp') { - $data[8] .= ''; - $data[8] .= html_print_image( + $data[9] .= ''; + $data[9] .= html_print_image( 'images/force@svg.svg', true, [ @@ -245,12 +248,12 @@ foreach ($servers as $server) { 'class' => 'main_menu_icon invert_filter', ] ); - $data[8] .= ''; + $data[9] .= ''; } if ($server['type'] === 'event' && (bool) check_acl($config['id_user'], 0, 'LM') === true) { - $data[8] .= ''; - $data[8] .= html_print_image( + $data[9] .= ''; + $data[9] .= html_print_image( 'images/alert@svg.svg', true, [ @@ -258,11 +261,11 @@ foreach ($servers as $server) { 'class' => 'main_menu_icon invert_filter', ] ); - $data[8] .= ''; + $data[9] .= ''; } - $data[8] .= ''; - $data[8] .= html_print_image( + $data[9] .= ''; + $data[9] .= html_print_image( 'images/edit.svg', true, [ @@ -270,11 +273,11 @@ foreach ($servers as $server) { 'class' => 'main_menu_icon invert_filter', ] ); - $data[8] .= ''; + $data[9] .= ''; if (($names_servers[$safe_server_name] === true) && ($ext === '_server' || $server['type'] === 'enterprise satellite')) { - $data[8] .= ''; - $data[8] .= html_print_image( + $data[9] .= ''; + $data[9] .= html_print_image( 'images/agents@svg.svg', true, [ @@ -282,10 +285,10 @@ foreach ($servers as $server) { 'class' => 'main_menu_icon invert_filter', ] ); - $data[8] .= ''; + $data[9] .= ''; - $data[8] .= ''; - $data[8] .= html_print_image( + $data[9] .= ''; + $data[9] .= html_print_image( 'images/remote-configuration@svg.svg', true, [ @@ -293,12 +296,12 @@ foreach ($servers as $server) { 'class' => 'main_menu_icon invert_filter', ] ); - $data[8] .= ''; + $data[9] .= ''; $names_servers[$safe_server_name] = false; } - $data[8] .= ''; - $data[8] .= html_print_image( + $data[9] .= ''; + $data[9] .= html_print_image( 'images/delete.svg', true, [ @@ -307,14 +310,14 @@ foreach ($servers as $server) { 'class' => 'main_menu_icon invert_filter', ] ); - $data[8] .= ''; + $data[9] .= ''; } if ($tiny) { - unset($data[4]); - unset($data[6]); + unset($data[5]); unset($data[7]); unset($data[8]); + unset($data[9]); } $ext = ''; @@ -323,10 +326,10 @@ foreach ($servers as $server) { } if ($tiny) { - unset($table->head[4]); - unset($table->head[6]); + unset($table->head[5]); unset($table->head[7]); unset($table->head[8]); + unset($table->head[9]); } if ($tiny) { From bdac4b6235b4c64a38e294da65b5257551fc5ae3 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Tue, 31 Oct 2023 16:40:55 +0100 Subject: [PATCH 43/93] #12252 fixed value group in discovery when it is 0 --- pandora_console/include/class/ExtensionsDiscovery.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/class/ExtensionsDiscovery.class.php b/pandora_console/include/class/ExtensionsDiscovery.class.php index 7fa1bfdb96..e908cc3c2b 100644 --- a/pandora_console/include/class/ExtensionsDiscovery.class.php +++ b/pandora_console/include/class/ExtensionsDiscovery.class.php @@ -1920,7 +1920,11 @@ class ExtensionsDiscovery extends Wizard $value = false; switch ($type) { case 'agent_groups': - $value = groups_get_name($v); + if ($v > 0) { + $value = groups_get_name($v); + } else { + $value = ''; + } break; case 'module_groups': From ff8c8e1796a1ff46a1994df2feb3fb73dbc57935 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Tue, 31 Oct 2023 16:45:03 +0100 Subject: [PATCH 44/93] #12252 revert fixed value group in discovery when it is 0 --- pandora_console/include/class/ExtensionsDiscovery.class.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pandora_console/include/class/ExtensionsDiscovery.class.php b/pandora_console/include/class/ExtensionsDiscovery.class.php index e908cc3c2b..7fa1bfdb96 100644 --- a/pandora_console/include/class/ExtensionsDiscovery.class.php +++ b/pandora_console/include/class/ExtensionsDiscovery.class.php @@ -1920,11 +1920,7 @@ class ExtensionsDiscovery extends Wizard $value = false; switch ($type) { case 'agent_groups': - if ($v > 0) { - $value = groups_get_name($v); - } else { - $value = ''; - } + $value = groups_get_name($v); break; case 'module_groups': From e403741b996be993ed7a113b68cc30a0a2deffcc Mon Sep 17 00:00:00 2001 From: Jonathan Date: Thu, 2 Nov 2023 08:27:11 +0100 Subject: [PATCH 45/93] #12271 styles widget message dashboard --- pandora_console/include/lib/Dashboard/Widget.php | 2 +- pandora_console/views/dashboard/widget.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/lib/Dashboard/Widget.php b/pandora_console/include/lib/Dashboard/Widget.php index 82fc7cbda5..abb39de1b8 100644 --- a/pandora_console/include/lib/Dashboard/Widget.php +++ b/pandora_console/include/lib/Dashboard/Widget.php @@ -508,7 +508,7 @@ class Widget } if ($this->configurationRequired === true) { - $output .= '
'; + $output .= '
'; $output .= \ui_print_info_message( __('Please configure this widget before usage'), '', diff --git a/pandora_console/views/dashboard/widget.php b/pandora_console/views/dashboard/widget.php index cf160ccc76..a2fbdc1783 100644 --- a/pandora_console/views/dashboard/widget.php +++ b/pandora_console/views/dashboard/widget.php @@ -43,7 +43,7 @@ if ((int) $cellData['id_widget'] !== 0 || $widgetId !== 0) { true ); - $output .= '
'; + $output .= '
'; $output .= \ui_print_info_message( __('Please select widget'), '', From b368f3b370cecef00be0b23538a6674ea0b278ea Mon Sep 17 00:00:00 2001 From: Jonathan Date: Thu, 2 Nov 2023 12:33:07 +0100 Subject: [PATCH 46/93] #12271 styles widget message dashboard --- pandora_console/include/lib/Dashboard/Widget.php | 2 +- pandora_console/include/styles/dashboards.css | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/lib/Dashboard/Widget.php b/pandora_console/include/lib/Dashboard/Widget.php index abb39de1b8..82fc7cbda5 100644 --- a/pandora_console/include/lib/Dashboard/Widget.php +++ b/pandora_console/include/lib/Dashboard/Widget.php @@ -508,7 +508,7 @@ class Widget } if ($this->configurationRequired === true) { - $output .= '
'; + $output .= '
'; $output .= \ui_print_info_message( __('Please configure this widget before usage'), '', diff --git a/pandora_console/include/styles/dashboards.css b/pandora_console/include/styles/dashboards.css index d7fcbd761e..c12ea132a7 100644 --- a/pandora_console/include/styles/dashboards.css +++ b/pandora_console/include/styles/dashboards.css @@ -950,7 +950,8 @@ input.resize_button { right: 6%; } -.new-widget-message .info_box_information .title b { +.new-widget-message .info_box_information .title > b, +.container-center .info_box_information .title > b { margin-left: 60px; } From ed5fdfddf57fcdfc34c73a8e677a6075ef58c342 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Thu, 2 Nov 2023 13:04:59 +0100 Subject: [PATCH 47/93] #12271 styles widget message dashboard --- pandora_console/include/styles/dashboards.css | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/styles/dashboards.css b/pandora_console/include/styles/dashboards.css index c12ea132a7..675b5c7c50 100644 --- a/pandora_console/include/styles/dashboards.css +++ b/pandora_console/include/styles/dashboards.css @@ -950,9 +950,17 @@ input.resize_button { right: 6%; } -.new-widget-message .info_box_information .title > b, -.container-center .info_box_information .title > b { - margin-left: 60px; +.new-widget-message > div > table, +.container-center > div > table { + display: flex; + flex-direction: column; + align-items: center; +} + +.new-widget-message > div > table tr td > div, +.container-center > div > table tr td > div { + position: absolute; + right: 20px; } .parent_graph > .graph { From 84d450e35ed3ed40d4c6dd75d369329576f9ef4a Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 3 Nov 2023 13:10:09 +0100 Subject: [PATCH 48/93] Fix pagination interfaces pandora_enterprise#12356 --- .../operation/agentes/interface_view.functions.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pandora_console/operation/agentes/interface_view.functions.php b/pandora_console/operation/agentes/interface_view.functions.php index 01f7ba75bb..00211d23f0 100644 --- a/pandora_console/operation/agentes/interface_view.functions.php +++ b/pandora_console/operation/agentes/interface_view.functions.php @@ -789,10 +789,6 @@ function print_table( } html_print_table($table); - - if (count($selected_interfaces) > $config['block_size']) { - ui_pagination(count($selected_interfaces), false, $pagination_index, 0, false, 'offset', true, ''); - } } else { ui_print_info_message(['no_close' => true, 'message' => __('No search parameters')]); } From e690f5788f532b002af1d01852b1124c963badcc Mon Sep 17 00:00:00 2001 From: Rafael Date: Tue, 7 Nov 2023 15:52:05 +0100 Subject: [PATCH 49/93] 12101 adding binary agent, made and open cron line --- extras/deploy-scripts/pandora_deploy_community.sh | 4 ++-- .../deploy-scripts/pandora_deploy_community_el8.sh | 7 ++++--- .../pandora_deploy_community_ubuntu_2204.sh | 14 +++++++++----- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/extras/deploy-scripts/pandora_deploy_community.sh b/extras/deploy-scripts/pandora_deploy_community.sh index 24d714daea..39b0ee681c 100644 --- a/extras/deploy-scripts/pandora_deploy_community.sh +++ b/extras/deploy-scripts/pandora_deploy_community.sh @@ -711,8 +711,8 @@ systemctl enable tentacle_serverd &>> $LOGFILE execute_cmd "service tentacle_serverd start" "Starting Tentacle Server" # Enabling condole cron -execute_cmd "echo \"* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://127.0.0.1/pandora_console/enterprise/cron.php >> $PANDORA_CONSOLE/log/cron.log\" >> /etc/crontab" "Enabling Pandora FMS Console cron" -echo "* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://127.0.0.1/pandora_console/enterprise/cron.php >> $PANDORA_CONSOLE/log/cron.log" >> /etc/crontab +execute_cmd "echo \"* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://127.0.0.1/pandora_console/cron.php >> $PANDORA_CONSOLE/log/cron.log\" >> /etc/crontab" "Enabling Pandora FMS Console cron" +echo "* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://127.0.0.1/pandora_console/cron.php >> $PANDORA_CONSOLE/log/cron.log" >> /etc/crontab ## Enabling agent systemctl enable pandora_agent_daemon &>> $LOGFILE execute_cmd "systemctl start pandora_agent_daemon" "Starting Pandora FMS Agent" diff --git a/extras/deploy-scripts/pandora_deploy_community_el8.sh b/extras/deploy-scripts/pandora_deploy_community_el8.sh index 3ad47baf73..d32221aa76 100644 --- a/extras/deploy-scripts/pandora_deploy_community_el8.sh +++ b/extras/deploy-scripts/pandora_deploy_community_el8.sh @@ -395,6 +395,7 @@ console_dependencies=" \ https://firefly.pandorafms.com/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \ https://firefly.pandorafms.com/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \ https://firefly.pandorafms.com/centos8/pandora_gotty-1.0-1.el8.x86_64.rpm \ + https://firefly.pandorafms.com/centos8/pandorafms_made-0.1.0-1.el8.x86_64.rpm \ https://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm" execute_cmd "dnf install -y $console_dependencies" "Installing Pandora FMS Console dependencies" @@ -570,7 +571,7 @@ export MYSQL_PWD=$DBPASS if [ "$PANDORA_LTS" -eq '1' ] ; then [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_server-7.0NG.noarch.rpm" [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_console-7.0NG.noarch.rpm" - [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_agent_linux-7.0NG.noarch.rpm" + [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux_bin-7.0NG.x86_64.rpm" elif [ "$PANDORA_LTS" -ne '1' ] ; then [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm" [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.x86_64.rpm" @@ -829,8 +830,8 @@ systemctl enable tentacle_serverd &>> "$LOGFILE" execute_cmd "service tentacle_serverd start" "Starting Tentacle Server" # Enabling condole cron -execute_cmd "echo \"* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://127.0.0.1/pandora_console/enterprise/cron.php >> $PANDORA_CONSOLE/log/cron.log\" >> /etc/crontab" "Enabling Pandora FMS Console cron" -echo "* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://127.0.0.1/pandora_console/enterprise/cron.php >> $PANDORA_CONSOLE/log/cron.log" >> /etc/crontab +execute_cmd "echo \"* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://127.0.0.1/pandora_console/cron.php >> $PANDORA_CONSOLE/log/cron.log\" >> /etc/crontab" "Enabling Pandora FMS Console cron" +echo "* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://127.0.0.1/pandora_console/cron.php >> $PANDORA_CONSOLE/log/cron.log" >> /etc/crontab ## Enabling agent systemctl enable pandora_agent_daemon &>> "$LOGFILE" execute_cmd "systemctl start pandora_agent_daemon" "Starting Pandora FMS Agent" diff --git a/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh b/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh index ca7ccf757e..28d9f70a78 100644 --- a/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh +++ b/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh @@ -348,6 +348,10 @@ execute_cmd "installing_docker" "Installing Docker for debug" execute_cmd "curl --output pandora_gotty.deb https://firefly.pandorafms.com/ubuntu/pandora_gotty_1.0.0.deb" "Downloading pandora_gotty" execute_cmd "apt install -y ./pandora_gotty.deb" "Intalling pandora_gotty" +# Installing MADE +execute_cmd "curl --output pandora_made.deb https://firefly.pandorafms.com/ubuntu/pandorafms-made_0.1.0-2_amd64.deb" "Downloading pandora MADE" +execute_cmd "apt install -y ./pandora_made.deb" "Intalling pandora MADE" + # wmic and pandorawmic execute_cmd "curl -O https://firefly.pandorafms.com/pandorafms/utils/bin/wmic" "Downloading wmic" execute_cmd "curl -O https://firefly.pandorafms.com/pandorafms/utils/bin/pandorawmic" "Downloading pandorawmic" @@ -518,17 +522,17 @@ execute_cmd "systemctl restart mysql" "Configuring and restarting database engin if [ "$PANDORA_LTS" -eq '1' ] ; then [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/LTS/pandorafms_server-7.0NG.tar.gz" [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/LTS/pandorafms_console-7.0NG.tar.gz" - [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/LTS/pandorafms_agent_linux-7.0NG.tar.gz" + [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG_x86_64.tar.gz" elif [ "$PANDORA_LTS" -ne '1' ] ; then [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_server-7.0NG.tar.gz" [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_console-7.0NG.tar.gz" - [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz" + [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG_x86_64.tar.gz" fi if [ "$PANDORA_BETA" -eq '1' ] ; then PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest.tar.gz" PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.tar.gz" - PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz" + PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG_x86_64.tar.gz" fi # Downloading Pandora Packages @@ -823,8 +827,8 @@ execute_cmd "service tentacle_serverd start" "Starting Tentacle Server" systemctl enable tentacle_serverd &>> "$LOGFILE" # Enabling console cron -execute_cmd "echo \"* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://127.0.0.1/pandora_console/enterprise/cron.php >> $PANDORA_CONSOLE/log/cron.log\" >> /etc/crontab" "Enabling Pandora FMS Console cron" -echo "* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://127.0.0.1/pandora_console/enterprise/cron.php >> $PANDORA_CONSOLE/log/cron.log" >> /etc/crontab +execute_cmd "echo \"* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://127.0.0.1/pandora_console/cron.php >> $PANDORA_CONSOLE/log/cron.log\" >> /etc/crontab" "Enabling Pandora FMS Console cron" +echo "* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep-session-cookies http://127.0.0.1/pandora_console/cron.php >> $PANDORA_CONSOLE/log/cron.log" >> /etc/crontab # Enabling pandoradb cron execute_cmd "echo 'enabling pandoradb cron' >> $PANDORA_CONSOLE/log/cron.log\" >> /etc/crontab" "Enabling Pandora FMS pandoradb cron" From 161b0e8a34782a36397e14590b2c7dc7cb2e7635 Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 8 Nov 2023 10:31:42 +0100 Subject: [PATCH 50/93] Add filter eventcardboard pandora_enterprise#11760 --- pandora_console/include/functions_events.php | 40 ++++++++++++++++--- .../lib/Dashboard/Widgets/EventCardboard.php | 6 +-- 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index abfee036cb..c814e137eb 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -6016,17 +6016,47 @@ function get_count_event_criticity( $type = 'AND event_type = "'.$eventType.'"'; } - $groups = ' '; + $groups = ' '; if ((int) $groupId !== 0) { $groups = 'AND id_grupo IN ('.$groupId.')'; } - $status = ' '; - if ((int) $eventStatus !== -1) { - $status = 'AND estado = '.$eventStatus; + $status = ' '; + if (empty($eventStatus) === false) { + switch ($eventStatus) { + case EVENT_ALL: + default: + // Do not filter. + break; + + case EVENT_NEW: + case EVENT_VALIDATE: + case EVENT_PROCESS: + $status = sprintf( + ' AND estado = %d', + $eventStatus + ); + break; + + case EVENT_NO_VALIDATED: + $status = sprintf( + ' AND (estado = %d OR estado = %d)', + EVENT_NEW, + EVENT_PROCESS + ); + break; + + case EVENT_NO_PROCESS: + $status = sprintf( + ' AND (estado = %d OR estado = %d)', + EVENT_NEW, + EVENT_VALIDATE + ); + break; + } } - $criticity = ' '; + $criticity = ' '; if (empty($criticityId) === false) { $criticity = 'AND criticity IN ('.$criticityId.')'; } diff --git a/pandora_console/include/lib/Dashboard/Widgets/EventCardboard.php b/pandora_console/include/lib/Dashboard/Widgets/EventCardboard.php index fa2f8bb023..8ca7571790 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/EventCardboard.php +++ b/pandora_console/include/lib/Dashboard/Widgets/EventCardboard.php @@ -296,11 +296,7 @@ class EventCardboard extends Widget ]; // Event status. - $fields = [ - -1 => __('All event'), - 1 => __('Only validated'), - 0 => __('Only pending'), - ]; + $fields = events_get_all_status(true); $inputs['inputs']['row1'][] = [ 'label' => __('Event status'), From 611e93ea7e6f0912be41f38ebf5fef6feb134b4c Mon Sep 17 00:00:00 2001 From: Jonathan Date: Fri, 10 Nov 2023 09:27:22 +0100 Subject: [PATCH 51/93] #12417 fix graph no show on string when FF change --- .../godmode/agentes/module_manager_editor_common.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index de08a299de..9c318b4e9f 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -2000,7 +2000,11 @@ ui_require_jquery_file('json'); $('#' + thisLabel).prop('checked', true); $('#' + thisLabel).siblings().prop('checked', false); - if ($('#radius-percentage_warning').prop('checked') === true || $('#radius-percentage_critical').prop('checked') === true) { + var type_selected = $("#id_module_type").val(); + var type_names = jQuery.parseJSON(Base64.decode($('#hidden-type_names').val())); + var type_name_selected = type_names[type_selected]; + + if ($('#radius-percentage_warning').prop('checked') === true || $('#radius-percentage_critical').prop('checked') === true || type_name_selected == 'generic_data_string') { $("#svg_dinamic").hide(); } else { paint_graph_values(); From 748238a7ea8da8a814db373d4e1e3536ab6c83af Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Fri, 10 Nov 2023 10:03:13 +0100 Subject: [PATCH 52/93] #11791 Prevent any user from changing another user's notification settings in AJAX --- pandora_console/include/ajax/notifications.ajax.php | 4 ++++ pandora_console/include/functions_notifications.php | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/ajax/notifications.ajax.php b/pandora_console/include/ajax/notifications.ajax.php index 36ea95900d..a69ad1b56e 100644 --- a/pandora_console/include/ajax/notifications.ajax.php +++ b/pandora_console/include/ajax/notifications.ajax.php @@ -38,6 +38,10 @@ if ($change_label === '1') { $source = get_parameter('source', 0); $user = get_parameter('user', ''); $value = get_parameter('value', 0) ? 1 : 0; + $user_info = get_user_info($config['id_user']); + if ((bool) $user_info['is_admin'] === false && $config['id_user'] !== $user) { + return false; + } // Update the label value. ob_clean(); diff --git a/pandora_console/include/functions_notifications.php b/pandora_console/include/functions_notifications.php index ea29c2c98a..4838f3c954 100644 --- a/pandora_console/include/functions_notifications.php +++ b/pandora_console/include/functions_notifications.php @@ -661,7 +661,8 @@ function notifications_set_user_label_status($source, $user, $label, $value) { global $config; - if ((bool) check_acl($config['id_user'], 0, 'PM') === false && $config['id_user'] !== $user) { + $user_info = get_user_info($config['id_user']); + if ((bool) $user_info['is_admin'] === false && $config['id_user'] !== $user) { return false; } From 584a31147f48a88e92de1721848fc1f76b3959c4 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Fri, 10 Nov 2023 11:46:13 +0100 Subject: [PATCH 53/93] fixed link --- pandora_console/views/tacticalView/view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/views/tacticalView/view.php b/pandora_console/views/tacticalView/view.php index 308c9626e9..29b1c923fc 100644 --- a/pandora_console/views/tacticalView/view.php +++ b/pandora_console/views/tacticalView/view.php @@ -268,7 +268,7 @@
loading(); ?>
From b100d34985404ad9402f1f4762df9463b92b970e Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Mon, 13 Nov 2023 09:38:24 +0100 Subject: [PATCH 54/93] #12249 new view vulnerabilities agent --- pandora_console/include/functions_ui.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 3b193b8975..cbe3314289 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -8230,3 +8230,23 @@ function ui_update_name_fav_element($id_element, $section, $label) ] ); } + + +function ui_print_status_vulnerability_div(float $score) +{ + $return = ''; + $class = 'status_rounded_rectangles forced_title'; + if (((float) $score) <= 5) { + return ui_print_div('group_view_ok '.$class, $score); + } + + if (((float) $score) > 5 && ((float) $score) <= 7.5) { + return ui_print_div('group_view_warn '.$class, $score); + } + + if (((float) $score) > 7.5) { + return ui_print_div('group_view_crit '.$class, $score); + } + + return $return; +} \ No newline at end of file From d312b0d81388d613b17249ab6c12b9f373165928 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 13 Nov 2023 13:08:28 +0100 Subject: [PATCH 55/93] #12400 Fixed date format --- pandora_console/include/functions_html.php | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 888531e915..d9c60589ce 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -7305,8 +7305,10 @@ function html_print_select_date_range( $time_end='', $date_text=SECONDS_1DAY, $class='w100p', - $date_format='Y/m/d', - $time_format='H:i:s' + $date_format_php='Y/m/d', + $time_format_php='H:i:s', + $date_format_js='yy/mm/dd', + $time_format_js='HH:mm:ss' ) { global $config; @@ -7328,21 +7330,21 @@ function html_print_select_date_range( } if ($date_end === '') { - $date_end = date($date_format); + $date_end = date($date_format_php); } if ($date_init === '') { - $date_init = date($date_format, strtotime($date_end.' -1 days')); + $date_init = date($date_format_php, strtotime($date_end.' -1 days')); } - $date_init = date($date_format, strtotime($date_init)); + $date_init = date($date_format_php, strtotime($date_init)); if ($time_init === '') { - $time_init = date($time_format); + $time_init = date($time_format_php); } if ($time_end === '') { - $time_end = date($time_format); + $time_end = date($time_format_php); } $fields[SECONDS_1DAY] = __('Last 24hr'); @@ -7508,7 +7510,7 @@ function html_print_select_date_range( } $('#text-date').datepicker({ - dateFormat: '".DATE_FORMAT_JS."', + dateFormat: '".$date_format_js."', changeMonth: true, changeYear: true, showAnim: 'slideDown' @@ -7516,7 +7518,7 @@ function html_print_select_date_range( $('[id^=text-time_init]').timepicker({ showSecond: true, - timeFormat: '".TIME_FORMAT_JS."', + timeFormat: '".$time_format_js."', timeOnlyTitle: '".__('Choose time')."', timeText: '".__('Time')."', hourText: '".__('Hour')."', @@ -7527,7 +7529,7 @@ function html_print_select_date_range( }); $('[id^=text-date_init]').datepicker ({ - dateFormat: '".DATE_FORMAT_JS."', + dateFormat: '".$date_format_js."', changeMonth: true, changeYear: true, showAnim: 'slideDown', @@ -7549,7 +7551,7 @@ function html_print_select_date_range( }); $('[id^=text-date_end]').datepicker ({ - dateFormat: '".DATE_FORMAT_JS."', + dateFormat: '".$date_format_js."', changeMonth: true, changeYear: true, showAnim: 'slideDown', @@ -7572,7 +7574,7 @@ function html_print_select_date_range( $('[id^=text-time_end]').timepicker({ showSecond: true, - timeFormat: '".TIME_FORMAT_JS."', + timeFormat: '".$time_format_js."', timeOnlyTitle: '".__('Choose time')."', timeText: '".__('Time')."', hourText: '".__('Hour')."', From dc714a5b9f9e1a82d9647305c7398fa25bbe3e24 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Mon, 13 Nov 2023 15:27:07 +0100 Subject: [PATCH 56/93] #12249 column secmon --- pandora_console/include/functions_ui.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index cbe3314289..05eeeb483d 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -8249,4 +8249,21 @@ function ui_print_status_vulnerability_div(float $score) } return $return; +} + + +function ui_print_status_secmon_div($status) +{ + $class = 'status_rounded_rectangles forced_title'; + if (($status) === 'normal') { + return ui_print_div('group_view_ok '.$class, __('normal')); + } + + if (($status) === 'warning') { + return ui_print_div('group_view_warn '.$class, __('warning')); + } + + if (($status) === 'critical') { + return ui_print_div('group_view_crit '.$class, __('critical')); + } } \ No newline at end of file From e38246521db38ce88f20174061b5353e9fd62fd6 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Tue, 14 Nov 2023 09:33:04 +0100 Subject: [PATCH 57/93] #12251 added info in security in agent contact --- pandora_console/include/functions_agents.php | 40 ++++++++++++++++++++ pandora_console/include/functions_ui.php | 11 ++++-- 2 files changed, 47 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 720b0e6e55..4fb61875d5 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -4845,6 +4845,46 @@ function get_resume_agent_concat($id_agente, $all_groups, $agent) $data[1] = $time_elapsed; $table_contact->data[] = $data; + // SecurityMon line. + $id_module_group = db_get_value('id_mg', 'tmodule_group', 'name', 'Security'); + $modules = db_get_all_rows_filter( + 'tagente_modulo', + [ + 'id_agente' => $agent['id_agente'], + 'id_module_group' => $id_module_group, + ] + ); + + if (is_array($modules) === true && count($modules) > 0) { + $secmon_status = secmon_status($agent['id_agente']); + $data = []; + $data[0] = ''.__('SecurityMon').''; + $data[1] = ui_print_status_secmon_div($secmon_status, __('Total security modules: %s', count($modules))); + $table_contact->data[] = $data; + } + + // Hardening line. + $module_score = modules_get_agentmodule_id(io_safe_input('Hardening - Score'), $agent['id_agente']); + $hardening = ''; + if (is_array($module_score) === true && key_exists('id_agente_modulo', $module_score) == true) { + $raw_data_score = modules_get_raw_data($module_score['id_agente_modulo'], 0, time()); + $hardening = format_numeric($raw_data_score[0]['datos'], 2); + $data = []; + $data[0] = ''.__('Hardening').''; + $data[1] = $hardening.' %'; + $table_contact->data[] = $data; + } + + // Vulnerabilities line. + $vuls = get_vulnerabilities($agent['id_agente']); + if (is_array($vuls) === true && count($vuls) > 0) { + $score = get_score($vuls); + $data = []; + $data[0] = ''.__('Vulnerability').''; + $data[1] = ui_print_status_vulnerability_div($score); + $table_contact->data[] = $data; + } + $agent_contact = html_print_div( [ 'class' => 'agent_details_header', diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 05eeeb483d..c3d14778d4 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -8252,18 +8252,21 @@ function ui_print_status_vulnerability_div(float $score) } -function ui_print_status_secmon_div($status) +function ui_print_status_secmon_div($status, $title=false) { $class = 'status_rounded_rectangles forced_title'; if (($status) === 'normal') { - return ui_print_div('group_view_ok '.$class, __('normal')); + $title = ($title === false) ? __('normal') : $title; + return ui_print_div('group_view_ok '.$class, $title); } if (($status) === 'warning') { - return ui_print_div('group_view_warn '.$class, __('warning')); + $title = ($title === false) ? __('warning') : $title; + return ui_print_div('group_view_warn '.$class, $title); } if (($status) === 'critical') { - return ui_print_div('group_view_crit '.$class, __('critical')); + $title = ($title === false) ? __('critical') : $title; + return ui_print_div('group_view_crit '.$class, $title); } } \ No newline at end of file From 636f76258e4fe017a4d38dcab6aa7ce85eca2c5b Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Tue, 14 Nov 2023 10:12:48 +0100 Subject: [PATCH 58/93] #12249 fixed black theme view --- pandora_console/include/styles/pandora_black.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pandora_console/include/styles/pandora_black.css b/pandora_console/include/styles/pandora_black.css index c2afb2c737..e2f5eb1639 100644 --- a/pandora_console/include/styles/pandora_black.css +++ b/pandora_console/include/styles/pandora_black.css @@ -1871,3 +1871,8 @@ a.pandora_pagination, #general-tactical-view #horizontalBar .labels .label span { color: black; } + +#score-bar .labels-bar span, +#score-bar .labels-bar div { + color: white; +} From b241200be687e6390a2f20253cbcbfcd7a619e62 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Tue, 14 Nov 2023 10:46:06 +0100 Subject: [PATCH 59/93] #12251 check if enterprise is installed in open --- pandora_console/include/functions_agents.php | 72 ++++++++++---------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 4fb61875d5..2e2988f662 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -4845,44 +4845,46 @@ function get_resume_agent_concat($id_agente, $all_groups, $agent) $data[1] = $time_elapsed; $table_contact->data[] = $data; - // SecurityMon line. - $id_module_group = db_get_value('id_mg', 'tmodule_group', 'name', 'Security'); - $modules = db_get_all_rows_filter( - 'tagente_modulo', - [ - 'id_agente' => $agent['id_agente'], - 'id_module_group' => $id_module_group, - ] - ); + if (enterprise_installed() === true) { + // SecurityMon line. + $id_module_group = db_get_value('id_mg', 'tmodule_group', 'name', 'Security'); + $modules = db_get_all_rows_filter( + 'tagente_modulo', + [ + 'id_agente' => $agent['id_agente'], + 'id_module_group' => $id_module_group, + ] + ); - if (is_array($modules) === true && count($modules) > 0) { - $secmon_status = secmon_status($agent['id_agente']); - $data = []; - $data[0] = ''.__('SecurityMon').''; - $data[1] = ui_print_status_secmon_div($secmon_status, __('Total security modules: %s', count($modules))); - $table_contact->data[] = $data; - } + if (is_array($modules) === true && count($modules) > 0) { + $secmon_status = secmon_status($agent['id_agente']); + $data = []; + $data[0] = ''.__('SecurityMon').''; + $data[1] = ui_print_status_secmon_div($secmon_status, __('Total security modules: %s', count($modules))); + $table_contact->data[] = $data; + } - // Hardening line. - $module_score = modules_get_agentmodule_id(io_safe_input('Hardening - Score'), $agent['id_agente']); - $hardening = ''; - if (is_array($module_score) === true && key_exists('id_agente_modulo', $module_score) == true) { - $raw_data_score = modules_get_raw_data($module_score['id_agente_modulo'], 0, time()); - $hardening = format_numeric($raw_data_score[0]['datos'], 2); - $data = []; - $data[0] = ''.__('Hardening').''; - $data[1] = $hardening.' %'; - $table_contact->data[] = $data; - } + // Hardening line. + $module_score = modules_get_agentmodule_id(io_safe_input('Hardening - Score'), $agent['id_agente']); + $hardening = ''; + if (is_array($module_score) === true && key_exists('id_agente_modulo', $module_score) == true) { + $raw_data_score = modules_get_raw_data($module_score['id_agente_modulo'], 0, time()); + $hardening = format_numeric($raw_data_score[0]['datos'], 2); + $data = []; + $data[0] = ''.__('Hardening').''; + $data[1] = $hardening.' %'; + $table_contact->data[] = $data; + } - // Vulnerabilities line. - $vuls = get_vulnerabilities($agent['id_agente']); - if (is_array($vuls) === true && count($vuls) > 0) { - $score = get_score($vuls); - $data = []; - $data[0] = ''.__('Vulnerability').''; - $data[1] = ui_print_status_vulnerability_div($score); - $table_contact->data[] = $data; + // Vulnerabilities line. + $vuls = get_vulnerabilities($agent['id_agente']); + if (is_array($vuls) === true && count($vuls) > 0) { + $score = get_score($vuls); + $data = []; + $data[0] = ''.__('Vulnerability').''; + $data[1] = ui_print_status_vulnerability_div($score); + $table_contact->data[] = $data; + } } $agent_contact = html_print_div( From 23f0ac8a90b1492010d8810f95e0138eaad2ca27 Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 14 Nov 2023 17:25:53 +0100 Subject: [PATCH 60/93] add demo data pandora_enterprise#12457 --- pandora_console/pandoradb_data.sql | 76 ++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 9ce5355361..bfb1d0ee96 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -2648,6 +2648,82 @@ INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable` SELECT @last_id := LAST_INSERT_ID(); INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`,`filename`,`path`) VALUES (@last_id,'zoom_en_graficas.png','images/tips/'); +INSERT INTO `twidget` (`id`,`class_name`,`unique_name`,`description`,`options`,`page`) VALUES + (1,'AgentHive','AgentHive','Agents hive','','AgentHive.php'), + (2,'AvgSumMaxMinModule','AvgSumMaxMinModule','Avg|Sum|Max|Min Module Data','','AvgSumMaxMinModule.php'), + (3,'BasicChart','BasicChart','Basic chart','','BasicChart.php'), + (4,'BlockHistogram','BlockHistogram','Block histogram','','BlockHistogram.php'), + (5,'ColorModuleTabs','ColorModuleTabs','Color tabs modules','','ColorModuleTabs.php'), + (6,'DataMatrix','DataMatrix','Data Matrix','','DataMatrix.php'), + (7,'EventCardboard','EventCardboard','Event cardboard','','EventCardboard.php'), + (8,'GroupedMeterGraphs','GroupedMeterGraphs','Grouped meter graphs','','GroupedMeterGraphs.php'), + (9,'ModulesByStatus','ModulesByStatus','Modules by status','','ModulesByStatus.php'), + (10,'AgentModuleWidget','agent_module','Agent/Module View','','agent_module.php'), + (11,'AlertsFiredWidget','alerts_fired','Triggered alerts report','','alerts_fired.php'), + (12,'ClockWidget','clock','Clock','','clock.php'), + (13,'CustomGraphWidget','custom_graph','Defined custom graph','','custom_graph.php'), + (14,'EventsListWidget','events_list','List of latest events','','events_list.php'), + (15,'WelcomeWidget','example','Welcome message to Pandora FMS','','example.php'), + (16,'GraphModuleHistogramWidget','graph_module_histogram','Module histogram','','graph_module_histogram.php'), + (17,'GroupsStatusWidget','groups_status','General group status','','groups_status.php'), + (18,'GroupsStatusMapWidget','groups_status_map','Group status map','','groups_status_map.php'), + (19,'HeatmapWidget','heatmap','Heatmap','','heatmap.php'), + (20,'InventoryWidget','inventory','Inventory','','inventory.php'), + (21,'MapsMadeByUser','maps_made_by_user','Visual Console','','maps_made_by_user.php'), + (22,'MapsStatusWidget','maps_status','General visual maps report','','maps_status.php'), + (23,'ModuleIconWidget','module_icon','Icon and module value','','module_icon.php'), + (24,'ModuleStatusWidget','module_status','Module status','','module_status.php'), + (25,'ModuleTableValueWidget','module_table_value','Module in a table','','module_table_value.php'), + (26,'ModuleValueWidget','module_value','Module value','','module_value.php'), + (27,'MonitorHealthWidget','monitor_health','Global health info','','monitor_health.php'), + (28,'Netflow','netflow','Netflow','','netflow.php'), + (29,'NetworkMapWidget','network_map','Network map','','network_map.php'), + (30,'OsQuickReportWidget','os_quick_report','OS quick report','','os_quick_report.php'), + (31,'PostWidget','post','Panel with a message','','post.php'), + (32,'ReportsWidget','reports','Custom report','','reports.php'), + (33,'ServiceMapWidget','service_map','Service map','','service_map.php'), + (34,'ServiceViewWidget','service_view','Services view','','service_view.php'), + (35,'SingleGraphWidget','single_graph','Agent module graph','','single_graph.php'), + (36,'SLAPercentWidget','sla_percent','SLA percentage','','sla_percent.php'), + (37,'SystemGroupStatusWidget','system_group_status','Groups status','','system_group_status.php'), + (38,'TacticalWidget','tactical','Tactical view','','tactical.php'), + (39,'TopNWidget','top_n','Top N of agent modules','','top_n.php'), + (40,'TopNEventByGroupWidget','top_n_events_by_group','Top N events by agent','','top_n_events_by_group.php'), + (41,'TopNEventByModuleWidget','top_n_events_by_module','Top N events by module','','top_n_events_by_module.php'), + (42,'TreeViewWidget','tree_view','Tree view','','tree_view.php'), + (43,'UrlWidget','url','URL content','','url.php'), + (44,'WuxWidget','wux_transaction','Agent WUX transaction','','wux_transaction.php'), + (45,'WuxStatsWidget','wux_transaction_stats','WUX transaction stats','','wux_transaction_stats.php'), + (46,'SecurityHardening','security_hardening','Security Hardening','','security_hardening.php'); + +INSERT INTO `tmap` (`id`,`id_group`,`id_user`,`type`,`subtype`,`name`,`description`,`height`,`width`,`center_x`,`center_y`,`background`,`background_options`,`source_period`,`source`,`source_data`,`generation_method`,`generated`,`filter`,`id_group_map`,`refresh_time`) VALUES (1,'0','admin',0,0,'Sample dynamic map','This is a sample dynamic map.',900,900,0,0,'',0,60,0,'0',6,0,'{\"dont_show_subgroups\":0,\"node_radius\":40,\"x_offs\":\"0\",\"y_offs\":\"0\",\"z_dash\":\"1\",\"node_sep\":\"0.25\",\"rank_sep\":\"0.5\",\"mindist\":\"1\",\"kval\":\"0.3\"}',0,300); +INSERT INTO `treport` (`id_report`,`id_user`,`name`,`description`,`private`,`id_group`,`custom_logo`,`header`,`first_page`,`footer`,`custom_font`,`id_template`,`id_group_edit`,`metaconsole`,`non_interactive`,`hidden`,`orientation`,`cover_page_render`,`index_render`) VALUES (1,'admin','Sample report #1','This is a sample report, just to show you some general report items.',0,0,NULL,NULL,'<p style="text-align: center;">&nbsp;</p> <p style="text-align: center;">&nbsp;</p> <p style="text-align: center;">&nbsp;</p> <p style="text-align: center;">&nbsp;</p> <p style="text-align: center;">&nbsp;</p> <p style="text-align: center;">&nbsp;</p> <p style="text-align: center;">&nbsp;</p> <p style="text-align: center;"><img src="http://localhost/pandora_console//images/pandora_report_logo.png" alt="" width="800" /></p> <p style="text-align: center;">&nbsp;</p> <p style="text-align: center;"><span style="font-size: xx-large;">(_REPORT_NAME_)</span></p> <p style="text-align: center;"><span style="font-size: large;">(_DATETIME_)</span></p>',NULL,'Lato-Regular.ttf',0,0,0,0,0,'vertical',1,1); +INSERT INTO `treport_content` (`id_rc`,`id_report`,`id_gs`,`id_agent_module`,`type`,`period`,`period_range`,`order`,`name`,`description`,`id_agent`,`text`,`external_source`,`treport_custom_sql_id`,`header_definition`,`column_separator`,`line_separator`,`time_from`,`time_to`,`monday`,`tuesday`,`wednesday`,`thursday`,`friday`,`saturday`,`sunday`,`only_display_wrong`,`top_n`,`top_n_value`,`exception_condition`,`exception_condition_value`,`show_resume`,`order_uptodown`,`show_graph`,`group_by_agent`,`style`,`id_group`,`id_module_group`,`server_name`,`historical_db`,`lapse_calc`,`lapse`,`visual_format`,`hide_no_data`,`recursion`,`show_extended_events`,`total_time`,`time_failed`,`time_in_ok_status`,`time_in_warning_status`,`time_in_unknown_status`,`time_of_not_initialized_module`,`time_of_downtime`,`total_checks`,`checks_failed`,`checks_in_ok_status`,`checks_in_warning_status`,`unknown_checks`,`agent_max_value`,`agent_min_value`,`current_month`,`failover_mode`,`failover_type`,`uncompressed_module`,`summary`,`landscape`,`pagebreak`,`compare_work_time`,`graph_render`,`ipam_network_filter`,`ipam_alive_ips`,`ipam_ip_not_assigned_to_agent`,`macros_definition`,`render_definition`,`use_prefix_notation`,`cat_security_hardening`,`ignore_skipped`,`status_of_check`) VALUES + (1,1,0,0,'agents_inventory',300,0,1,'General agent inventory','',0,'<p>This type of report implies loading a lot of data. Therefore it is recommended for scheduled reports, not real-time view.</p>','{\"agent_server_filter\":\"\",\"agents_inventory_display_options\":[\"alias\",\"comentarios\",\"id_grupo\",\"direccion\",\"id_os\",\"estado\"],\"agent_custom_field_filter\":\"\",\"agent_os_filter\":[\"0\"],\"agent_custom_fields\":[\"3\",\"2\",\"1\"],\"agent_status_filter\":[\"-1\"],\"agent_version_filter\":\"\",\"agent_module_search_filter\":\"\",\"agent_group_filter\":\"0\",\"agent_remote_conf\":\"\"}',0,'','','','00:00:00','00:00:00',1,1,1,1,1,1,1,0,0,10,0,10,0,0,0,0,'{"show_in_same_row":0,"hide_notinit_agents":0,"priority_mode":"1","dyn_height":"250"}',0,0,'',0,0,300,0,0,NULL,NULL,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,NULL,NULL,1,0,0,NULL), + (2,1,0,0,'top_n',28800,0,2,'Top CPU per agent','',0,'<p>This type of report implies loading a lot of data. Therefore it is recommended for scheduled reports, not real-time view.</p>',NULL,0,'','','','00:00:00','00:00:00',1,1,1,1,1,1,1,0,3,10,0,10,0,1,1,0,'{"show_in_same_row":0,"hide_notinit_agents":0,"priority_mode":"1","dyn_height":"250","text_agent":"Lio=","text_agent_module":"Y3B1Lio="}',0,0,'',0,0,300,0,0,NULL,NULL,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,NULL,NULL,1,0,0,NULL), + (3,1,0,0,'event_report_group',21600,0,3,'General event report','This is a sample of not normal events for any agent available in the last 6 hours',0,'<p>This type of report implies loading a lot of data. Therefore it is recommended for scheduled reports, not real-time view.</p>',NULL,0,'','','','00:00:00','00:00:00',1,1,1,1,1,1,1,0,0,10,0,10,0,0,0,0,'{"show_in_same_row":0,"hide_notinit_agents":0,"priority_mode":"1","dyn_height":"250","server_multiple":"\"\"","show_summary_group":0,"filter_event_severity":"[\"20\"]","filter_event_type":"[\"all\"]","filter_event_status":"[\"-1\"]","event_graph_by_agent":"1","event_graph_by_user_validator":"1","event_graph_by_criticity":"1","event_graph_validated_vs_unvalidated":0,"event_filter_search":"","event_filter_exclude":"","custom_data_events":"1","label":""}',0,0,'',0,0,300,0,0,NULL,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,NULL,NULL,1,0,0,NULL); +INSERT INTO `tdashboard` (`id`,`name`,`id_user`,`id_group`,`active`,`cells`,`cells_slideshow`) VALUES + (1,'Sample Dashboard #1','',0,0,0,0), + (2,'Sample Dashboard #2','',0,0,0,0); +INSERT INTO `twidget_dashboard` (`id`,`position`,`options`,`order`,`id_dashboard`,`id_widget`,`prop_width`,`prop_height`) VALUES + (1,'{\"x\":\"0\",\"y\":\"0\",\"width\":\"4\",\"height\":\"4\"}','{\"title\":\"Agents hive\",\"background\":\"#ffffff\",\"groups\":[\"12,8,4,9,2,10,13,11\"]}',0,1,1,0.32,0.32), + (2,'{\"x\":\"4\",\"y\":\"0\",\"width\":\"3\",\"height\":\"4\"}','{\"title\":\"Clock\",\"background\":\"#ffffff\",\"clockType\":\"analogic\"}',1,1,12,0.32,0.32), + (3,'{\"x\":\"7\",\"y\":\"0\",\"width\":\"5\",\"height\":\"2\"}','{\"title\":\"Event cardboard\",\"background\":\"#ffffff\",\"eventType\":\"0\",\"maxHours\":\"8\",\"eventStatus\":\"-1\",\"groupId\":[\"0\"],\"severity\":\"4,1,0,5,2,3\",\"nodes\":0}',2,1,7,0.32,0.32), + (4,'{\"x\":\"7\",\"y\":\"2\",\"width\":\"5\",\"height\":\"2\"}','{\"title\":\"Heatmap\",\"background\":\"#ffffff\",\"search\":\"\",\"type\":\"3\",\"groups\":[\"0\"]}',3,1,19,0.32,0.32), + (5,'{\"x\":\"0\",\"y\":\"4\",\"width\":\"4\",\"height\":\"6\"}','{\"title\":\"Groups status\",\"background\":\"#ffffff\",\"groupId\":[\"0\"],\"status\":[\"4,1,0,2\"],\"groupRecursion\":false}',4,1,37,0.32,0.32), + (6,'{\"x\":\"4\",\"y\":\"4\",\"width\":\"3\",\"height\":\"6\"}','{\"title\":\"Unknown Group overview\",\"background\":\"#ffffff\",\"groupId\":\"10\",\"groupRecursion\":0}',5,1,17,0.32,0.32), + (7,'{\"x\":\"7\",\"y\":\"4\",\"width\":\"5\",\"height\":\"6\"}','{\"title\":\"CPU Status\",\"background\":\"#ffffff\",\"search\":\"cpu\",\"status\":\"1,0,2\",\"limit\":\"5\",\"nodes\":\"\",\"disabled_modules\":1}',6,1,9,0.32,0.32), + (8,'{\"x\":\"0\",\"y\":\"0\",\"width\":\"6\",\"height\":\"13\"}','{\"title\":\"Last event view\",\"background\":\"#ffffff\",\"eventType\":\"0\",\"maxHours\":\"24\",\"limit\":40,\"eventStatus\":\"-1\",\"severity\":\"-1\",\"groupId\":[\"0\"],\"tagsId\":[\"\"],\"groupRecursion\":0,\"customFilter\":\"-1\",\"columns_events_widget\":[\"mini_severity,evento,estado,agent_name,timestamp\",\"\"]}',0,2,14,0.32,0.32), + (9,'{\"x\":\"6\",\"y\":\"0\",\"width\":\"4\",\"height\":\"4\"}','{\"title\":\"Tactical view\",\"background\":\"#ffffff\",\"statusMonitor\":1,\"serverPerformance\":1,\"summary\":1,\"groupId\":[\"0\"]}',1,2,38,0.32,0.32), + (10,'{\"x\":\"6\",\"y\":\"4\",\"width\":\"3\",\"height\":\"4\"}','{\"title\":\"Top N events per agent\",\"background\":\"#ffffff\",\"amountShow\":\"10\",\"maxHours\":\"8\",\"groupId\":[\"0\"],\"legendPosition\":\"bottom\",\"show_total_data\":0}',3,2,40,0.32,0.32), + (11,'{\"x\":\"10\",\"y\":\"0\",\"width\":\"2\",\"height\":\"4\"}','{\"title\":\"Dynamic map\",\"background\":\"#ffffff\",\"networkmapId\":\"1\",\"xOffset\":\"0\",\"yOffset\":\"0\",\"zoomLevel\":0.6}',2,2,29,0.32,0.32), + (12,'{\"x\":\"9\",\"y\":\"4\",\"width\":\"3\",\"height\":\"4\"}','{\"title\":\"Fired alerts\",\"background\":\"#ffffff\",\"groupId\":\"0\",\"group_recursion\":\"\"}',4,2,11,0.32,0.32), + (13,'{\"x\":\"0\",\"y\":\"13\",\"width\":\"6\",\"height\":\"3\"}','{\"title\":\"Infrastructure treeview\",\"background\":\"#ffffff\",\"typeTree\":\"group\",\"groupId\":\"0\",\"openAllGroups\":1,\"agentStatus\":\"-1\",\"filterAgent\":\"\",\"moduleStatus\":\"6\",\"filterModule\":\"\"}',7,2,42,0.32,0.32), + (14,'{\"x\":\"6\",\"y\":\"8\",\"width\":\"6\",\"height\":\"4\"}','{\"title\":\"Top N events per module\",\"background\":\"#ffffff\",\"amountShow\":\"10\",\"maxHours\":\"8\",\"groupId\":[\"0\"],\"legendPosition\":\"bottom\"}',5,2,41,0.32,0.32), + (15,'{\"x\":\"6\",\"y\":\"12\",\"width\":\"6\",\"height\":\"4\"}',NULL,6,2,30,0.32,0.32), + (16,'{\"x\":\"0\",\"y\":\"16\",\"width\":\"4\",\"height\":\"4\"}','{\"title\":\"\",\"background\":\"#ffffff\",\"agentId\":0}',8,2,15,0.32,0.32), + (17,'{\"x\":\"4\",\"y\":\"16\",\"width\":\"8\",\"height\":\"4\"}','{\"title\":\"Top10 CPU Modules per agent\",\"background\":\"#ffffff\",\"agent\":\".*\",\"module\":\"CPU\",\"period\":\"86400\",\"quantity\":\"10\",\"order\":\"1\",\"display\":\"0\",\"type_graph\":\"bar_vertical\",\"legend\":\"agent\"}',9,2,39,0.32,0.32); + -- Insert new VMware APP SET @short_name = 'pandorafms.vmware'; SET @name = 'VMware'; From 440adc41091df995c3c392ca87d72159ee7d564c Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 15 Nov 2023 13:07:06 +0100 Subject: [PATCH 61/93] #12453 Fixed interval 2 --- .../reporting_builder.item_editor.php | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index bb06d3a800..592f4e5fb3 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -6685,6 +6685,7 @@ function loadLogAgents() { params["get_agent_source"] = 1; params["log_alert"] = 1; params["page"] = "enterprise/include/ajax/log_viewer.ajax"; + params["date"] = ''; jQuery.ajax({ data: params, @@ -7904,8 +7905,10 @@ function source_change_agents() { $("#id_agents3 option").attr("style","display:none"); var params = {}; - params["get_agent_source"] = 1; + params["get_agents_by_source"] = 1; params["page"] = "enterprise/include/ajax/log_viewer.ajax"; + params["date"] = ''; + params["sources"] = JSON.stringify(source); jQuery.ajax({ data: params, @@ -7914,19 +7917,8 @@ function source_change_agents() { url: "ajax.php", async: true, success: function(data) { - let source_array = []; - $.each(data['source'],function(key,value) { - if (value === source) { - const split = key.split('-'); - source_array.push(split[1]); - } - }); - - $.each(data['agent'],function(key,value) { - const result = source_array.includes(key); - if (result === true) { - $(`#id_agents3 option[value*='${key}']`).attr("style","display:"); - } + $.each(data,function(key,value) { + $(`#id_agents3 option[value*='${value}']`).attr("style","display:"); }); $("#spinner_hack").hide(); From 6059f4dea0140fa66ed747f5de67140253fe5b58 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 15 Nov 2023 13:10:19 +0100 Subject: [PATCH 62/93] #12453 Changed string --- pandora_console/operation/agentes/log_sources_status.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/operation/agentes/log_sources_status.php b/pandora_console/operation/agentes/log_sources_status.php index 26f0c4490a..1c67cf2eba 100644 --- a/pandora_console/operation/agentes/log_sources_status.php +++ b/pandora_console/operation/agentes/log_sources_status.php @@ -96,7 +96,7 @@ if (!empty($table->data)) { // Create controlled toggle content. ui_toggle( $html_content, - __('Log sources status'), + __('Log sources status (last 24h)'), 'log_sources_status', !$log_sources_defined, false, From 7219471ff847aa14195c9985aa5ed048ec5aac73 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 15 Nov 2023 16:10:00 +0100 Subject: [PATCH 63/93] #12453 Fixed interval 3 --- .../reporting_builder.item_editor.php | 44 ++++++++++++++++--- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 592f4e5fb3..8b68ea3036 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -1589,7 +1589,7 @@ if (is_metaconsole() === true) { + + + + + + + + '; - + params["date"] = $('#period_select').val(); jQuery.ajax({ data: params, dataType: "json", @@ -6726,10 +6758,10 @@ function chooseType() { $("#row_period_range").hide(); $("#row_agent").hide(); $("#row_module").hide(); - $("#row_period").hide(); $("#row_search").hide(); $("#row_log_number").hide(); $("#row_period1").hide(); + $("#row_period2").hide(); $("#row_estimate").hide(); $("#row_interval").hide(); $("#row_custom_graph").hide(); @@ -6896,7 +6928,7 @@ function chooseType() { case 'event_report_log': $("#log_help_tip").css("visibility", "visible"); $("#row_description").show(); - $("#row_period").show(); + $("#row_period2").show(); $("#row_search").show(); $("#row_log_number").show(); $("#agents_row").show(); @@ -6910,7 +6942,7 @@ function chooseType() { case 'event_report_log_table': $("#log_help_tip").css("visibility", "visible"); $("#row_description").show(); - $("#row_period").show(); + $("#row_period2").show(); $("#row_period_range").show(); $("#row_search").show(); $("#row_log_number").show(); From de7fc79d95a13dcc5cf9526ad274391ed198f9bf Mon Sep 17 00:00:00 2001 From: alejandro Date: Wed, 15 Nov 2023 16:46:12 +0100 Subject: [PATCH 64/93] mr changes --- pandora_console/pandoradb_data.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 9ce5355361..c2fa2e993a 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -2699,7 +2699,7 @@ SET @short_name = 'pandorafms.oracle'; SET @name = 'Oracle'; SET @section = 'app'; SET @description = 'Monitor Oracle databases'; -SET @version = '1.0'; +SET @version = '1.1'; INSERT IGNORE INTO `tdiscovery_apps` (`id_app`, `short_name`, `name`, `section`, `description`, `version`) VALUES ('', @short_name, @name, @section, @description, @version); SELECT @id_app := `id_app` FROM `tdiscovery_apps` WHERE `short_name` = @short_name; From 33c4833200d18b1e243f9482e7949d097d54bf8c Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 15 Nov 2023 17:28:16 +0100 Subject: [PATCH 65/93] fix image pdf pandora_enterprise#12472 --- pandora_console/include/javascript/pandora.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index 7da7aed2a5..2b906e61f6 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -1461,7 +1461,8 @@ function defineTinyMCE(selector) { { text: "C#", value: "csharp" }, { text: "C++", value: "cpp" } ], - toolbar: defaultToolbar + toolbar: defaultToolbar, + relative_urls: false }); } From f75baa72e93fd955d688f88e121ff9e2441f26bd Mon Sep 17 00:00:00 2001 From: alejandro Date: Thu, 16 Nov 2023 10:07:28 +0100 Subject: [PATCH 66/93] update vmwre md5 code --- .../extras/discovery/DiscoveryApplicationsMigrateCodes.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/extras/discovery/DiscoveryApplicationsMigrateCodes.ini b/pandora_console/extras/discovery/DiscoveryApplicationsMigrateCodes.ini index 6323aec140..c0cee7d03f 100644 --- a/pandora_console/extras/discovery/DiscoveryApplicationsMigrateCodes.ini +++ b/pandora_console/extras/discovery/DiscoveryApplicationsMigrateCodes.ini @@ -1,4 +1,4 @@ -pandorafms.vmware=9959cc3e5cc6bfcfadd6d05b56d4a11b +pandorafms.vmware=248788e0fb2cd4e11623e4a52ee7d05b pandorafms.mysql=fadb4750d18285c0eca34f47c6aa3cfe pandorafms.mssql=1cc215409741d19080269ffba112810e pandorafms.oracle=2d9320a514d1e48a0b2804e1653c31c6 From de905b2e95bacb0d7be1835e88b4dc04c9707372 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 16 Nov 2023 12:47:33 +0100 Subject: [PATCH 67/93] #12453 Fixed interval 4 --- .../reporting/reporting_builder.item_editor.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 8b68ea3036..c461aba626 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -6726,9 +6726,9 @@ function loadLogAgents() { url: "ajax.php", async: true, success: function(data) { - $('#id_agents3') - .find('option') - .remove(); + $('#id_agents3').find('option').remove(); + $('#source option[value!=""]').remove(); + $.each(data['source'],function(key,value) { if (value === source) { $('#source').append( ``); @@ -7979,7 +7979,7 @@ function dialog_message(message_id) { } function control_period_range() { let value_period_range = $('#row_period_range #hidden-period_range').val(); - let current_value = $('#row_period #hidden-period').val(); + let current_value = $('#row_period2 #hidden-period').val(); let min_range = (current_value/12); if(min_range > value_period_range) { $('#row_period_range div:nth-child(2) select option').removeAttr("selected"); @@ -8027,10 +8027,10 @@ function control_period_range() { $(document).ready(function () { $('[id^=period], #combo_graph_options, #combo_sla_sort_options').next().css('z-index', 0); - $('#row_period input').change(function(e){ + $('#row_period2 input').change(function(e){ control_period_range(); }); - $('#row_period select').change(function(e){ + $('#row_period2 select').change(function(e){ control_period_range(); }); $('#row_period_range input').change(function(e){ From 134da0c646616747a1e97fa423a0e360d1ff729a Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Thu, 16 Nov 2023 15:31:10 +0100 Subject: [PATCH 68/93] #12475 fixed alias agent --- pandora_console/include/functions_html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 888531e915..83f8fe6d52 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1745,7 +1745,7 @@ function html_print_select_multiple_modules_filtered(array $data):string 'label' => __('Agents'), 'label_class' => 'font-title-font', 'type' => 'select_from_sql', - 'sql' => 'SELECT `id_agente`,`nombre` FROM tagente', + 'sql' => 'SELECT `id_agente`,`alias` FROM tagente', 'name' => 'filtered-module-agents-'.$uniqId, 'selected' => explode(',', $data['mAgents']), 'return' => true, From 42e278bd7c9f174948346fbf4e8acd78cba90334 Mon Sep 17 00:00:00 2001 From: alejandro Date: Thu, 16 Nov 2023 15:55:07 +0100 Subject: [PATCH 69/93] update version and tasks with the new macros --- pandora_console/extras/mr/67.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 pandora_console/extras/mr/67.sql diff --git a/pandora_console/extras/mr/67.sql b/pandora_console/extras/mr/67.sql new file mode 100644 index 0000000000..73feb2b066 --- /dev/null +++ b/pandora_console/extras/mr/67.sql @@ -0,0 +1,13 @@ +START TRANSACTION; + +UPDATE `tdiscovery_apps` SET `version` = '1.1' WHERE `short_name` = 'pandorafms.oracle'; + +SET @id_app := (SELECT `id_app` FROM `tdiscovery_apps` WHERE `short_name` = 'pandorafms.oracle'); + +UPDATE `tdiscovery_apps_tasks_macros` SET `value` = 'agents_group_id=__taskGroupID__ interval=__taskInterval__ user=_dbuser_ password=_dbpass_ thick_mode=_thickMode_ client_path=_clientPath_ threads=_threads_ modules_prefix=_prefixModuleName_ execute_custom_queries=_executeCustomQueries_ analyze_connections=_checkConnections_ engine_uptime=_checkUptime_ query_stats=_queryStats_ cache_stats=_checkCache_ fragmentation_ratio=_checkFragmentation_ check_tablescpaces=_checkTablespaces_' WHERE `macro` = '_tempfileConf_' AND `id_task` IN (SELECT `id_rt` FROM `trecon_task` WHERE `id_app` = @id_app); + +INSERT IGNORE INTO `tdiscovery_apps_tasks_macros` (`id_task`, `macro`, `type`, `value`, `temp_conf`) SELECT id_rt, '_thickMode_', 'custom', 0, 0 FROM `trecon_task` WHERE `id_app` = @id_app; +INSERT IGNORE INTO `tdiscovery_apps_tasks_macros` (`id_task`, `macro`, `type`, `value`, `temp_conf`) SELECT id_rt, '_clientPath_', 'custom', '', 0 FROM `trecon_task` WHERE `id_app` = @id_app; +UPDATE `trecon_task` SET `setup_complete` = 1 WHERE `id_app` = @id_app; + +COMMIT; From 35447154aa97f3704a9796ae262ba87b99f86389 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Thu, 16 Nov 2023 16:34:06 +0100 Subject: [PATCH 70/93] #12473 fixed status and group in export csv --- .../include/lib/ClusterViewer/ClusterManager.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pandora_console/include/lib/ClusterViewer/ClusterManager.php b/pandora_console/include/lib/ClusterViewer/ClusterManager.php index 7ee9a96ba1..4f47ca0d42 100644 --- a/pandora_console/include/lib/ClusterViewer/ClusterManager.php +++ b/pandora_console/include/lib/ClusterViewer/ClusterManager.php @@ -620,9 +620,16 @@ class ClusterManager if (empty($tmp->group) === true) { $tmp->group = __('Not set'); } else { + // Html div part for csv export. $tmp->group = ui_print_group_icon( $tmp->group, true + ).html_print_div( + [ + 'content' => groups_get_name($tmp->group), + 'class' => 'invisible', + ], + true ); } @@ -636,9 +643,16 @@ class ClusterManager } // Status. + // Html div part for csv export. $tmp->known_status = ui_print_module_status( $tmp->known_status, true + ).html_print_div( + [ + 'content' => $tmp->known_status, + 'class' => 'invisible', + ], + true ); // Options. View. From 4e9f2ac9d8fa0e1bf5c37db5887b057d142eadca Mon Sep 17 00:00:00 2001 From: Jorge Rincon Date: Thu, 16 Nov 2023 16:50:47 +0100 Subject: [PATCH 71/93] #12477 Added the option to edit bulk users and adjusted the home screen --- .../godmode/massive/massive_edit_users.php | 17 ++++++++--------- .../godmode/massive/massive_operations.php | 9 +++++++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/pandora_console/godmode/massive/massive_edit_users.php b/pandora_console/godmode/massive/massive_edit_users.php index 2ee9030e68..57274dc129 100644 --- a/pandora_console/godmode/massive/massive_edit_users.php +++ b/pandora_console/godmode/massive/massive_edit_users.php @@ -269,15 +269,14 @@ $size_pagination .= '
'; // Home screen. $home_screen = '

'.__('Home screen').ui_print_help_tip(__('User can customize the home page. By default, will display \'Agent Detail\'. Example: Select \'Other\' and type index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=1 to show agent detail view'), true).'

'; $values = [ - '-1' => __('No change'), - 'Default' => __('Default'), - 'Visual console' => __('Visual console'), - 'Event list' => __('Event list'), - 'Group view' => __('Group view'), - 'Tactical view' => __('Tactical view'), - 'Alert detail' => __('Alert detail'), - 'Other' => __('Other'), - 'Dashboard' => __('Dashboard'), + HOME_SCREEN_DEFAULT => __('Default'), + HOME_SCREEN_VISUAL_CONSOLE => __('Visual console'), + HOME_SCREEN_EVENT_LIST => __('Event list'), + HOME_SCREEN_GROUP_VIEW => __('Group view'), + HOME_SCREEN_TACTICAL_VIEW => __('Tactical view'), + HOME_SCREEN_ALERT_DETAIL => __('Alert detail'), + HOME_SCREEN_OTHER => __('Other'), + HOME_SCREEN_DASHBOARD => __('Dashboard'), ]; $home_screen .= html_print_select( diff --git a/pandora_console/godmode/massive/massive_operations.php b/pandora_console/godmode/massive/massive_operations.php index b91f1dfa94..be396d2a1b 100755 --- a/pandora_console/godmode/massive/massive_operations.php +++ b/pandora_console/godmode/massive/massive_operations.php @@ -80,12 +80,17 @@ $options_agents = [ ]; if (check_acl($config['id_user'], 0, 'UM')) { - $options_users['edit_users'] = __('Edit users in bulk'); + $options_users = [ + 'edit_users' => __('Edit users in bulk'), + ]; + if (is_metaconsole() === false) { - $options_users = [ + $options_profiles = [ 'add_profiles' => __('Bulk profile add'), 'delete_profiles' => __('Bulk profile delete'), ]; + + $options_users = array_merge(array_slice($options_users, 0, count($options_users)), $options_profiles, array_slice($options_users, count($options_users))); } } else { $options_users = []; From f386274dc07f449d34563562ece69d9852f8ebce Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 17 Nov 2023 01:00:20 +0100 Subject: [PATCH 72/93] 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.redhat_bin.el8.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.el9.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.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 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 0efa3abcfd..27748527bc 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.774-231116 +Version: 7.0NG.774-231117 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 2b6044827d..dec5ee2065 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.774-231116" +pandora_version="7.0NG.774-231117" 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 f70773274a..995cb8bcec 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1039,7 +1039,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.774'; -use constant AGENT_BUILD => '231116'; +use constant AGENT_BUILD => '231117'; # 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 318d60b4b9..360bc8a9cc 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231116 +%define release 231117 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec index d477ccf864..382472565f 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231116 +%define release 231117 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index 0c98223cb7..3a7c32b439 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231116 +%define release 231117 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index b956321eb3..6845c8f115 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231116 +%define release 231117 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 40620be9ac..7171afb7c4 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231116 +%define release 231117 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 4ddbc75dd8..12859b1a97 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231116" +PI_BUILD="231117" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 3b96dbdfd3..5dca74e452 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{231116} +{231117} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index bc2ab8c94c..58b11ecee7 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.774 Build 231116") +#define PANDORA_VERSION ("7.0NG.774 Build 231117") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 4bc4011b9c..9fd8cefaaf 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.774(Build 231116))" + VALUE "ProductVersion", "(7.0NG.774(Build 231117))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index e78dfd87a2..5086641831 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.774-231116 +Version: 7.0NG.774-231117 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 1979a86090..0833de4964 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.774-231116" +pandora_version="7.0NG.774-231117" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 75d09c46bb..5d507c2fda 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 = 'PC231116'; +$build_version = 'PC231117'; $pandora_version = 'v7.0NG.774'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 27ed7eee39..f383f63b17 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index a8a6911d8e..5a97522e47 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -7,7 +7,7 @@ %define debug_package %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231116 +%define release 231117 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index b7e332ff6a..965aab611f 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231116 +%define release 231117 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 81055b864d..61020a8524 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231116" +PI_BUILD="231117" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 6f654fe668..827d967894 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -38,7 +38,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.774 Build 231116"; +my $version = "7.0NG.774 Build 231117"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 37a7cbd202..289878ef89 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.774 Build 231116"; +my $version = "7.0NG.774 Build 231117"; # save program name for logging my $progname = basename($0); From 0eea4788bf0126820c378c82ec8e52ddaaca056f Mon Sep 17 00:00:00 2001 From: Calvo Date: Fri, 17 Nov 2023 13:24:44 +0100 Subject: [PATCH 73/93] Added blankspaces in server view --- pandora_console/godmode/servers/servers.build_table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/servers/servers.build_table.php b/pandora_console/godmode/servers/servers.build_table.php index 80b9ff9c6b..f482883786 100644 --- a/pandora_console/godmode/servers/servers.build_table.php +++ b/pandora_console/godmode/servers/servers.build_table.php @@ -144,7 +144,7 @@ foreach ($servers as $server) { } // Type. - $data[2] = ''.$server['img'].' '.ucfirst($server['type']).' server'; + $data[2] = ''.$server['img'].'    '.ucfirst($server['type']).' server'; if ($server['master'] == $master) { $data[3] .= __('Yes', true); } else { From 16495859295fc258c47b0b6d9c134f3c5d3268e5 Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 18 Nov 2023 01:00:23 +0100 Subject: [PATCH 74/93] 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.redhat_bin.el8.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.el9.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.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 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 27748527bc..6475d27969 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.774-231117 +Version: 7.0NG.774-231118 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 dec5ee2065..939b25d426 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.774-231117" +pandora_version="7.0NG.774-231118" 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 995cb8bcec..8a22591fbe 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1039,7 +1039,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.774'; -use constant AGENT_BUILD => '231117'; +use constant AGENT_BUILD => '231118'; # 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 360bc8a9cc..d04b26bba5 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231117 +%define release 231118 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec index 382472565f..fdeb826798 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231117 +%define release 231118 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index 3a7c32b439..0590e85ef3 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231117 +%define release 231118 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index 6845c8f115..a554ca331d 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231117 +%define release 231118 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 7171afb7c4..3ef08dd491 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231117 +%define release 231118 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 12859b1a97..3f5f69774a 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231117" +PI_BUILD="231118" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 5dca74e452..e76e9e257b 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{231117} +{231118} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 58b11ecee7..7e6dc1f8c0 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.774 Build 231117") +#define PANDORA_VERSION ("7.0NG.774 Build 231118") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 9fd8cefaaf..abaaab341b 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.774(Build 231117))" + VALUE "ProductVersion", "(7.0NG.774(Build 231118))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 5086641831..93ab9398eb 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.774-231117 +Version: 7.0NG.774-231118 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 0833de4964..ad4c116179 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.774-231117" +pandora_version="7.0NG.774-231118" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 5d507c2fda..2352d5fec5 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 = 'PC231117'; +$build_version = 'PC231118'; $pandora_version = 'v7.0NG.774'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index f383f63b17..5f5539f553 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 5a97522e47..c804fb6500 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -7,7 +7,7 @@ %define debug_package %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231117 +%define release 231118 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 965aab611f..ab4ef1b313 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231117 +%define release 231118 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 61020a8524..4b83eb692a 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231117" +PI_BUILD="231118" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 827d967894..acffcaf14c 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -38,7 +38,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.774 Build 231117"; +my $version = "7.0NG.774 Build 231118"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 289878ef89..e905e1e17f 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.774 Build 231117"; +my $version = "7.0NG.774 Build 231118"; # save program name for logging my $progname = basename($0); From 42936697023a65a23efad1967530507567f8de39 Mon Sep 17 00:00:00 2001 From: artica Date: Sun, 19 Nov 2023 01:00:18 +0100 Subject: [PATCH 75/93] 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.redhat_bin.el8.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.el9.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.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 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 6475d27969..83a5081306 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.774-231118 +Version: 7.0NG.774-231119 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 939b25d426..2a3fab685b 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.774-231118" +pandora_version="7.0NG.774-231119" 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 8a22591fbe..7a4e6d0f58 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1039,7 +1039,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.774'; -use constant AGENT_BUILD => '231118'; +use constant AGENT_BUILD => '231119'; # 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 d04b26bba5..534053e16d 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231118 +%define release 231119 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec index fdeb826798..2e93270e40 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231118 +%define release 231119 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index 0590e85ef3..6a4eb3c28a 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231118 +%define release 231119 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index a554ca331d..7fc052087e 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231118 +%define release 231119 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 3ef08dd491..7b21c3a8b9 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231118 +%define release 231119 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 3f5f69774a..478c869951 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231118" +PI_BUILD="231119" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index e76e9e257b..710e99c81a 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{231118} +{231119} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 7e6dc1f8c0..7d7c9407ab 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.774 Build 231118") +#define PANDORA_VERSION ("7.0NG.774 Build 231119") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index abaaab341b..64a35b6234 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.774(Build 231118))" + VALUE "ProductVersion", "(7.0NG.774(Build 231119))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 93ab9398eb..661d246a62 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.774-231118 +Version: 7.0NG.774-231119 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 ad4c116179..d4978a84a3 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.774-231118" +pandora_version="7.0NG.774-231119" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 2352d5fec5..82cc4e2f17 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 = 'PC231118'; +$build_version = 'PC231119'; $pandora_version = 'v7.0NG.774'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 5f5539f553..b53db98585 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index c804fb6500..45005556f1 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -7,7 +7,7 @@ %define debug_package %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231118 +%define release 231119 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index ab4ef1b313..ae6826ee9f 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231118 +%define release 231119 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 4b83eb692a..97e9209a4a 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231118" +PI_BUILD="231119" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index acffcaf14c..5edef328a0 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -38,7 +38,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.774 Build 231118"; +my $version = "7.0NG.774 Build 231119"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index e905e1e17f..700c4bf0c4 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.774 Build 231118"; +my $version = "7.0NG.774 Build 231119"; # save program name for logging my $progname = basename($0); From 838ba785da8e2cf2a25e675502a81c192d3e2b40 Mon Sep 17 00:00:00 2001 From: artica Date: Mon, 20 Nov 2023 01:00:19 +0100 Subject: [PATCH 76/93] 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.redhat_bin.el8.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.el9.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.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 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 83a5081306..e07eddb0af 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.774-231119 +Version: 7.0NG.774-231120 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 2a3fab685b..d070fcb5a7 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.774-231119" +pandora_version="7.0NG.774-231120" 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 7a4e6d0f58..515c2ffdd7 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1039,7 +1039,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.774'; -use constant AGENT_BUILD => '231119'; +use constant AGENT_BUILD => '231120'; # 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 534053e16d..03d879e5ad 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231119 +%define release 231120 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec index 2e93270e40..6fa58bba75 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231119 +%define release 231120 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index 6a4eb3c28a..43f5c989cd 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231119 +%define release 231120 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index 7fc052087e..4e52466887 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231119 +%define release 231120 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 7b21c3a8b9..2b68247825 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231119 +%define release 231120 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 478c869951..c9f4e7f958 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231119" +PI_BUILD="231120" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 710e99c81a..3525eee5b8 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{231119} +{231120} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 7d7c9407ab..121d6f5877 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.774 Build 231119") +#define PANDORA_VERSION ("7.0NG.774 Build 231120") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 64a35b6234..8a98de3db2 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.774(Build 231119))" + VALUE "ProductVersion", "(7.0NG.774(Build 231120))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 661d246a62..412f51ccba 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.774-231119 +Version: 7.0NG.774-231120 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 d4978a84a3..db9c97cf1a 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.774-231119" +pandora_version="7.0NG.774-231120" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 82cc4e2f17..b320d011f7 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 = 'PC231119'; +$build_version = 'PC231120'; $pandora_version = 'v7.0NG.774'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index b53db98585..cb877ea8ef 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 45005556f1..03b0159d6b 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -7,7 +7,7 @@ %define debug_package %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231119 +%define release 231120 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index ae6826ee9f..5f66d11c56 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231119 +%define release 231120 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 97e9209a4a..8eb5f4a43e 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231119" +PI_BUILD="231120" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 5edef328a0..e002f0a85b 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -38,7 +38,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.774 Build 231119"; +my $version = "7.0NG.774 Build 231120"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 700c4bf0c4..90d43df4a4 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.774 Build 231119"; +my $version = "7.0NG.774 Build 231120"; # save program name for logging my $progname = basename($0); From 50406748bf211618fe14bf19e7c382cb2752c149 Mon Sep 17 00:00:00 2001 From: Calvo Date: Mon, 20 Nov 2023 12:04:25 +0100 Subject: [PATCH 77/93] Fix server names uppercases on server list --- .../godmode/servers/servers.build_table.php | 2 +- pandora_console/include/functions_servers.php | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/servers/servers.build_table.php b/pandora_console/godmode/servers/servers.build_table.php index f482883786..95b831b86c 100644 --- a/pandora_console/godmode/servers/servers.build_table.php +++ b/pandora_console/godmode/servers/servers.build_table.php @@ -144,7 +144,7 @@ foreach ($servers as $server) { } // Type. - $data[2] = ''.$server['img'].'    '.ucfirst($server['type']).' server'; + $data[2] = ''.$server['img'].'    '.$server['name']; if ($server['master'] == $master) { $data[3] .= __('Yes', true); } else { diff --git a/pandora_console/include/functions_servers.php b/pandora_console/include/functions_servers.php index 75e034ce3c..ff6fab73c6 100644 --- a/pandora_console/include/functions_servers.php +++ b/pandora_console/include/functions_servers.php @@ -665,6 +665,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'data'; $id_modulo = 1; + $server['name'] = __('Data server'); break; case SERVER_TYPE_NETWORK: @@ -678,6 +679,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'network'; $id_modulo = 2; + $server['name'] = __('Network server'); break; case SERVER_TYPE_SNMP: @@ -691,6 +693,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'snmp'; $id_modulo = 0; + $server['name'] = __('SNMP Trap server'); break; case SERVER_TYPE_DISCOVERY: @@ -704,6 +707,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'recon'; $id_modulo = 0; + $server['name'] = __('Discovery server'); break; case SERVER_TYPE_PLUGIN: @@ -717,6 +721,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'plugin'; $id_modulo = 4; + $server['name'] = __('Plugin server'); break; case SERVER_TYPE_PREDICTION: @@ -730,6 +735,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'prediction'; $id_modulo = 5; + $server['name'] = __('Prediction server'); break; case SERVER_TYPE_WMI: @@ -743,6 +749,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'wmi'; $id_modulo = 6; + $server['name'] = __('WMI server'); break; case SERVER_TYPE_EXPORT: @@ -756,6 +763,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'export'; $id_modulo = 0; + $server['name'] = __('Export server'); break; case SERVER_TYPE_INVENTORY: @@ -769,6 +777,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'inventory'; $id_modulo = 0; + $server['name'] = __('Inventory server'); break; case SERVER_TYPE_WEB: @@ -782,6 +791,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'web'; $id_modulo = 0; + $server['name'] = __('Web server'); break; case SERVER_TYPE_EVENT: @@ -795,6 +805,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'event'; $id_modulo = 2; + $server['name'] = __('Event server'); break; case SERVER_TYPE_CORRELATION: @@ -808,6 +819,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'correlation'; $id_modulo = 0; + $server['name'] = __('Correlation server'); break; case SERVER_TYPE_ENTERPRISE_ICMP: @@ -821,6 +833,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'enterprise icmp'; $id_modulo = 2; + $server['name'] = __('Enterprise ICMP server'); break; case SERVER_TYPE_ENTERPRISE_SNMP: @@ -834,6 +847,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'enterprise snmp'; $id_modulo = 2; + $server['name'] = __('Enterprise SNMP server'); break; case SERVER_TYPE_ENTERPRISE_SATELLITE: @@ -847,6 +861,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'enterprise satellite'; $id_modulo = 0; + $server['name'] = __('Enterprise Satellite server'); break; case SERVER_TYPE_ENTERPRISE_TRANSACTIONAL: @@ -860,6 +875,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'enterprise transactional'; $id_modulo = 0; + $server['name'] = __('Enterprise Transactional server'); break; case SERVER_TYPE_MAINFRAME: @@ -873,6 +889,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'mainframe'; $id_modulo = 0; + $server['name'] = __('Mainframe server'); break; case SERVER_TYPE_SYNC: @@ -886,6 +903,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'sync'; $id_modulo = 0; + $server['name'] = __('Sync server'); break; case SERVER_TYPE_WUX: @@ -899,6 +917,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'wux'; $id_modulo = 0; + $server['name'] = __('Wux server'); break; case SERVER_TYPE_SYSLOG: @@ -912,6 +931,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'syslog'; $id_modulo = 0; + $server['name'] = __('Syslog server'); break; case SERVER_TYPE_NCM: @@ -925,6 +945,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'ncm'; $id_modulo = 0; + $server['name'] = __('NCM server'); break; case SERVER_TYPE_AUTOPROVISION: @@ -938,6 +959,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'autoprovision'; $id_modulo = 0; + $server['name'] = __('Autoprovision server'); break; case SERVER_TYPE_MIGRATION: @@ -951,6 +973,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'migration'; $id_modulo = 0; + $server['name'] = __('Migration server'); break; case SERVER_TYPE_ALERT: @@ -964,6 +987,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'alert'; $id_modulo = 0; + $server['name'] = __('Alert server'); break; case SERVER_TYPE_NETFLOW: @@ -977,6 +1001,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'netflow'; $id_modulo = 0; + $server['name'] = __('Netflow server'); break; case SERVER_TYPE_LOG: @@ -990,6 +1015,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'log'; $id_modulo = 0; + $server['name'] = __('Log server'); break; case SERVER_TYPE_MADE: @@ -1003,6 +1029,7 @@ function servers_get_info($id_server=-1, $sql_limit=-1) ); $server['type'] = 'made'; $id_modulo = 0; + $server['name'] = __('MADE server'); break; default: From ee93c86982456437f887910475b4a4dbeb90a5e2 Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 20 Nov 2023 17:19:39 +0100 Subject: [PATCH 78/93] fix update manager pandora_enterprise#12479 --- pandora_console/index.php | 1 + .../lib/UpdateManager/Client.php | 189 +++++++++++++++--- .../resources/javascript/umc.js | 17 +- .../update_manager_client/views/online.php | 49 +++-- 4 files changed, 209 insertions(+), 47 deletions(-) diff --git a/pandora_console/index.php b/pandora_console/index.php index fce3421ffe..4ca8f80a82 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -1057,6 +1057,7 @@ if ((bool) ($config['maintenance_mode'] ?? false) === true if ((bool) ($config['maintenance_mode'] ?? false) === true && $page !== 'advanced/command_center' + && $page !== 'godmode/update_manager/update_manager' && is_user_admin($config['id_user']) === true ) { // Prevent access to metaconsole if not merged. diff --git a/pandora_console/update_manager_client/lib/UpdateManager/Client.php b/pandora_console/update_manager_client/lib/UpdateManager/Client.php index 42d9e6367a..c75c84fefb 100644 --- a/pandora_console/update_manager_client/lib/UpdateManager/Client.php +++ b/pandora_console/update_manager_client/lib/UpdateManager/Client.php @@ -763,6 +763,126 @@ class Client } + /** + * Executes a curl request. + * + * @param string $url Url to be called. + * @param array $request Options. + * @param string $destiny Path. + * + * @return mixed Response given by curl. + */ + private function curlSaveToDisk(string $url, array $request, string $destiny) + { + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt( + $ch, + CURLOPT_POSTFIELDS, + $request + ); + + // Abre el archivo en modo escritura para guardar la respuesta. + $archivo = fopen($destiny, 'w'); + + // Configura cURL para guardar la respuesta directamente en el archivo. + curl_setopt($ch, CURLOPT_FILE, $archivo); + + if ($this->insecure === true) { + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); + } + + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + curl_setopt($ch, CURLOPT_TCP_KEEPALIVE, true); + + if (is_array($this->proxy) === true) { + curl_setopt($ch, CURLOPT_PROXY, $this->proxy['host']); + if (isset($this->proxy['port']) === true) { + curl_setopt($ch, CURLOPT_PROXYPORT, $this->proxy['port']); + } + + if (isset($this->proxy['user']) === true) { + curl_setopt( + $ch, + CURLOPT_PROXYUSERPWD, + $this->proxy['user'].':'.$this->proxy['password'] + ); + } + } + + // Track progress. + if ((empty($request) === true + || $request['action'] === 'get_package' + || $request['action'] === 'get_server_package') + ) { + curl_setopt( + $ch, + CURLOPT_NOPROGRESS, + false + ); + } + + $target = ''; + if ($request['action'] === 'get_server_package') { + $target = __('server update %s', $request['version']); + } else if ($request['action'] === 'get_package') { + $target = __('console update %s', $request['version']); + } + + // phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.Found + // phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundBeforeLastUsed + // phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed + curl_setopt( + $ch, + CURLOPT_PROGRESSFUNCTION, + function ( + $ch, + $total_bytes, + $current_bytes, + $total_sent_bytes, + $current_sent_bytes + ) use ($target) { + if ($total_bytes > 0) { + $this->notify( + (100 * $current_bytes / $total_bytes), + __( + 'Downloading %s %.2f/ %.2f MB.', + $target, + ($current_bytes / (1024 * 1024)), + ($total_bytes / (1024 * 1024)) + ), + true + ); + } else { + $this->notify( + 0, + __( + 'Downloading %.2f MB', + ($current_bytes / (1024 * 1024)) + ), + true + ); + } + } + ); + + // Call. + curl_exec($ch); + + $erro_no = curl_errno($ch); + if ($erro_no > 0) { + $this->lastError = $erro_no.':'.curl_error($ch); + return null; + } + + fclose($archivo); + curl_close($ch); + return true; + } + + /** * Make a request to Update manager. * @@ -810,14 +930,26 @@ class Client } } - // Initialize. - $response = $this->curl( - $this->url, - array_merge( - ['action' => $request['action']], - $request['arguments'] - ) - ); + if ($request['action'] === 'get_server_package') { + // Initialize. + $response = $this->curlSaveToDisk( + $this->url, + array_merge( + ['action' => $request['action']], + $request['arguments'] + ), + ($request['destiny'] ?? '') + ); + } else { + // Initialize. + $response = $this->curl( + $this->url, + array_merge( + ['action' => $request['action']], + $request['arguments'] + ) + ); + } if ($literal === true) { return $response; @@ -1393,10 +1525,6 @@ class Client ) { unlink($file); $processed[$file] = 'removed'; - } else if (is_dir($file) === true) { - $processed[$file] = 'skipped, is a directory'; - } else { - $processed[$file] = 'skipped. Unreachable.'; } } @@ -1836,6 +1964,9 @@ class Client return false; } + $this->notify(100, 'Updated files', true, ['reload' => true]); + sleep(2); + if ($this->globalTask === null && $this->offline === false) { $this->percentage = 90; $this->currentTask = __('Retrieving server update'); @@ -1985,6 +2116,10 @@ class Client } while ($rc !== null); } + if ($this->lock() !== true) { + return null; + } + $last_error = $this->lastError; $this->updateServerPackage(null, $this->currentPackage); @@ -1995,6 +2130,7 @@ class Client $this->percentage = 100; $this->notify(100, 'Updated to '.$this->getVersion().'.'); + $this->unlock(); return $this->currentPackage; } @@ -2133,30 +2269,21 @@ class Client } if ($package === null) { - // Retrieve package from UMS. - $this->notify(0, 'Downloading server update '.$version); - $file = $this->post( - [ - 'action' => 'get_server_package', - 'arguments' => ['version' => $version], - ], - 1 - ); - - if (empty($file) === true) { - // No content. - return false; - } - $file_name = 'pandorafms_server-'.$version.'.tar.gz'; $official_name = 'pandorafms_server_enterprise-7.0NG.%s_x86_64.tar.gz'; $filename_repo = sprintf($official_name, $version); $official_path = $file_path.$filename_repo; - if (file_put_contents($official_path, $file) === false) { - $this->lastError = 'Failed to store server update package.'; - return false; - } + // Retrieve package from UMS. + $this->notify(0, 'Downloading server update '.$version); + $this->post( + [ + 'action' => 'get_server_package', + 'arguments' => ['version' => $version], + 'destiny' => $official_path, + ], + 1 + ); $signature = $this->post( [ diff --git a/pandora_console/update_manager_client/resources/javascript/umc.js b/pandora_console/update_manager_client/resources/javascript/umc.js index ec87cf2c63..8cc3a2a971 100644 --- a/pandora_console/update_manager_client/resources/javascript/umc.js +++ b/pandora_console/update_manager_client/resources/javascript/umc.js @@ -328,11 +328,11 @@ function updateProgress(url, auth) { } if (general_label.innerText == "100.00 %") { - cleanExit(); + window.onbeforeunload = undefined; if (_auxIntervalReference != null) { window.clearInterval(_auxIntervalReference); } - return; + window.location.reload(); } ajax({ @@ -375,6 +375,19 @@ function updateProgress(url, auth) { general_action.innerText = d.result.processing; task_action.innerText = d.result.message; + + // Reload to update console. + if ( + d.result.extra != undefined && + d.result.extra.reload != undefined && + d.result.extra.reload === true + ) { + window.onbeforeunload = undefined; + if (_auxIntervalReference != null) { + window.clearInterval(_auxIntervalReference); + } + window.location.reload(); + } }, error: function(d) { dprog.innerHTML = umErrorMsg(d.error); diff --git a/pandora_console/update_manager_client/views/online.php b/pandora_console/update_manager_client/views/online.php index 0adbb9decf..ad071bb8c4 100644 --- a/pandora_console/update_manager_client/views/online.php +++ b/pandora_console/update_manager_client/views/online.php @@ -27,7 +27,9 @@ * GNU General Public License for more details. * ============================================================================ */ + global $config; + ?> @@ -57,16 +59,25 @@ global $config; $settings = update_manager_get_config_values(); $umc = new \UpdateManager\Client($settings); $updates = $umc->listUpdates(); + if ($updates === null) { + $updates = []; + } + $text_for_next_version = ''; $text_for_last_version = ''; $back_up_url = 'index.php?sec=gextensions&sec2=enterprise/godmode/manage_backups'; - if ($updates[0]['lts'] === true) { + if (isset($updates[0]['lts']) === true + && $updates[0]['lts'] === true + ) { $text_for_next_version = __('Attention. You are about to install an LTS version. LTS versions are the most stable and are released twice a year. Before installing this LTS version, please make sure you have an up-to-date backup.'); } else { $text_for_next_version = __('Attention. You are about to install an RRR version. This version may contain new features and changes, so its installation is not recommended if you are looking for maximum system stability. LTS versions are the most stable and are released twice a year.
Before installing this RRR version, please make sure you have an up-to-date backup.'); } - if ($updates[array_key_last($updates)]['lts'] === true) { + if (isset($updates[array_key_last($updates)]) === true + && isset($updates[array_key_last($updates)]['lts']) === true + && $updates[array_key_last($updates)]['lts'] === true + ) { $text_for_last_version = __('Attention. You are about to install an LTS version. LTS versions are the most stable and are released twice a year. Before installing this LTS version, please make sure you have an up-to-date backup.'); } else { $text_for_last_version = __('Attention. You are about to install an RRR version. This version may contain new features and changes, so its installation is not recommended if you are looking for maximum system stability. LTS versions are the most stable and are released twice a year.
Before installing this RRR version, please make sure you have an up-to-date backup.'); @@ -160,14 +171,19 @@ global $config; } }, error: function(e, r) { - if (typeof r != "undefined" ) { - result.innerHTML = umErrorMsg( - '' + nextUpdateVersion+' '+r - ); + if(e != '504') { + if (typeof r != "undefined" ) { + result.innerHTML = umErrorMsg( + '' + nextUpdateVersion+' '+r + ); + } else { + result.innerHTML = umErrorMsg( + '' + nextUpdateVersion+' RC'+e + ); + } } else { - result.innerHTML = umErrorMsg( - '' + nextUpdateVersion+' RC'+e - ); + cleanExit(); + window.location.reload(); } }, }); @@ -202,12 +218,17 @@ global $config; } }, error: function(e, r) { - if (typeof r != "undefined" ) { - result.innerHTML = umErrorMsg(r); + if(e != '504') { + if (typeof r != "undefined" ) { + result.innerHTML = umErrorMsg(r); + } else { + result.innerHTML = umErrorMsg( + ' RC'+e + ); + } } else { - result.innerHTML = umErrorMsg( - ' RC'+e - ); + cleanExit(); + window.location.reload(); } }, }); From 7d8eb2a4e7dca2224e4909d1af491615c8f36de1 Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 21 Nov 2023 01:00:23 +0100 Subject: [PATCH 79/93] 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.redhat_bin.el8.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.el9.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.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 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index e07eddb0af..f429a8f6dc 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.774-231120 +Version: 7.0NG.774-231121 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 d070fcb5a7..fe76c35b1a 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.774-231120" +pandora_version="7.0NG.774-231121" 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 515c2ffdd7..f967bc9041 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1039,7 +1039,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.774'; -use constant AGENT_BUILD => '231120'; +use constant AGENT_BUILD => '231121'; # 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 03d879e5ad..09ac5140d0 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231120 +%define release 231121 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec index 6fa58bba75..92302eb72c 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231120 +%define release 231121 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index 43f5c989cd..d53a059254 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231120 +%define release 231121 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index 4e52466887..68beee2f6b 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231120 +%define release 231121 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 2b68247825..7f8da22004 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231120 +%define release 231121 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 c9f4e7f958..d158955c7d 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231120" +PI_BUILD="231121" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 3525eee5b8..3a879193ae 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{231120} +{231121} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 121d6f5877..08addbce67 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.774 Build 231120") +#define PANDORA_VERSION ("7.0NG.774 Build 231121") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 8a98de3db2..bd3f6189e9 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.774(Build 231120))" + VALUE "ProductVersion", "(7.0NG.774(Build 231121))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 412f51ccba..a7ee1a3934 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.774-231120 +Version: 7.0NG.774-231121 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 db9c97cf1a..6920983923 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.774-231120" +pandora_version="7.0NG.774-231121" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index b320d011f7..ef604d9464 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 = 'PC231120'; +$build_version = 'PC231121'; $pandora_version = 'v7.0NG.774'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index cb877ea8ef..edc19ed944 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 03b0159d6b..e3d8b72c7f 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -7,7 +7,7 @@ %define debug_package %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231120 +%define release 231121 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 5f66d11c56..4b5953850c 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231120 +%define release 231121 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 8eb5f4a43e..0736d8d879 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231120" +PI_BUILD="231121" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index e002f0a85b..99853e2915 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -38,7 +38,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.774 Build 231120"; +my $version = "7.0NG.774 Build 231121"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 90d43df4a4..235e177175 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.774 Build 231120"; +my $version = "7.0NG.774 Build 231121"; # save program name for logging my $progname = basename($0); From 5514b0735e95958c855ea21f8768fc41ede2a0ca Mon Sep 17 00:00:00 2001 From: "felix.suarez" Date: Tue, 17 Oct 2023 11:51:47 -0600 Subject: [PATCH 80/93] Remove reset when reach normal but status not change --- pandora_server/lib/PandoraFMS/Core.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 420a49426b..edbd4069a9 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -2413,10 +2413,8 @@ sub pandora_process_module ($$$$$$$$$;$) { } else { if($new_status == 0 && $ff_normal > $min_ff_event) { - # Reached normal FF but status have not changed, reset counters. + # Reached normal FF but status have not changed, reset counter. $ff_normal = 0; - $ff_critical = 0; - $ff_warning = 0; } # Active ff interval From bdd4628d2474dc130927ef14826cff729281396e Mon Sep 17 00:00:00 2001 From: vgilc Date: Tue, 21 Nov 2023 16:00:27 +0000 Subject: [PATCH 81/93] Revert "Merge branch 'ent-12374-16517-cambio-en-discovery-oracle-2' into 'develop'" This reverts merge request !6674 --- .../discovery/DiscoveryApplicationsMigrateCodes.ini | 2 +- pandora_console/extras/mr/67.sql | 13 ------------- pandora_console/pandoradb_data.sql | 2 +- 3 files changed, 2 insertions(+), 15 deletions(-) delete mode 100644 pandora_console/extras/mr/67.sql diff --git a/pandora_console/extras/discovery/DiscoveryApplicationsMigrateCodes.ini b/pandora_console/extras/discovery/DiscoveryApplicationsMigrateCodes.ini index c0cee7d03f..6323aec140 100644 --- a/pandora_console/extras/discovery/DiscoveryApplicationsMigrateCodes.ini +++ b/pandora_console/extras/discovery/DiscoveryApplicationsMigrateCodes.ini @@ -1,4 +1,4 @@ -pandorafms.vmware=248788e0fb2cd4e11623e4a52ee7d05b +pandorafms.vmware=9959cc3e5cc6bfcfadd6d05b56d4a11b pandorafms.mysql=fadb4750d18285c0eca34f47c6aa3cfe pandorafms.mssql=1cc215409741d19080269ffba112810e pandorafms.oracle=2d9320a514d1e48a0b2804e1653c31c6 diff --git a/pandora_console/extras/mr/67.sql b/pandora_console/extras/mr/67.sql deleted file mode 100644 index 73feb2b066..0000000000 --- a/pandora_console/extras/mr/67.sql +++ /dev/null @@ -1,13 +0,0 @@ -START TRANSACTION; - -UPDATE `tdiscovery_apps` SET `version` = '1.1' WHERE `short_name` = 'pandorafms.oracle'; - -SET @id_app := (SELECT `id_app` FROM `tdiscovery_apps` WHERE `short_name` = 'pandorafms.oracle'); - -UPDATE `tdiscovery_apps_tasks_macros` SET `value` = 'agents_group_id=__taskGroupID__ interval=__taskInterval__ user=_dbuser_ password=_dbpass_ thick_mode=_thickMode_ client_path=_clientPath_ threads=_threads_ modules_prefix=_prefixModuleName_ execute_custom_queries=_executeCustomQueries_ analyze_connections=_checkConnections_ engine_uptime=_checkUptime_ query_stats=_queryStats_ cache_stats=_checkCache_ fragmentation_ratio=_checkFragmentation_ check_tablescpaces=_checkTablespaces_' WHERE `macro` = '_tempfileConf_' AND `id_task` IN (SELECT `id_rt` FROM `trecon_task` WHERE `id_app` = @id_app); - -INSERT IGNORE INTO `tdiscovery_apps_tasks_macros` (`id_task`, `macro`, `type`, `value`, `temp_conf`) SELECT id_rt, '_thickMode_', 'custom', 0, 0 FROM `trecon_task` WHERE `id_app` = @id_app; -INSERT IGNORE INTO `tdiscovery_apps_tasks_macros` (`id_task`, `macro`, `type`, `value`, `temp_conf`) SELECT id_rt, '_clientPath_', 'custom', '', 0 FROM `trecon_task` WHERE `id_app` = @id_app; -UPDATE `trecon_task` SET `setup_complete` = 1 WHERE `id_app` = @id_app; - -COMMIT; diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index b9194c41b3..bfb1d0ee96 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -2775,7 +2775,7 @@ SET @short_name = 'pandorafms.oracle'; SET @name = 'Oracle'; SET @section = 'app'; SET @description = 'Monitor Oracle databases'; -SET @version = '1.1'; +SET @version = '1.0'; INSERT IGNORE INTO `tdiscovery_apps` (`id_app`, `short_name`, `name`, `section`, `description`, `version`) VALUES ('', @short_name, @name, @section, @description, @version); SELECT @id_app := `id_app` FROM `tdiscovery_apps` WHERE `short_name` = @short_name; From e4539029ef95643d8fd9e8afcd2a72b95e69ecd9 Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 21 Nov 2023 17:52:59 +0100 Subject: [PATCH 82/93] fix update current packege pandora_enterprise#12506 --- .../godmode/um_client/updateMR.php | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/pandora_console/godmode/um_client/updateMR.php b/pandora_console/godmode/um_client/updateMR.php index fc60fedc43..a66f270f25 100644 --- a/pandora_console/godmode/um_client/updateMR.php +++ b/pandora_console/godmode/um_client/updateMR.php @@ -53,12 +53,30 @@ try { echo 'current historyDB MR: '.Config::get('MR', 'unknown', true)."\n"; } + global $pandora_version; + if (isset($pandora_version) === true + && empty($pandora_version) === false + ) { + $version_array = explode('.', $pandora_version); + if (is_array($version_array) === true) { + $current_package = $version_array[2]; + if (count($version_array) > 2) { + foreach ($version_array as $key => $value) { + if ($key > 2) { + $current_package .= '.'.$value; + } + } + } + } + } + $umc = new UpdateManager\Client( [ - 'homedir' => $config['homedir'], - 'dbconnection' => $config['dbconnection'], - 'historydb' => $historical_dbh, - 'MR' => (int) $current_mr, + 'homedir' => $config['homedir'], + 'dbconnection' => $config['dbconnection'], + 'historydb' => $historical_dbh, + 'MR' => (int) $current_mr, + 'current_package' => ($current_package ?? ''), ] ); From 445514586a45641823beb2a7013f703a9be4bc0c Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 22 Nov 2023 01:00:18 +0100 Subject: [PATCH 83/93] 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.redhat_bin.el8.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.el9.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.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 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index f429a8f6dc..9c2894c643 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.774-231121 +Version: 7.0NG.774-231122 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 fe76c35b1a..ac3f82ac1a 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.774-231121" +pandora_version="7.0NG.774-231122" 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 f967bc9041..688b2d2a0d 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1039,7 +1039,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.774'; -use constant AGENT_BUILD => '231121'; +use constant AGENT_BUILD => '231122'; # 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 09ac5140d0..7ef9d4e0bb 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231121 +%define release 231122 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec index 92302eb72c..8dc0b21442 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231121 +%define release 231122 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index d53a059254..ffb01b3beb 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231121 +%define release 231122 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index 68beee2f6b..c90ff7ab9e 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231121 +%define release 231122 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 7f8da22004..1ca71f6fc7 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231121 +%define release 231122 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 d158955c7d..591e9dba3a 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231121" +PI_BUILD="231122" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 3a879193ae..2318bf943e 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{231121} +{231122} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 08addbce67..2309ed6052 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.774 Build 231121") +#define PANDORA_VERSION ("7.0NG.774 Build 231122") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index bd3f6189e9..42b600028b 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.774(Build 231121))" + VALUE "ProductVersion", "(7.0NG.774(Build 231122))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index a7ee1a3934..a13b5e376d 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.774-231121 +Version: 7.0NG.774-231122 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 6920983923..27ac4edd72 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.774-231121" +pandora_version="7.0NG.774-231122" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index ef604d9464..810a917b90 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 = 'PC231121'; +$build_version = 'PC231122'; $pandora_version = 'v7.0NG.774'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index edc19ed944..9a8f65d62e 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index e3d8b72c7f..09499372b1 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -7,7 +7,7 @@ %define debug_package %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231121 +%define release 231122 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 4b5953850c..36435148f9 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231121 +%define release 231122 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 0736d8d879..e4f44e9ecc 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231121" +PI_BUILD="231122" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 99853e2915..a6daa6c117 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -38,7 +38,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.774 Build 231121"; +my $version = "7.0NG.774 Build 231122"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 235e177175..3ecf58dbdf 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.774 Build 231121"; +my $version = "7.0NG.774 Build 231122"; # save program name for logging my $progname = basename($0); From 300e01c186ef2cb665fe841410d741c096ae9170 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 22 Nov 2023 10:10:35 +0100 Subject: [PATCH 84/93] #12502 Fixed filter --- .../include/ajax/dashboard.ajax.php | 22 ++++- .../include/lib/Dashboard/Manager.php | 20 +---- pandora_console/views/dashboard/list.php | 80 +++---------------- 3 files changed, 30 insertions(+), 92 deletions(-) diff --git a/pandora_console/include/ajax/dashboard.ajax.php b/pandora_console/include/ajax/dashboard.ajax.php index f07d1aee57..50a0e0b7a1 100644 --- a/pandora_console/include/ajax/dashboard.ajax.php +++ b/pandora_console/include/ajax/dashboard.ajax.php @@ -99,10 +99,26 @@ if ($method === 'draw') { $table->data = []; + $where_name = ''; if (strlen($filter['free_search']) > 0) { - $where = 'WHERE name LIKE "%'.$filter['free_search'].'%"'; - } else { - $where = ''; + $where_name = 'name LIKE "%'.$filter['free_search'].'%"'; + } + + $where_group = ''; + if (empty($filter['group']) === false && $filter['group'] !== '0') { + $where_group = sprintf('id_group = %s', $filter['group']); + if (empty($where_name) === false) { + $where_group = 'AND '.$where_group; + } + } + + $where = ''; + if (empty($where_name) === false || empty($where_group) === false) { + $where = sprintf( + 'WHERE %s %s', + $where_name, + $where_group + ); } $sql = 'SELECT * FROM tdashboard '.$where.' ORDER BY id '.$pagination; diff --git a/pandora_console/include/lib/Dashboard/Manager.php b/pandora_console/include/lib/Dashboard/Manager.php index 181777b405..40b6d2d1a0 100644 --- a/pandora_console/include/lib/Dashboard/Manager.php +++ b/pandora_console/include/lib/Dashboard/Manager.php @@ -731,8 +731,7 @@ class Manager implements PublicLogin int $limit=-1, bool $favourite=false, bool $slideshow=false, - string $id_user='', - array $rowFilter=[] + string $id_user='' ):array { global $config; @@ -750,14 +749,6 @@ class Manager implements PublicLogin $sql_where .= 'AND td.cells_slideshow = 1'; } - if (empty((int) $rowFilter['id_group']) === false) { - $sql_where .= ' AND td.id_group = '.$rowFilter['id_group']; - } - - if (empty($rowFilter['name_filter']) === false) { - $sql_where .= ' AND td.name like "%'.$rowFilter['name_filter'].'%"'; - } - if (empty($id_user) === true) { $id_user = $config['id_user']; } @@ -953,13 +944,6 @@ class Manager implements PublicLogin private function showList() { global $config; - $id_group_filter = \get_parameter_post('id_group', ''); - $name_filter = \get_parameter_post('name', ''); - - $rowFilter = [ - 'id_group' => $id_group_filter, - 'name_filter' => $name_filter, - ]; $limit_sql = $config['block_size']; @@ -973,7 +957,7 @@ class Manager implements PublicLogin $resultCopy = $this->copy(); } - $dashboards = $this->getDashboards($this->offset, $limit_sql, false, false, '', $rowFilter); + $dashboards = $this->getDashboards($this->offset, $limit_sql); $count = $this->getDashboardsCount(); View::render( diff --git a/pandora_console/views/dashboard/list.php b/pandora_console/views/dashboard/list.php index 657f0a8683..aae6778f6d 100644 --- a/pandora_console/views/dashboard/list.php +++ b/pandora_console/views/dashboard/list.php @@ -67,74 +67,6 @@ if (isset($resultCopy) === true) { ); } -// Filter table. -$filter_id_group = \get_parameter_post('id_group', ''); -$filter_name = \get_parameter_post('name', ''); - -$filterTable = new stdClass(); -$filterTable->class = 'filter-table-adv w100p'; -$filterTable->size[0] = '20%'; -$filterTable->size[1] = '20%'; -$filterTable->data = []; - -$filterTable->data[0][0] = html_print_label_input_block( - __('Group'), - html_print_select_groups( - false, - 'AR', - true, - 'id_group', - $filter_id_group, - '', - '', - '', - true, - false, - true, - 'w100p', - false, - '' - ) -); - -$filterTable->data[0][1] = html_print_label_input_block( - __('Name'), - html_print_input_text('name', $filter_name, '', 25, 80, true) -); - -$form_html = ''; - -ui_toggle( - $form_html, - ''.__('Filter').'', - 'dashboard_search', - false, - true, - false, - '', - 'white-box-content', - 'box-flat white_table_graph fixed_filter_bar' -); - - if (empty($dashboards) === true) { ui_print_info_message( [ @@ -189,15 +121,21 @@ if (empty($dashboards) === true) { 'form' => [ 'inputs' => [ [ - 'label' => __('Free search'), + 'label' => __('Name'), 'type' => 'text', - 'class' => 'w400px', + 'class' => 'w80p', 'id' => 'free_search', 'name' => 'free_search', ], + [ + 'label' => __('Group'), + 'type' => 'select_groups', + 'id' => 'group', + 'name' => 'group', + ], ], ], - 'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar ', + 'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar', 'csv' => false, ] ); From b09a02a6dceea78c48a6fd38a6e0a84cd4c1fae8 Mon Sep 17 00:00:00 2001 From: rafael Date: Wed, 22 Nov 2023 14:02:48 +0100 Subject: [PATCH 85/93] Rename package names --- extras/deploy-scripts/pandora_agent_deploy.sh | 4 ++-- extras/deploy-scripts/pandora_deploy_community.sh | 2 +- extras/deploy-scripts/pandora_deploy_community_el8.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extras/deploy-scripts/pandora_agent_deploy.sh b/extras/deploy-scripts/pandora_agent_deploy.sh index 88bfe4dd83..30bfc82632 100644 --- a/extras/deploy-scripts/pandora_agent_deploy.sh +++ b/extras/deploy-scripts/pandora_agent_deploy.sh @@ -184,14 +184,14 @@ if [[ $OS_RELEASE =~ 'rhel' ]] || [[ $OS_RELEASE =~ 'fedora' ]]; then echo -e "${cyan}Installing agent dependencies...${reset}" ${green}OK${reset} # Insatall pandora agent - [ "$PANDORA_AGENT_PACKAGE_EL" ] || PANDORA_AGENT_PACKAGE_EL="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux_bin-7.0NG.x86_64.rpm " + [ "$PANDORA_AGENT_PACKAGE_EL" ] || PANDORA_AGENT_PACKAGE_EL="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux_bin-7.0NG.x86_64.rpm" execute_cmd "$package_manager_cmd install -y ${PANDORA_AGENT_PACKAGE_EL}" 'Installing Pandora FMS agent package' #[[ $PANDORA_AGENT_SSL ]] && execute_cmd "$package_manager_cmd install -y perl-IO-Socket-SSL" "Installing SSL libraries for encrypted connection" fi if [[ $OS_RELEASE == 'debian' ]]; then - [ "$PANDORA_AGENT_PACKAGE_UBUNTU" ] || PANDORA_AGENT_PACKAGE_UBUNTU='https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG_x86_64.tar.gz' + [ "$PANDORA_AGENT_PACKAGE_UBUNTU" ] || PANDORA_AGENT_PACKAGE_UBUNTU='https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.x86_64.tar.gz' execute_cmd "apt update" 'Updating repos' execute_cmd "apt install -y perl wget curl unzip procps python3 python3-pip" 'Installing agent dependencies' execute_cmd "curl --output pandorafms_agent_linux-7.0NG.tar.gz ${PANDORA_AGENT_PACKAGE_UBUNTU}" 'Downloading Pandora FMS agent package' diff --git a/extras/deploy-scripts/pandora_deploy_community.sh b/extras/deploy-scripts/pandora_deploy_community.sh index 39b0ee681c..44be2d8fb9 100644 --- a/extras/deploy-scripts/pandora_deploy_community.sh +++ b/extras/deploy-scripts/pandora_deploy_community.sh @@ -466,7 +466,7 @@ if [ "$PANDORA_LTS" -eq '1' ] ; then [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_console-7.0NG.noarch.rpm" [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_agent_linux-7.0NG.noarch.rpm" elif [ "$PANDORA_LTS" -ne '1' ] ; then - [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm" + [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.x86_64.rpm" [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.x86_64.rpm" [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm" fi diff --git a/extras/deploy-scripts/pandora_deploy_community_el8.sh b/extras/deploy-scripts/pandora_deploy_community_el8.sh index d32221aa76..7e2d2524c0 100644 --- a/extras/deploy-scripts/pandora_deploy_community_el8.sh +++ b/extras/deploy-scripts/pandora_deploy_community_el8.sh @@ -573,7 +573,7 @@ if [ "$PANDORA_LTS" -eq '1' ] ; then [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_console-7.0NG.noarch.rpm" [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux_bin-7.0NG.x86_64.rpm" elif [ "$PANDORA_LTS" -ne '1' ] ; then - [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm" + [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.x86_64.rpm" [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.x86_64.rpm" [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux_bin-7.0NG.x86_64.rpm" fi From ebd39b6b1b4ee4db400c7523e8218a48c53b8ebf Mon Sep 17 00:00:00 2001 From: Rafael Date: Wed, 22 Nov 2023 14:58:43 +0100 Subject: [PATCH 86/93] 12101 fix pandora agent name --- .../deploy-scripts/pandora_deploy_community_ubuntu_2204.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh b/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh index 28d9f70a78..5f240b0a41 100644 --- a/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh +++ b/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh @@ -522,17 +522,17 @@ execute_cmd "systemctl restart mysql" "Configuring and restarting database engin if [ "$PANDORA_LTS" -eq '1' ] ; then [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/LTS/pandorafms_server-7.0NG.tar.gz" [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/LTS/pandorafms_console-7.0NG.tar.gz" - [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG_x86_64.tar.gz" + [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.x86_64.tar.gz" elif [ "$PANDORA_LTS" -ne '1' ] ; then [ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_server-7.0NG.tar.gz" [ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_console-7.0NG.tar.gz" - [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG_x86_64.tar.gz" + [ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE=" https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.x86_64.tar.gz" fi if [ "$PANDORA_BETA" -eq '1' ] ; then PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest.tar.gz" PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.tar.gz" - PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG_x86_64.tar.gz" + PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.x86_64.tar.gz" fi # Downloading Pandora Packages From 257630356604fb3d75929887df3b8ed78c937e6e Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 23 Nov 2023 01:00:31 +0100 Subject: [PATCH 87/93] 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.redhat_bin.el8.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.el9.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.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 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 9c2894c643..67e9bee69a 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.774-231122 +Version: 7.0NG.774-231123 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 ac3f82ac1a..00b50b4032 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.774-231122" +pandora_version="7.0NG.774-231123" 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 688b2d2a0d..0cd9b1fddf 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1039,7 +1039,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.774'; -use constant AGENT_BUILD => '231122'; +use constant AGENT_BUILD => '231123'; # 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 7ef9d4e0bb..33b94d8697 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231122 +%define release 231123 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec index 8dc0b21442..fdbbabbb8f 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231122 +%define release 231123 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index ffb01b3beb..91615903ed 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231122 +%define release 231123 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index c90ff7ab9e..ee88eaa7de 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231122 +%define release 231123 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 1ca71f6fc7..8e3498ef71 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231122 +%define release 231123 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 591e9dba3a..5fdf76928f 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231122" +PI_BUILD="231123" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 2318bf943e..246bd6dc3e 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{231122} +{231123} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 2309ed6052..fc84cd3119 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.774 Build 231122") +#define PANDORA_VERSION ("7.0NG.774 Build 231123") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 42b600028b..8a8f1ac85e 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.774(Build 231122))" + VALUE "ProductVersion", "(7.0NG.774(Build 231123))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index a13b5e376d..3a99aa4b24 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.774-231122 +Version: 7.0NG.774-231123 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 27ac4edd72..31b6c1c366 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.774-231122" +pandora_version="7.0NG.774-231123" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 810a917b90..e2984499c0 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 = 'PC231122'; +$build_version = 'PC231123'; $pandora_version = 'v7.0NG.774'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 9a8f65d62e..fa0546b8cf 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 09499372b1..ed01554f83 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -7,7 +7,7 @@ %define debug_package %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231122 +%define release 231123 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 36435148f9..8f1aaab8e2 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231122 +%define release 231123 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index e4f44e9ecc..bbc79c91b2 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231122" +PI_BUILD="231123" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index a6daa6c117..a722e5f557 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -38,7 +38,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.774 Build 231122"; +my $version = "7.0NG.774 Build 231123"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 3ecf58dbdf..25fa325da7 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.774 Build 231122"; +my $version = "7.0NG.774 Build 231123"; # save program name for logging my $progname = basename($0); From 4c475239c97c6ca43a9d55a1f3b8c0a65e98d3f2 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Thu, 23 Nov 2023 17:15:44 +0100 Subject: [PATCH 88/93] #12513 fixed bug in alert triggered --- pandora_console/include/functions_events.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 5534897e84..1050c85470 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -4039,7 +4039,13 @@ function events_get_response_target( if (empty($event['custom_data']) === false) { $custom_data = json_decode($event['custom_data']); foreach ($custom_data as $key => $value) { - $target = str_replace('_customdata_'.$key.'_', $value, $target); + if (is_array($value) === true) { + foreach ($value as $k => $v) { + $target = str_replace('_customdata_'.$k.'_', $v, $target); + } + } else { + $target = str_replace('_customdata_'.$key.'_', $value, $target); + } } if (strpos($target, '_customdata_json_') !== false) { From 558279e61b9a09257ae9b75aa6600c2cf03da94b Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 24 Nov 2023 01:00:22 +0100 Subject: [PATCH 89/93] 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.redhat_bin.el8.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.el9.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.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 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 67e9bee69a..dd0ce08b75 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.774-231123 +Version: 7.0NG.774-231124 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 00b50b4032..5158af8d98 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.774-231123" +pandora_version="7.0NG.774-231124" 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 0cd9b1fddf..ebc53342ea 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1039,7 +1039,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.774'; -use constant AGENT_BUILD => '231123'; +use constant AGENT_BUILD => '231124'; # 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 33b94d8697..035e294a80 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231123 +%define release 231124 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec index fdbbabbb8f..2d9786d989 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231123 +%define release 231124 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index 91615903ed..664ac69870 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231123 +%define release 231124 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index ee88eaa7de..bd9985ef8d 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231123 +%define release 231124 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 8e3498ef71..1da3e088b0 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231123 +%define release 231124 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 5fdf76928f..3fb5fe7f8d 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231123" +PI_BUILD="231124" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 246bd6dc3e..9e8d2e364c 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{231123} +{231124} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index fc84cd3119..367fee4b81 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.774 Build 231123") +#define PANDORA_VERSION ("7.0NG.774 Build 231124") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 8a8f1ac85e..c690b7b3a2 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.774(Build 231123))" + VALUE "ProductVersion", "(7.0NG.774(Build 231124))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 3a99aa4b24..054afd4970 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.774-231123 +Version: 7.0NG.774-231124 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 31b6c1c366..e3673d56f7 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.774-231123" +pandora_version="7.0NG.774-231124" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index e2984499c0..13b679aa04 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 = 'PC231123'; +$build_version = 'PC231124'; $pandora_version = 'v7.0NG.774'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index fa0546b8cf..12618b5b50 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index ed01554f83..e6084d3a15 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -7,7 +7,7 @@ %define debug_package %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231123 +%define release 231124 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 8f1aaab8e2..54751b2823 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231123 +%define release 231124 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index bbc79c91b2..6f89a7be8d 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231123" +PI_BUILD="231124" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index a722e5f557..726014a594 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -38,7 +38,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.774 Build 231123"; +my $version = "7.0NG.774 Build 231124"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 25fa325da7..1742d5ec73 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.774 Build 231123"; +my $version = "7.0NG.774 Build 231124"; # save program name for logging my $progname = basename($0); From 18b337a8dfd8906b1a514034df9c8d1a99779ccf Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 25 Nov 2023 01:00:21 +0100 Subject: [PATCH 90/93] 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.redhat_bin.el8.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.el9.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.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 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index dd0ce08b75..f54ba96583 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.774-231124 +Version: 7.0NG.774-231125 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 5158af8d98..2d0baee976 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.774-231124" +pandora_version="7.0NG.774-231125" 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 ebc53342ea..3f280d559b 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1039,7 +1039,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.774'; -use constant AGENT_BUILD => '231124'; +use constant AGENT_BUILD => '231125'; # 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 035e294a80..ed91d7850d 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231124 +%define release 231125 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec index 2d9786d989..7201863917 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231124 +%define release 231125 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index 664ac69870..fcb0a2aca8 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231124 +%define release 231125 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index bd9985ef8d..5e171a10e2 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231124 +%define release 231125 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 1da3e088b0..6c061876c5 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231124 +%define release 231125 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 3fb5fe7f8d..da1d670455 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231124" +PI_BUILD="231125" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 9e8d2e364c..8f0118c6d7 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{231124} +{231125} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 367fee4b81..6e2509ef0a 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.774 Build 231124") +#define PANDORA_VERSION ("7.0NG.774 Build 231125") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index c690b7b3a2..4eb8420bd5 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.774(Build 231124))" + VALUE "ProductVersion", "(7.0NG.774(Build 231125))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 054afd4970..230afccf0b 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.774-231124 +Version: 7.0NG.774-231125 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 e3673d56f7..3214aedf4d 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.774-231124" +pandora_version="7.0NG.774-231125" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 13b679aa04..8497c9d58c 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 = 'PC231124'; +$build_version = 'PC231125'; $pandora_version = 'v7.0NG.774'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 12618b5b50..e84ec8ad9d 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index e6084d3a15..a55b591ba5 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -7,7 +7,7 @@ %define debug_package %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231124 +%define release 231125 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 54751b2823..f2c839d63b 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231124 +%define release 231125 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 6f89a7be8d..1ec4b3e770 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231124" +PI_BUILD="231125" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 726014a594..7e641fed79 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -38,7 +38,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.774 Build 231124"; +my $version = "7.0NG.774 Build 231125"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 1742d5ec73..41cd418395 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.774 Build 231124"; +my $version = "7.0NG.774 Build 231125"; # save program name for logging my $progname = basename($0); From cdd00fcc683f765beabc2096507bb481c5c190a2 Mon Sep 17 00:00:00 2001 From: artica Date: Sun, 26 Nov 2023 01:00:18 +0100 Subject: [PATCH 91/93] 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.redhat_bin.el8.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.el9.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.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 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index f54ba96583..2281168d5b 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.774-231125 +Version: 7.0NG.774-231126 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 2d0baee976..23434f6381 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.774-231125" +pandora_version="7.0NG.774-231126" 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 3f280d559b..c82dc6f520 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1039,7 +1039,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.774'; -use constant AGENT_BUILD => '231125'; +use constant AGENT_BUILD => '231126'; # 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 ed91d7850d..50ac301cd6 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231125 +%define release 231126 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec index 7201863917..d3eb69b6dd 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231125 +%define release 231126 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index fcb0a2aca8..4563247d74 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231125 +%define release 231126 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index 5e171a10e2..6151d582c7 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231125 +%define release 231126 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 6c061876c5..6b0dfe41ac 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231125 +%define release 231126 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 da1d670455..1fd472136c 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231125" +PI_BUILD="231126" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 8f0118c6d7..360377b249 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{231125} +{231126} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 6e2509ef0a..25fbf6e9f0 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.774 Build 231125") +#define PANDORA_VERSION ("7.0NG.774 Build 231126") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 4eb8420bd5..564b1a5f40 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.774(Build 231125))" + VALUE "ProductVersion", "(7.0NG.774(Build 231126))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 230afccf0b..fe9b9ef857 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.774-231125 +Version: 7.0NG.774-231126 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 3214aedf4d..b65cc35c98 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.774-231125" +pandora_version="7.0NG.774-231126" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 8497c9d58c..735fcb9237 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 = 'PC231125'; +$build_version = 'PC231126'; $pandora_version = 'v7.0NG.774'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index e84ec8ad9d..cf8d81bc7b 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index a55b591ba5..ccf1019d26 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -7,7 +7,7 @@ %define debug_package %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231125 +%define release 231126 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index f2c839d63b..08ba46844d 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231125 +%define release 231126 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 1ec4b3e770..79d7686c5c 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231125" +PI_BUILD="231126" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 7e641fed79..5bf826a63a 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -38,7 +38,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.774 Build 231125"; +my $version = "7.0NG.774 Build 231126"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 41cd418395..eff7c4f1f0 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.774 Build 231125"; +my $version = "7.0NG.774 Build 231126"; # save program name for logging my $progname = basename($0); From 60cfc49e3e59fe29e1a43833f184430912585dbb Mon Sep 17 00:00:00 2001 From: artica Date: Mon, 27 Nov 2023 01:00:19 +0100 Subject: [PATCH 92/93] 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.redhat_bin.el8.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.el9.spec | 2 +- pandora_agents/unix/pandora_agent.redhat_bin.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 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 2281168d5b..2cbd073e72 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.774-231126 +Version: 7.0NG.774-231127 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 23434f6381..d22fd0695f 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.774-231126" +pandora_version="7.0NG.774-231127" 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 c82dc6f520..f942f995b4 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1039,7 +1039,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.774'; -use constant AGENT_BUILD => '231126'; +use constant AGENT_BUILD => '231127'; # 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 50ac301cd6..d1eb93e83f 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231126 +%define release 231127 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec index d3eb69b6dd..d711fb699c 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231126 +%define release 231127 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index 4563247d74..ea420e44ed 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231126 +%define release 231127 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index 6151d582c7..3796b6ecd8 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231126 +%define release 231127 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 6b0dfe41ac..3480ae034d 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.774 -%define release 231126 +%define release 231127 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 1fd472136c..cdd83702fb 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231126" +PI_BUILD="231127" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 360377b249..9cdd7c6d29 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{231126} +{231127} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 25fbf6e9f0..963a3116dc 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.774 Build 231126") +#define PANDORA_VERSION ("7.0NG.774 Build 231127") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 564b1a5f40..ff3ee2a969 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.774(Build 231126))" + VALUE "ProductVersion", "(7.0NG.774(Build 231127))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index fe9b9ef857..8bfb3754d1 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.774-231126 +Version: 7.0NG.774-231127 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 b65cc35c98..ad9d0a7a05 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.774-231126" +pandora_version="7.0NG.774-231127" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 735fcb9237..efb2c99128 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 = 'PC231126'; +$build_version = 'PC231127'; $pandora_version = 'v7.0NG.774'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index cf8d81bc7b..4522b758cf 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index ccf1019d26..0880d75291 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -7,7 +7,7 @@ %define debug_package %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231126 +%define release 231127 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 08ba46844d..8405c53f30 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.774 -%define release 231126 +%define release 231127 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 79d7686c5c..a43cbbee8a 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.774" -PI_BUILD="231126" +PI_BUILD="231127" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 5bf826a63a..69e368b3af 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -38,7 +38,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.774 Build 231126"; +my $version = "7.0NG.774 Build 231127"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index eff7c4f1f0..0d7a37ce21 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.774 Build 231126"; +my $version = "7.0NG.774 Build 231127"; # save program name for logging my $progname = basename($0); From 082a6417420391e51fda33329ff3278c88dd2495 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Mon, 27 Nov 2023 08:19:33 +0100 Subject: [PATCH 93/93] #12138 Add MR --- pandora_console/extras/mr/67.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 pandora_console/extras/mr/67.sql diff --git a/pandora_console/extras/mr/67.sql b/pandora_console/extras/mr/67.sql new file mode 100644 index 0000000000..dd2b77b394 --- /dev/null +++ b/pandora_console/extras/mr/67.sql @@ -0,0 +1,6 @@ +START TRANSACTION; + +-- Delete table tagent_access +DROP TABLE tagent_access; + +COMMIT;