From 85b98a10fa7c4fabcce20d3ddcba11d459fad6ed Mon Sep 17 00:00:00 2001 From: enriquecd Date: Fri, 2 Jun 2017 12:51:22 +0200 Subject: [PATCH 001/142] Change jquery ajax call method in welcome window dont show get to post - #963 --- pandora_console/general/login_help_dialog.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/general/login_help_dialog.php b/pandora_console/general/login_help_dialog.php index 9e097a6fbc..631d9d5ce1 100644 --- a/pandora_console/general/login_help_dialog.php +++ b/pandora_console/general/login_help_dialog.php @@ -119,7 +119,7 @@ $(document).ready (function () { // Update config['skip_login_help_dialog'] to don't display more this message if (skip_login_help) { - jQuery.get ("ajax.php", + jQuery.post ("ajax.php", {"page": "general/login_help_dialog", "skip_login_help": 1}, function (data) {} From 38464bf615d98f4e55355a9ec6498b78c96392fc Mon Sep 17 00:00:00 2001 From: enriquecd Date: Mon, 5 Jun 2017 18:36:12 +0200 Subject: [PATCH 002/142] Change ajax call method get to post for autorefresh and use new timecount param - #868 --- pandora_console/operation/visual_console/render_view.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pandora_console/operation/visual_console/render_view.php b/pandora_console/operation/visual_console/render_view.php index 79101d82ee..cb1102fbd4 100755 --- a/pandora_console/operation/visual_console/render_view.php +++ b/pandora_console/operation/visual_console/render_view.php @@ -245,11 +245,12 @@ $ignored_params['refr'] = ''; //cb(); url = js_html_entity_decode( href ) + duration; //$(document).attr ("location", url); - $.get(window.location.href.replace("render_view","pure_ajax"), function(respuestaSolicitud){ + $.post(window.location.href.replace("refr=300","refr="+new_count), function(respuestaSolicitud){ $('#background_').html(respuestaSolicitud); - startCountDown(refr, false); }); - } + $("#main_pure").css('background-color',''); + + } }); } @@ -260,6 +261,7 @@ $ignored_params['refr'] = ''; $('select#refr').change(function (event) { refr = Number.parseInt(event.target.value, 10); + new_count = event.target.value; startCountDown(refr, false); }); } From f0492c370ce50261787a5c8f3fb145d30c19bb2a Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Tue, 6 Jun 2017 15:48:58 +0200 Subject: [PATCH 003/142] Changed format --- pandora_console/include/ajax/module.php | 28 +++++++------------------ 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index 6eb5b0e17a..3b77ca8f19 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -266,21 +266,16 @@ if ($get_module_detail) { foreach ($columns as $col => $attr) { if ($attr[1] != "modules_format_data") { $data[] = date('d F Y h:i:s A', $row['utimestamp']); - } elseif (($config['command_snapshot']) && (preg_match ("/[\n]+/i", $row[$attr[0]]))) { // Its a single-data, multiline data (data snapshot) ? - // Detect string data with \n and convert to
's $datos = $row[$attr[0]]; - //$datos = preg_replace ('/\n/i','
',$row[$attr[0]]); - //$datos = preg_replace ('/\s/i',' ',$datos); // Because this *SHIT* of print_table monster, I cannot format properly this cells // so, eat this, motherfucker :)) - - $datos = io_safe_input($datos); + $datos = preg_replace("/\n/", "

", $datos); // I dont why, but using index (value) method, data is automatically converted to html entities ¿? $data[] = $datos; @@ -288,7 +283,6 @@ if ($get_module_detail) { elseif ($is_web_content_string) { //Fixed the goliat sends the strings from web //without HTML entities - $data[] = io_safe_input($row[$attr[0]]); } else { @@ -299,9 +293,6 @@ if ($get_module_detail) { $data[] = io_safe_input($row[$attr[0]]); } else if (is_numeric($row[$attr[0]]) && !modules_is_string_type($row['module_type']) ) { - - //~ $data[] = remove_right_zeros(number_format($row[$attr[0]], $config['graph_precision'])); - //~ $data[] = (double) $row[$attr[0]]; switch($row['module_type']) { case 15: $value = db_get_value('snmp_oid', 'tagente_modulo', 'id_agente_modulo', $module_id); @@ -320,17 +311,12 @@ if ($get_module_detail) { $data[] = 'No data'; } else { - - if(is_snapshot_data($row[$attr[0]])){ - $data[] = ""; - } - else{ - $data[] = $row[$attr[0]]; - } - - - - + if(is_snapshot_data($row[$attr[0]])){ + $data[] = ""; + } + else{ + $data[] = $row[$attr[0]]; + } } } } From 5e099a0da3738cba140509b463fac80cecacae29 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 7 Jun 2017 11:43:11 +0200 Subject: [PATCH 004/142] added graph colors in dahsboard --- pandora_console/include/constants.php | 1 + .../include/functions_custom_graphs.php | 5 ++-- pandora_console/include/functions_graph.php | 23 +++++++++++++++---- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index cee055d867..aa287b344a 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -467,6 +467,7 @@ define("OPTION_SINGLE_SELECT_TIME", 7); define("OPTION_CUSTOM_INPUT", 8); define("OPTION_AGENT_AUTOCOMPLETE", 9); define("OPTION_SELECT_MULTISELECTION", 10); +define("OPTION_COLOR_PICKER", 11); /* Transactional map constants */ define("NODE_TYPE", 0); diff --git a/pandora_console/include/functions_custom_graphs.php b/pandora_console/include/functions_custom_graphs.php index 361975b29c..499a8a817f 100644 --- a/pandora_console/include/functions_custom_graphs.php +++ b/pandora_console/include/functions_custom_graphs.php @@ -164,7 +164,7 @@ function custom_graphs_print($id_graph, $height, $width, $period, $background_color = 'white', $modules_param = array(), $homeurl = '', $name_list = array(), $unit_list = array(), $show_last = true, $show_max = true, $show_min = true, $show_avg = true, $ttl = 1, - $dashboard = false, $vconsole = false, $percentil = null, $from_interface = false) { + $dashboard = false, $vconsole = false, $percentil = null, $from_interface = false,$id_widget_dashboard=false) { global $config; @@ -260,7 +260,8 @@ function custom_graphs_print($id_graph, $height, $width, $period, $dashboard, $vconsole, $percentil, - $from_interface); + $from_interface, + $id_widget_dashboard); if ($return) return $output; diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index c6721d1476..ba089a9457 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -791,7 +791,7 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events, $only_image = false, $homeurl = '', $ttl = 1, $projection = false, $adapt_key = '', $compare = false, $show_unknown = false, $menu = true, $backgroundColor = 'white', $percentil = null, - $dashboard = false, $vconsole = false, $type_graph = 'area') { + $dashboard = false, $vconsole = false, $type_graph = 'area',$id_widget_dashboard = false) { global $config; global $graphic_type; @@ -855,8 +855,7 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events, $date, $unit, $baseline, $return_data, $show_title, $projection, $adapt_key, $compare, '', '', $show_unknown, $percentil, $dashboard, $vconsole,$type_graph); - - + if ($return_data) { return $data_returned; } @@ -907,6 +906,13 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events, } else { // Color commented not to restrict serie colors + if($id_widget_dashboard){ + $opcion = unserialize(db_get_value_filter('options','twidget_dashboard',array('id' => $id_widget_dashboard))); + $color['min']['color'] = $opcion['min']; + $color['sum']['color'] = $opcion['avg']; + $color['max']['color'] = $opcion['max']; + } + return area_graph($flash_chart, $chart, $width, $height, $color, $legend, $long_index, @@ -993,7 +999,7 @@ function graphic_combined_module ($module_list, $weight_list, $period, $prediction_period = false, $background_color = 'white', $name_list = array(), $unit_list = array(), $show_last = true, $show_max = true, $show_min = true, $show_avg = true, $labels = array(), $dashboard = false, - $vconsole = false, $percentil = null, $from_interface = false) { + $vconsole = false, $percentil = null, $from_interface = false, $id_widget_dashboard=false) { global $config; global $graphic_type; @@ -1828,6 +1834,15 @@ function graphic_combined_module ($module_list, $weight_list, $period, $color[15] = array('border' => '#000000', 'color' => COL_GRAPH13, 'alpha' => CHART_DEFAULT_ALPHA); + + if($id_widget_dashboard){ + $opcion = unserialize(db_get_value_filter('options','twidget_dashboard',array('id' => $id_widget_dashboard))); + foreach ($module_list as $key => $value) { + if(!empty($opcion[$value])){ + $color[$key]['color'] = $opcion[$value]; + } + } + } $threshold_data = array(); From a27a9e8cb382fbe255a2bc5e6d198ab395dccd8e Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 8 Jun 2017 10:22:59 +0200 Subject: [PATCH 005/142] Fixed version in footer --- pandora_console/general/footer.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pandora_console/general/footer.php b/pandora_console/general/footer.php index 64564d300a..99cebe8f2d 100644 --- a/pandora_console/general/footer.php +++ b/pandora_console/general/footer.php @@ -32,13 +32,18 @@ if (!$config["MR"]) { echo ''; -if($current_package == 0){ -$build_package_version = $build_version; -} -else{ -$build_package_version = $current_package; +if(enterprise_installed()){ + enterprise_include_once("../include/functions_update_manager.php"); } +$current_package = update_manager_get_current_package(); + +if($current_package == 0){ + $build_package_version = $build_version; +} +else{ + $build_package_version = $current_package; +} echo sprintf(__('Pandora FMS %s - Build %s - MR %s', $pandora_version, $build_package_version, $config["MR"])); From 4bdc0df5c4749faf29ed565a73bf0dff8793998f Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 8 Jun 2017 17:55:04 +0200 Subject: [PATCH 006/142] Changed agent name by alias in alerts details --- pandora_console/godmode/alerts/alert_view.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/alerts/alert_view.php b/pandora_console/godmode/alerts/alert_view.php index f420ea168c..6655f3009e 100644 --- a/pandora_console/godmode/alerts/alert_view.php +++ b/pandora_console/godmode/alerts/alert_view.php @@ -32,7 +32,7 @@ $id_alert = get_parameter ("id_alert", 0); // ID given as parameter $alert = alerts_get_alert_agent_module($id_alert); $template = alerts_get_alert_template ($alert['id_alert_template']); $actions = alerts_get_alert_agent_module_actions ($id_alert); -$agent_name = modules_get_agentmodule_agent_name ($alert['id_agent_module']); +$agent_alias = modules_get_agentmodule_agent_alias ($alert['id_agent_module']); $agent = modules_get_agentmodule_agent ($alert['id_agent_module']); $module_name = modules_get_agentmodule_name ($alert['id_agent_module']); @@ -65,7 +65,7 @@ $table_details->data[] = $data; $data[0] = __('Agent'); $data[1] =''.$agent_name.''; +'" title="'.$agent_alias.'">'.$agent_alias.''; $table_details->data[] = $data; $data[0] = __('Module'); From 4693702741f272f6cd74a8c0ca70c368741cf3c5 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 12 Jun 2017 13:43:53 +0200 Subject: [PATCH 007/142] Fixed sql error in tagente_datos_log4x --- pandora_console/include/functions_modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index d7926d2266..29b5a10676 100755 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -1722,7 +1722,7 @@ function modules_get_agentmodule_data ($id_agent_module, $period, break; //log4x case 24: - $sql = sprintf ("SELECT datos AS data, utimestamp + $sql = sprintf ("SELECT message AS data, utimestamp FROM tagente_datos_log4x WHERE id_agente_modulo = %d AND utimestamp > %d AND utimestamp <= %d From 2ede05729856c567b05c09d5884859240478c5b7 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Tue, 13 Jun 2017 16:49:25 +0200 Subject: [PATCH 008/142] Add data image option to simple data visual console element - #412 --- .../general/check_image_module.php | 25 ++++ .../visual_console_builder.editor.js | 127 +++++++++++++++++- .../images/console/signes/data_image.png | Bin 0 -> 13215 bytes .../ajax/visual_console_builder.ajax.php | 2 + .../include/functions_visual_map.php | 56 +++++--- .../include/functions_visual_map_editor.php | 4 +- .../operation/visual_console/render_view.php | 2 +- 7 files changed, 190 insertions(+), 26 deletions(-) create mode 100644 pandora_console/general/check_image_module.php create mode 100644 pandora_console/images/console/signes/data_image.png diff --git a/pandora_console/general/check_image_module.php b/pandora_console/general/check_image_module.php new file mode 100644 index 0000000000..422b1de7ba --- /dev/null +++ b/pandora_console/general/check_image_module.php @@ -0,0 +1,25 @@ + + + diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index 229ceeaa86..798d330196 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -84,6 +84,45 @@ function visual_map_main() { //Fixed to wait the load of images. $(window).load(function() { + $('#module').change(function(){ + var txt = $("#module").val(); + if(selectedItem == 'simple_value' || creationItem == 'simple_value'){ + $.ajax({ + async:false, + type: "POST", + url: "ajax.php", + data: {"page" : "general/check_image_module", + "get_image" : txt, + }, + success: function(data) { + if(data == 0){ + $("#data_image_check").html('Off'); + $('#data_image_container').css('display','none'); + $('#data_image_check').css('display','none'); + $('#data_image_check_label').css('display','none'); + $('.block_tinymce').remove(); + $('#process_value_row').css('display','table-row'); + if($('#process_value').val() != '0'){ + $('#period_row').css('display','table-row'); + } + } + else{ + $('#data_image_container').css('display','inline'); + $('#data_image_check').css('display','inline'); + $('#data_image_check_label').css('display','inline'); + $("#data_image_check").html('On'); + $('#process_value_row').css('display','none'); + $('#period_row').css('display','none'); + $('#text-label_ifr').contents().find('#tinymce').html('_VALUE_'); + $('.block_tinymce').remove(); + $('#label_row').append('
'); + } + } + }); + } + }); + + $('#radiobtn0001').click(function(){ $("#custom_graph option[value=0]").prop("selected", true); }); @@ -338,10 +377,32 @@ function update_button_palette_callback() { setModuleGraph(idItem); break; case 'simple_value': - $("#text_" + idItem).html(values['label']); + //checkpoint + if(($('#text-label_ifr').contents().find('#tinymce p').html() == '_VALUE_' || + $('#text-label_ifr').contents().find('#tinymce').html() == '_VALUE_') + && $('#data_image_check').html() != 'On'){ + alert('_VALUE_ exactly value is only enable for data image. Please change label text or select a data image module.'); + return; + } + $("#" + idItem).html(values['label']); + if(values['label'].replace( /<.*?>/g, '' ) == '_VALUE_'){ + $("#text_" + idItem).html(''); + $("#" + idItem).html(''); + } + else{ + $("#text_" + idItem).html( + '
'+values["label"]+'
' + ) + $("#" + idItem).html( + '
'+values["label"]+'
' + ) + + } + + //$("#simplevalue_" + idItem) //.html($('').attr('src', "images/spinner.gif")); - setModuleValue(idItem,values['process_simple_value'], values['period']); + setModuleValue(idItem,values['process_simple_value'], values['period'],values['width']); break; case 'label': $("#text_" + idItem).html(values['label']); @@ -489,6 +550,10 @@ function readFields() { values['background'] = $("#background_image").val(); values['period'] = undefined != $("#hidden-period").val() ? $("#hidden-period").val() : $("#period").val(); values['width'] = $("input[name=width]").val(); + values['width_data_image'] = $("#data_image_width").val(); + if(values['width_data_image'] != 0){ + values['width'] = values['width_data_image']; + } values['height'] = $("input[name=height]").val(); values['parent'] = $("select[name=parent]").val(); values['map_linked'] = $("select[name=map_linked]").val(); @@ -656,6 +721,7 @@ function create_button_palette_callback() { create_line('step_1', values); break; default: + insertDB(creationItem, values); break; } @@ -933,6 +999,14 @@ function toggle_item_palette() { $( "#text-label_ifr" ).contents().find( "span" ).css("line-height",$('#lineheight').val()); } + + if(creationItem != 'simple_value'){ + $("#data_image_check").html('Off'); + $("#data_image_check").css('display','none'); + $("#data_image_check_label").css('display','none'); + $("#data_image_container").css('display','none'); + $('.block_tinymce').remove(); + } } function fill_parent_select(id_item) { @@ -1655,12 +1729,13 @@ function setModuleGraph(id_data) { } -function setModuleValue(id_data, process_simple_value, period) { +function setModuleValue(id_data, process_simple_value, period,width_data_image) { var parameter = Array(); parameter.push ({name: "page", value: "include/ajax/visual_console_builder.ajax"}); parameter.push ({name: "action", value: "get_module_value"}); parameter.push ({name: "id_element", value: id_data}); parameter.push ({name: "period", value: period}); + parameter.push ({name: "width", value: width_data_image}); parameter.push ({name: "id_visual_console", value: id_visual_console}); if (process_simple_value != undefined) { parameter.push ({name: "process_simple_value", value: process_simple_value}); @@ -1672,7 +1747,9 @@ function setModuleValue(id_data, process_simple_value, period) { type: "POST", dataType: 'json', success: function (data) { - var currentValue = $("#text_" + id_data).html(); + + var currentValue = $("#text_" + id_data).html(); + //currentValue = currentValue.replace(/_VALUE_/gi, data.value); $("#text_" + id_data).html(currentValue); //$("#text_" + id_data).html('Data value'); @@ -2183,10 +2260,14 @@ function createItem(type, values, id_data) { case 'simple_value': sizeStyle = ''; imageSize = ''; + if($('#data_image_check').html() == 'On'){ + values['label'] = ''; + + } item = $('
' + ' ' + values['label'] + ' ' + '
' ); - setModuleValue(id_data,values.process_simple_value,values.period); + setModuleValue(id_data,values.process_simple_value,values.period,values.width_data_image); break; case 'label': item = $('
0){ + $("#data_image_check").css('display','inline'); + $("#data_image_check_label").css('display','inline'); + $('#data_image_container').css('display','inline'); + $("#data_image_check").html('On'); + $('.block_tinymce').remove(); + $('#label_row').append('
'); + $('#process_value_row').css('display','none'); + $('#period_row').css('display','none'); + } + else{ + $("#data_image_check").html('Off'); + $("#data_image_check").css('display','none'); + $("#data_image_check_label").css('display','none'); + $('#data_image_container').css('display','none'); + $('.block_tinymce').remove(); + $('#process_value_row').css('display','table-row'); + if($('#process_value').val() != 0){ + $('#period_row').css('display','table-row'); + } + } + } + else{ + $("#data_image_check").css('display','none'); + $("#data_image_check_label").css('display','none'); + $('#data_image_container').css('display','none'); + } + }); //Set the limit of draggable in the div with id "background" and set drag diff --git a/pandora_console/images/console/signes/data_image.png b/pandora_console/images/console/signes/data_image.png new file mode 100644 index 0000000000000000000000000000000000000000..e3542c1ea329e5974eb533c7bb76790c6bcb567a GIT binary patch literal 13215 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 CY=8v- literal 0 HcmV?d00001 diff --git a/pandora_console/include/ajax/visual_console_builder.ajax.php b/pandora_console/include/ajax/visual_console_builder.ajax.php index 2a786200ad..efc5267119 100755 --- a/pandora_console/include/ajax/visual_console_builder.ajax.php +++ b/pandora_console/include/ajax/visual_console_builder.ajax.php @@ -422,6 +422,7 @@ switch ($action) { $values['type'] = visual_map_get_simple_value_type( $process_simple_value); $values['period'] = $period; + $values['width'] = $width; } case 'percentile_bar': case 'percentile_item': @@ -897,6 +898,7 @@ switch ($action) { //This allows min, max and avg process in a simple value $values['type'] = visual_map_get_simple_value_type($process_simple_value); $values['period'] = $period; + $values['width'] = $width; break; case 'label': $values['type'] = LABEL; diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 60125340ff..6967633915 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -1438,17 +1438,25 @@ function visual_map_print_item($mode = "read", $layoutData, if(get_parameter('action') == 'edit'){ - - //echo 'Data value'; - - echo $io_safe_output_text; + //html_debug($layoutData); + //echo 'Data value'; + if(strip_tags($io_safe_output_text) != '_VALUE_'){ + echo $io_safe_output_text; + } + else{ + echo ""; + } } else{ - - echo str_replace(array('_VALUE_','_value_'), $value, $io_safe_output_text); - + if(strip_tags($io_safe_output_text) != '_VALUE_'){ + echo str_replace(array('_VALUE_','_value_'), $value, $io_safe_output_text); } + else{ + echo str_replace('>', ' style="width:'.$layoutData['width'].'px">',$value); + } + + } //Restore db connection @@ -1575,6 +1583,8 @@ function visual_map_get_simple_value_type($process_simple_value) { function visual_map_get_simple_value($type, $id_module, $period = SECONDS_1DAY) { global $config; + + $unit_text = db_get_sql ('SELECT unit FROM tagente_modulo WHERE id_agente_modulo = ' . $id_module); $unit_text = trim(io_safe_output($unit_text)); @@ -1583,23 +1593,35 @@ function visual_map_get_simple_value($type, $id_module, $period = SECONDS_1DAY) case SIMPLE_VALUE: $value = db_get_value ('datos', 'tagente_estado', 'id_agente_modulo', $id_module); + + if ($value === false) { $value = __('Unknown'); + + $value = preg_replace ('/\n/i','
',$value); + $value = preg_replace ('/\s/i',' ',$value); } else { - if ( is_numeric($value) ) { - if ($config['simple_module_value']) { - $value = remove_right_zeros(number_format($value, $config['graph_precision'])); + if(strpos($value, 'data:image') !== false){ + $value = ''; + } + else{ + + if ( is_numeric($value) ) { + if ($config['simple_module_value']) { + $value = remove_right_zeros(number_format($value, $config['graph_precision'])); + } } + if (!empty($unit_text)) { + $value .= " " . $unit_text; + } + + $value = preg_replace ('/\n/i','
',$value); + $value = preg_replace ('/\s/i',' ',$value); + } - if (!empty($unit_text)) { - $value .= " " . $unit_text; - } + } - - $value = preg_replace ('/\n/i','
',$value); - $value = preg_replace ('/\s/i',' ',$value); - return $value; break; case SIMPLE_VALUE_MAX: diff --git a/pandora_console/include/functions_visual_map_editor.php b/pandora_console/include/functions_visual_map_editor.php index 83f7c99a81..c145b08f88 100755 --- a/pandora_console/include/functions_visual_map_editor.php +++ b/pandora_console/include/functions_visual_map_editor.php @@ -310,8 +310,8 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { $form_items['module_row']['html'] = '' . __('Module') . ' ' . - html_print_select(array(), 'module', '', '', __('Any'), 0, true) . - ''; + html_print_select(array(), 'module', '', '', __('Any'), 0, true). ' + '; $form_items['type_graph'] = array(); diff --git a/pandora_console/operation/visual_console/render_view.php b/pandora_console/operation/visual_console/render_view.php index 79101d82ee..550be5504a 100755 --- a/pandora_console/operation/visual_console/render_view.php +++ b/pandora_console/operation/visual_console/render_view.php @@ -278,7 +278,7 @@ $ignored_params['refr'] = ''; $(".overlay").removeClass("overlay").addClass("overlaydisabled"); - $('.item:not(.icon) img').each( function() { + $('.item:not(.icon) img:not(.b64img)').each( function() { if ($(this).css('float')=='left' || $(this).css('float')=='right') { $(this).css('margin-top',(parseInt($(this).parent().parent().css('height'))/2-parseInt($(this).css('height'))/2)+'px'); $(this).css('margin-left',''); From c7c158297d8ee0be3fd15fc798806b148c488c65 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Wed, 14 Jun 2017 19:12:17 +0200 Subject: [PATCH 009/142] Fix module editor can not show name with quotes - #1019 --- .../godmode/agentes/module_manager_editor_common.php | 2 +- 1 file changed, 1 insertion(+), 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 fb2ed5c845..dfcff7adc9 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -148,7 +148,7 @@ $table_simple->colspan[6][1] = 3; $table_simple->data[0][0] = __('Name'); $table_simple->data[0][1] = html_print_input_text_extended ('name', - io_safe_output($name), 'text-name', '', 45, 100, $disabledBecauseInPolicy, '', $largeClassDisabledBecauseInPolicy, true); + io_safe_input(html_entity_decode($name)), 'text-name', '', 45, 100, $disabledBecauseInPolicy, '', $largeClassDisabledBecauseInPolicy, true); //$table_simple->data[0][1] = html_print_input_text ('name', // io_safe_output($name), '', 45, 100, true, $disabledBecauseInPolicy); From e68858e4c22fd0e9b630e3b9e5171308fbad07a4 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 15 Jun 2017 15:12:27 +0200 Subject: [PATCH 010/142] new feature in snmp browser --- .../include/functions_snmp_browser.php | 97 ++++++++++++++++++- .../operation/snmpconsole/snmp_browser.php | 1 + 2 files changed, 97 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_snmp_browser.php b/pandora_console/include/functions_snmp_browser.php index c15ceb2966..b8644e044e 100644 --- a/pandora_console/include/functions_snmp_browser.php +++ b/pandora_console/include/functions_snmp_browser.php @@ -116,7 +116,7 @@ function snmp_browser_print_tree ($tree, $id = 0, $depth = 0, $last = 0, $last_a echo ""; } - echo ' ' . $level . ''; + echo ' ' . $level . ''. html_print_checkbox("create_$sub_id", 0, false, true, false, '');; if (isset ($sub_level['__VALUE__'])) { echo ''; } @@ -618,3 +618,98 @@ function snmp_browser_print_container ($return = false, $width = '100%', $height } ?> + + diff --git a/pandora_console/operation/snmpconsole/snmp_browser.php b/pandora_console/operation/snmpconsole/snmp_browser.php index 148a6e7179..262367cca3 100644 --- a/pandora_console/operation/snmpconsole/snmp_browser.php +++ b/pandora_console/operation/snmpconsole/snmp_browser.php @@ -47,6 +47,7 @@ if (is_ajax()) { } else { snmp_browser_print_tree ($snmp_tree); + echo html_print_submit_button(__('Create network component'),'create_network_component', false, '', true); } return; } From 7bf9860aaa609e8c25c8b9d19e678c77176ef182 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 15 Jun 2017 15:40:12 +0200 Subject: [PATCH 011/142] Changed agent name by alias --- pandora_console/operation/snmpconsole/snmp_view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/operation/snmpconsole/snmp_view.php b/pandora_console/operation/snmpconsole/snmp_view.php index 61506e85a3..5a6d8547ed 100755 --- a/pandora_console/operation/snmpconsole/snmp_view.php +++ b/pandora_console/operation/snmpconsole/snmp_view.php @@ -774,7 +774,7 @@ if ($traps !== false) { continue; } $data[1] = ''; - $data[1] .= ''.$agent["nombre"].ui_print_help_tip($trap['source'], true, "images/tip-blanco.png");''; + $data[1] .= ''.$agent["alias"].ui_print_help_tip($trap['source'], true, "images/tip-blanco.png");''; } //OID From 4398b47d92607d256de85b2b5d9aa99a411797b0 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 20 Jun 2017 10:31:14 +0200 Subject: [PATCH 012/142] updated --- .../include/functions_snmp_browser.php | 119 +++++++++++------- pandora_console/include/styles/pandora.css | 5 +- .../operation/snmpconsole/snmp_browser.php | 22 +++- 3 files changed, 102 insertions(+), 44 deletions(-) diff --git a/pandora_console/include/functions_snmp_browser.php b/pandora_console/include/functions_snmp_browser.php index b8644e044e..0dd694c04b 100644 --- a/pandora_console/include/functions_snmp_browser.php +++ b/pandora_console/include/functions_snmp_browser.php @@ -116,7 +116,7 @@ function snmp_browser_print_tree ($tree, $id = 0, $depth = 0, $last = 0, $last_a echo ""; } - echo ' ' . $level . ''. html_print_checkbox("create_$sub_id", 0, false, true, false, '');; + echo html_print_checkbox("create_$sub_id", 0, false, true, false, '') .' ' . $level . ''; if (isset ($sub_level['__VALUE__'])) { echo ''; } @@ -622,69 +622,104 @@ function snmp_browser_print_container ($return = false, $width = '100%', $height + From 7e383262bb8c323166b33955f0c082c083828e05 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Tue, 20 Jun 2017 13:56:20 +0200 Subject: [PATCH 014/142] Change tserver_export_data to varchar 600 - #1015 --- .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 6 ++++++ pandora_console/pandoradb.sql | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 588a68da48..2a6896b217 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -1370,3 +1370,9 @@ CREATE TABLE IF NOT EXISTS `treset_pass` ( UPDATE tgis_map_connection SET conection_data = '{"type":"OSM","url":"http://tile.openstreetmap.org/${z}/${x}/${y}.png"}' where id_tmap_connection = 1; ALTER TABLE tpolicy_modules MODIFY post_process double(24,15) default 0; + +-- --------------------------------------------------------------------- +-- Table `tserver_export` +-- --------------------------------------------------------------------- + +ALTER TABLE tserver_export MODIFY `name` varchar(600) BINARY NOT NULL default ''; \ No newline at end of file diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 1ef3c1f7e8..3bc2788f2c 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1381,7 +1381,7 @@ CREATE TABLE IF NOT EXISTS `tmodule` ( -- --------------------------------------------------------------------- CREATE TABLE IF NOT EXISTS `tserver_export` ( `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(100) NOT NULL default '', + `name` varchar(600) BINARY NOT NULL default '', `preffix` varchar(100) NOT NULL default '', `interval` int(5) unsigned NOT NULL default '300', `ip_server` varchar(100) NOT NULL default '', From b38b41b94216d212e7ae2b0832956989ec4a6481 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 20 Jun 2017 15:32:24 +0200 Subject: [PATCH 015/142] updated files --- pandora_console/include/functions_snmp_browser.php | 8 ++++++-- pandora_console/include/styles/pandora.css | 2 +- pandora_console/operation/snmpconsole/snmp_browser.php | 5 ++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/pandora_console/include/functions_snmp_browser.php b/pandora_console/include/functions_snmp_browser.php index 0dd694c04b..7318e871cf 100644 --- a/pandora_console/include/functions_snmp_browser.php +++ b/pandora_console/include/functions_snmp_browser.php @@ -684,7 +684,11 @@ function snmp_browser_print_container ($return = false, $width = '100%', $height $('input[name*=create_network_component]').addClass("sub add"); if(data.length !== 0){ - $('#prueba').text(data); + $('#error_text').text(""); + data.forEach( function(valor, indice, array) { + console.log(valor); + $('#error_text').append('
'+ valor ); + }); $("#dialog_error") .dialog({ resizable: true, @@ -703,7 +707,7 @@ function snmp_browser_print_container ($return = false, $width = '100%', $height resizable: true, draggable: true, modal: true, - height: 300, + height: 250, width: 500, overlay: { opacity: 0.5, diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 0803ba4354..b2f7592fd5 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -742,7 +742,7 @@ input.camera { background-image: url(../../images/input_camera.png) !important; } input.spinn { - background-image: url(../../images/input_update.png) !important; + background-image: url(../../images/spinner.gif) !important; } #toolbox #auto_save { diff --git a/pandora_console/operation/snmpconsole/snmp_browser.php b/pandora_console/operation/snmpconsole/snmp_browser.php index 37b7eca939..191c0caab9 100644 --- a/pandora_console/operation/snmpconsole/snmp_browser.php +++ b/pandora_console/operation/snmpconsole/snmp_browser.php @@ -54,8 +54,8 @@ if (is_ajax()) { echo "
"; echo "
"; echo "

ERROR

"; - echo "

".__('Error creating the following modules:')."

"; - echo "

"; + echo "

".__('Error creating the following modules:')."

"; + echo "

"; echo "
"; echo '
'; @@ -65,7 +65,6 @@ if (is_ajax()) { echo "
"; echo "

SUCCESS

"; echo "

".__('Modules successfully created')."

"; - echo "

"; echo "
"; echo '
'; } From b7f4ecbe698a5667885de20ece911c228d0d6e2f Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 20 Jun 2017 15:46:35 +0200 Subject: [PATCH 016/142] update css and added gif --- pandora_console/images/spinner_green.gif | Bin 0 -> 2281 bytes pandora_console/include/styles/pandora.css | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 pandora_console/images/spinner_green.gif diff --git a/pandora_console/images/spinner_green.gif b/pandora_console/images/spinner_green.gif new file mode 100644 index 0000000000000000000000000000000000000000..5182e7e42ebd564ce3143e9144870b38e40b0e1c GIT binary patch literal 2281 zcmcJQYfMvT9L7(fcMjzoS}wiP7KAdZL3(812$r7HQV=>Wl?7z3)WU?d$QTMDae&+> zw}wr_ltD4L3t7M*%hW9jajQ|2WzHpjGj8sZ#a;X|O_pr`w-=bpK59QTZPL@{_x_&e zEhw~P=hPAyf%Re-l||KbP{n(x)@gli5#=7$+nXq+oO1Q+J3rRv=27-~s&_^2>Y*6; zc1mA!h$^n6s2xFii7zl+A3f zpz}-3nOid=S?Ht3Y=Hn%VS0EEe}cd;j%y}u)YULOAG^@4bLq}|jz7vE9OXCqhgdh} z&EAx(6I1?G2Vs5d<{GUj$r5i~bL_Adj*QG-{CS+RdaqX8QCo$xj&B4_qD_%oevv-f zn%1#X6=SGLV-rSB0_R2D_(ZBE^kD7AgZuuS-ZiR+h>#v~yWc@+fB~cj7!Vp501UtY zgdjBJTW8SfLy7Gz6fginxfa9&NB|gs;r50|ptMi>#ceZAlv<^-u{F#0$J|ci%=NjP zWrcC7`>P0JwPJ?l*LHA6CqH5>raP&bp4V9>zL*~5Iv2WdE3TGX2(_wPEw-rCY`Q`# zRSPXKGEsy{8KY>%3%GA;6(UWuvP4?JDxG}Uu652WnXn}O*m;YhAV0)1X@g}iumn8F zq?KUk*}F+=%wb*D~=UwbHjkjE|Tl9c)gFaGCZ zt|sf=M1hZB9e=O?jHv}5?CO~y=;dLKTpYd4qdT0J%@a23RC!X?QA(@gjZD6MGC6FE zdLv=jmTD9Ooo}Ens3jnN3$g_QKTyV^5%TcR8gRruRe6jw_Iww>ZHTx;8H80jAhzId^$-f?3MAvCQcP$CadEkR7q9!W@&X*^=LbTD_A%#IZ+Z9Rbs`? zTEm(sHy|QS(BJ?>pB~N@HV06m=0N43VEu?1&;*pgC0H|HhdSvE^%MA_nn6E@L*SsL z>+CpHj=+}e=Se449ZqM~z`i|S&XaZfa>R7<8}E+C#uoG~FG&lc1qYVL6{1^{hjwM+ zpP%}*ju!rvnNs8_TTx0PZqE1DbAMR56jA!zppM1olkS@SJz*vOBmH`s(0qaz)!q8w;00%R_bl@;1$os zF2QBTINQ)Ypk6(lHQ{%-?kKF@h%HWHxAr2wFqBTE_zGKRvS)XCM;2-oyV7I{_(ZntvcdbX|icVVZ`D~;<`w2g4Hkrr^A58TfYai+yj3K!U#!*&A#hSPz$1IAp3#y8EvN*FiK4#J+ zBxNzUN_a$knie+hju#ioCDBQegtC=Sn6U2uk1?P-x+ns=2Qi|N4BVi>y9G`j_yoOw zg5-R_ekev$;35i;1cpHJnPY4ZW2{v#8P%k^$iFnCFm`F~-Wp=?*)Qhg0z%6E?e3)< z$>5m({;IlCD>}kNHj50TiV?lSNHD29mf@00h98+o3Ych~Jf3MF6A#cbQZB-6cqLC< zPDkHzE+XZP~mB`(X_{N&|Tc&{s&BWPb2^U literal 0 HcmV?d00001 diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index b2f7592fd5..9c9caec505 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -742,7 +742,7 @@ input.camera { background-image: url(../../images/input_camera.png) !important; } input.spinn { - background-image: url(../../images/spinner.gif) !important; + background-image: url(../../images/spinner_green.gif) !important; } #toolbox #auto_save { From c942fce06864a7b4c9d65d84ea0ca0606d92781d Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 20 Jun 2017 15:47:29 +0200 Subject: [PATCH 017/142] added snmp_browser.ajax --- .../include/ajax/snmp_browser.ajax.php | 126 ++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 pandora_console/include/ajax/snmp_browser.ajax.php diff --git a/pandora_console/include/ajax/snmp_browser.ajax.php b/pandora_console/include/ajax/snmp_browser.ajax.php new file mode 100644 index 0000000000..3376245093 --- /dev/null +++ b/pandora_console/include/ajax/snmp_browser.ajax.php @@ -0,0 +1,126 @@ + $target_oid) { + $oid = snmp_browser_get_oid ($target_ip, $community, + htmlspecialchars_decode($target_oid), $snmp_version, $snmp3_auth_user, + $snmp3_security_level, $snmp3_auth_method, $snmp3_auth_pass, + $snmp3_privacy_method, $snmp3_privacy_pass); + + + $name_check = db_get_value ('name', 'tnetwork_component', + 'name', $oid['oid']); + + if(empty($oid['description'])) { + $description = ''; + } else { + $description = io_safe_input($oid['description']); + } + + if(!$name_check){ + $id = network_components_create_network_component ($oid['oid'],17,1, + array ('description' => $description, + 'module_interval' => 300, + 'max' => 0, + 'min' => 0, + 'tcp_send' => $snmp_version, + 'tcp_rcv' => '', + 'tcp_port' => 0, + 'snmp_oid' => $oid['numeric_oid'], + 'snmp_community' => $community, + 'id_module_group' => 3, + 'id_modulo' => 2, + 'id_plugin' => 0, + 'plugin_user' => '', + 'plugin_pass' => '', + 'plugin_parameter' => '', + 'macros' => '', + 'max_timeout' => 0, + 'max_retries' => 0, + 'history_data' => '', + 'dynamic_interval' => 0, + 'dynamic_max' => 0, + 'dynamic_min' => 0, + 'dynamic_two_tailed' => 0, + 'min_warning' => 0, + 'max_warning' => 0, + 'str_warning' => '', + 'min_critical' => 0, + 'max_critical' => 0, + 'str_critical' => '', + 'min_ff_event' => 0, + 'custom_string_1' => '', + 'custom_string_2' => '', + 'custom_string_3' => '', + 'post_process' => 0, + 'unit' => '', + 'wizard_level' => 'nowizard', + 'macros' => '', + 'critical_instructions' => '', + 'warning_instructions' => '', + 'unknown_instructions' => '', + 'critical_inverse' => 0, + 'warning_inverse' => 0, + 'id_category' => 0, + 'tags' => '', + 'disabled_types_event' => '{"going_unknown":1}', + 'min_ff_event_normal' => 0, + 'min_ff_event_warning' => 0, + 'min_ff_event_critical' => 0, + 'each_ff' => 0)); + } + + if(empty($id)) { + array_push($fail_modules,$name_check); + } + } + } + + echo json_encode($fail_modules); + return; +} + + + +?> \ No newline at end of file From bd537cd8917a111891bfa7b3b984a180f7bea441 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Tue, 20 Jun 2017 17:45:01 +0200 Subject: [PATCH 018/142] Change connection data for mysql queries - #1030 --- pandora_console/extensions/db_status.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pandora_console/extensions/db_status.php b/pandora_console/extensions/db_status.php index ca69e0282b..e5e1d84331 100755 --- a/pandora_console/extensions/db_status.php +++ b/pandora_console/extensions/db_status.php @@ -127,7 +127,7 @@ function extension_db_status_execute_checks($db_user, $db_password, $db_host, $d ui_print_error_message( __('Unsuccessful installed tables into the testing DB')); } - else { + else {/* if (enterprise_installed()) { $install_tables_enterprise = extension_db_status_execute_sql_file( @@ -139,7 +139,7 @@ function extension_db_status_execute_checks($db_user, $db_password, $db_host, $d __('Unsuccessful installed enterprise tables into the testing DB')); } } - + */ extension_db_check_tables_differences( $connection_test, $connection_system, @@ -159,6 +159,7 @@ function extension_db_check_tables_differences($connection_test, global $config; + // --------- Check the tables -------------------------------------- mysql_select_db($db_name_test, $connection_test); $result = mysql_query("SHOW TABLES", $connection_test); @@ -170,9 +171,8 @@ function extension_db_check_tables_differences($connection_test, //~ $tables_test = array_merge($tables_test, //~ extension_db_status_extension_tables()); - - mysql_select_db($db_name_system, $connection_system); - $result = mysql_query("SHOW TABLES", $connection_system); + mysql_select_db($db_name_system, $connection_test); + $result = mysql_query("SHOW TABLES", $connection_test); $tables_system = array(); while ($row = mysql_fetch_array ($result)) { $tables_system[] = $row[0]; @@ -227,8 +227,8 @@ function extension_db_check_tables_differences($connection_test, - mysql_select_db($db_name_system, $connection_system); - $result = mysql_query("EXPLAIN " . $table, $connection_system); + mysql_select_db($db_name_system, $connection_test); + $result = mysql_query("EXPLAIN " . $table, $connection_test); $fields_system = array(); if (!empty($result)) { while ($row = mysql_fetch_array ($result)) { From ff7de5ed4f31da83ed75d0e24043642917edc3b5 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Wed, 21 Jun 2017 11:06:52 +0200 Subject: [PATCH 019/142] Added alias to snmp alert agent object --- pandora_server/lib/PandoraFMS/Core.pm | 47 ++++++++++++++------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 9c311c9c5d..1fd6250c56 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -3391,6 +3391,30 @@ sub pandora_evaluate_snmp_alerts ($$$$$$$$$) { if (($internal_counter + 1 >= $min_alerts) && ($times_fired + 1 <= $max_alerts)) { ($times_fired++, $internal_counter++); + my %agent; + + my $this_agent = get_agent_from_addr ($dbh, $trap_agent); + + if (defined($this_agent)){ + %agent = ( + 'nombre' => $this_agent->{'nombre'}, + 'id_agente' => $this_agent->{'id_agente'}, + 'direccion' => $trap_agent, + 'id_grupo' => $this_agent->{'id_grupo'}, + 'comentarios' => '', + 'alias' => $this_agent->{'alias'} + ); + } else { + %agent = ( + 'nombre' => $trap_agent, + 'direccion' => $trap_agent, + 'comentarios' => '', + 'id_agente' => 0, + 'id_grupo' => 0, + 'alias' => $trap_agent + ); + } + my %alert = ( 'snmp_alert' => 1, 'name' => '', @@ -3419,27 +3443,6 @@ sub pandora_evaluate_snmp_alerts ($$$$$$$$$) { 'id' => $alert->{'id_alert'}, 'priority' => $alert->{'priority'}, ); - - my %agent; - - my $this_agent = get_agent_from_addr ($dbh, $trap_agent); - if (defined($this_agent)){ - %agent = ( - 'nombre' => $this_agent->{'nombre'}, - 'id_agente' => $this_agent->{'id_agente'}, - 'direccion' => $trap_agent, - 'id_grupo' => $this_agent->{'id_grupo'}, - 'comentarios' => '' - ); - } else { - %agent = ( - 'nombre' => $trap_agent, - 'direccion' => $trap_agent, - 'comentarios' => '', - 'id_agente' => 0, - 'id_grupo' => 0 - ); - } # Execute alert my $action = get_db_single_row ($dbh, 'SELECT * @@ -3455,7 +3458,7 @@ sub pandora_evaluate_snmp_alerts ($$$$$$$$$) { if ($action->{'id_alert_command'} != 3){ pandora_event ($pa_config, "SNMP alert fired (" . $alert->{'description'} . ")", 0, 0, $alert->{'priority'}, 0, 0, 'alert_fired', 0, $dbh); - } + } # Update alert status db_do ($dbh, 'UPDATE talert_snmp SET times_fired = ?, last_fired = ?, internal_counter = ? WHERE id_as = ?', From e86c87d23b787156a62d0ba7dbacc174eeb903ff Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Wed, 21 Jun 2017 13:50:05 +0200 Subject: [PATCH 020/142] Added refresh by user --- pandora_console/general/header.php | 6 ++++-- pandora_console/include/config_process.php | 2 +- pandora_console/include/functions_config.php | 3 --- pandora_console/operation/users/user_edit.php | 12 ++++++------ 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index 971ca50465..b5b3479dd9 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -191,7 +191,9 @@ config_check(); $_GET['refr'] = null; } - if ($config['autorefresh_white_list'] !== null && array_search($_GET['sec2'], $config['autorefresh_white_list']) !== false) { + $select = db_process_sql("SELECT autorefresh_white_list FROM tusuario WHERE id_user = '" . $config['id_user'] . "'"); + $autorefresh_list = json_decode($select[0]['autorefresh_white_list']); + if ($autorefresh_list !== null && array_search($_GET['sec2'], $autorefresh_list) !== false) { $autorefresh_img = html_print_image("images/header_refresh.png", true, array("class" => 'bot', "alt" => 'lightning', 'title' => __('Configure autorefresh'))); if ($_GET['refr']) { @@ -354,7 +356,7 @@ config_check(); var new_chat = ; $(document).ready (function () { $("a.autorefresh_txt").toggle (); $("#combo_refr").toggle (); diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 4398f0c3e5..d9a6294d17 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -252,7 +252,7 @@ if (isset($_POST['vc_refr'])) { //======= Autorefresh code ============================================= -$select = db_process_sql("SELECT value FROM tconfig WHERE token='autorefresh_white_list'"); +$select = db_process_sql("SELECT autorefresh_white_list FROM tusuario WHERE id_user = '" . $config['id_user'] . "'"); $autorefresh_list = json_decode($select[0]['value']); $config['autorefresh_white_list'] = array(); $config['autorefresh_white_list'] = $autorefresh_list; diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index c6828ffd1b..08bd6f7aac 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -855,9 +855,6 @@ function config_process_config () { config_update_value ('status_images_set', 'default'); } - if(!isset ($config['autorefresh_white_list'])){ - config_update_value ('autorefresh_white_list', ''); - } // Load user session if (isset ($_SESSION['id_usuario'])) $config["id_user"] = $_SESSION["id_usuario"]; diff --git a/pandora_console/operation/users/user_edit.php b/pandora_console/operation/users/user_edit.php index b2f3c91874..4e76d32899 100644 --- a/pandora_console/operation/users/user_edit.php +++ b/pandora_console/operation/users/user_edit.php @@ -94,11 +94,11 @@ if (isset ($_GET["modified"]) && !$view_mode) { //save autorefresh list $autorefresh_list = get_parameter_post ("autorefresh_list"); if(($autorefresh_list[0] === '') || ($autorefresh_list[0] === '0')){ - db_process_sql("UPDATE tconfig SET value ='' WHERE token='autorefresh_white_list'"); - }else{ - db_process_sql("UPDATE tconfig SET value ='".json_encode($autorefresh_list)."' WHERE token='autorefresh_white_list'"); + $upd_info['autorefresh_white_list'] = ""; + } + else{ + $upd_info['autorefresh_white_list'] = json_encode($autorefresh_list); } - $is_admin = db_get_value('is_admin', 'tusuario', 'id_user', $id); @@ -382,8 +382,8 @@ $autorefresh_list_out['operation/visual_console/render_view'] = "render_view"; $autorefresh_list_out['operation/events/events'] = "events"; if(!isset($autorefresh_list)){ - $select = db_process_sql("SELECT value FROM tconfig WHERE token='autorefresh_white_list'"); - $autorefresh_list = json_decode($select[0]['value']); + $select = db_process_sql("SELECT autorefresh_white_list FROM tusuario WHERE id_user = '" . $config['id_user'] . "'"); + $autorefresh_list = json_decode($select[0]['autorefresh_white_list']); if($autorefresh_list === null){ $autorefresh_list[0] = __('None'); }else{ From 2737b6567a7aae6dd1cc7619eb3ab7029d9083eb Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Wed, 21 Jun 2017 14:35:22 +0200 Subject: [PATCH 021/142] Added Borja line to fix module graph period in visual console with non-administrator users --- .../visual_console_builder.editor.js | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index 4926a215ca..ba1669da9f 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -510,6 +510,9 @@ function readFields() { values['process_simple_value'] = $("select[name=process_value]").val(); values['background'] = $("#background_image").val(); values['period'] = undefined != $("#hidden-period").val() ? $("#hidden-period").val() : $("#period").val(); + if (values['period'] == null) { + values['period'] = undefined != $("#hidden-period").val() ? $("#hidden-period").val() : $("#period_select").val(); + } values['width'] = $("input[name=width]").val(); values['height'] = $("input[name=height]").val(); values['parent'] = $("select[name=parent]").val(); @@ -563,14 +566,14 @@ function create_button_palette_callback() { var validate = true; switch (creationItem) { case 'box_item': - if (($("input[name='width_box']").val() == '')) { - alert('Undefined width'); - validate = false; - } - if (($("input[name='height_box']").val() == '')) { - alert('Undefined height'); - validate = false; - } + if (($("input[name='width_box']").val() == '')) { + alert('Undefined width'); + validate = false; + } + if (($("input[name='height_box']").val() == '')) { + alert('Undefined height'); + validate = false; + } break; case 'group_item': case 'static_graph': @@ -630,7 +633,7 @@ function create_button_palette_callback() { validate = false; } break; - case 'module_graph': + case 'module_graph': if (values['width_module_graph'] == '') { alert('Undefined width'); validate = false; From ec2872b83b142c1779eeef803b28b45e1f3b0f80 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Wed, 21 Jun 2017 16:41:31 +0200 Subject: [PATCH 022/142] Added second check to period field in module charts (admin have diferent field name) --- pandora_console/operation/agentes/stat_win.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php index 63cb403e04..5199f58506 100644 --- a/pandora_console/operation/agentes/stat_win.php +++ b/pandora_console/operation/agentes/stat_win.php @@ -150,7 +150,10 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent); $avg_only = $show_other; } - $period = get_parameter ("period", SECONDS_1DAY); + $period = get_parameter ("period"); + if ($period == "") { + $period = get_parameter ("period_select", SECONDS_1DAY); + } $id = get_parameter ("id", 0); $width = get_parameter ("width", STATWIN_DEFAULT_CHART_WIDTH); $height = get_parameter ("height", STATWIN_DEFAULT_CHART_HEIGHT); From e6efe5825bca9099edc8626f6fb43dbc0336cb1a Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Thu, 22 Jun 2017 09:28:07 +0200 Subject: [PATCH 023/142] Added active filters to snmp console --- pandora_console/include/functions_snmp.php | 107 ++++++++++++++++++ .../operation/snmpconsole/snmp_view.php | 22 +++- 2 files changed, 124 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/functions_snmp.php b/pandora_console/include/functions_snmp.php index 71a232280e..fe5333f162 100644 --- a/pandora_console/include/functions_snmp.php +++ b/pandora_console/include/functions_snmp.php @@ -279,4 +279,111 @@ function snmp_update_translation($oid, $new_oid, $description, $post_process) { } } } + +/* + * Print the event filter tag cloud (enterprise feature) + * @param $filter_resume: Array with the active filters + * @param $filter_refs: Array of all arrays to humanize some tags + */ +function print_snmp_tags_active_filters ($filter_resume = array()) { + global $config; + + $tags_set = array(); + + // Alert + if (isset($filter_resume['filter_fired'])) { + array_push ($tags_set, array( + 'title' => __('Alert'), + 'value' => $filter_resume['filter_fired'] + )); + } + // Severity + if (isset($filter_resume['filter_severity'])) { + array_push ($tags_set, array( + 'title' => __('Severity'), + 'value' => $filter_resume['filter_severity'] + )); + } + // Pagination + if ($filter_resume['pagination'] == "") { + $filter_resume['pagination'] = $config["block_size"]; + } + array_push ($tags_set, array( + 'title' => __('Pagination'), + 'value' => $filter_resume['pagination'] + )); + // Free search + if (isset($filter_resume['free_search_string']) && $filter_resume['free_search_string'] != "") { + array_push ($tags_set, array( + 'title' => __('Search'), + 'value' => $filter_resume['free_search_string'] + )); + } + // Status + if (isset($filter_resume['filter_status']) && $filter_resume['filter_status'] != "") { + array_push ($tags_set, array( + 'title' => __('Status'), + 'value' => $filter_resume['filter_status'] + )); + } + // Group by + if (isset($filter_resume['group_by'])) { + if ($filter_resume['group_by'] == 0) { + array_push ($tags_set, array( + 'title' => __('Group by Enterprise String / IP'), + 'value' => __('No') + )); + } + else { + array_push ($tags_set, array( + 'title' => __('Group by Enterprise String / IP'), + 'value' => __('Yes') + )); + } + } + // Date from + if (isset($filter_resume['date_from_trap']) && $filter_resume['date_from_trap'] != "") { + if (isset($filter_resume['time_from_trap']) && $filter_resume['time_from_trap'] != "") { + array_push ($tags_set, array( + 'title' => __('From'), + 'value' => $filter_resume['date_from_trap'] . " " . $filter_resume['time_from_trap'] + )); + } + else { + array_push ($tags_set, array( + 'title' => __('From'), + 'value' => $filter_resume['date_from_trap'] + )); + } + } + // Date to + if (isset($filter_resume['date_to_trap']) && $filter_resume['date_to_trap'] != "") { + if (isset($filter_resume['time_to_trap']) && $filter_resume['time_to_trap'] != "") { + array_push ($tags_set, array( + 'title' => __('To'), + 'value' => $filter_resume['date_to_trap'] . " " . $filter_resume['time_to_trap'] + )); + } + else { + array_push ($tags_set, array( + 'title' => __('To'), + 'value' => $filter_resume['date_to_trap'] + )); + } + } + // Trap type + if (isset($filter_resume['trap_type'])) { + array_push ($tags_set, array( + 'title' => __('Trap type'), + 'value' => $filter_resume['trap_type'] + )); + } + $title = ''; + if(!$config['pure']){ + $title = isset($filter_resume['title']) + ? __('Active filter') . " (" . $filter_resume['title'] . ")" + : __('Active filters'); + } + if (sizeof($filter_resume) > 0) ui_print_tags_view($title, $tags_set); +} ?> diff --git a/pandora_console/operation/snmpconsole/snmp_view.php b/pandora_console/operation/snmpconsole/snmp_view.php index 61506e85a3..79aca85153 100755 --- a/pandora_console/operation/snmpconsole/snmp_view.php +++ b/pandora_console/operation/snmpconsole/snmp_view.php @@ -518,15 +518,22 @@ $filter .= html_print_submit_button(__('Update'), 'search', false, 'class="sub u $filter .= ''; $filter .= ''; - - - +$filter_resume = array(); +$filter_resume['filter_fired'] = $alerted[$filter_fired]; +$filter_resume['filter_severity'] = $severities[$filter_severity]; +$filter_resume['pagination'] = $paginations[$pagination]; +$filter_resume['free_search_string'] = $free_search_string; +$filter_resume['filter_status'] = $status_array[$filter_status]; +$filter_resume['group_by'] = $group_by; +$filter_resume['date_from_trap'] = $date_from_trap; +$filter_resume['time_from_trap'] = $time_from_trap; +$filter_resume['date_to_trap'] = $date_to_trap; +$filter_resume['time_to_trap'] = $time_to_trap; +$filter_resume['trap_type'] = $trap_types[$trap_type]; $traps = db_get_all_rows_sql($sql); $trapcount = (int) db_get_value_sql($sql_count); - - // No traps if (empty ($traps)) { // Header @@ -546,6 +553,9 @@ if (empty ($traps)) { if(!empty ($traps2)){ ui_toggle($filter, __('Toggle filter(s)')); + + print_snmp_tags_active_filters($filter_resume); + ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no SNMP traps in database that contains this filter') ) ); } else { ui_print_info_message ( array('no_close'=>true, 'message'=> __('There are no SNMP traps in database') ) ); @@ -651,6 +661,8 @@ if (empty ($traps)) { ui_toggle($filter, __('Toggle filter(s)')); unset ($table); +print_snmp_tags_active_filters($filter_resume); + if (($config['dbtype'] == 'oracle') && ($traps !== false)) { for ($i = 0; $i < count($traps); $i++) { unset($traps[$i]['rnum']); From b19164cbd2e11a6e49f5e7a5927b51c96b35a8c1 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 22 Jun 2017 11:55:30 +0200 Subject: [PATCH 024/142] Fixed visual console render img --- pandora_console/operation/visual_console/render_view.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pandora_console/operation/visual_console/render_view.php b/pandora_console/operation/visual_console/render_view.php index 79101d82ee..78c29d1e68 100755 --- a/pandora_console/operation/visual_console/render_view.php +++ b/pandora_console/operation/visual_console/render_view.php @@ -284,8 +284,13 @@ $ignored_params['refr'] = ''; $(this).css('margin-left',''); } else { - $(this).css('margin-left',(parseInt($(this).parent().parent().css('width'))/2-parseInt($(this).css('width'))/2)+'px'); - $(this).css('margin-top',''); + if(parseInt($(this).parent().parent().css('width'))/2-parseInt($(this).css('width'))/2 < 0){ + $(this).css('margin-left',''); + $(this).css('margin-top',''); + } else { + $(this).css('margin-left',(parseInt($(this).parent().parent().css('width'))/2-parseInt($(this).css('width'))/2)+'px'); + $(this).css('margin-top',''); + } } }); From 42b822a07a03d825b365d4e79026297979766fac Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 22 Jun 2017 15:27:00 +0200 Subject: [PATCH 025/142] Erase functionality --- pandora_console/godmode/setup/setup_auth.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/setup/setup_auth.php b/pandora_console/godmode/setup/setup_auth.php index c7e29ea909..1b18f0f7ec 100644 --- a/pandora_console/godmode/setup/setup_auth.php +++ b/pandora_console/godmode/setup/setup_auth.php @@ -51,7 +51,8 @@ if (is_ajax ()) { $row['control'] = __('Yes').' '.html_print_radio_button('fallback_local_auth', 1, '', $config['fallback_local_auth'], true).'  '; $row['control'] .= __('No').' '.html_print_radio_button('fallback_local_auth', 0, '', $config['fallback_local_auth'], true); $table->data['fallback_local_auth'] = $row; - + + if (enterprise_installed()) { // Autocreate remote users $row = array(); $row['name'] = __('Autocreate remote users'); @@ -59,8 +60,7 @@ if (is_ajax ()) { $row['control'] .= __('No').' '.html_print_radio_button_extended('autocreate_remote_users', 0, '', $config['autocreate_remote_users'], false, '', '', true); $table->data['autocreate_remote_users'] = $row; - if (enterprise_installed()) { - add_enterprise_auth_autocreate_profiles($table, $type_auth); + add_enterprise_auth_autocreate_profiles($table, $type_auth); } } From 8d378b4b608ed8d10e1ced13f86e2273b91d79bd Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 26 Jun 2017 11:29:56 +0200 Subject: [PATCH 026/142] Fixed display of data --- .../operation/agentes/gis_view.php | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/pandora_console/operation/agentes/gis_view.php b/pandora_console/operation/agentes/gis_view.php index 96b3167013..9784d65fc0 100644 --- a/pandora_console/operation/agentes/gis_view.php +++ b/pandora_console/operation/agentes/gis_view.php @@ -141,9 +141,29 @@ $result = db_get_all_rows_sql ($sql, true); if ($result === false) { - ui_print_empty_data( __('This agent doesn\'t have any GIS data.') ); + + $sql2 = sprintf (" + SELECT current_longitude AS longitude, current_latitude AS latitude, current_altitude AS altitude, + start_timestamp, description, number_of_packages, manual_placement + FROM tgis_data_status + WHERE tagente_id_agente = %d + ORDER BY start_timestamp DESC + LIMIT %d OFFSET %d", $agentId, $config['block_size'], (int)get_parameter ('offset')); + + $result2 = db_get_all_rows_sql ($sql2, true); + + if ($result2 === false) { + ui_print_empty_data( __('This agent doesn\'t have any GIS data.') ); + } else { + $result2[0]['end_timestamp'] = date('Y-m-d H:i:s'); + $result = $result2; + } } -else { + +if ($result !== false) { + if(!$countData){ + $countData = 1; + } ui_pagination ($countData, false) ; $table->data = array(); foreach ($result as $key => $row) { From 78bb583824ebe779b263852493d1e2a4144235b0 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Wed, 28 Jun 2017 11:31:45 +0200 Subject: [PATCH 027/142] Use session and not exec sql if already exists acl perms in session - #1017 --- pandora_console/include/functions.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index b4e25c9eac..1ef37e74bc 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -1796,6 +1796,26 @@ function check_acl($id_user, $id_group, $access, $onlyOneGroup = false) { $id_group = (int) $id_group; } + if($_SESSION['check_acl'] != null){ + if (empty ($_SESSION['check_acl'])) + return 0; + + $result = 0; + $acl_column = get_acl_column($access); + foreach ($_SESSION['check_acl'] as $row) { + // For each profile for this pair of group and user do... + if (isset($row[$acl_column])) { + $result += $row[$acl_column]; + } + } + + if ($result >= 1) { + return 1; + } + + return 0; + } + $parents_id = array($id_group); if ($id_group != 0 && $onlyOneGroup !== true) { $group = db_get_row_filter('tgrupo', array('id_grupo' => $id_group)); @@ -1844,8 +1864,13 @@ function check_acl($id_user, $id_group, $access, $onlyOneGroup = false) { OR tusuario_perfil.id_grupo = 0)", $id_user, implode(', ', $parents_id)); } + + + $rowdup = db_get_all_rows_sql ($query); + $_SESSION['check_acl'] = $rowdup; + if (empty ($rowdup)) return 0; From 342db3c4fbcd8ee4dd14c7a0f63c471d8f7d5fef Mon Sep 17 00:00:00 2001 From: enriquecd Date: Thu, 29 Jun 2017 17:33:29 +0200 Subject: [PATCH 028/142] Add column id_server to tgraph_source and fix metaconsole automatic_graph report_template - #1071 --- .../pandoradb_migrate_6.0_to_7.0.mysql.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 588a68da48..4d8634346c 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -1370,3 +1370,21 @@ CREATE TABLE IF NOT EXISTS `treset_pass` ( UPDATE tgis_map_connection SET conection_data = '{"type":"OSM","url":"http://tile.openstreetmap.org/${z}/${x}/${y}.png"}' where id_tmap_connection = 1; ALTER TABLE tpolicy_modules MODIFY post_process double(24,15) default 0; + +-- --------------------------------------------------------------------- +-- Table `tgraph_source` column 'id_server' +-- --------------------------------------------------------------------- + +START TRANSACTION; + +SET @st_oum707 = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'tgraph_source' AND table_schema = DATABASE() AND column_name = 'id_server') > 0, + "SELECT 1", + "ALTER TABLE tgraph_source ADD COLUMN id_server int(11) UNSIGNED NOT NULL default 0" +)); + +PREPARE pr_oum707 FROM @st_oum707; +EXECUTE pr_oum707; +DEALLOCATE PREPARE pr_oum707; + +COMMIT; From 0603a8408b6a15999335ac1ae692047c576a4f46 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Fri, 30 Jun 2017 20:39:41 +0200 Subject: [PATCH 029/142] Make explicit comparisons to avoid trouble with values that evaluate to false. --- pandora_server/lib/PandoraFMS/Core.pm | 204 +++++++++++++------------- 1 file changed, 102 insertions(+), 102 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index bc0f383701..7acb66ecd8 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -830,118 +830,118 @@ sub pandora_execute_action ($$$$$$$$$;$) { if (!defined($alert->{'snmp_alert'})) { # Regular alerts - $field1 = $action->{'field1'} ? $action->{'field1'} : $alert->{'field1'}; - $field2 = $action->{'field2'} ? $action->{'field2'} : $alert->{'field2'}; - $field3 = $action->{'field3'} ? $action->{'field3'} : $alert->{'field3'}; - $field4 = $action->{'field4'} ? $action->{'field4'} : $alert->{'field4'}; - $field5 = $action->{'field5'} ? $action->{'field5'} : $alert->{'field5'}; - $field6 = $action->{'field6'} ? $action->{'field6'} : $alert->{'field6'}; - $field7 = $action->{'field7'} ? $action->{'field7'} : $alert->{'field7'}; - $field8 = $action->{'field8'} ? $action->{'field8'} : $alert->{'field8'}; - $field9 = $action->{'field9'} ? $action->{'field9'} : $alert->{'field9'}; - $field10 = $action->{'field10'} ? $action->{'field10'} : $alert->{'field10'}; - $field11 = $action->{'field11'} ? $action->{'field11'} : $alert->{'field11'}; - $field12 = $action->{'field12'} ? $action->{'field12'} : $alert->{'field12'}; - $field13 = $action->{'field13'} ? $action->{'field13'} : $alert->{'field13'}; - $field14 = $action->{'field14'} ? $action->{'field14'} : $alert->{'field14'}; - $field15 = $action->{'field15'} ? $action->{'field15'} : $alert->{'field15'}; + $field1 = defined($action->{'field1'}) && $action->{'field1'} ne "" ? $action->{'field1'} : $alert->{'field1'}; + $field2 = defined($action->{'field2'}) && $action->{'field2'} ne "" ? $action->{'field2'} : $alert->{'field2'}; + $field3 = defined($action->{'field3'}) && $action->{'field3'} ne "" ? $action->{'field3'} : $alert->{'field3'}; + $field4 = defined($action->{'field4'}) && $action->{'field4'} ne "" ? $action->{'field4'} : $alert->{'field4'}; + $field5 = defined($action->{'field5'}) && $action->{'field5'} ne "" ? $action->{'field5'} : $alert->{'field5'}; + $field6 = defined($action->{'field6'}) && $action->{'field6'} ne "" ? $action->{'field6'} : $alert->{'field6'}; + $field7 = defined($action->{'field7'}) && $action->{'field7'} ne "" ? $action->{'field7'} : $alert->{'field7'}; + $field8 = defined($action->{'field8'}) && $action->{'field8'} ne "" ? $action->{'field8'} : $alert->{'field8'}; + $field9 = defined($action->{'field9'}) && $action->{'field9'} ne "" ? $action->{'field9'} : $alert->{'field9'}; + $field10 = defined($action->{'field10'}) && $action->{'field10'} ne "" ? $action->{'field10'} : $alert->{'field10'}; + $field11 = defined($action->{'field11'}) && $action->{'field11'} ne "" ? $action->{'field11'} : $alert->{'field11'}; + $field12 = defined($action->{'field12'}) && $action->{'field12'} ne "" ? $action->{'field12'} : $alert->{'field12'}; + $field13 = defined($action->{'field13'}) && $action->{'field13'} ne "" ? $action->{'field13'} : $alert->{'field13'}; + $field14 = defined($action->{'field14'}) && $action->{'field14'} ne "" ? $action->{'field14'} : $alert->{'field14'}; + $field15 = defined($action->{'field15'}) && $action->{'field15'} ne "" ? $action->{'field15'} : $alert->{'field15'}; } else { - $field1 = $alert->{'field1'} ? $alert->{'field1'} : $action->{'field1'}; - $field2 = $alert->{'field2'} ? $alert->{'field2'} : $action->{'field2'}; - $field3 = $alert->{'field3'} ? $alert->{'field3'} : $action->{'field3'}; - $field4 = $action->{'field4'} ? $action->{'field4'} : $alert->{'field4'}; - $field5 = $action->{'field5'} ? $action->{'field5'} : $alert->{'field5'}; - $field6 = $action->{'field6'} ? $action->{'field6'} : $alert->{'field6'}; - $field7 = $action->{'field7'} ? $action->{'field7'} : $alert->{'field7'}; - $field8 = $action->{'field8'} ? $action->{'field8'} : $alert->{'field8'}; - $field9 = $action->{'field9'} ? $action->{'field9'} : $alert->{'field9'}; - $field10 = $action->{'field10'} ? $action->{'field10'} : $alert->{'field10'}; - $field11 = $action->{'field11'} ? $action->{'field11'} : $alert->{'field11'}; - $field12 = $action->{'field12'} ? $action->{'field12'} : $alert->{'field12'}; - $field13 = $action->{'field13'} ? $action->{'field13'} : $alert->{'field13'}; - $field14 = $action->{'field14'} ? $action->{'field14'} : $alert->{'field14'}; - $field15 = $action->{'field15'} ? $action->{'field15'} : $alert->{'field15'}; + $field1 = defined($alert->{'field1'}) && $alert->{'field1'} ne "" ? $alert->{'field1'} : $action->{'field1'}; + $field2 = defined($alert->{'field2'}) && $alert->{'field2'} ne "" ? $alert->{'field2'} : $action->{'field2'}; + $field3 = defined($alert->{'field3'}) && $alert->{'field3'} ne "" ? $alert->{'field3'} : $action->{'field3'}; + $field4 = defined($action->{'field4'}) && $action->{'field4'} ne "" ? $action->{'field4'} : $alert->{'field4'}; + $field5 = defined($action->{'field5'}) && $action->{'field5'} ne "" ? $action->{'field5'} : $alert->{'field5'}; + $field6 = defined($action->{'field6'}) && $action->{'field6'} ne "" ? $action->{'field6'} : $alert->{'field6'}; + $field7 = defined($action->{'field7'}) && $action->{'field7'} ne "" ? $action->{'field7'} : $alert->{'field7'}; + $field8 = defined($action->{'field8'}) && $action->{'field8'} ne "" ? $action->{'field8'} : $alert->{'field8'}; + $field9 = defined($action->{'field9'}) && $action->{'field9'} ne "" ? $action->{'field9'} : $alert->{'field9'}; + $field10 = defined($action->{'field10'}) && $action->{'field10'} ne "" ? $action->{'field10'} : $alert->{'field10'}; + $field11 = defined($action->{'field11'}) && $action->{'field11'} ne "" ? $action->{'field11'} : $alert->{'field11'}; + $field12 = defined($action->{'field12'}) && $action->{'field12'} ne "" ? $action->{'field12'} : $alert->{'field12'}; + $field13 = defined($action->{'field13'}) && $action->{'field13'} ne "" ? $action->{'field13'} : $alert->{'field13'}; + $field14 = defined($action->{'field14'}) && $action->{'field14'} ne "" ? $action->{'field14'} : $alert->{'field14'}; + $field15 = defined($action->{'field15'}) && $action->{'field15'} ne "" ? $action->{'field15'} : $alert->{'field15'}; } # Recovery fields, thanks to Kato Atsushi if ($alert_mode == RECOVERED_ALERT) { # Field 1 is a special case where [RECOVER] prefix is not added even when it is defined - $field1 = $alert->{'field1_recovery'} ? $alert->{'field1_recovery'} : $field1; - $field1 = $action->{'field1_recovery'} ? $action->{'field1_recovery'} : $field1; + $field1 = defined($alert->{'field1_recovery'}) && $alert->{'field1_recovery'} ne "" ? $alert->{'field1_recovery'} : $field1; + $field1 = defined($action->{'field1_recovery'}) && $action->{'field1_recovery'} ne "" ? $action->{'field1_recovery'} : $field1; - $field2 = $field2 ? "[RECOVER]" . $field2 : ""; - $field2 = $alert->{'field2_recovery'} ? $alert->{'field2_recovery'} : $field2; - $field2 = $action->{'field2_recovery'} ? $action->{'field2_recovery'} : $field2; - - $field3 = $field3 ? "[RECOVER]" . $field3 : ""; - $field3 = $alert->{'field3_recovery'} ? $alert->{'field3_recovery'} : $field3; - $field3 = $action->{'field3_recovery'} ? $action->{'field3_recovery'} : $field3; - - $field4 = $field4 ? "[RECOVER]" . $field4 : ""; - $field4 = $alert->{'field4_recovery'} ? $alert->{'field4_recovery'} : $field4; - $field4 = $action->{'field4_recovery'} ? $action->{'field4_recovery'} : $field4; - - $field5 = $field5 ? "[RECOVER]" . $field5 : ""; - $field5 = $alert->{'field5_recovery'} ? $alert->{'field5_recovery'} : $field5; - $field5 = $action->{'field5_recovery'} ? $action->{'field5_recovery'} : $field5; - - $field6 = $field6 ? "[RECOVER]" . $field6 : ""; - $field6 = $alert->{'field6_recovery'} ? $alert->{'field6_recovery'} : $field6; - $field6 = $action->{'field6_recovery'} ? $action->{'field6_recovery'} : $field6; - - $field7 = $field7 ? "[RECOVER]" . $field7 : ""; - $field7 = $alert->{'field7_recovery'} ? $alert->{'field7_recovery'} : $field7; - $field7 = $action->{'field7_recovery'} ? $action->{'field7_recovery'} : $field7; - - $field8 = $field8 ? "[RECOVER]" . $field8 : ""; - $field8 = $alert->{'field8_recovery'} ? $alert->{'field8_recovery'} : $field8; - $field8 = $action->{'field8_recovery'} ? $action->{'field8_recovery'} : $field8; - - $field9 = $field9 ? "[RECOVER]" . $field9 : ""; - $field9 = $alert->{'field9_recovery'} ? $alert->{'field9_recovery'} : $field9; - $field9 = $action->{'field9_recovery'} ? $action->{'field9_recovery'} : $field9; - - $field10 = $field10 ? "[RECOVER]" . $field10 : ""; - $field10 = $alert->{'field10_recovery'} ? $alert->{'field10_recovery'} : $field10; - $field10 = $action->{'field10_recovery'} ? $action->{'field10_recovery'} : $field10; - - $field11 = $field11 ? "[RECOVER]" . $field11 : ""; - $field11 = $alert->{'field11_recovery'} ? $alert->{'field11_recovery'} : $field11; - $field11 = $action->{'field11_recovery'} ? $action->{'field11_recovery'} : $field11; - - $field12 = $field12 ? "[RECOVER]" . $field12 : ""; - $field12 = $alert->{'field12_recovery'} ? $alert->{'field12_recovery'} : $field12; - $field12 = $action->{'field12_recovery'} ? $action->{'field12_recovery'} : $field12; - - $field13 = $field13 ? "[RECOVER]" . $field13 : ""; - $field13 = $alert->{'field13_recovery'} ? $alert->{'field13_recovery'} : $field13; - $field13 = $action->{'field13_recovery'} ? $action->{'field13_recovery'} : $field13; - - $field14 = $field14 ? "[RECOVER]" . $field14 : ""; - $field14 = $alert->{'field14_recovery'} ? $alert->{'field14_recovery'} : $field14; - $field14 = $action->{'field14_recovery'} ? $action->{'field14_recovery'} : $field14; - - $field15 = $field15 ? "[RECOVER]" . $field15 : ""; - $field15 = $alert->{'field15_recovery'} ? $alert->{'field15_recovery'} : $field15; - $field15 = $action->{'field15_recovery'} ? $action->{'field15_recovery'} : $field15; + $field2 = defined($field2) && $field2 ne "" ? "[RECOVER]" . $field2 : ""; + $field2 = defined($alert->{'field2_recovery'}) && $alert->{'field2_recovery'} ne "" ? $alert->{'field2_recovery'} : $field2; + $field2 = defined($action->{'field2_recovery'}) && $action->{'field2_recovery'} ne "" ? $action->{'field2_recovery'} : $field2; + + $field3 = defined($field3) && $field3 ne "" ? "[RECOVER]" . $field3 : ""; + $field3 = defined($alert->{'field3_recovery'}) && $alert->{'field3_recovery'} ne "" ? $alert->{'field3_recovery'} : $field3; + $field3 = defined($action->{'field3_recovery'}) && $action->{'field3_recovery'} ne "" ? $action->{'field3_recovery'} : $field3; + + $field4 = defined($field4) && $field4 ne "" ? "[RECOVER]" . $field4 : ""; + $field4 = defined($alert->{'field4_recovery'}) && $alert->{'field4_recovery'} ne "" ? $alert->{'field4_recovery'} : $field4; + $field4 = defined($action->{'field4_recovery'}) && $action->{'field4_recovery'} ne "" ? $action->{'field4_recovery'} : $field4; + + $field5 = defined($field5) && $field5 ne "" ? "[RECOVER]" . $field5 : ""; + $field5 = defined($alert->{'field5_recovery'}) && $alert->{'field5_recovery'} ne "" ? $alert->{'field5_recovery'} : $field5; + $field5 = defined($action->{'field5_recovery'}) && $action->{'field5_recovery'} ne "" ? $action->{'field5_recovery'} : $field5; + + $field6 = defined($field6) && $field6 ne "" ? "[RECOVER]" . $field6 : ""; + $field6 = defined($alert->{'field6_recovery'}) && $alert->{'field6_recovery'} ne "" ? $alert->{'field6_recovery'} : $field6; + $field6 = defined($action->{'field6_recovery'}) && $action->{'field6_recovery'} ne "" ? $action->{'field6_recovery'} : $field6; + + $field7 = defined($field7) && $field7 ne "" ? "[RECOVER]" . $field7 : ""; + $field7 = defined($alert->{'field7_recovery'}) && $alert->{'field7_recovery'} ne "" ? $alert->{'field7_recovery'} : $field7; + $field7 = defined($action->{'field7_recovery'}) && $action->{'field7_recovery'} ne "" ? $action->{'field7_recovery'} : $field7; + + $field8 = defined($field8) && $field8 ne "" ? "[RECOVER]" . $field8 : ""; + $field8 = defined($alert->{'field8_recovery'}) && $alert->{'field8_recovery'} ne "" ? $alert->{'field8_recovery'} : $field8; + $field8 = defined($action->{'field8_recovery'}) && $action->{'field8_recovery'} ne "" ? $action->{'field8_recovery'} : $field8; + + $field9 = defined($field9) && $field9 ne "" ? "[RECOVER]" . $field9 : ""; + $field9 = defined($alert->{'field9_recovery'}) && $alert->{'field9_recovery'} ne "" ? $alert->{'field9_recovery'} : $field9; + $field9 = defined($action->{'field9_recovery'}) && $action->{'field9_recovery'} ne "" ? $action->{'field9_recovery'} : $field9; + + $field10 = defined($field10) && $field10 ne "" ? "[RECOVER]" . $field10 : ""; + $field10 = defined($alert->{'field10_recovery'}) && $alert->{'field10_recovery'} ne "" ? $alert->{'field10_recovery'} : $field10; + $field10 = defined($action->{'field10_recovery'}) && $action->{'field10_recovery'} ne "" ? $action->{'field10_recovery'} : $field10; + + $field11 = defined($field11) && $field11 ne "" ? "[RECOVER]" . $field11 : ""; + $field11 = defined($alert->{'field11_recovery'}) && $alert->{'field11_recovery'} ne "" ? $alert->{'field11_recovery'} : $field11; + $field11 = defined($action->{'field11_recovery'}) && $action->{'field11_recovery'} ne "" ? $action->{'field11_recovery'} : $field11; + + $field12 = defined($field12) && $field12 ne "" ? "[RECOVER]" . $field12 : ""; + $field12 = defined($alert->{'field12_recovery'}) && $alert->{'field12_recovery'} ne "" ? $alert->{'field12_recovery'} : $field12; + $field12 = defined($action->{'field12_recovery'}) && $action->{'field12_recovery'} ne "" ? $action->{'field12_recovery'} : $field12; + + $field13 = defined($field13) && $field13 ne "" ? "[RECOVER]" . $field13 : ""; + $field13 = defined($alert->{'field13_recovery'}) && $alert->{'field13_recovery'} ne "" ? $alert->{'field13_recovery'} : $field13; + $field13 = defined($action->{'field13_recovery'}) && $action->{'field13_recovery'} ne "" ? $action->{'field13_recovery'} : $field13; + + $field14 = defined($field14) && $field14 ne "" ? "[RECOVER]" . $field14 : ""; + $field14 = defined($alert->{'field14_recovery'}) && $alert->{'field14_recovery'} ne "" ? $alert->{'field14_recovery'} : $field14; + $field14 = defined($action->{'field14_recovery'}) && $action->{'field14_recovery'} ne "" ? $action->{'field14_recovery'} : $field14; + + $field15 = defined($field15) && $field15 ne "" ? "[RECOVER]" . $field15 : ""; + $field15 = defined($alert->{'field15_recovery'}) && $alert->{'field15_recovery'} ne "" ? $alert->{'field15_recovery'} : $field15; + $field15 = defined($action->{'field15_recovery'}) && $action->{'field15_recovery'} ne "" ? $action->{'field15_recovery'} : $field15; } - $field1 = $field1 ? decode_entities($field1) : ""; - $field2 = $field2 ? decode_entities($field2) : ""; - $field3 = $field3 ? decode_entities($field3) : ""; - $field4 = $field4 ? decode_entities($field4) : ""; - $field5 = $field5 ? decode_entities($field5) : ""; - $field6 = $field6 ? decode_entities($field6) : ""; - $field7 = $field7 ? decode_entities($field7) : ""; - $field8 = $field8 ? decode_entities($field8) : ""; - $field9 = $field9 ? decode_entities($field9) : ""; - $field10 = $field10 ? decode_entities($field10) : ""; - $field11 = $field11 ? decode_entities($field11) : ""; - $field12 = $field12 ? decode_entities($field12) : ""; - $field13 = $field13 ? decode_entities($field13) : ""; - $field14 = $field14 ? decode_entities($field14) : ""; - $field15 = $field15 ? decode_entities($field15) : ""; + $field1 = defined($field1) && $field1 ne "" ? decode_entities($field1) : ""; + $field2 = defined($field2) && $field2 ne "" ? decode_entities($field2) : ""; + $field3 = defined($field3) && $field3 ne "" ? decode_entities($field3) : ""; + $field4 = defined($field4) && $field4 ne "" ? decode_entities($field4) : ""; + $field5 = defined($field5) && $field5 ne "" ? decode_entities($field5) : ""; + $field6 = defined($field6) && $field6 ne "" ? decode_entities($field6) : ""; + $field7 = defined($field7) && $field7 ne "" ? decode_entities($field7) : ""; + $field8 = defined($field8) && $field8 ne "" ? decode_entities($field8) : ""; + $field9 = defined($field9) && $field9 ne "" ? decode_entities($field9) : ""; + $field10 = defined($field10) && $field10 ne "" ? decode_entities($field10) : ""; + $field11 = defined($field11) && $field11 ne "" ? decode_entities($field11) : ""; + $field12 = defined($field12) && $field12 ne "" ? decode_entities($field12) : ""; + $field13 = defined($field13) && $field13 ne "" ? decode_entities($field13) : ""; + $field14 = defined($field14) && $field14 ne "" ? decode_entities($field14) : ""; + $field15 = defined($field15) && $field15 ne "" ? decode_entities($field15) : ""; # Get group info my $group = undef; From f2f7a8179fb267804fa6c3c6859ccd2b85c79527 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Mon, 3 Jul 2017 15:24:30 +0200 Subject: [PATCH 030/142] Fix image align when create a static graph in vconsole - #844 --- .../godmode/reporting/visual_console_builder.editor.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index 4926a215ca..2c3bcbc97c 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -1518,7 +1518,6 @@ function set_static_graph_status(idElement, image, status) { data: parameter, success: function (data) { set_static_graph_status(idElement, image, data); - if($('#'+idElement+' table').css('float') == 'right' || $('#'+idElement+ ' table').css('float') == 'left'){ $('#'+idElement+ ' img').css('margin-top', parseInt($('#'+idElement).css('height'))/2 - parseInt($('#'+idElement+ ' img').css('height'))/2); } @@ -1554,7 +1553,6 @@ function set_static_graph_status(idElement, image, status) { suffix = ".png"; break; } - set_image("image", idElement, image + suffix); } @@ -2025,6 +2023,10 @@ function createItem(type, values, id_data) { if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){ $image.attr('width', '70') .attr('height', '70'); + } + else{ + $image.attr('width', $('#preview > img')[0].naturalWidth) + .attr('height', $('#preview > img')[0].naturalHeight); } } else { From 48d303cf8f6fb52594d68d510d28be02e6e87b12 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Mon, 10 Jul 2017 12:20:23 +0200 Subject: [PATCH 031/142] Fix a warning when there are multiple empty addresses. --- pandora_server/lib/PandoraFMS/DataServer.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/DataServer.pm b/pandora_server/lib/PandoraFMS/DataServer.pm index 8098f5cd69..effd0f317a 100644 --- a/pandora_server/lib/PandoraFMS/DataServer.pm +++ b/pandora_server/lib/PandoraFMS/DataServer.pm @@ -326,10 +326,12 @@ sub process_xml_data ($$$$$) { } # Save the first address as the main address - $address = $address_list[0]; - $address =~ s/^\s+|\s+$//g ; - shift (@address_list); -} + if (defined($address_list[0])) { + $address = $address_list[0]; + $address =~ s/^\s+|\s+$//g ; + shift (@address_list); + } + } # A module with No-learn mode (modo = 0) creates its modules on database only when it is created my $new_agent = 0; From ede763cecf68f0a8c38943ed9b4f05374ce59cbe Mon Sep 17 00:00:00 2001 From: artica Date: Mon, 10 Jul 2017 15:11:14 +0200 Subject: [PATCH 032/142] Updated version and build strings. --- pandora_agents/pc/AIX/pandora_agent.conf | 2 +- pandora_agents/pc/FreeBSD/pandora_agent.conf | 2 +- pandora_agents/pc/HP-UX/pandora_agent.conf | 2 +- pandora_agents/pc/Linux/pandora_agent.conf | 2 +- pandora_agents/pc/NT4/pandora_agent.conf | 2 +- pandora_agents/pc/SunOS/pandora_agent.conf | 2 +- pandora_agents/pc/Win32/pandora_agent.conf | 2 +- pandora_agents/shellscript/aix/pandora_agent.conf | 2 +- pandora_agents/shellscript/bsd-ipso/pandora_agent.conf | 2 +- pandora_agents/shellscript/hp-ux/pandora_agent.conf | 2 +- pandora_agents/shellscript/linux/pandora_agent.conf | 2 +- pandora_agents/shellscript/mac_osx/pandora_agent.conf | 2 +- pandora_agents/shellscript/openWRT/pandora_agent.conf | 2 +- pandora_agents/shellscript/solaris/pandora_agent.conf | 2 +- pandora_agents/unix/AIX/pandora_agent.conf | 2 +- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/Darwin/pandora_agent.conf | 2 +- pandora_agents/unix/FreeBSD/pandora_agent.conf | 2 +- pandora_agents/unix/HP-UX/pandora_agent.conf | 2 +- pandora_agents/unix/Linux/pandora_agent.conf | 2 +- pandora_agents/unix/NT4/pandora_agent.conf | 2 +- pandora_agents/unix/NetBSD/pandora_agent.conf | 2 +- pandora_agents/unix/SunOS/pandora_agent.conf | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 4 ++-- pandora_agents/unix/pandora_agent.spec | 4 ++-- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/bin/pandora_agent.conf | 2 +- pandora_agents/win32/installer/pandora.mpi | 4 ++-- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 4 ++-- pandora_console/pandora_console.spec | 4 ++-- pandora_console/pandora_console_install | 2 +- pandora_console/pandoradb_data.sql | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/conf/pandora_server.conf.new | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/pandora_server.redhat.spec | 4 ++-- pandora_server/pandora_server.spec | 4 ++-- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 49 files changed, 56 insertions(+), 56 deletions(-) diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf index aef55f8e67..0e4014f5e6 100644 --- a/pandora_agents/pc/AIX/pandora_agent.conf +++ b/pandora_agents/pc/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.705, AIX version +# Version 7.0NG.707, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/FreeBSD/pandora_agent.conf b/pandora_agents/pc/FreeBSD/pandora_agent.conf index af531588eb..207efac3a2 100644 --- a/pandora_agents/pc/FreeBSD/pandora_agent.conf +++ b/pandora_agents/pc/FreeBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.705, FreeBSD Version +# Version 7.0NG.707, FreeBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/HP-UX/pandora_agent.conf b/pandora_agents/pc/HP-UX/pandora_agent.conf index 67846d2798..f0aeb191e4 100644 --- a/pandora_agents/pc/HP-UX/pandora_agent.conf +++ b/pandora_agents/pc/HP-UX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.705, HP-UX Version +# Version 7.0NG.707, HP-UX Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/Linux/pandora_agent.conf b/pandora_agents/pc/Linux/pandora_agent.conf index b1fc942ef7..d9dec84092 100644 --- a/pandora_agents/pc/Linux/pandora_agent.conf +++ b/pandora_agents/pc/Linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.705, GNU/Linux +# Version 7.0NG.707, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/NT4/pandora_agent.conf b/pandora_agents/pc/NT4/pandora_agent.conf index d1490e3902..29781cd47c 100644 --- a/pandora_agents/pc/NT4/pandora_agent.conf +++ b/pandora_agents/pc/NT4/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.705, GNU/Linux +# Version 7.0NG.707, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/SunOS/pandora_agent.conf b/pandora_agents/pc/SunOS/pandora_agent.conf index 8db5b78a5a..4a0110cbe4 100644 --- a/pandora_agents/pc/SunOS/pandora_agent.conf +++ b/pandora_agents/pc/SunOS/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.705, Solaris Version +# Version 7.0NG.707, Solaris Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/Win32/pandora_agent.conf b/pandora_agents/pc/Win32/pandora_agent.conf index 31f05a2abd..515e60a1af 100644 --- a/pandora_agents/pc/Win32/pandora_agent.conf +++ b/pandora_agents/pc/Win32/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2010 Artica Soluciones Tecnologicas -# Version 7.0NG.705 +# Version 7.0NG.707 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software diff --git a/pandora_agents/shellscript/aix/pandora_agent.conf b/pandora_agents/shellscript/aix/pandora_agent.conf index 942a2f4274..1d2be693ad 100644 --- a/pandora_agents/shellscript/aix/pandora_agent.conf +++ b/pandora_agents/shellscript/aix/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.705, AIX version +# Version 7.0NG.707, AIX version # General Parameters # ================== diff --git a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf index 8677ad5d67..54dca07566 100644 --- a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf +++ b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.705 +# Version 7.0NG.707 # FreeBSD/IPSO version # Licenced under GPL licence, 2003-2007 Sancho Lerena diff --git a/pandora_agents/shellscript/hp-ux/pandora_agent.conf b/pandora_agents/shellscript/hp-ux/pandora_agent.conf index df0cf2d32c..94f5627291 100644 --- a/pandora_agents/shellscript/hp-ux/pandora_agent.conf +++ b/pandora_agents/shellscript/hp-ux/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.705, HPUX Version +# Version 7.0NG.707, HPUX Version # General Parameters # ================== diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf index 51d2bb1af8..23524d4db2 100644 --- a/pandora_agents/shellscript/linux/pandora_agent.conf +++ b/pandora_agents/shellscript/linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.705 +# Version 7.0NG.707 # Licensed under GPL license v2, # (c) 2003-2010 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/mac_osx/pandora_agent.conf b/pandora_agents/shellscript/mac_osx/pandora_agent.conf index f3370b0916..53edc0a423 100644 --- a/pandora_agents/shellscript/mac_osx/pandora_agent.conf +++ b/pandora_agents/shellscript/mac_osx/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.705 +# Version 7.0NG.707 # Licensed under GPL license v2, # (c) 2003-2009 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/openWRT/pandora_agent.conf b/pandora_agents/shellscript/openWRT/pandora_agent.conf index bf44df9b35..811e4181df 100644 --- a/pandora_agents/shellscript/openWRT/pandora_agent.conf +++ b/pandora_agents/shellscript/openWRT/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.705 +# Version 7.0NG.707 # Licensed under GPL license v2, # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/solaris/pandora_agent.conf b/pandora_agents/shellscript/solaris/pandora_agent.conf index 04933fbf78..f66fa06679 100644 --- a/pandora_agents/shellscript/solaris/pandora_agent.conf +++ b/pandora_agents/shellscript/solaris/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.705, Solaris version +# Version 7.0NG.707, Solaris version # General Parameters # ================== diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf index f566855881..9b5905996f 100644 --- a/pandora_agents/unix/AIX/pandora_agent.conf +++ b/pandora_agents/unix/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.705, AIX version +# Version 7.0NG.707, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 1f231b4ff8..bb05c6240c 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.705-170710 +Version: 7.0NG.707 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 81258bfa37..c0376e93cc 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.705-170710" +pandora_version="7.0NG.707" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/Darwin/pandora_agent.conf b/pandora_agents/unix/Darwin/pandora_agent.conf index 05d24eb45e..35fbd8c7f8 100644 --- a/pandora_agents/unix/Darwin/pandora_agent.conf +++ b/pandora_agents/unix/Darwin/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.705, GNU/Linux +# Version 7.0NG.707, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2012 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/FreeBSD/pandora_agent.conf b/pandora_agents/unix/FreeBSD/pandora_agent.conf index 68c96e4ba5..4c1e20f0ff 100644 --- a/pandora_agents/unix/FreeBSD/pandora_agent.conf +++ b/pandora_agents/unix/FreeBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.705, FreeBSD Version +# Version 7.0NG.707, FreeBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2016 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/HP-UX/pandora_agent.conf b/pandora_agents/unix/HP-UX/pandora_agent.conf index 3ad599e216..522ef2f345 100644 --- a/pandora_agents/unix/HP-UX/pandora_agent.conf +++ b/pandora_agents/unix/HP-UX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.705, HP-UX Version +# Version 7.0NG.707, HP-UX Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf index 02baa0729f..86a2f501b2 100644 --- a/pandora_agents/unix/Linux/pandora_agent.conf +++ b/pandora_agents/unix/Linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.705, GNU/Linux +# Version 7.0NG.707, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2014 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/NT4/pandora_agent.conf b/pandora_agents/unix/NT4/pandora_agent.conf index 5872b70e91..d2feeff65c 100644 --- a/pandora_agents/unix/NT4/pandora_agent.conf +++ b/pandora_agents/unix/NT4/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.705, GNU/Linux +# Version 7.0NG.707, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/NetBSD/pandora_agent.conf b/pandora_agents/unix/NetBSD/pandora_agent.conf index 26d63448ce..ef6a51d6d2 100644 --- a/pandora_agents/unix/NetBSD/pandora_agent.conf +++ b/pandora_agents/unix/NetBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.705, NetBSD Version +# Version 7.0NG.707, NetBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/SunOS/pandora_agent.conf b/pandora_agents/unix/SunOS/pandora_agent.conf index 11911ed676..d642c6d314 100644 --- a/pandora_agents/unix/SunOS/pandora_agent.conf +++ b/pandora_agents/unix/SunOS/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.705, Solaris Version +# Version 7.0NG.707, Solaris Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 289435ad55..8f0156d11d 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -40,7 +40,7 @@ my $Sem = undef; # Semaphore used to control the number of threads my $ThreadSem = undef; -use constant AGENT_VERSION => '7.0NG.705'; +use constant AGENT_VERSION => '7.0NG.707'; use constant AGENT_BUILD => '170710'; # Agent log default file size maximum and instances diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 0f9dfa348f..8fce41fcca 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -2,8 +2,8 @@ #Pandora FMS Linux Agent # %define name pandorafms_agent_unix -%define version 7.0NG.705 -%define release 170710 +%define version 7.0NG.707 +%define release 1 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 23d7042539..2d307de099 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -2,8 +2,8 @@ #Pandora FMS Linux Agent # %define name pandorafms_agent_unix -%define version 7.0NG.705 -%define release 170710 +%define version 7.0NG.707 +%define release 1 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 0d98a60019..c940f2d3fe 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -9,7 +9,7 @@ # Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license. # ********************************************************************** -PI_VERSION="7.0NG.705" +PI_VERSION="7.0NG.707" PI_BUILD="170710" OS_NAME=`uname -s` diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index 93ba47c6cf..1ecdcbad3f 100644 --- a/pandora_agents/win32/bin/pandora_agent.conf +++ b/pandora_agents/win32/bin/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2014 Artica Soluciones Tecnologicas -# Version 7.0NG.705 +# Version 7.0NG.707 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 0baa184790..c0de96a25e 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -3,7 +3,7 @@ AllowLanguageSelection {Yes} AppName -{Pandora FMS Windows Agent v7.0NG.705} +{Pandora FMS Windows Agent v7.0NG.707} ApplicationID {17E3D2CF-CA02-406B-8A80-9D31C17BD08F} @@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives {No} Windows,Executable -{<%AppName%>-<%Version%>-Setup<%Ext%>} +{<%AppName%>-Setup<%Ext%>} Windows,FileDescription {<%AppName%> <%Version%> Setup} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 93aed2a783..84c11b5fa3 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.705(Build 170710)") +#define PANDORA_VERSION ("7.0NG.707(Build 170710)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 32f3567d81..f3928d453a 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.705(Build 170710))" + VALUE "ProductVersion", "(7.0NG.707(Build 170710))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 4da85b0ff3..84932f2f9c 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.705-170710 +Version: 7.0NG.707 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 1caefd8cc1..908dcd41a6 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.705-170710" +pandora_version="7.0NG.707" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index dded8fb175..3c24ab5cca 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -23,7 +23,7 @@ * Pandora build version and version */ $build_version = 'PC170710'; -$pandora_version = 'v7.0NG.705'; +$pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. $script_tz = @date_default_timezone_get(); diff --git a/pandora_console/install.php b/pandora_console/install.php index c4e8e0635b..37eab50559 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -70,7 +70,7 @@
Date: Mon, 10 Jul 2017 16:22:41 +0200 Subject: [PATCH 033/142] Fixed events filter from agent events graph --- pandora_console/include/functions_graph.php | 14 ++++++--- .../include/graphs/flot/pandora.flot.js | 30 ++++++++++++++----- .../include/graphs/functions_flot.php | 7 +++-- .../agentes/estado_generalagente.php | 2 +- .../operation/events/events_list.php | 2 -- 5 files changed, 39 insertions(+), 16 deletions(-) diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index d3845a51eb..a3ce5ad993 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -3565,7 +3565,7 @@ function graph_custom_sql_graph ($id, $width, $height, * @param string homeurl * @param bool return or echo the result */ -function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $homeurl, $return = false) { +function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $homeurl, $return = false, $from_agent_view = false) { global $config; global $graphic_type; @@ -3582,13 +3582,14 @@ function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $ho $data = array (); $legend = array(); $full_legend = array(); + $full_legend_date = array(); $cont = 0; for ($i = 0; $i < $interval; $i++) { $bottom = $datelimit + ($periodtime * $i); if (! $graphic_type) { if ($config['flash_charts']) { - $name = date('H:i', $bottom); + $name = date('H:i:s', $bottom); } else { $name = date('H\h', $bottom); @@ -3602,6 +3603,11 @@ function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $ho if ($cont == 0 or $cont % 2) $legend[$cont] = $name; + if ($from_agent_view) { + $full_date = date('Y/m/d', $bottom); + $full_legend_date[$cont] = $full_date; + } + $full_legend[$cont] = $name; $top = $datelimit + ($periodtime * ($i + 1)); @@ -3630,12 +3636,12 @@ function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $ho } $cont++; } - + $colors = array(1 => COL_NORMAL, 2 => COL_WARNING, 3 => COL_CRITICAL, 4 => COL_UNKNOWN); // Draw slicebar graph if ($config['flash_charts']) { - $out = flot_slicesbar_graph($data, $period, $width, $height, $full_legend, $colors, $config['fontpath'], $config['round_corner'], $homeurl, '', '', false, $id_agent); + $out = flot_slicesbar_graph($data, $period, $width, $height, $full_legend, $colors, $config['fontpath'], $config['round_corner'], $homeurl, '', '', false, $id_agent, $full_legend_date); } else { $out = slicesbar_graph($data, $period, $width, $height, $colors, $config['fontpath'], $config['round_corner'], $homeurl); diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 5595b93f5b..8b4ddca948 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -608,13 +608,16 @@ function pandoraFlotVBars(graph_id, values, labels, labels_long, legend, colors, } } -function pandoraFlotSlicebar(graph_id, values, datacolor, labels, legend, acumulate_data, intervaltick, water_mark, maxvalue, separator, separator2, graph_javascript, id_agent) { +function pandoraFlotSlicebar(graph_id, values, datacolor, labels, legend, acumulate_data, intervaltick, water_mark, maxvalue, separator, separator2, graph_javascript, id_agent, full_legend) { values = values.split(separator2); labels = labels.split(separator); legend = legend.split(separator); acumulate_data = acumulate_data.split(separator); datacolor = datacolor.split(separator); - + if (full_legend != "") { + full_legend = full_legend.split(separator); + } + console.log(full_legend); // Check possible adapt_keys on classes check_adaptions(graph_id); @@ -692,15 +695,28 @@ function pandoraFlotSlicebar(graph_id, values, datacolor, labels, legend, acumul var to = legend[item.seriesIndex+1]; //current date var dateObj = new Date(); - var month = dateObj.getUTCMonth() + 1; //months from 1-12 - var day = dateObj.getUTCDate(); - var year = dateObj.getUTCFullYear(); - newdate = year + "/" + month + "/" + day; + if (full_legend != "") { + newdate = full_legend[item.seriesIndex]; + newdate2 = full_legend[item.seriesIndex+1]; + } + else { + var month = dateObj.getUTCMonth() + 1; //months from 1-12 + var day = dateObj.getUTCDate(); + var year = dateObj.getUTCFullYear(); + newdate = year + "/" + month + "/" + day; + } + if(!to){ to= '23:59'; } - window.location='index.php?sec=eventos&sec2=operation/events/events&id_agent='+id_agent+'&date_from='+newdate+'&time_from='+from+'&date_to='+newdate+'&time_to='+to+'&status=-1'; + + if (full_legend != "") { + window.location='index.php?sec=eventos&sec2=operation/events/events&id_agent='+id_agent+'&date_from='+newdate+'&time_from='+from+'&date_to='+newdate2+'&time_to='+to+'&status=-1'; + } + else { + window.location='index.php?sec=eventos&sec2=operation/events/events&id_agent='+id_agent+'&date_from='+newdate+'&time_from='+from+'&date_to='+newdate+'&time_to='+to+'&status=-1'; + } } }); diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index 22a6de27b0..243412fe08 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -846,7 +846,7 @@ function flot_vcolumn_chart ($graph_data, $width, $height, $color, $legend, $lon return $return; } -function flot_slicesbar_graph ($graph_data, $period, $width, $height, $legend, $colors, $fontpath, $round_corner, $homeurl, $watermark = '', $adapt_key = '', $stat_win = false, $id_agent = 0) { +function flot_slicesbar_graph ($graph_data, $period, $width, $height, $legend, $colors, $fontpath, $round_corner, $homeurl, $watermark = '', $adapt_key = '', $stat_win = false, $id_agent = 0, $full_legend_date = array()) { global $config; include_javascript_dependencies_flot_graph(); @@ -943,6 +943,9 @@ function flot_slicesbar_graph ($graph_data, $period, $width, $height, $legend, $ $labels = implode($separator,$labels); $datacolor = implode($separator,$datacolor); $legend = io_safe_output(implode($separator,$legend)); + if (!empty($full_legend_date)) { + $full_legend_date = io_safe_output(implode($separator,$full_legend_date)); + } $acumulate_data = io_safe_output(implode($separator,$acumulate_data)); // Store data series in javascript format @@ -966,7 +969,7 @@ function flot_slicesbar_graph ($graph_data, $period, $width, $height, $legend, $ // Javascript code $return .= ""; diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index 9cb2c5d0da..23b5dabed8 100755 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -602,7 +602,7 @@ $data[0][0] .= __('Events (24h)') . '' . '
' . - graph_graphic_agentevents ($id_agente, 450, 15, SECONDS_1DAY, '', true) . + graph_graphic_agentevents ($id_agente, 450, 15, SECONDS_1DAY, '', true, true) . '
' . ''; diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index b2ba0a338e..a9574b21bf 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -543,8 +543,6 @@ $table_advanced->rowclass[] = ''; $data = array(); $data[0] = __('Date from') . $jump; -//~ $user_users = users_get_user_users($config['id_user'], "ER", users_can_manage_group_all()); - $data[0] .= html_print_input_text ('date_from', $date_from, '', 15, 10, true); $data[1] = __('Date to') . $jump; From 2872686042f9b58f84c5eb1b54503b15b72216a6 Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 11 Jul 2017 00:01:16 +0200 Subject: [PATCH 034/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 4 ++-- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index bb05c6240c..956bb3ab71 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707 +Version: 7.0NG.707-170711 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 c0376e93cc..82e31cf40b 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.707" +pandora_version="7.0NG.707-170711" 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 8f0156d11d..06e0c4235a 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170710'; +use constant AGENT_BUILD => '170711'; # 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 8fce41fcca..7cacd92892 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 1 +%define release 170711 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 2d307de099..b131c06fef 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 1 +%define release 170711 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 c940f2d3fe..392b8bf35b 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170710" +PI_BUILD="170711" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index c0de96a25e..d849b12d7c 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170710} +{170711} ViewReadme {Yes} @@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives {No} Windows,Executable -{<%AppName%>-Setup<%Ext%>} +{<%AppName%>-<%Version%>-Setup<%Ext%>} Windows,FileDescription {<%AppName%> <%Version%> Setup} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 84c11b5fa3..9b70a4a160 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.707(Build 170710)") +#define PANDORA_VERSION ("7.0NG.707(Build 170711)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index f3928d453a..50376359a9 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.707(Build 170710))" + VALUE "ProductVersion", "(7.0NG.707(Build 170711))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 84932f2f9c..2b566503dd 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707 +Version: 7.0NG.707-170711 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 908dcd41a6..ca3d5c0bef 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.707" +pandora_version="7.0NG.707-170711" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 3c24ab5cca..2f0109f445 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170710'; +$build_version = 'PC170711'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 37eab50559..64304c23cd 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Tue, 11 Jul 2017 10:04:26 +0200 Subject: [PATCH 035/142] Changed text line --- pandora_console/include/functions_visual_map_editor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_visual_map_editor.php b/pandora_console/include/functions_visual_map_editor.php index 421fe26bd2..42772adf28 100755 --- a/pandora_console/include/functions_visual_map_editor.php +++ b/pandora_console/include/functions_visual_map_editor.php @@ -188,7 +188,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { ' . html_print_input_text('label', '', '', 20, 200, true) . ' - '.__("Click right mouse button to change background label editor color").' + '.__("Click right mouse button to change the background color of the label editor").' '; From 57f6ad097a6c6d5b17571706932e849022c4ef66 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 11 Jul 2017 10:10:48 +0200 Subject: [PATCH 036/142] update --- pandora_console/include/functions_html.php | 17 ++++++++++++++++- pandora_console/pandoradb.sql | 15 +++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index d868f68f48..797660534c 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -385,13 +385,28 @@ function html_print_select_groups($id_user = false, $privilege = "AR", $nothing = '', $nothing_value = 0, $return = false, $multiple = false, $sort = true, $class = '', $disabled = false, $style = false, $option_style = false, $id_group = false, - $keys_field = 'id_grupo', $strict_user = false) { + $keys_field = 'id_grupo', $strict_user = false, $delete_groups = false , $include_groups = false) { global $config; $fields = users_get_groups_for_select($id_user, $privilege, $returnAllGroup, true, $id_group, $keys_field); + + if ($delete_groups && is_array($delete_groups)){ + foreach ($delete_groups as $value) { + unset($fields[$value]); + } + } + + if (is_array($include_groups)){ + $field = array(); + foreach ($include_groups as $value) { + $field[$value] = $fields[$value]; + } + $fields = $field; + } + if ($strict_user) { $fields = users_get_strict_mode_groups($config['id_user'], $returnAllGroup); } diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 1ef3c1f7e8..471b64e048 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -2167,6 +2167,20 @@ CREATE TABLE IF NOT EXISTS `tpolicy_agents` ( UNIQUE (`id_policy`, `id_agent`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- ----------------------------------------------------- +-- Table `tpolicy_groups` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS `tpolicy_groups` ( + `id` int(10) unsigned NOT NULL auto_increment, + `id_policy` int(10) unsigned default '0', + `id_group` int(10) unsigned default '0', + `policy_applied` tinyint(1) unsigned default '0', + `pending_delete` tinyint(1) unsigned default '0', + `last_apply_utimestamp` int(10) unsigned NOT NULL default 0, + PRIMARY KEY (`id`), + UNIQUE (`id_policy`, `id_group`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + -- --------------------------------------------------------------------- -- Table `tdashboard` -- --------------------------------------------------------------------- @@ -2468,6 +2482,7 @@ CREATE TABLE IF NOT EXISTS `tpolicy_queue` ( `id` int(10) unsigned NOT NULL auto_increment, `id_policy` int(10) unsigned NOT NULL default '0', `id_agent` int(10) unsigned NOT NULL default '0', + `id_group` int(10) unsigned NOT NULL default '0', `operation` varchar(15) default '', `progress` int(10) unsigned NOT NULL default '0', `end_utimestamp` int(10) unsigned NOT NULL default 0, From 39fb79bbb42b9402fac5f22111bf0f4158ea0b78 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Tue, 11 Jul 2017 18:22:25 +0200 Subject: [PATCH 037/142] Fix automatic combined graph macros in name and labels - #1088 --- .../include/functions_reporting.php | 69 +++++++++++++++---- 1 file changed, 55 insertions(+), 14 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index fc9341d2ec..ffde723fe7 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -128,6 +128,26 @@ function reporting_make_reporting_data($report = null, $id_report, $content['period'] = $period; } + if(defined('METACONSOLE')){ + if (is_array($content['id_agent'])) { + $new_array = array(); + foreach ($content['id_agent'] as $key => $value) { + $meta_id = explode("|",$value); + array_push($new_array,$meta_id[1]); + } + $content['id_agent'] = $new_array; + } + else { + $meta_id = explode("|",$content['id_agent']); + if ($meta_id[1] != null) { + $content['id_agent'] = array(); + $content['id_agent'] = $meta_id[1]; + } + } + + + } + $content['style'] = json_decode(io_safe_output($content['style']), true); if(isset($content['style']['name_label'])){ //Add macros name @@ -147,7 +167,18 @@ function reporting_make_reporting_data($report = null, $id_report, } } - $content['name'] = reporting_label_macro($items_label, $content['style']['name_label']); + + + if(sizeof($content['id_agent']) != 1){ + $content['style']['name_label'] = str_replace("_agent_",sizeof($content['id_agent']).__(' agents'),$content['style']['name_label']); + } + + if(sizeof($content['id_agent_module']) != 1){ + $content['style']['name_label'] = str_replace("_module_",sizeof($content['id_agent_module']).__(' modules'),$content['style']['name_label']); + } + + $content['name'] = reporting_label_macro($items_label, $content['style']['name_label']); + if ($metaconsole_on) { //Restore db connection @@ -5780,17 +5811,12 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', require_once ($config["homedir"] . '/include/functions_graph.php'); - if ($type_report == 'automatic_graph') { - // Do none - } - else { - if ($config['metaconsole']) { - $id_meta = metaconsole_get_id_server($content["server_name"]); - - - $server = metaconsole_get_connection_by_id ($id_meta); - metaconsole_connect($server); - } + if ($config['metaconsole']) { + $id_meta = metaconsole_get_id_server($content["server_name"]); + + + $server = metaconsole_get_connection_by_id ($id_meta); + metaconsole_connect($server); } $graph = db_get_row ("tgraph", "id_graph", $content['id_gs']); @@ -5833,9 +5859,17 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', array_push ($weights, $graph_item["weight"]); if (in_array('label',$content['style'])) { + if (defined('METACONSOLE')) { + $item = array('type' => 'custom_graph', + 'id_agent' =>$content['id_agent'], + 'id_agent_module'=>$graph_item['id_agent_module']); + } + else { $item = array('type' => 'custom_graph', 'id_agent' =>modules_get_agentmodule_agent($graph_item['id_agent_module']), 'id_agent_module'=>$graph_item['id_agent_module']); + } + $label = reporting_label_macro($item, $content['style']['label']); $labels[$graph_item['id_agent_module']] = $label; } @@ -5855,6 +5889,13 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', $height = 50; } } + if (defined('METACONSOLE')) { + $modules_new = array(); + foreach ($modules as $mod) { + $modules_new[] = $mod['module']; + } + $modules = $modules_new; + } switch ($type) { case 'dinamic': @@ -10251,7 +10292,6 @@ function reporting_get_agentmodule_sla_working_timestamp ($period, $date_end, $w } function reporting_label_macro ($item, $label) { - switch ($item['type']) { case 'event_report_agent': case 'alert_report_agent': @@ -10277,6 +10317,7 @@ function reporting_label_macro ($item, $label) { $label = str_replace("_address_", $agent_name, $label); } break; + case 'automatic_graph': case 'simple_graph': case 'module_histogram_graph': case 'custom_graph': @@ -10330,4 +10371,4 @@ function reporting_label_macro ($item, $label) { return $label; } -?> +?> \ No newline at end of file From 7536b1fd5693bfb4e836e114a85a27e600cac998 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 12 Jul 2017 00:01:15 +0200 Subject: [PATCH 038/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 956bb3ab71..5a5e40940b 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170711 +Version: 7.0NG.707-170712 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 82e31cf40b..f709c33a53 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.707-170711" +pandora_version="7.0NG.707-170712" 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 06e0c4235a..b3d9589d86 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170711'; +use constant AGENT_BUILD => '170712'; # 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 7cacd92892..5f1424b747 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170711 +%define release 170712 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index b131c06fef..2faa837177 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170711 +%define release 170712 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 392b8bf35b..a553144ea0 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170711" +PI_BUILD="170712" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index d849b12d7c..f31d5a42ad 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170711} +{170712} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 9b70a4a160..216e27cd4c 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.707(Build 170711)") +#define PANDORA_VERSION ("7.0NG.707(Build 170712)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 50376359a9..64a9e83fb9 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.707(Build 170711))" + VALUE "ProductVersion", "(7.0NG.707(Build 170712))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 2b566503dd..8ca248b60e 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170711 +Version: 7.0NG.707-170712 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 ca3d5c0bef..ad4ace1067 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.707-170711" +pandora_version="7.0NG.707-170712" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 2f0109f445..cde5c668e4 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170711'; +$build_version = 'PC170712'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 64304c23cd..bab75c60c6 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Wed, 12 Jul 2017 11:20:19 +0200 Subject: [PATCH 039/142] Change agent / module icons height a width - #1114 --- pandora_console/extensions/agents_modules.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index 2c7a9147b8..cb6fe8cd42 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -528,24 +528,24 @@ function mainAgentsModules() { echo ''; switch ($status) { case AGENT_MODULE_STATUS_NORMAL: - ui_print_status_image ('module_ok.png', modules_get_last_value($module_id), false, array('width' => '20px', 'height' => '20px')); + ui_print_status_image ('module_ok.png', modules_get_last_value($module_id), false); break; case AGENT_MODULE_STATUS_CRITICAL_BAD: - ui_print_status_image ('module_critical.png', modules_get_last_value($module_id), false, array('width' => '20px', 'height' => '20px')); + ui_print_status_image ('module_critical.png', modules_get_last_value($module_id), false); break; case AGENT_MODULE_STATUS_WARNING: - ui_print_status_image ('module_warning.png', modules_get_last_value($module_id), false, array('width' => '20px', 'height' => '20px')); + ui_print_status_image ('module_warning.png', modules_get_last_value($module_id), false); break; case AGENT_MODULE_STATUS_UNKNOWN: - ui_print_status_image ('module_unknown.png', modules_get_last_value($module_id), false, array('width' => '20px', 'height' => '20px')); + ui_print_status_image ('module_unknown.png', modules_get_last_value($module_id), false); break; case AGENT_MODULE_STATUS_NORMAL_ALERT: case AGENT_MODULE_STATUS_WARNING_ALERT: case AGENT_MODULE_STATUS_CRITICAL_ALERT: - ui_print_status_image ('module_alertsfired.png', modules_get_last_value($module_id), false, array('width' => '20px', 'height' => '20px')); + ui_print_status_image ('module_alertsfired.png', modules_get_last_value($module_id), false); break; case 4: - ui_print_status_image ('module_no_data.png', modules_get_last_value($module_id), false, array('width' => '20px', 'height' => '20px')); + ui_print_status_image ('module_no_data.png', modules_get_last_value($module_id), false); break; } echo ''; From 9db5669f163c9c43a1f3c0d9544a53d84bd685c2 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Wed, 12 Jul 2017 11:51:00 +0200 Subject: [PATCH 040/142] Added item in button palette with default fields --- .../visual_console_builder.editor.js | 7 +++ .../visual_console_builder.elements.php | 5 +++ .../images/auto_sla_graph.disabled.png | Bin 0 -> 410 bytes pandora_console/images/auto_sla_graph.png | Bin 0 -> 410 bytes pandora_console/include/constants.php | 1 + .../include/functions_visual_map.php | 4 ++ .../include/functions_visual_map_editor.php | 41 +++++++++++------- pandora_console/include/styles/pandora.css | 6 +++ 8 files changed, 49 insertions(+), 15 deletions(-) create mode 100644 pandora_console/images/auto_sla_graph.disabled.png create mode 100644 pandora_console/images/auto_sla_graph.png diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index 4926a215ca..5b7b801f8b 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -1346,6 +1346,9 @@ function hiddenFields(item) { $("#process_value_row").css('display', 'none'); $("#process_value_row." + item).css('display', ''); + $("#event_max_time_row").css('display', 'none'); + $("#event_max_time_row." + item).css('display', ''); + $("#background_row_1").css('display', 'none'); $("#background_row_1." + item).css('display', ''); @@ -3218,6 +3221,10 @@ function click_button_toolbox(id) { toolbuttonActive = creationItem = 'module_graph'; toggle_item_palette(); break; + case 'auto_sla_graph': + toolbuttonActive = creationItem = 'auto_sla_graph'; + toggle_item_palette(); + break; case 'simple_value': toolbuttonActive = creationItem = 'simple_value'; toggle_item_palette(); diff --git a/pandora_console/godmode/reporting/visual_console_builder.elements.php b/pandora_console/godmode/reporting/visual_console_builder.elements.php index 12b38df2b3..747a293de4 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.elements.php +++ b/pandora_console/godmode/reporting/visual_console_builder.elements.php @@ -152,6 +152,11 @@ foreach ($layoutDatas as $layoutData) { html_print_image('images/chart_curve.png', true, array('title' => __('Module Graph'))); break; + case AUTO_SLA_GRAPH: + $table->data[$i + 1]['icon'] = + html_print_image('images/auto_sla_graph.png', true, + array('title' => __('Auto SLA Graph'))); + break; case SIMPLE_VALUE: $table->data[$i + 1]['icon'] = html_print_image('images/binary.png', true, diff --git a/pandora_console/images/auto_sla_graph.disabled.png b/pandora_console/images/auto_sla_graph.disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..e3f0e4fe86d5d2dd73c5d5081c29eb7a48025760 GIT binary patch literal 410 zcmV;L0cHM)P)=3!5vnQxNaf>EcR^iEwGhKd zAX@;$M-Bm)JVtl{P51z%51`AjKzUxM{MrJY9i2minx6JpFrp|Voh4a z#Lj*+CpeNEGXMcb6U2z*#PzUxM{MrJY9i2minx6JpFrp|Voh4a z#Lj*+CpeNEGXMcb6U2z*#PviU0rr07*qoM6N<$ Eg5m0rhyVZp literal 0 HcmV?d00001 diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index cee055d867..6284b5c3a7 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -185,6 +185,7 @@ define('AGENT_STATUS_WARNING', 2); define('STATIC_GRAPH', 0); define('PERCENTILE_BAR', 3); define('MODULE_GRAPH', 1); +define('AUTO_SLA_GRAPH', 14); define('SIMPLE_VALUE', 2); define('LABEL', 4); define('ICON', 5); diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 60125340ff..a92ce3f731 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -2746,6 +2746,10 @@ function visual_map_create_internal_name_item($label = null, $type, $image, $age case MODULE_GRAPH: $text = __('Module graph'); break; + case 'auto_sla_graph': + case AUTO_SLA_GRAPH: + $text = __('Auto SLA Graph'); + break; case 'percentile_bar': case PERCENTILE_BAR: $text = __('Percentile bar'); diff --git a/pandora_console/include/functions_visual_map_editor.php b/pandora_console/include/functions_visual_map_editor.php index 42772adf28..46aa26e287 100755 --- a/pandora_console/include/functions_visual_map_editor.php +++ b/pandora_console/include/functions_visual_map_editor.php @@ -54,6 +54,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { 'static_graph' => __('Static Graph'), 'percentile_item' => __('Percentile Item'), 'module_graph' => __('Graph'), + 'auto_sla_graph' => __('Auto SLA Graph'), 'simple_value' => __('Simple value') . ui_print_help_tip(__("To use 'label'field, you should write a text to replace '(_VALUE_)' and the value of the module will be printed at the end."), true), 'label' => __('Label'), @@ -276,7 +277,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { $form_items['agent_row'] = array(); $form_items['agent_row']['items'] = array('static_graph', 'percentile_bar', 'percentile_item', 'module_graph', - 'simple_value', 'datos'); + 'simple_value', 'datos', 'auto_sla_graph'); $form_items['agent_row']['html'] = '' . __('Agent') . ''; $params = array(); @@ -306,28 +307,38 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { ui_print_agent_autocomplete_input($params) . ''; - $form_items['module_row'] = array(); $form_items['module_row']['items'] = array('static_graph', 'percentile_bar', 'percentile_item', 'module_graph', - 'simple_value', 'datos'); + 'simple_value', 'datos', 'auto_sla_graph'); $form_items['module_row']['html'] = '' . __('Module') . ' ' . html_print_select(array(), 'module', '', '', __('Any'), 0, true) . ''; + + $event_times = array(86400 => __('24h'), + 28800 => __('8h'), + 7200 => __('2h'), + 3600 => __('1h'),); + $form_items['event_max_time_row'] = array(); + $form_items['event_max_time_row']['items'] = array('auto_sla_graph'); + $form_items['event_max_time_row']['html'] = '' . + __('Max. Time') . ' + ' . + html_print_select($event_times, 'event_max_time_row', '', '', 0, 86400, true, false, false) . + ''; - - $form_items['type_graph'] = array(); - $form_items['type_graph']['items'] = array( - 'Line', - 'Area'); - $form_items['type_graph']['html'] = '' . - __('Type of graph') . ' - '. html_print_select ( - array ('line' => __('Line'), - 'area' => __('Area')), - 'type_graph', '', '', 0, 'area', true, false, false) . ''; + $form_items['type_graph'] = array(); + $form_items['type_graph']['items'] = array( + 'Line', + 'Area'); + $form_items['type_graph']['html'] = '' . + __('Type of graph') . ' + '. html_print_select ( + array ('line' => __('Line'), + 'area' => __('Area')), + 'type_graph', '', '', 0, 'area', true, false, false) . ''; $own_info = get_user_info($config['id_user']); if (!$own_info['is_admin'] && !check_acl ($config['id_user'], 0, "PM")) @@ -654,6 +665,7 @@ function visual_map_editor_print_toolbox() { visual_map_print_button_editor('static_graph', __('Static Graph'), 'left', false, 'camera_min', true); visual_map_print_button_editor('percentile_item', __('Percentile Item'), 'left', false, 'percentile_item_min', true); visual_map_print_button_editor('module_graph', __('Module Graph'), 'left', false, 'graph_min', true); + visual_map_print_button_editor('auto_sla_graph', __('Auto SLA Graph'), 'left', false, 'auto_sla_graph_min', true); visual_map_print_button_editor('simple_value', __('Simple Value'), 'left', false, 'binary_min', true); visual_map_print_button_editor('label', __('Label'), 'left', false, 'label_min', true); visual_map_print_button_editor('icon', __('Icon'), 'left', false, 'icon_min', true); @@ -672,7 +684,6 @@ function visual_map_editor_print_toolbox() { $text_autosave = html_print_input_hidden ('auto_save', true, true); visual_map_print_item_toolbox('auto_save', $text_autosave, 'right'); - //visual_map_print_button_editor('save_visualmap', __('Save'), 'right', true, 'save_min', true); visual_map_print_button_editor('show_grid', __('Show grid'), 'right', true, 'grid_min', true); visual_map_print_button_editor('edit_item', __('Update item'), 'right', true, 'config_min', true); visual_map_print_button_editor('delete_item', __('Delete item'), 'right', true, 'delete_min', true); diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index b07a95f79b..9074f8f4a0 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -778,6 +778,12 @@ input.percentile_item_min { input.percentile_item_min[disabled] { background: #fefefe url(../../images/percentile_item.disabled.png) no-repeat center !important; } +input.auto_sla_graph_min { + background: #fefefe url(../../images/auto_sla_graph.png) no-repeat center !important; +} +input.auto_sla_graph_min[disabled] { + background: #fefefe url(../../images/auto_sla_graph.disabled.png) no-repeat center !important; +} input.binary_min { background: #fefefe url(../../images/binary.png) no-repeat center !important; } From 63d07e1416721e94baec3f2c590d4d2e049744a3 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Wed, 12 Jul 2017 13:34:20 +0200 Subject: [PATCH 041/142] Added more things to new vc item --- .../visual_console_builder.editor.js | 35 +++++++++- .../visual_console_builder.elements.php | 1 + .../ajax/visual_console_builder.ajax.php | 70 ++++++++++++++++++- 3 files changed, 104 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index 5b7b801f8b..fb28c0afb3 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -515,9 +515,10 @@ function readFields() { values['parent'] = $("select[name=parent]").val(); values['map_linked'] = $("select[name=map_linked]").val(); values['width_percentile'] = $("input[name=width_percentile]").val(); - values['max_percentile'] = $("input[name=max_percentile]").val(); + values['max_percentile'] = parseInt($("input[name=max_percentile]").val()); values['width_module_graph'] = $("input[name=width_module_graph]").val(); values['height_module_graph'] = $("input[name=height_module_graph]").val(); + values['event_max_time_row'] = $("select[name=event_max_time_row]").val(); values['type_percentile'] = $("input[name=type_percentile]:checked").val(); values['value_show'] = $("input[name=value_show]:checked").val(); values['enable_link'] = $("input[name=enable_link]").is(':checked') ? 1 : 0; @@ -587,6 +588,16 @@ function create_button_palette_callback() { validate = false; } break; + case 'auto_sla_graph': + if ((values['agent'] == '')) { + alert($("#message_alert_no_agent").html()); + validate = false; + } + if ((values['module'] == 0)) { + alert($("#message_alert_no_module").html()); + validate = false; + } + break; case 'label': if ((values['label'] == '')) { alert($("#message_alert_no_label").html()); @@ -1783,6 +1794,17 @@ function setPercentileBar(id_data, values) { }); } +function setEventsBar(id_data, values) { + metaconsole = $("input[name='metaconsole']").val(); + + var url_hack_metaconsole = ''; + if (is_metaconsole()) { + url_hack_metaconsole = '../../'; + } + + $("#image_" + id_data).attr('src', data); +} + function setPercentileBubble(id_data, values) { metaconsole = $("input[name='metaconsole']").val(); @@ -2094,6 +2116,17 @@ function createItem(type, values, id_data) { set_static_graph_status(id_data, values['image']); + break; + case 'auto_sla_graph': + var sizeStyle = ''; + var imageSize = ''; + item = $('
' + + '
' + values['label'] + '
' + + '' + + '
' + ); + + setEventsBar(id_data, values); break; case 'percentile_bar': case 'percentile_item': diff --git a/pandora_console/godmode/reporting/visual_console_builder.elements.php b/pandora_console/godmode/reporting/visual_console_builder.elements.php index 747a293de4..15134a9c1d 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.elements.php +++ b/pandora_console/godmode/reporting/visual_console_builder.elements.php @@ -470,6 +470,7 @@ foreach ($layoutDatas as $layoutData) { switch ($layoutData['type']) { case LINE_ITEM: case BOX_ITEM: + case AUTO_SLA_GRAPH: $table->data[$i + 2][4] = ""; break; default: diff --git a/pandora_console/include/ajax/visual_console_builder.ajax.php b/pandora_console/include/ajax/visual_console_builder.ajax.php index 2a786200ad..b096212b26 100755 --- a/pandora_console/include/ajax/visual_console_builder.ajax.php +++ b/pandora_console/include/ajax/visual_console_builder.ajax.php @@ -95,6 +95,7 @@ $top = get_parameter('top', null); $agent = get_parameter('agent', null); $id_module = get_parameter('module', null); $period = get_parameter('period', null); +$event_max_time_row = get_parameter('event_max_time_row', null); $width = get_parameter('width', null); $height = get_parameter('height', null); $parent = get_parameter('parent', null); @@ -139,7 +140,70 @@ switch ($action) { echo json_encode($return); break; - + case 'get_module_events': + $data = array (); + + $resolution = $config['graph_res'] * ($event_max_time_row * 2 / 450); // Number of "slices" we want in graph + + $interval = (int) ($event_max_time_row / $resolution); + $date = get_system_time (); + $datelimit = $date - $event_max_time_row; + $periodtime = floor ($event_max_time_row / $interval); + $time = array (); + $data = array (); + $legend = array(); + $full_legend = array(); + + $cont = 0; + for ($i = 0; $i < $interval; $i++) { + $bottom = $datelimit + ($periodtime * $i); + + $name = date('H:i', $bottom); + + // Show less values in legend + if ($cont == 0 or $cont % 2) + $legend[$cont] = $name; + + $full_legend[$cont] = $name; + + $top = $datelimit + ($periodtime * ($i + 1)); + $event = db_get_row_filter ('tevento', + array ('id_agente' => $id_agent, + 'id_agentmodule' => $id_module, + 'utimestamp > '.$bottom, + 'utimestamp < '.$top), 'criticity, utimestamp'); + + if (!empty($event['utimestamp'])) { + $data[$cont]['utimestamp'] = $periodtime; + switch ($event['criticity']) { + case EVENT_CRIT_WARNING: + $data[$cont]['data'] = 2; + break; + case EVENT_CRIT_CRITICAL: + $data[$cont]['data'] = 3; + break; + default: + $data[$cont]['data'] = 1; + break; + } + } + else { + $data[$cont]['utimestamp'] = $periodtime; + $data[$cont]['data'] = 1; + } + $cont++; + } + + $colors = array(1 => COL_NORMAL, 2 => COL_WARNING, 3 => COL_CRITICAL, 4 => COL_UNKNOWN); + + $out = flot_slicesbar_graph($data, $period, 450, 15, $full_legend, $colors, $config['fontpath'], $config['round_corner'], $homeurl, '', '', false, $id_agent); + html_debug($out, true); + if (!$out) { + $out = array(); + } + + echo json_encode($out); + break; case 'get_image_sparse': //Metaconsole db connection @@ -868,6 +932,10 @@ switch ($action) { } $values['period'] = $period; break; + case 'auto_sla_graph': + $values['type'] = AUTO_SLA_GRAPH; + $values['period'] = $event_max_time_row; + break; case 'percentile_item': case 'percentile_bar': if ($type_percentile == 'percentile') { From c9219107bf90e2443b8a612ea36ace5d318d4252 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Wed, 12 Jul 2017 18:49:39 +0200 Subject: [PATCH 042/142] Hold mark labels font size when autorefresh and fix drag map font size bug - #1115 --- pandora_console/include/functions_gis.php | 8 +++++++- .../include/javascript/openlayers.pandora.js | 20 +++++++++++++------ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/pandora_console/include/functions_gis.php b/pandora_console/include/functions_gis.php index cbd4b28b69..8f1a02f9f0 100644 --- a/pandora_console/include/functions_gis.php +++ b/pandora_console/include/functions_gis.php @@ -368,6 +368,7 @@ function gis_activate_ajax_refresh($layers = null, $lastTimeOfData = null, $publ } } } + EventZoomEnd(null,map.zoom); } }); } @@ -396,7 +397,7 @@ function gis_activate_ajax_refresh($layers = null, $lastTimeOfData = null, $publ } ?> } - + last_time_of_data = Math.round(new Date().getTime() / 1000); //Unixtimestamp //Test if the user change the refresh time. @@ -405,11 +406,16 @@ function gis_activate_ajax_refresh($layers = null, $lastTimeOfData = null, $publ idIntervalAjax = setInterval("clock_ajax_refresh()", refreshAjaxIntervalSeconds); oldRefreshAjaxIntervalSeconds = refreshAjaxIntervalSeconds; } + + EventZoomEnd(null,map.zoom); + + } $(document).ready ( function () { idIntervalAjax = setInterval("clock_ajax_refresh()", refreshAjaxIntervalSeconds); + EventZoomEnd(null,map.zoom); } ); diff --git a/pandora_console/include/javascript/openlayers.pandora.js b/pandora_console/include/javascript/openlayers.pandora.js index 56874514e4..d72db09699 100755 --- a/pandora_console/include/javascript/openlayers.pandora.js +++ b/pandora_console/include/javascript/openlayers.pandora.js @@ -138,6 +138,7 @@ function js_printMap(id_div, initial_zoom, center_latitude, center_longitude, ob var baseLayer = null; map.events.on({"zoomend": EventZoomEnd}); + map.events.on({"mouseup": EventZoomEnd}); //Define the maps layer for (var baselayerIndex in objBaseLayers) { @@ -224,10 +225,18 @@ function js_printMap(id_div, initial_zoom, center_latitude, center_longitude, ob .transform(map.displayProjection, map.getProjectionObject()); map.setCenter (lonLat, initial_zoom); + } -function EventZoomEnd (evt) { - var actual_zoom = (evt.object.zoom < 6) ? 6 : evt.object.zoom; +function EventZoomEnd (evt,zoom = map.zoom) { + if(evt == null){ + var actual_zoom = (zoom < 6) ? 6 : zoom; + } + else{ + var actual_zoom = (evt.object.zoom < 6) ? 6 : evt.object.zoom; + } + + var max_width_marker = 38; var max_zoom_map = map.numZoomLevels; var max_font_size = 15; @@ -236,11 +245,11 @@ function EventZoomEnd (evt) { jQuery.each($("tspan"), function (i, tspan) { if (actual_zoom <= 18 && actual_zoom > 13) - actual_font_size = (max_font_size - 3); + actual_font_size = (max_font_size + 5); else if (actual_zoom <= 13 && actual_zoom >= 8) - actual_font_size = (max_font_size - 6); + actual_font_size = (max_font_size); else if (actual_zoom <= 8) - actual_font_size = (max_font_size - 6); + actual_font_size = (max_font_size); $(tspan).css('font-size', actual_font_size); }); @@ -258,7 +267,6 @@ function EventZoomEnd (evt) { var new_width_marker = (actual_zoom * max_width_marker) / max_zoom_map; var new_height_marker = (actual_zoom * max_width_marker) / max_zoom_map; - console.log(feature); feature.style.fontSize = '' + actual_font_size + ' !important'; feature.style.graphicHeight = new_height_marker; feature.style.graphicWidth = new_width_marker; From b0c2a9e25c3773da013baa74254d3656c2a6a17f Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 13 Jul 2017 00:01:16 +0200 Subject: [PATCH 043/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 5a5e40940b..3d000685b6 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170712 +Version: 7.0NG.707-170713 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 f709c33a53..09aeee5f36 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.707-170712" +pandora_version="7.0NG.707-170713" 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 b3d9589d86..723d02b1d5 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170712'; +use constant AGENT_BUILD => '170713'; # 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 5f1424b747..f52ff8d321 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170712 +%define release 170713 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 2faa837177..b70910f18c 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170712 +%define release 170713 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 a553144ea0..08e221761c 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170712" +PI_BUILD="170713" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index f31d5a42ad..046d990beb 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170712} +{170713} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 216e27cd4c..cca1e7202b 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.707(Build 170712)") +#define PANDORA_VERSION ("7.0NG.707(Build 170713)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 64a9e83fb9..9e04222084 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.707(Build 170712))" + VALUE "ProductVersion", "(7.0NG.707(Build 170713))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 8ca248b60e..e25fa4e8a2 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170712 +Version: 7.0NG.707-170713 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 ad4ace1067..a0fb7b75c6 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.707-170712" +pandora_version="7.0NG.707-170713" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index cde5c668e4..eeca1080f1 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170712'; +$build_version = 'PC170713'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index bab75c60c6..61fe3443fc 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Thu, 13 Jul 2017 12:07:53 +0200 Subject: [PATCH 044/142] Update openlayers.pandora.js --- pandora_console/include/javascript/openlayers.pandora.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/javascript/openlayers.pandora.js b/pandora_console/include/javascript/openlayers.pandora.js index d72db09699..801ecf7bd5 100755 --- a/pandora_console/include/javascript/openlayers.pandora.js +++ b/pandora_console/include/javascript/openlayers.pandora.js @@ -245,11 +245,11 @@ function EventZoomEnd (evt,zoom = map.zoom) { jQuery.each($("tspan"), function (i, tspan) { if (actual_zoom <= 18 && actual_zoom > 13) - actual_font_size = (max_font_size + 5); + actual_font_size = (max_font_size - 3); else if (actual_zoom <= 13 && actual_zoom >= 8) - actual_font_size = (max_font_size); + actual_font_size = (max_font_size - 6); else if (actual_zoom <= 8) - actual_font_size = (max_font_size); + actual_font_size = (max_font_size - 6); $(tspan).css('font-size', actual_font_size); }); @@ -288,6 +288,7 @@ function EventZoomEnd (evt,zoom = map.zoom) { function changeShowStatus(newShowStatus) { statusShow = newShowStatus; hideAgentsStatus(); + EventZoomEnd(null,map.zoom); js_refreshParentLines(); } From 19caa3ebfbef1176fbe762246f8d78dfcd3417b3 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Thu, 13 Jul 2017 12:26:13 +0200 Subject: [PATCH 045/142] Added js image --- .../visual_console_builder.editor.js | 40 +++++++++- .../ajax/visual_console_builder.ajax.php | 76 ++++++------------- .../include/functions_visual_map_editor.php | 6 +- 3 files changed, 64 insertions(+), 58 deletions(-) diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index fb28c0afb3..f49ea8e58b 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -1795,14 +1795,46 @@ function setPercentileBar(id_data, values) { } function setEventsBar(id_data, values) { - metaconsole = $("input[name='metaconsole']").val(); - var url_hack_metaconsole = ''; if (is_metaconsole()) { url_hack_metaconsole = '../../'; } - $("#image_" + id_data).attr('src', data); + parameter = Array(); + + parameter.push ({name: "page", value: "include/ajax/visual_console_builder.ajax"}); + parameter.push ({name: "action", value: "get_module_events"}); + parameter.push ({name: "id_agent", value: values['id_agent']}); + parameter.push ({name: "id_agent_module", value: values['module']}); + if (is_metaconsole()) { + parameter.push ({name: "id_metaconsole", value: id_metaconsole}); + } + parameter.push ({name: "period", value: values['event_max_time_row']}); + parameter.push ({name: "id_visual_console", value: id_visual_console}); + jQuery.ajax({ + url: get_url_ajax(), + data: parameter, + type: "POST", + dataType: 'json', + success: function (data) { + console.log(data); + if (data['no_data'] == true) { + $("#" + id_data + " img").attr('src', url_hack_metaconsole + 'images/console/signes/module_graph.png'); + } + else { + $("#" + id_data + " img").attr('src', url_hack_metaconsole + 'images/console/signes/module_graph.png'); + + if($('#text-width').val() == 0 || $('#text-height').val() == 0){ + $("#" + id_data + " img").css('width', '300px'); + $("#" + id_data + " img").css('height', '180px'); + } + else{ + $("#" + id_data + " img").css('width', $('#text-width').val()+'px'); + $("#" + id_data + " img").css('height', $('#text-height').val()+'px'); + } + } + } + }); } function setPercentileBubble(id_data, values) { @@ -2123,7 +2155,7 @@ function createItem(type, values, id_data) { item = $('
' + '
' + values['label'] + '
' + '' + - '
' + '
' ); setEventsBar(id_data, values); diff --git a/pandora_console/include/ajax/visual_console_builder.ajax.php b/pandora_console/include/ajax/visual_console_builder.ajax.php index b096212b26..33f36b8c7a 100755 --- a/pandora_console/include/ajax/visual_console_builder.ajax.php +++ b/pandora_console/include/ajax/visual_console_builder.ajax.php @@ -143,66 +143,36 @@ switch ($action) { case 'get_module_events': $data = array (); - $resolution = $config['graph_res'] * ($event_max_time_row * 2 / 450); // Number of "slices" we want in graph - - $interval = (int) ($event_max_time_row / $resolution); $date = get_system_time (); $datelimit = $date - $event_max_time_row; - $periodtime = floor ($event_max_time_row / $interval); - $time = array (); - $data = array (); - $legend = array(); - $full_legend = array(); - $cont = 0; - for ($i = 0; $i < $interval; $i++) { - $bottom = $datelimit + ($periodtime * $i); - - $name = date('H:i', $bottom); - - // Show less values in legend - if ($cont == 0 or $cont % 2) - $legend[$cont] = $name; - - $full_legend[$cont] = $name; - - $top = $datelimit + ($periodtime * ($i + 1)); - $event = db_get_row_filter ('tevento', - array ('id_agente' => $id_agent, - 'id_agentmodule' => $id_module, - 'utimestamp > '.$bottom, - 'utimestamp < '.$top), 'criticity, utimestamp'); - - if (!empty($event['utimestamp'])) { - $data[$cont]['utimestamp'] = $periodtime; - switch ($event['criticity']) { - case EVENT_CRIT_WARNING: - $data[$cont]['data'] = 2; - break; - case EVENT_CRIT_CRITICAL: - $data[$cont]['data'] = 3; - break; - default: - $data[$cont]['data'] = 1; - break; + $events = db_get_row_filter ('tevento', + array ('id_agente' => $id_agent, + 'id_agentmodule' => $id_module, + 'utimestamp > ' . $datelimit, + 'utimestamp < ' . $date), 'criticity, utimestamp'); + html_debug($events, true); + + $return = array(); + if (!$events) { + $return['no_data'] = true; + if (!empty($id_metaconsole)) { + $connection = db_get_row_filter ('tmetaconsole_setup', + $id_metaconsole); + if (metaconsole_load_external_db($connection) != NOERR) { + continue; } } - else { - $data[$cont]['utimestamp'] = $periodtime; - $data[$cont]['data'] = 1; + $return['url'] = true; + if (!empty($id_metaconsole)) { + metaconsole_restore_db(); } - $cont++; + } + else { + $return['no_data'] = false; } - $colors = array(1 => COL_NORMAL, 2 => COL_WARNING, 3 => COL_CRITICAL, 4 => COL_UNKNOWN); - - $out = flot_slicesbar_graph($data, $period, 450, 15, $full_legend, $colors, $config['fontpath'], $config['round_corner'], $homeurl, '', '', false, $id_agent); - html_debug($out, true); - if (!$out) { - $out = array(); - } - - echo json_encode($out); + echo json_encode($return); break; case 'get_image_sparse': @@ -935,6 +905,8 @@ switch ($action) { case 'auto_sla_graph': $values['type'] = AUTO_SLA_GRAPH; $values['period'] = $event_max_time_row; + $values['width'] = $width; + $values['height'] = $height; break; case 'percentile_item': case 'percentile_bar': diff --git a/pandora_console/include/functions_visual_map_editor.php b/pandora_console/include/functions_visual_map_editor.php index 46aa26e287..5f8e43f3f6 100755 --- a/pandora_console/include/functions_visual_map_editor.php +++ b/pandora_console/include/functions_visual_map_editor.php @@ -510,7 +510,8 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { $form_items_advance['position_row'] = array(); $form_items_advance['position_row']['items'] = array('static_graph', 'percentile_bar', 'percentile_item', 'module_graph', - 'simple_value', 'label', 'icon', 'datos', 'box_item'); + 'simple_value', 'label', 'icon', 'datos', 'box_item', + 'auto_sla_graph'); $form_items_advance['position_row']['html'] = ' ' . __('Position') . ' (' . html_print_input_text('left', '0', '', 3, 5, true) . @@ -521,7 +522,8 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { $form_items_advance['size_row'] = array(); $form_items_advance['size_row']['items'] = array( 'group_item', 'background', - 'static_graph', 'icon datos'); + 'static_graph', 'icon datos', + 'auto_sla_graph'); $form_items_advance['size_row']['html'] = '' . __('Size') . ui_print_help_tip ( From 8f2b4fb78315737c936d706a78ed45daeeb964dc Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Thu, 13 Jul 2017 13:25:28 +0200 Subject: [PATCH 046/142] Added more changes to the first version --- .../visual_console_builder.editor.js | 1 - .../ajax/visual_console_builder.ajax.php | 1 - pandora_console/include/functions_graph.php | 19 +++-- .../include/functions_visual_map.php | 80 +++++++++++++++++-- 4 files changed, 89 insertions(+), 12 deletions(-) diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index f49ea8e58b..889d1d461b 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -1817,7 +1817,6 @@ function setEventsBar(id_data, values) { type: "POST", dataType: 'json', success: function (data) { - console.log(data); if (data['no_data'] == true) { $("#" + id_data + " img").attr('src', url_hack_metaconsole + 'images/console/signes/module_graph.png'); } diff --git a/pandora_console/include/ajax/visual_console_builder.ajax.php b/pandora_console/include/ajax/visual_console_builder.ajax.php index 33f36b8c7a..e7f423732f 100755 --- a/pandora_console/include/ajax/visual_console_builder.ajax.php +++ b/pandora_console/include/ajax/visual_console_builder.ajax.php @@ -151,7 +151,6 @@ switch ($action) { 'id_agentmodule' => $id_module, 'utimestamp > ' . $datelimit, 'utimestamp < ' . $date), 'criticity, utimestamp'); - html_debug($events, true); $return = array(); if (!$events) { diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index d3845a51eb..ec3b2d7477 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -3565,7 +3565,7 @@ function graph_custom_sql_graph ($id, $width, $height, * @param string homeurl * @param bool return or echo the result */ -function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $homeurl, $return = false) { +function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $homeurl, $return = false, $id_module = 0) { global $config; global $graphic_type; @@ -3605,10 +3605,19 @@ function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $ho $full_legend[$cont] = $name; $top = $datelimit + ($periodtime * ($i + 1)); - $event = db_get_row_filter ('tevento', - array ('id_agente' => $id_agent, - 'utimestamp > '.$bottom, - 'utimestamp < '.$top), 'criticity, utimestamp'); + if ($id_module != 0) { + $event = db_get_row_filter ('tevento', + array ('id_agente' => $id_agent, + 'utimestamp > '.$bottom, + 'utimestamp < '.$top), 'criticity, utimestamp'); + } + else { + $event = db_get_row_filter ('tevento', + array ('id_agente' => $id_agent, + 'id_agentmodule' => $id_module, + 'utimestamp > '.$bottom, + 'utimestamp < '.$top), 'criticity, utimestamp'); + } if (!empty($event['utimestamp'])) { $data[$cont]['utimestamp'] = $periodtime; diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index a92ce3f731..fd81e15d6d 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -376,6 +376,9 @@ function visual_map_print_item($mode = "read", $layoutData, $link = true; } + break; + case AUTO_SLA_GRAPH: + $link = true; break; default: if (!empty($element_enterprise)) { @@ -391,7 +394,6 @@ function visual_map_print_item($mode = "read", $layoutData, $is_a_service = false; $is_a_link_to_other_visualconsole = false; - if (enterprise_installed()) { $id_service = services_service_from_module ($layoutData['id_agente_modulo']); @@ -404,9 +406,6 @@ function visual_map_print_item($mode = "read", $layoutData, $is_a_link_to_other_visualconsole = true; } - - - if ($is_a_service) { if (empty($layoutData['id_metaconsole'])) { $url = $config['homeurl'] . @@ -458,6 +457,36 @@ function visual_map_print_item($mode = "read", $layoutData, } + break; + case AUTO_SLA_GRAPH: + $e_period = $layoutData['period']; + $date = get_system_time (); + $datelimit = $date - $e_period; + + $time_format = "Y/m/d H:i:s"; + + $timestamp_init = date($time_format, $datelimit); + $timestamp_end = date($time_format, $date); + + $timestamp_init_aux = explode(" ", $timestamp_init); + $timestamp_end_aux = explode(" ", $timestamp_end); + + $date_from = $timestamp_init_aux[0]; + $time_from = $timestamp_init_aux[1]; + + $date_to = $timestamp_end_aux[0]; + $time_to = $timestamp_end_aux[1]; + + if (empty($layout_data['id_metaconsole'])) { + $url = $config['homeurl'] . "index.php?sec=eventos&sec2=operation/events/events&id_agent=" . $layoutData['id_agent'] . + "&module_search_hidden=" . $layoutData['id_agente_modulo'] . "&date_from=" . $date_from . "&time_from=" . $time_from . + "&date_to=" . $date_to . "&time_to=" . $time_to . "&status=-1"; + } + else { + $url = "index.php?sec=eventos&sec2=operation/events/events&id_agent=" . $layoutData['id_agent'] . + "&module_search_hidden=" . $layoutData['id_agente_modulo'] . "&date_from=" . $date_from . "&time_from=" . $time_from . + "&date_to=" . $date_to . "&time_to=" . $time_to . "&status=-1"; + } break; case GROUP_ITEM: $is_a_link_to_other_visualconsole = false; @@ -1046,13 +1075,51 @@ function visual_map_print_item($mode = "read", $layoutData, case BOX_ITEM: $z_index = 1; break; + case AUTO_SLA_GRAPH: + if ((get_parameter('action') == 'edit') || (get_parameter('operation') == 'edit_visualmap')) { + if($width == 0 || $height == 0){ + if ($layoutData['id_metaconsole'] != 0) { + $img = ''; + } + else{ + $img = ''; + } + } + else{ + if ($layoutData['id_metaconsole'] != 0) { + $img = ''; + } + else{ + $img = ''; + } + } + } + else { + if ($width == 0 || $height == 0) { + $img = graph_graphic_agentevents ($layoutData['id_agent'], 500, 50, $layoutData['period'], '', true, $layoutData['id_agente_modulo']); + } + else{ + $img = graph_graphic_agentevents ($layoutData['id_agent'], $width, $height, $layoutData['period'], '', true, $layoutData['id_agente_modulo']); + } + } + + //Restore db connection + if ($layoutData['id_metaconsole'] != 0) { + metaconsole_restore_db(); + } + + $z_index = 2 + 1; + break; } - + html_debug(get_parameter('action'), true); $class = "item "; switch ($type) { case STATIC_GRAPH: $class .= "static_graph"; break; + case AUTO_SLA_GRAPH: + $class .= "auto_sla_graph"; + break; case GROUP_ITEM: $class .= "group_item"; break; @@ -1386,6 +1453,9 @@ function visual_map_print_item($mode = "read", $layoutData, echo io_safe_output($text); } break; + case AUTO_SLA_GRAPH: + echo $img; + break; case SIMPLE_VALUE: case SIMPLE_VALUE_MAX: case SIMPLE_VALUE_MIN: From d57508f09e564f83031b4e78e6b0f4abc90ea521 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Thu, 13 Jul 2017 16:23:16 +0200 Subject: [PATCH 047/142] Added sla_auto_graph item to vc first version --- .../visual_console_builder.editor.js | 267 ++++++++++-------- .../ajax/visual_console_builder.ajax.php | 21 +- .../include/functions_visual_map.php | 81 +++--- .../include/functions_visual_map_editor.php | 6 +- .../include/graphs/flot/pandora.flot.js | 108 ++++--- 5 files changed, 277 insertions(+), 206 deletions(-) diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index 889d1d461b..58c7490618 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -231,14 +231,14 @@ function update_button_palette_callback() { break; case 'box_item': - if($('input[name=width_box]').val() == ''){ - alert('Undefined width'); - return false; - } - if($('input[name=height_box]').val() == ''){ - alert('Undefined height'); - return false; - } + if($('input[name=width_box]').val() == ''){ + alert('Undefined width'); + return false; + } + if($('input[name=height_box]').val() == ''){ + alert('Undefined height'); + return false; + } $("#" + idItem + " div").css('background-color', values['fill_color']); $("#" + idItem + " div").css('border-color', values['border_color']); @@ -256,55 +256,53 @@ function update_button_palette_callback() { case 'group_item': case 'static_graph': - if($('input[name=width]').val() == ''){ - alert('Undefined width'); - return false; - } - if($('input[name=height]').val() == ''){ - alert('Undefined height'); - return false; - } - - $("#text_" + idItem).html(values['label']); - if ((values['width'] == 0) || (values['height'] == 0)) { - if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){ - $("#image_" + idItem).removeAttr('width'); - $("#image_" + idItem).removeAttr('height'); - $("#image_" + idItem).attr('width', 70); - $("#image_" + idItem).attr('height', 70); - $("#image_" + idItem).css('width', '70px'); - $("#image_" + idItem).css('height', '70px'); + if($('input[name=width]').val() == ''){ + alert('Undefined width'); + return false; } - else{ + if($('input[name=height]').val() == ''){ + alert('Undefined height'); + return false; + } + + $("#text_" + idItem).html(values['label']); + if ((values['width'] == 0) || (values['height'] == 0)) { + if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){ + $("#image_" + idItem).removeAttr('width'); + $("#image_" + idItem).removeAttr('height'); + $("#image_" + idItem).attr('width', 70); + $("#image_" + idItem).attr('height', 70); + $("#image_" + idItem).css('width', '70px'); + $("#image_" + idItem).css('height', '70px'); + } + else{ + $("#image_" + idItem).removeAttr('width'); + $("#image_" + idItem).removeAttr('height'); + $("#image_" + idItem).attr('width', $('#preview > img')[0].naturalHeight); + $("#image_" + idItem).attr('height', $('#preview > img')[0].naturalHeight); + $("#image_" + idItem).css('width', $('#preview > img')[0].naturalHeight+'px'); + $("#image_" + idItem).css('height', $('#preview > img')[0].naturalHeight+'px'); + } + } + else { $("#image_" + idItem).removeAttr('width'); $("#image_" + idItem).removeAttr('height'); - $("#image_" + idItem).attr('width', $('#preview > img')[0].naturalHeight); - $("#image_" + idItem).attr('height', $('#preview > img')[0].naturalHeight); - $("#image_" + idItem).css('width', $('#preview > img')[0].naturalHeight+'px'); - $("#image_" + idItem).css('height', $('#preview > img')[0].naturalHeight+'px'); - } - } - else { - $("#image_" + idItem).removeAttr('width'); - $("#image_" + idItem).removeAttr('height'); - $("#image_" + idItem).attr('width', values['width']); - $("#image_" + idItem).attr('height', values['height']); - $("#image_" + idItem).css('width', values['width'] + 'px'); - $("#image_" + idItem).css('height', values['height'] + 'px'); - } + $("#image_" + idItem).attr('width', values['width']); + $("#image_" + idItem).attr('height', values['height']); + $("#image_" + idItem).css('width', values['width'] + 'px'); + $("#image_" + idItem).css('height', values['height'] + 'px'); + } break; case 'percentile_bar': case 'percentile_item': - - if($('input[name=width_percentile]').val() == ''){ - alert('Undefined width'); - return false; - } - if($('input[name=height_percentile]').val() == ''){ - alert('Undefined height'); - return false; - } - + if($('input[name=width_percentile]').val() == ''){ + alert('Undefined width'); + return false; + } + if($('input[name=height_percentile]').val() == ''){ + alert('Undefined height'); + return false; + } $("#text_" + idItem).html(values['label']); $("#image_" + idItem).attr("src", "images/spinner.gif"); @@ -315,50 +313,57 @@ function update_button_palette_callback() { setPercentileBar(idItem, values); } - - break; case 'module_graph': - - - if($('#dir_items').html() == 'horizontal'){ - if(parseInt($('#text-left').val()) + (parseInt($('input[name=height_module_graph]').val() * $('#count_items').html())) > parseInt($('#background').css('width')) - || parseInt($('#text-left').val()) + (parseInt($('input[name=width_module_graph]').val() * $('#count_items').html())) > parseInt($('#background').css('width'))){ - - alert($('#count_items').html()+' joined graph items are wider than background'); - return false; - + if($('#dir_items').html() == 'horizontal'){ + if(parseInt($('#text-left').val()) + (parseInt($('input[name=height_module_graph]').val() * $('#count_items').html())) > parseInt($('#background').css('width')) + || parseInt($('#text-left').val()) + (parseInt($('input[name=width_module_graph]').val() * $('#count_items').html())) > parseInt($('#background').css('width'))){ + + alert($('#count_items').html()+' joined graph items are wider than background'); + return false; + + } } - } - - if($('#dir_items').html() == 'vertical'){ - if(parseInt($('#text-top').val()) + (parseInt($('input[name=height_module_graph]').val() * $('#count_items').html())) > parseInt($('#background').css('height'))){ - alert($('#count_items').html()+' joined graph items are higher than background'); - return false; - + + if($('#dir_items').html() == 'vertical'){ + if(parseInt($('#text-top').val()) + (parseInt($('input[name=height_module_graph]').val() * $('#count_items').html())) > parseInt($('#background').css('height'))){ + alert($('#count_items').html()+' joined graph items are higher than background'); + return false; + + } } - } - - - if($('input[name=width_module_graph]').val() == ''){ - alert('Undefined width'); - return false; - } - if($('input[name=height_module_graph]').val() == ''){ - alert('Undefined height'); - return false; - } - if($('#custom_graph_row').css('display') != 'none' && $("#custom_graph option:selected").html() == 'None'){ + + if($('input[name=width_module_graph]').val() == ''){ + alert('Undefined width'); + return false; + } + if($('input[name=height_module_graph]').val() == ''){ + alert('Undefined height'); + return false; + } + if($('#custom_graph_row').css('display') != 'none' && $("#custom_graph option:selected").html() == 'None'){ alert('Undefined graph'); - return false; - } - - + return false; + } $("#text_" + idItem).html(values['label']); $("#image_" + idItem).attr("src", "images/spinner.gif"); setModuleGraph(idItem); break; + case 'auto_sla_graph': + if($('input[name=width]').val() == ''){ + alert('Undefined width'); + return false; + } + if($('input[name=height]').val() == ''){ + alert('Undefined height'); + return false; + } + $("#text_" + idItem).html(values['label']); + $("#image_" + idItem).attr("src", "images/spinner.gif"); + + setEventsBar(idItem, values); + break; case 'simple_value': $("#text_" + idItem).html(values['label']); //$("#simplevalue_" + idItem) @@ -369,42 +374,41 @@ function update_button_palette_callback() { $("#text_" + idItem).html(values['label']); break; case 'icon': - - if($('input[name=width]').val() == ''){ - alert('Undefined width'); - return false; - } - if($('input[name=height]').val() == ''){ - alert('Undefined height'); - return false; - } - $("#image_" + idItem).attr('src', "images/spinner.gif"); - if ((values['width'] == 0) || (values['height'] == 0)) { - if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){ + if($('input[name=width]').val() == ''){ + alert('Undefined width'); + return false; + } + if($('input[name=height]').val() == ''){ + alert('Undefined height'); + return false; + } + $("#image_" + idItem).attr('src', "images/spinner.gif"); + if ((values['width'] == 0) || (values['height'] == 0)) { + if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){ + $("#image_" + idItem).removeAttr('width'); + $("#image_" + idItem).removeAttr('height'); + $("#image_" + idItem).attr('width', 70); + $("#image_" + idItem).attr('height', 70); + $("#image_" + idItem).css('width', '70px'); + $("#image_" + idItem).css('height', '70px'); + } + else{ + $("#image_" + idItem).removeAttr('width'); + $("#image_" + idItem).removeAttr('height'); + $("#image_" + idItem).attr('width', $('#preview > img')[0].naturalHeight); + $("#image_" + idItem).attr('height', $('#preview > img')[0].naturalHeight); + $("#image_" + idItem).css('width', $('#preview > img')[0].naturalHeight+'px'); + $("#image_" + idItem).css('height', $('#preview > img')[0].naturalHeight+'px'); + } + } + else { $("#image_" + idItem).removeAttr('width'); $("#image_" + idItem).removeAttr('height'); - $("#image_" + idItem).attr('width', 70); - $("#image_" + idItem).attr('height', 70); - $("#image_" + idItem).css('width', '70px'); - $("#image_" + idItem).css('height', '70px'); - } - else{ - $("#image_" + idItem).removeAttr('width'); - $("#image_" + idItem).removeAttr('height'); - $("#image_" + idItem).attr('width', $('#preview > img')[0].naturalHeight); - $("#image_" + idItem).attr('height', $('#preview > img')[0].naturalHeight); - $("#image_" + idItem).css('width', $('#preview > img')[0].naturalHeight+'px'); - $("#image_" + idItem).css('height', $('#preview > img')[0].naturalHeight+'px'); - } - } - else { - $("#image_" + idItem).removeAttr('width'); - $("#image_" + idItem).removeAttr('height'); - $("#image_" + idItem).attr('width', values['width']); - $("#image_" + idItem).attr('height', values['height']); - $("#image_" + idItem).css('width', values['width'] + 'px'); - $("#image_" + idItem).css('height', values['height'] + 'px'); - } + $("#image_" + idItem).attr('width', values['width']); + $("#image_" + idItem).attr('height', values['height']); + $("#image_" + idItem).css('width', values['width'] + 'px'); + $("#image_" + idItem).css('height', values['height'] + 'px'); + } var image = values['image'] + ".png"; set_image("image", idItem, image); break; @@ -872,6 +876,7 @@ function toggle_item_palette() { activeToolboxButton('group_item', true); activeToolboxButton('box_item', true); activeToolboxButton('line_item', true); + activeToolboxButton('auto_sla_graph', true); if (typeof(enterprise_activeToolboxButton) == 'function') { enterprise_activeToolboxButton(true); @@ -891,6 +896,7 @@ function toggle_item_palette() { activeToolboxButton('static_graph', false); activeToolboxButton('module_graph', false); + activeToolboxButton('auto_sla_graph', false); activeToolboxButton('simple_value', false); activeToolboxButton('label', false); activeToolboxButton('icon', false); @@ -1023,6 +1029,8 @@ function loadFieldsFromDB(item) { fill_parent_select(idItem); jQuery.each(data, function(key, val) { + if (key == 'event_max_time_row') + $("select[name=event_max_time_row]").val(val); if (key == 'background') $("#background_image").val(val); if (key == 'width') $("input[name=width]").val(val); @@ -2478,13 +2486,13 @@ function updateDB_visual(type, idElement , values, event, top, left) { set_static_graph_status(idElement, values['image']); } + break; case 'percentile_item': case 'simple_value': case 'label': case 'icon': case 'module_graph': - - + case 'auto_sla_graph': if (type == 'simple_value') { setModuleValue(idElement, values.process_simple_value, @@ -2708,8 +2716,6 @@ function updateDB(type, idElement , values, event) { function copyDB(idItem) { metaconsole = $("input[name='metaconsole']").val(); - - parameter = Array(); parameter.push ({name: "page", value: "include/ajax/visual_console_builder.ajax"}); parameter.push ({name: "action", value: "copy"}); @@ -2880,6 +2886,15 @@ function eventsItems(drag) { activeToolboxButton('delete_item', true); activeToolboxButton('show_grid', false); } + if ($(divParent).hasClass('auto_sla_graph')) { + creationItem = null; + selectedItem = 'auto_sla_graph'; + idItem = $(divParent).attr('id'); + activeToolboxButton('copy_item', true); + activeToolboxButton('edit_item', true); + activeToolboxButton('delete_item', true); + activeToolboxButton('show_grid', false); + } if ($(divParent).hasClass('group_item')) { creationItem = null; selectedItem = 'group_item'; @@ -2987,6 +3002,9 @@ function eventsItems(drag) { if ($(event.target).hasClass('static_graph')) { selectedItem = 'static_graph'; } + if ($(event.target).hasClass('auto_sla_graph')) { + selectedItem = 'auto_sla_graph'; + } if ($(event.target).hasClass('group_item')) { selectedItem = 'group_item'; } @@ -3344,7 +3362,7 @@ function click_button_toolbox(id) { activeToolboxButton('icon', false); activeToolboxButton('service', false); activeToolboxButton('group_item', false); - + activeToolboxButton('auto_sla_graph', false); activeToolboxButton('copy_item', false); activeToolboxButton('edit_item', false); activeToolboxButton('delete_item', false); @@ -3374,6 +3392,7 @@ function click_button_toolbox(id) { activeToolboxButton('label', true); activeToolboxButton('icon', true); activeToolboxButton('group_item', true); + activeToolboxButton('auto_sla_graph', true); } break; case 'save_visualmap': diff --git a/pandora_console/include/ajax/visual_console_builder.ajax.php b/pandora_console/include/ajax/visual_console_builder.ajax.php index e7f423732f..9738d9150d 100755 --- a/pandora_console/include/ajax/visual_console_builder.ajax.php +++ b/pandora_console/include/ajax/visual_console_builder.ajax.php @@ -456,12 +456,14 @@ switch ($action) { $process_simple_value); $values['period'] = $period; } + break; case 'percentile_bar': case 'percentile_item': case 'static_graph': case 'module_graph': case 'label': case 'icon': + case 'auto_sla_graph': default: if ($type == 'label') { $values['type'] = LABEL; @@ -536,6 +538,18 @@ switch ($action) { $values['border_color'] = $line_color; break; // ------------------------------------------------- + case 'auto_sla_graph': + $values['type'] = AUTO_SLA_GRAPH; + if ($event_max_time_row !== null) { + $values['period'] = $event_max_time_row; + } + if ($width !== null) { + $values['width'] = $width; + } + if ($height !== null) { + $values['height'] = $height; + } + break; case 'box_item': $values['border_width'] = $border_width; $values['border_color'] = $border_color; @@ -654,7 +668,7 @@ switch ($action) { if (($item_in_db['parent_item'] == 0) && ($values['parent_item'] != 0)) { $new_line = 1; } - + $result = db_process_sql_update('tlayout_data', $values, array('id' => $id_element)); @@ -691,6 +705,7 @@ switch ($action) { case 'simple_value': case 'label': case 'icon': + case 'auto_sla_graph': $elementFields = db_get_row_filter('tlayout_data', array('id' => $id_element)); @@ -742,6 +757,8 @@ switch ($action) { } switch ($type) { + case 'auto_sla_graph': + $elementFields['event_max_time_row'] = $elementFields['period']; case 'percentile_item': case 'percentile_bar': $elementFields['width_percentile'] = $elementFields['width']; @@ -1022,8 +1039,6 @@ switch ($action) { echo json_encode($return); break; - - case 'delete': if (db_process_sql_delete('tlayout_data', array('id' => $id_element, 'id_layout' => $id_visual_console)) === false) { $return['correct'] = 0; diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index fd81e15d6d..8bed46cbcc 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -156,6 +156,7 @@ function visual_map_print_item($mode = "read", $layoutData, $wimg ='70'; break; case 3: + case 14: if (get_parameter('action') == 'edit') { $himg = '30'; $wimg = '150'; @@ -1066,8 +1067,6 @@ function visual_map_print_item($mode = "read", $layoutData, metaconsole_restore_db(); } - //$img = str_replace('>', 'class="image" id="image_' . $id . '" />', $img); - break; case LABEL: $z_index = 4 + 1; @@ -1096,10 +1095,30 @@ function visual_map_print_item($mode = "read", $layoutData, } else { if ($width == 0 || $height == 0) { - $img = graph_graphic_agentevents ($layoutData['id_agent'], 500, 50, $layoutData['period'], '', true, $layoutData['id_agente_modulo']); + if ($layoutData['label_position']=='left') { + $img = '
' . + $img = graph_graphic_agentevents ($layoutData['id_agent'], 500, 50, $layoutData['period'], '', true, $layoutData['id_agente_modulo']); + } + elseif ($layoutData['label_position']=='right') { + $img = '
' . + $img = graph_graphic_agentevents ($layoutData['id_agent'], 500, 50, $layoutData['period'], '', true, $layoutData['id_agente_modulo']); + } + else { + $img = graph_graphic_agentevents ($layoutData['id_agent'], 500, 50, $layoutData['period'], '', true, $layoutData['id_agente_modulo']); + } } else{ - $img = graph_graphic_agentevents ($layoutData['id_agent'], $width, $height, $layoutData['period'], '', true, $layoutData['id_agente_modulo']); + if ($layoutData['label_position']=='left') { + $img = '
' . + $img = graph_graphic_agentevents ($layoutData['id_agent'], $width, $height, $layoutData['period'], '', true, $layoutData['id_agente_modulo']); + } + elseif ($layoutData['label_position']=='right') { + $img = '
' . + $img = graph_graphic_agentevents ($layoutData['id_agent'], $width, $height, $layoutData['period'], '', true, $layoutData['id_agente_modulo']); + } + else { + $img = graph_graphic_agentevents ($layoutData['id_agent'], $width, $height, $layoutData['period'], '', true, $layoutData['id_agente_modulo']); + } } } @@ -1111,7 +1130,7 @@ function visual_map_print_item($mode = "read", $layoutData, $z_index = 2 + 1; break; } - html_debug(get_parameter('action'), true); + $class = "item "; switch ($type) { case STATIC_GRAPH: @@ -1454,7 +1473,18 @@ function visual_map_print_item($mode = "read", $layoutData, } break; case AUTO_SLA_GRAPH: + if ($layoutData['label_position']=='up') { + echo io_safe_output($text); + } + echo $img; + + if ($layoutData['label_position']=='down') { + echo io_safe_output($text); + } + elseif($layoutData['label_position']=='left' || $layoutData['label_position']=='right') { + echo io_safe_output($text); + } break; case SIMPLE_VALUE: case SIMPLE_VALUE_MAX: @@ -1484,42 +1514,12 @@ function visual_map_print_item($mode = "read", $layoutData, $layoutData['id_agente_modulo'], $period); global $config; - - if ($type == SIMPLE_VALUE) { - //~ $returnValue_value = explode(' ', $value); - - //~ if ($returnValue_value[1] != "") { - //~ $value = remove_right_zeros(number_format($returnValue_value[0], $config['graph_precision'])) . " " . $returnValue_value[1]; - //~ } - //~ else { - //~ $value = remove_right_zeros(number_format($returnValue_value[0], $config['graph_precision'])); - //~ } - - } - else { - // If the value is a string, dont format it - if (!is_string($value)) { - //~ $value = remove_right_zeros(format_for_graph($value, $config['graph_precision'])); - } - } - - //$io_safe_output_text = str_replace(array('_VALUE_','_value_'), $value, $io_safe_output_text); - - - if(get_parameter('action') == 'edit'){ - - //echo 'Data value'; - - echo $io_safe_output_text; - - } + echo $io_safe_output_text; + } else{ - - echo str_replace(array('_VALUE_','_value_'), $value, $io_safe_output_text); - - } - + echo str_replace(array('_VALUE_','_value_'), $value, $io_safe_output_text); + } //Restore db connection if ($layoutData['id_metaconsole'] != 0) { @@ -2931,6 +2931,9 @@ function visual_map_type_in_js($type) { case MODULE_GRAPH: return 'module_graph'; break; + case AUTO_SLA_GRAPH: + return 'auto_sla_graph'; + break; case SIMPLE_VALUE: return 'simple_value'; break; diff --git a/pandora_console/include/functions_visual_map_editor.php b/pandora_console/include/functions_visual_map_editor.php index 5f8e43f3f6..a97055c8f3 100755 --- a/pandora_console/include/functions_visual_map_editor.php +++ b/pandora_console/include/functions_visual_map_editor.php @@ -154,7 +154,6 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { html_print_input_text('height_module_graph', 180, '', 3, 5, true) . ''; - $form_items['label_row'] = array(); $form_items['label_row']['items'] = array('label', 'static_graph', @@ -163,7 +162,8 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { 'module_graph', 'simple_value', 'datos', - 'group_item'); + 'group_item', + 'auto_sla_graph'); $form_items['label_row']['html'] = '' . __('Label') . ' @@ -540,7 +540,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { $form_items_advance['parent_row']['items'] = array( 'group_item', 'static_graph', 'percentile_bar', 'percentile_item', 'module_graph', - 'simple_value', 'label', 'icon', 'datos'); + 'simple_value', 'label', 'icon', 'datos', 'auto_sla_graph'); $form_items_advance['parent_row']['html'] = '' . __('Parent') . ' ' . diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 5595b93f5b..7e2950f806 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -635,7 +635,11 @@ function pandoraFlotSlicebar(graph_id, values, datacolor, labels, legend, acumul var stack = 0, bars = true, lines = false, steps = false; - var options = { + var regex = /visual_console/; + var match = regex.exec(window.location.href); + + if (match == null) { + var options = { series: { stack: stack, shadowSize: 0.1, @@ -662,51 +666,81 @@ function pandoraFlotSlicebar(graph_id, values, datacolor, labels, legend, acumul show: false } }; + } + else { + var options = { + series: { + stack: stack, + shadowSize: 0.1, + color: '#ddd' + }, + grid: { + hoverable: false, + clickable: false, + borderWidth:1, + borderColor: '', + tickColor: '#fff' + }, + xaxes: [ { + tickFormatter: xFormatter, + color: '', + tickSize: intervaltick, + tickLength: 0 + } ], + yaxes: [ { + show: false, + tickLength: 0 + }], + legend: { + show: false + } + }; + } var plot = $.plot($('#'+graph_id), datas, options ); - // Events - $('#'+graph_id).bind('plothover', function (event, pos, item) { - if (item) { - var from = legend[item.seriesIndex]; - var to = legend[item.seriesIndex+1]; + if (match == null) { + // Events + $('#'+graph_id).bind('plothover', function (event, pos, item) { + if (item) { + var from = legend[item.seriesIndex]; + var to = legend[item.seriesIndex+1]; - if (to == undefined) { - to = '>'; + if (to == undefined) { + to = '>'; + } + + $('#extra_'+graph_id).text(from+'-'+to); + var extra_height = parseInt($('#extra_'+graph_id).css('height').split('px')[0]); + var extra_width = parseInt($('#extra_'+graph_id).css('width').split('px')[0]); + $('#extra_'+graph_id).css('left',pos.pageX-(extra_width/4)+'px'); + //$('#extra_'+graph_id).css('top',plot.offset().top-extra_height-5+'px'); + $('#extra_'+graph_id).show(); } + }); - $('#extra_'+graph_id).text(from+'-'+to); - var extra_height = parseInt($('#extra_'+graph_id).css('height').split('px')[0]); - var extra_width = parseInt($('#extra_'+graph_id).css('width').split('px')[0]); - $('#extra_'+graph_id).css('left',pos.pageX-(extra_width/4)+'px'); - //$('#extra_'+graph_id).css('top',plot.offset().top-extra_height-5+'px'); - $('#extra_'+graph_id).show(); - } - }); + $('#'+graph_id).bind('plotclick', function(event, pos, item) { + if (item) { + //from time + var from = legend[item.seriesIndex]; + //to time + var to = legend[item.seriesIndex+1]; + //current date + var dateObj = new Date(); + var month = dateObj.getUTCMonth() + 1; //months from 1-12 + var day = dateObj.getUTCDate(); + var year = dateObj.getUTCFullYear(); + newdate = year + "/" + month + "/" + day; - $('#'+graph_id).bind('plotclick', function(event, pos, item) { - if (item) { - //from time - var from = legend[item.seriesIndex]; - //to time - var to = legend[item.seriesIndex+1]; - //current date - var dateObj = new Date(); - var month = dateObj.getUTCMonth() + 1; //months from 1-12 - var day = dateObj.getUTCDate(); - var year = dateObj.getUTCFullYear(); - newdate = year + "/" + month + "/" + day; - - if(!to){ - to= '23:59'; + if(!to){ + to= '23:59'; + } + window.location='index.php?sec=eventos&sec2=operation/events/events&id_agent='+id_agent+'&date_from='+newdate+'&time_from='+from+'&date_to='+newdate+'&time_to='+to+'&status=-1'; } - window.location='index.php?sec=eventos&sec2=operation/events/events&id_agent='+id_agent+'&date_from='+newdate+'&time_from='+from+'&date_to='+newdate+'&time_to='+to+'&status=-1'; - } - }); + }); - - - $('#'+graph_id).bind('mouseout',resetInteractivity); + $('#'+graph_id).bind('mouseout',resetInteractivity); + } // Reset interactivity styles function resetInteractivity() { From b4c31df636275903e4562aa07801a09b6aaacb26 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Thu, 13 Jul 2017 16:57:53 +0200 Subject: [PATCH 048/142] Fixed module events graph in vc --- pandora_console/include/functions_graph.php | 115 ++++++++++++++++-- .../include/functions_visual_map.php | 12 +- 2 files changed, 110 insertions(+), 17 deletions(-) diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index ec3b2d7477..aff6ce4c7c 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -3565,7 +3565,7 @@ function graph_custom_sql_graph ($id, $width, $height, * @param string homeurl * @param bool return or echo the result */ -function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $homeurl, $return = false, $id_module = 0) { +function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $homeurl, $return = false) { global $config; global $graphic_type; @@ -3605,20 +3605,113 @@ function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $ho $full_legend[$cont] = $name; $top = $datelimit + ($periodtime * ($i + 1)); - if ($id_module != 0) { - $event = db_get_row_filter ('tevento', - array ('id_agente' => $id_agent, - 'utimestamp > '.$bottom, - 'utimestamp < '.$top), 'criticity, utimestamp'); + $event = db_get_row_filter ('tevento', + array ('id_agente' => $id_agent, + 'utimestamp > '.$bottom, + 'utimestamp < '.$top), 'criticity, utimestamp'); + + if (!empty($event['utimestamp'])) { + $data[$cont]['utimestamp'] = $periodtime; + switch ($event['criticity']) { + case EVENT_CRIT_WARNING: + $data[$cont]['data'] = 2; + break; + case EVENT_CRIT_CRITICAL: + $data[$cont]['data'] = 3; + break; + default: + $data[$cont]['data'] = 1; + break; + } } else { - $event = db_get_row_filter ('tevento', - array ('id_agente' => $id_agent, - 'id_agentmodule' => $id_module, - 'utimestamp > '.$bottom, - 'utimestamp < '.$top), 'criticity, utimestamp'); + $data[$cont]['utimestamp'] = $periodtime; + $data[$cont]['data'] = 1; + } + $cont++; + } + + $colors = array(1 => COL_NORMAL, 2 => COL_WARNING, 3 => COL_CRITICAL, 4 => COL_UNKNOWN); + + // Draw slicebar graph + if ($config['flash_charts']) { + $out = flot_slicesbar_graph($data, $period, $width, $height, $full_legend, $colors, $config['fontpath'], $config['round_corner'], $homeurl, '', '', false, $id_agent); + } + else { + $out = slicesbar_graph($data, $period, $width, $height, $colors, $config['fontpath'], $config['round_corner'], $homeurl); + + // Draw legend + $out .= "
"; + $out .= " "; + foreach ($legend as $hour) { + $out .= "" . $hour . ""; + $out .= " "; + } + } + + if ($return) { + return $out; + } + else { + echo $out; + } +} + +/** + * Print a static graph with event data of agents + * + * @param integer id_agent Agent ID + * @param integer width pie graph width + * @param integer height pie graph height + * @param integer period time period + * @param string homeurl + * @param bool return or echo the result + */ +function graph_graphic_moduleevents ($id_agent, $id_module, $width, $height, $period = 0, $homeurl, $return = false) { + global $config; + global $graphic_type; + + $data = array (); + + $resolution = $config['graph_res'] * ($period * 2 / $width); // Number of "slices" we want in graph + $interval = (int) ($period / $resolution); + $date = get_system_time (); + $datelimit = $date - $period; + $periodtime = floor ($period / $interval); + $time = array (); + $data = array (); + $legend = array(); + $full_legend = array(); + + $cont = 0; + for ($i = 0; $i < $interval; $i++) { + $bottom = $datelimit + ($periodtime * $i); + if (! $graphic_type) { + if ($config['flash_charts']) { + $name = date('H:i:s', $bottom); + } + else { + $name = date('H\h', $bottom); + } + } + else { + $name = $bottom; } + // Show less values in legend + if ($cont == 0 or $cont % 2) + $legend[$cont] = $name; + + $full_legend[$cont] = $name; + + $top = $datelimit + ($periodtime * ($i + 1)); + + $event = db_get_row_filter ('tevento', + array ('id_agente' => $id_agent, + 'id_agentmodule' => $id_module, + 'utimestamp > '.$bottom, + 'utimestamp < '.$top), 'criticity, utimestamp'); + if (!empty($event['utimestamp'])) { $data[$cont]['utimestamp'] = $periodtime; switch ($event['criticity']) { diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 8bed46cbcc..d2ff9a643c 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -1097,27 +1097,27 @@ function visual_map_print_item($mode = "read", $layoutData, if ($width == 0 || $height == 0) { if ($layoutData['label_position']=='left') { $img = '
' . - $img = graph_graphic_agentevents ($layoutData['id_agent'], 500, 50, $layoutData['period'], '', true, $layoutData['id_agente_modulo']); + $img = graph_graphic_moduleevents ($layoutData['id_agent'], $layoutData['id_agente_modulo'], 500, 50, $layoutData['period'], '', true); } elseif ($layoutData['label_position']=='right') { $img = '
' . - $img = graph_graphic_agentevents ($layoutData['id_agent'], 500, 50, $layoutData['period'], '', true, $layoutData['id_agente_modulo']); + $img = graph_graphic_moduleevents ($layoutData['id_agent'], $layoutData['id_agente_modulo'], 500, 50, $layoutData['period'], '', true); } else { - $img = graph_graphic_agentevents ($layoutData['id_agent'], 500, 50, $layoutData['period'], '', true, $layoutData['id_agente_modulo']); + $img = graph_graphic_moduleevents ($layoutData['id_agent'], $layoutData['id_agente_modulo'], 500, 50, $layoutData['period'], '', true); } } else{ if ($layoutData['label_position']=='left') { $img = '
' . - $img = graph_graphic_agentevents ($layoutData['id_agent'], $width, $height, $layoutData['period'], '', true, $layoutData['id_agente_modulo']); + $img = graph_graphic_moduleevents ($layoutData['id_agent'], $layoutData['id_agente_modulo'], $width, $height, $layoutData['period'], '', true); } elseif ($layoutData['label_position']=='right') { $img = '
' . - $img = graph_graphic_agentevents ($layoutData['id_agent'], $width, $height, $layoutData['period'], '', true, $layoutData['id_agente_modulo']); + $img = graph_graphic_moduleevents ($layoutData['id_agent'], $layoutData['id_agente_modulo'], $width, $height, $layoutData['period'], '', true); } else { - $img = graph_graphic_agentevents ($layoutData['id_agent'], $width, $height, $layoutData['period'], '', true, $layoutData['id_agente_modulo']); + $img = graph_graphic_moduleevents ($layoutData['id_agent'], $layoutData['id_agente_modulo'], $width, $height, $layoutData['period'], '', true); } } } From 65cbbd1bae2d5c99b9c8a2eaaee39c015d97f3d8 Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 14 Jul 2017 00:01:19 +0200 Subject: [PATCH 049/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 3d000685b6..0267bf4aeb 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170713 +Version: 7.0NG.707-170714 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 09aeee5f36..cfd023931d 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.707-170713" +pandora_version="7.0NG.707-170714" 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 723d02b1d5..34269b5292 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170713'; +use constant AGENT_BUILD => '170714'; # 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 f52ff8d321..de91f2d496 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170713 +%define release 170714 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index b70910f18c..487789d473 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170713 +%define release 170714 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 08e221761c..7808486009 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170713" +PI_BUILD="170714" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 046d990beb..4cbe8f8853 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170713} +{170714} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index cca1e7202b..cbbdb79b2a 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.707(Build 170713)") +#define PANDORA_VERSION ("7.0NG.707(Build 170714)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 9e04222084..8fafaf8ca4 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.707(Build 170713))" + VALUE "ProductVersion", "(7.0NG.707(Build 170714))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index e25fa4e8a2..2af245fd81 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170713 +Version: 7.0NG.707-170714 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 a0fb7b75c6..a1a268bc12 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.707-170713" +pandora_version="7.0NG.707-170714" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index eeca1080f1..862e889d7f 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170713'; +$build_version = 'PC170714'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 61fe3443fc..11aa8bf4f6 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Sat, 15 Jul 2017 00:01:15 +0200 Subject: [PATCH 050/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 0267bf4aeb..0912b1ea97 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170714 +Version: 7.0NG.707-170715 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 cfd023931d..305b812336 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.707-170714" +pandora_version="7.0NG.707-170715" 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 34269b5292..313265634e 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170714'; +use constant AGENT_BUILD => '170715'; # 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 de91f2d496..4c6d2a964a 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170714 +%define release 170715 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 487789d473..1c36990e29 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170714 +%define release 170715 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 7808486009..3fdd75d7db 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170714" +PI_BUILD="170715" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 4cbe8f8853..647f4cf0c4 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170714} +{170715} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index cbbdb79b2a..25bb9d869e 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.707(Build 170714)") +#define PANDORA_VERSION ("7.0NG.707(Build 170715)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 8fafaf8ca4..64d508265a 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.707(Build 170714))" + VALUE "ProductVersion", "(7.0NG.707(Build 170715))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 2af245fd81..55a93bc358 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170714 +Version: 7.0NG.707-170715 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 a1a268bc12..b2ffb55188 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.707-170714" +pandora_version="7.0NG.707-170715" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 862e889d7f..0c8251b7e4 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170714'; +$build_version = 'PC170715'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 11aa8bf4f6..acc546f383 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Sun, 16 Jul 2017 00:01:15 +0200 Subject: [PATCH 051/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 0912b1ea97..335c2d99b0 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170715 +Version: 7.0NG.707-170716 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 305b812336..ec89e7d4c8 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.707-170715" +pandora_version="7.0NG.707-170716" 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 313265634e..8cd1e9ded6 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170715'; +use constant AGENT_BUILD => '170716'; # 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 4c6d2a964a..d90aaec990 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170715 +%define release 170716 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 1c36990e29..56518a02d4 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170715 +%define release 170716 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 3fdd75d7db..0764e23f37 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170715" +PI_BUILD="170716" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 647f4cf0c4..1f121cb5f1 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170715} +{170716} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 25bb9d869e..5de59b708e 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.707(Build 170715)") +#define PANDORA_VERSION ("7.0NG.707(Build 170716)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 64d508265a..0a0d2d6615 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.707(Build 170715))" + VALUE "ProductVersion", "(7.0NG.707(Build 170716))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 55a93bc358..9c6e0a911d 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170715 +Version: 7.0NG.707-170716 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 b2ffb55188..17062b76eb 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.707-170715" +pandora_version="7.0NG.707-170716" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 0c8251b7e4..92b8d550cb 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170715'; +$build_version = 'PC170716'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index acc546f383..d6054d1e3f 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Mon, 17 Jul 2017 00:01:15 +0200 Subject: [PATCH 052/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 335c2d99b0..9d89e99740 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170716 +Version: 7.0NG.707-170717 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 ec89e7d4c8..8dda38f704 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.707-170716" +pandora_version="7.0NG.707-170717" 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 8cd1e9ded6..8e3a8d70a9 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170716'; +use constant AGENT_BUILD => '170717'; # 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 d90aaec990..19eabfbf8e 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170716 +%define release 170717 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 56518a02d4..1377b0feb1 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170716 +%define release 170717 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 0764e23f37..db9622fb8a 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170716" +PI_BUILD="170717" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 1f121cb5f1..738eda29a3 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170716} +{170717} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 5de59b708e..2a5ac13bd2 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.707(Build 170716)") +#define PANDORA_VERSION ("7.0NG.707(Build 170717)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 0a0d2d6615..998c6d0a21 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.707(Build 170716))" + VALUE "ProductVersion", "(7.0NG.707(Build 170717))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 9c6e0a911d..d7eca59930 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170716 +Version: 7.0NG.707-170717 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 17062b76eb..a86246496c 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.707-170716" +pandora_version="7.0NG.707-170717" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 92b8d550cb..5353d39048 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170716'; +$build_version = 'PC170717'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index d6054d1e3f..e545b26bb7 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Mon, 17 Jul 2017 09:22:28 +0200 Subject: [PATCH 053/142] update agent --- .../godmode/agentes/configurar_agente.php | 49 +++++++++++++++++ .../godmode/massive/massive_edit_agents.php | 52 +++++++++++++++++++ 2 files changed, 101 insertions(+) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 4484e6a1ba..5e965d2348 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -239,6 +239,14 @@ if ($create_agent) { $agent_created_ok = true; + $tpolicy_group = db_get_sql("SELECT id_policy FROM tpolicy_groups + WHERE id_group = ".$grupo); + + if($tpolicy_group){ + db_process_sql_insert ('tpolicy_agents', + array('id_policy' => $tpolicy_group, 'id_agent' => $id_agente)); + } + $info = 'Name: ' . $nombre_agente . ' IP: ' . $direccion_agente . ' Group: ' . $grupo . @@ -787,6 +795,47 @@ if ($update_agent) { // if modified some agent paramenter if ($old_interval != $intervalo) { enterprise_hook('config_agents_update_config_interval', array($id_agente, $intervalo)); } + + if($grupo){ + $group_old = db_get_sql("SELECT id_grupo FROM tagente WHERE id_agente =" .$id_agente); + + $tpolicy_group_old = db_get_all_rows_sql("SELECT id_policy FROM tpolicy_groups + WHERE id_group = ".$group_old); + + if($tpolicy_group_old){ + foreach ($tpolicy_group_old as $key => $value) { + $tpolicy_agents_old= db_get_sql("SELECT * FROM tpolicy_agents + WHERE id_policy = ".$value['id_policy'] . " AND id_agent =" .$id_agente); + + if($tpolicy_agents_old){ + $result2 = db_process_sql_update ('tpolicy_agents', + array('pending_delete' => 1), + array ('id_agent' => $id_agente, 'id_policy' => $value['id_policy'])); + } + } + } + } + + //pruebassssss + $tpolicy_group = db_get_all_rows_sql("SELECT id_policy FROM tpolicy_groups + WHERE id_group = ".$grupo); + + if($tpolicy_group){ + foreach ($tpolicy_group as $key => $value) { + $tpolicy_agents= db_get_sql("SELECT * FROM tpolicy_agents + WHERE id_policy = ".$value['id_policy'] . " AND id_agent =" .$id_agente); + + if(!$tpolicy_agents){ + db_process_sql_insert ('tpolicy_agents', + array('id_policy' => $value['id_policy'], 'id_agent' => $id_agente)); + } else { + $result3 = db_process_sql_update ('tpolicy_agents', + array('pending_delete' => 0), + array ('id_agent' => $id_agente, 'id_policy' => $value['id_policy'])); + } + } + + } $info = 'Group: ' . $grupo . ' Interval: ' . $intervalo . ' Comments: ' . $comentarios . ' Mode: ' . $modo . diff --git a/pandora_console/godmode/massive/massive_edit_agents.php b/pandora_console/godmode/massive/massive_edit_agents.php index facdf18b54..647b1f3226 100755 --- a/pandora_console/godmode/massive/massive_edit_agents.php +++ b/pandora_console/godmode/massive/massive_edit_agents.php @@ -139,9 +139,61 @@ if ($update_agents) { isset($values['id_grupo'])) { $values['update_module_count'] = 1; // Force an update of the agent cache. } + $group_old = false; + if($values['id_grupo']){ + $group_old = db_get_sql("SELECT id_grupo FROM tagente WHERE id_agente =" .$id_agent); + } + $result = db_process_sql_update ('tagente', $values, array ('id_agente' => $id_agent)); + + if($group_old || $result){ + $tpolicy_group_old = db_get_sql("SELECT id_policy FROM tpolicy_groups + WHERE id_group = ".$group_old); + + if($tpolicy_group_old){ + $tpolicy_agents_old= db_get_sql("SELECT * FROM tpolicy_agents + WHERE id_policy = ".$tpolicy_group_old . " AND id_agent =" .$id_agent); + + if($tpolicy_agents_old){ + $result2 = db_process_sql_update ('tpolicy_agents', + array('pending_delete' => 1), + array ('id_agent' => $id_agent, 'id_policy' => $tpolicy_group_old)); + } + + } + + $tpolicy_group_new = db_get_sql("SELECT id_policy FROM tpolicy_groups + WHERE id_group = ".$values['id_grupo']); + + if($tpolicy_group_new){ + $tpolicy_agents_new= db_get_sql("SELECT * FROM tpolicy_agents + WHERE id_policy = ".$tpolicy_group_new . " AND id_agent =" .$id_agent); + + if($tpolicy_agents_new){ + $result3 = db_process_sql_update ('tpolicy_agents', + array('pending_delete' => 0), + array ('id_agent' => $id_agent, 'id_policy' => $tpolicy_group_new)); + } else { + db_process_sql_insert ('tpolicy_agents', + array('id_policy' => $tpolicy_group_new, 'id_agent' => $id_agent)); + } + } + + } + + // if($values['id_grupo'] || $result){ + // $tpolicy_agents= db_get_sql("SELECT * FROM tpolicy_agents + // WHERE id_policy = ".$tpolicy_group . " AND id_agent =" .$id_agente); + // + // $tpolicy_group = db_get_sql("SELECT id_policy FROM tpolicy_groups + // WHERE id_group = ".$values['id_grupo']); + // if ($tpolicy_group){ + // + // } + // } + } // Update Custom Fields From 1ea465b7d41cce3d490c544b8913591ac6f72206 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Mon, 17 Jul 2017 10:46:26 +0200 Subject: [PATCH 054/142] Added db changes to package 708 --- pandora_console/extras/mr/4.sql | 1 + .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 5 +++-- pandora_console/pandoradb.sql | 1 + pandora_console/pandoradb_data.sql | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 pandora_console/extras/mr/4.sql diff --git a/pandora_console/extras/mr/4.sql b/pandora_console/extras/mr/4.sql new file mode 100644 index 0000000000..f3f9819cc4 --- /dev/null +++ b/pandora_console/extras/mr/4.sql @@ -0,0 +1 @@ +alter table tusuario add autorefresh_white_list text not null default ''; \ No newline at end of file diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 6f146f7ca8..56661a6fb8 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -1136,10 +1136,10 @@ ALTER TABLE titem MODIFY `source_data` int(10) unsigned; INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30'); -INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 1); +INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 4); UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager'; DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise'; -INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '704'); +INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '708'); -- --------------------------------------------------------------------- -- Table `tplanned_downtime_agents` @@ -1168,6 +1168,7 @@ ALTER TABLE tevent_filter ADD COLUMN `date_to` date DEFAULT NULL; ALTER TABLE tusuario ADD COLUMN `id_filter` int(10) UNSIGNED NULL DEFAULT NULL; ALTER TABLE tusuario ADD CONSTRAINT `fk_id_filter` FOREIGN KEY (`id_filter`) REFERENCES tevent_filter(`id_filter`) ON DELETE SET NULL; ALTER TABLE tusuario ADD COLUMN `session_time` int(10) signed NOT NULL default '0'; +alter table tusuario add autorefresh_white_list text not null default ''; -- --------------------------------------------------------------------- -- Table `tagente_modulo` diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 69c161528a..cf9e1142ac 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1112,6 +1112,7 @@ CREATE TABLE IF NOT EXISTS `tusuario` ( `id_filter` int(10) unsigned NULL default NULL, `session_time` int(10) signed NOT NULL default 0, `default_event_filter` int(10) unsigned NOT NULL default 0, + `autorefresh_white_list` text not null default '', CONSTRAINT `fk_filter_id` FOREIGN KEY (`id_filter`) REFERENCES tevent_filter (`id_filter`) ON DELETE SET NULL, UNIQUE KEY `id_user` (`id_user`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 996df2ea47..3afdd8a8e7 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -109,10 +109,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_report_front_logo', 'images/pandora_logo_white.jpg'), ('custom_report_front_header', ''), ('custom_report_front_footer', ''), -('MR', 3), +('MR', 4), ('identification_reminder', 1), ('identification_reminder_timestamp', 0), -('current_package_enterprise', '707'), +('current_package_enterprise', '708'), ('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.0009765625":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'); UNLOCK TABLES; From dd6e4a3bd8edb5bc103ba991f4ceb62298d97391 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Mon, 17 Jul 2017 11:26:22 +0200 Subject: [PATCH 055/142] Changed conf description --- pandora_agents/unix/Linux/pandora_agent.conf | 3 +-- pandora_agents/win32/bin/pandora_agent.conf | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf index 86a2f501b2..8d9893c24a 100644 --- a/pandora_agents/unix/Linux/pandora_agent.conf +++ b/pandora_agents/unix/Linux/pandora_agent.conf @@ -18,8 +18,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # Optional. UDP Server to receive orders from outside diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index 1ecdcbad3f..5a29b89766 100644 --- a/pandora_agents/win32/bin/pandora_agent.conf +++ b/pandora_agents/win32/bin/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2014 Artica Soluciones Tecnologicas -# Version 7.0NG.707 +# Version 7.0NG.707 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software @@ -36,7 +36,7 @@ temporal "%ProgramFiles%\pandora_agent\temp" # If set to __rand__ the agent will generate a random name. #agent_name_cmd cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\agentname.vbs" agent_name_cmd __rand__ - + #Parent agent_name #parent_agent_name caprica @@ -77,7 +77,7 @@ server_port 41121 # If set to 1 disables log writing into pandora_agent.log #disable_logfile 1 -# Debug mode do not copy XML data files to server. +# Debug mode renames XML in the temp folder and continues running # debug 1 # If set to 1 allows the agent to be configured via the web console From 4aa04cfef0cd96443e4fb98129eb94801dac03d4 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Mon, 17 Jul 2017 16:19:38 +0200 Subject: [PATCH 056/142] Set texport_server table name field varchar 600 - #1015 --- pandora_console/extras/mr/4.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_console/extras/mr/4.sql b/pandora_console/extras/mr/4.sql index f3f9819cc4..75428b2ea3 100644 --- a/pandora_console/extras/mr/4.sql +++ b/pandora_console/extras/mr/4.sql @@ -1 +1,2 @@ -alter table tusuario add autorefresh_white_list text not null default ''; \ No newline at end of file +alter table tusuario add autorefresh_white_list text not null default ''; +ALTER TABLE tserver_export MODIFY name varchar(600) BINARY NOT NULL default ''; \ No newline at end of file From d65ad2693e1c312d83d51c0e1e8c9fd927801bab Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 18 Jul 2017 00:01:17 +0200 Subject: [PATCH 057/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/bin/pandora_agent.conf | 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.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 9d89e99740..b2baa6978a 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170717 +Version: 7.0NG.707-170718 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 8dda38f704..25f101dcbc 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.707-170717" +pandora_version="7.0NG.707-170718" 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 8e3a8d70a9..f05b8948ab 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170717'; +use constant AGENT_BUILD => '170718'; # 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 19eabfbf8e..dee15b601c 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170717 +%define release 170718 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 1377b0feb1..10905ab433 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170717 +%define release 170718 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 db9622fb8a..7967cc9d11 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170717" +PI_BUILD="170718" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index 5a29b89766..c2db09fe55 100644 --- a/pandora_agents/win32/bin/pandora_agent.conf +++ b/pandora_agents/win32/bin/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2014 Artica Soluciones Tecnologicas -# Version 7.0NG.707 +# Version 7.0NG.707 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 738eda29a3..5f562b103e 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170717} +{170718} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 2a5ac13bd2..e0e4567c8c 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.707(Build 170717)") +#define PANDORA_VERSION ("7.0NG.707(Build 170718)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 998c6d0a21..3fa1197125 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.707(Build 170717))" + VALUE "ProductVersion", "(7.0NG.707(Build 170718))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index d7eca59930..264e95b72e 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170717 +Version: 7.0NG.707-170718 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 a86246496c..26ce1db52d 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.707-170717" +pandora_version="7.0NG.707-170718" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index e3d72fc3a7..4a5b4fbe45 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170717'; +$build_version = 'PC170718'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index e545b26bb7..524954ec77 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Tue, 18 Jul 2017 11:48:59 +0200 Subject: [PATCH 058/142] Added recover delimiter --- pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 16b67d8e28..33fe856c09 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -1313,6 +1313,7 @@ IF @vv1>0 THEN END IF; END; // +delimiter; CALL addcol(); DROP PROCEDURE addcol; From f0e43e252c171164c31ecfd41b1a2d471d219e2b Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 18 Jul 2017 12:06:57 +0200 Subject: [PATCH 059/142] New feature: Add groups to policies --- pandora_console/extras/mr/4.sql | 17 ++++++ .../pandoradb_migrate_6.0_to_7.0.mysql.sql | 14 +++++ .../godmode/agentes/configurar_agente.php | 45 ++++++++-------- .../godmode/massive/massive_edit_agents.php | 52 ++++++++---------- pandora_console/include/functions_api.php | 54 ++++++++++++++++++- pandora_console/include/functions_html.php | 2 +- pandora_console/pandoradb.sql | 1 - 7 files changed, 126 insertions(+), 59 deletions(-) create mode 100644 pandora_console/extras/mr/4.sql diff --git a/pandora_console/extras/mr/4.sql b/pandora_console/extras/mr/4.sql new file mode 100644 index 0000000000..828b770c90 --- /dev/null +++ b/pandora_console/extras/mr/4.sql @@ -0,0 +1,17 @@ +START TRANSACTION; + +alter table tusuario add autorefresh_white_list text not null default ''; +ALTER TABLE tserver_export MODIFY name varchar(600) BINARY NOT NULL default ''; + +CREATE TABLE IF NOT EXISTS `tpolicy_groups` ( + `id` int(10) unsigned NOT NULL auto_increment, + `id_policy` int(10) unsigned default '0', + `id_group` int(10) unsigned default '0', + `policy_applied` tinyint(1) unsigned default '0', + `pending_delete` tinyint(1) unsigned default '0', + `last_apply_utimestamp` int(10) unsigned NOT NULL default 0, + PRIMARY KEY (`id`), + UNIQUE (`id_policy`, `id_group`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +COMMIT; diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 588a68da48..6b2577e051 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -181,6 +181,20 @@ CREATE TABLE IF NOT EXISTS `tpolicy_agents` ( UNIQUE (`id_policy`, `id_agent`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- ----------------------------------------------------- +-- Table `tpolicy_groups` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS `tpolicy_groups` ( + `id` int(10) unsigned NOT NULL auto_increment, + `id_policy` int(10) unsigned default '0', + `id_group` int(10) unsigned default '0', + `policy_applied` tinyint(1) unsigned default '0', + `pending_delete` tinyint(1) unsigned default '0', + `last_apply_utimestamp` int(10) unsigned NOT NULL default 0, + PRIMARY KEY (`id`), + UNIQUE (`id_policy`, `id_group`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + -- --------------------------------------------------------------------- -- Table `tdashboard` -- --------------------------------------------------------------------- diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 5e965d2348..f86ba0849e 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -239,12 +239,14 @@ if ($create_agent) { $agent_created_ok = true; - $tpolicy_group = db_get_sql("SELECT id_policy FROM tpolicy_groups + $tpolicy_group_old = db_get_all_rows_sql("SELECT id_policy FROM tpolicy_groups WHERE id_group = ".$grupo); - - if($tpolicy_group){ - db_process_sql_insert ('tpolicy_agents', - array('id_policy' => $tpolicy_group, 'id_agent' => $id_agente)); + + if($tpolicy_group_old){ + foreach ($tpolicy_group_old as $key => $old_group) { + db_process_sql_insert ('tpolicy_agents', + array('id_policy' => $old_group['id_policy'], 'id_agent' => $id_agente)); + } } $info = 'Name: ' . $nombre_agente . @@ -782,6 +784,10 @@ if ($update_agent) { // if modified some agent paramenter $values['update_module_count'] = 1; // Force an update of the agent cache. } + $group_old = db_get_sql("SELECT id_grupo FROM tagente WHERE id_agente =" .$id_agente); + $tpolicy_group_old = db_get_all_rows_sql("SELECT id_policy FROM tpolicy_groups + WHERE id_group = ".$group_old); + $result = db_process_sql_update ('tagente', $values, array ('id_agente' => $id_agente)); if ($result === false) { ui_print_error_message( @@ -795,28 +801,20 @@ if ($update_agent) { // if modified some agent paramenter if ($old_interval != $intervalo) { enterprise_hook('config_agents_update_config_interval', array($id_agente, $intervalo)); } - - if($grupo){ - $group_old = db_get_sql("SELECT id_grupo FROM tagente WHERE id_agente =" .$id_agente); - - $tpolicy_group_old = db_get_all_rows_sql("SELECT id_policy FROM tpolicy_groups - WHERE id_group = ".$group_old); - - if($tpolicy_group_old){ - foreach ($tpolicy_group_old as $key => $value) { - $tpolicy_agents_old= db_get_sql("SELECT * FROM tpolicy_agents - WHERE id_policy = ".$value['id_policy'] . " AND id_agent =" .$id_agente); + + if($tpolicy_group_old){ + foreach ($tpolicy_group_old as $key => $value) { + $tpolicy_agents_old= db_get_sql("SELECT * FROM tpolicy_agents + WHERE id_policy = ".$value['id_policy'] . " AND id_agent = " .$id_agente); - if($tpolicy_agents_old){ - $result2 = db_process_sql_update ('tpolicy_agents', - array('pending_delete' => 1), - array ('id_agent' => $id_agente, 'id_policy' => $value['id_policy'])); - } + if($tpolicy_agents_old){ + $result2 = db_process_sql_update ('tpolicy_agents', + array('pending_delete' => 1), + array ('id_agent' => $id_agente, 'id_policy' => $value['id_policy'])); } } - } + } - //pruebassssss $tpolicy_group = db_get_all_rows_sql("SELECT id_policy FROM tpolicy_groups WHERE id_group = ".$grupo); @@ -834,7 +832,6 @@ if ($update_agent) { // if modified some agent paramenter array ('id_agent' => $id_agente, 'id_policy' => $value['id_policy'])); } } - } $info = 'Group: ' . $grupo . ' Interval: ' . $intervalo . diff --git a/pandora_console/godmode/massive/massive_edit_agents.php b/pandora_console/godmode/massive/massive_edit_agents.php index 647b1f3226..802dc67e6b 100755 --- a/pandora_console/godmode/massive/massive_edit_agents.php +++ b/pandora_console/godmode/massive/massive_edit_agents.php @@ -149,51 +149,41 @@ if ($update_agents) { array ('id_agente' => $id_agent)); if($group_old || $result){ - $tpolicy_group_old = db_get_sql("SELECT id_policy FROM tpolicy_groups - WHERE id_group = ".$group_old); + $tpolicy_group_old = db_get_all_rows_sql("SELECT id_policy FROM tpolicy_groups + WHERE id_group = ".$group_old); - if($tpolicy_group_old){ + if($tpolicy_group_old){ + foreach ($tpolicy_group_old as $key => $value) { $tpolicy_agents_old= db_get_sql("SELECT * FROM tpolicy_agents - WHERE id_policy = ".$tpolicy_group_old . " AND id_agent =" .$id_agent); - + WHERE id_policy = ".$value['id_policy'] . " AND id_agent = " .$id_agent); + if($tpolicy_agents_old){ $result2 = db_process_sql_update ('tpolicy_agents', array('pending_delete' => 1), - array ('id_agent' => $id_agent, 'id_policy' => $tpolicy_group_old)); + array ('id_agent' => $id_agent, 'id_policy' => $value['id_policy'])); } - } - - $tpolicy_group_new = db_get_sql("SELECT id_policy FROM tpolicy_groups - WHERE id_group = ".$values['id_grupo']); + } + + $tpolicy_group_new = db_get_all_rows_sql("SELECT id_policy FROM tpolicy_groups + WHERE id_group = ".$values['id_grupo']); - if($tpolicy_group_new){ + if($tpolicy_group_new){ + foreach ($tpolicy_group_new as $key => $value) { $tpolicy_agents_new= db_get_sql("SELECT * FROM tpolicy_agents - WHERE id_policy = ".$tpolicy_group_new . " AND id_agent =" .$id_agent); - - if($tpolicy_agents_new){ + WHERE id_policy = ".$value['id_policy'] . " AND id_agent =" .$id_agent); + + if(!$tpolicy_agents_new){ + db_process_sql_insert ('tpolicy_agents', + array('id_policy' => $value['id_policy'], 'id_agent' => $id_agent)); + } else { $result3 = db_process_sql_update ('tpolicy_agents', array('pending_delete' => 0), - array ('id_agent' => $id_agent, 'id_policy' => $tpolicy_group_new)); - } else { - db_process_sql_insert ('tpolicy_agents', - array('id_policy' => $tpolicy_group_new, 'id_agent' => $id_agent)); + array ('id_agent' => $id_agent, 'id_policy' => $value['id_policy'])); } } - + } } - - // if($values['id_grupo'] || $result){ - // $tpolicy_agents= db_get_sql("SELECT * FROM tpolicy_agents - // WHERE id_policy = ".$tpolicy_group . " AND id_agent =" .$id_agente); - // - // $tpolicy_group = db_get_sql("SELECT id_policy FROM tpolicy_groups - // WHERE id_group = ".$values['id_grupo']); - // if ($tpolicy_group){ - // - // } - // } - } // Update Custom Fields diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 89fb8843da..657807e533 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -1195,7 +1195,11 @@ function api_set_update_agent($id_agent, $thrash2, $other, $thrash3) { else { $cascadeProtectionModule = 0; } - + + $group_old = db_get_sql("SELECT id_grupo FROM tagente WHERE id_agente =" .$id_agent); + $tpolicy_group_old = db_get_all_rows_sql("SELECT id_policy FROM tpolicy_groups + WHERE id_group = ".$group_old); + $return = db_process_sql_update('tagente', array('alias' => $alias, 'direccion' => $ip, @@ -1216,6 +1220,40 @@ function api_set_update_agent($id_agent, $thrash2, $other, $thrash3) { // register ip for this agent in 'taddress' agents_add_address ($id_agent, $ip); } + + if($return){ + if($tpolicy_group_old){ + foreach ($tpolicy_group_old as $key => $value) { + $tpolicy_agents_old= db_get_sql("SELECT * FROM tpolicy_agents + WHERE id_policy = ".$value['id_policy'] . " AND id_agent = " .$id_agent); + + if($tpolicy_agents_old){ + $result2 = db_process_sql_update ('tpolicy_agents', + array('pending_delete' => 1), + array ('id_agent' => $id_agent, 'id_policy' => $value['id_policy'])); + } + } + } + + $tpolicy_group = db_get_all_rows_sql("SELECT id_policy FROM tpolicy_groups + WHERE id_group = ".$idGroup); + + if($tpolicy_group){ + foreach ($tpolicy_group as $key => $value) { + $tpolicy_agents= db_get_sql("SELECT * FROM tpolicy_agents + WHERE id_policy = ".$value['id_policy'] . " AND id_agent =" .$id_agent); + + if(!$tpolicy_agents){ + db_process_sql_insert ('tpolicy_agents', + array('id_policy' => $value['id_policy'], 'id_agent' => $id_agent)); + } else { + $result3 = db_process_sql_update ('tpolicy_agents', + array('pending_delete' => 0), + array ('id_agent' => $id_agent, 'id_policy' => $value['id_policy'])); + } + } + } + } returnData('string', array('type' => 'string', 'data' => (int)((bool)$return))); @@ -1339,7 +1377,19 @@ function api_set_new_agent($thrash1, $thrash2, $other, $thrash3) { // register ip for this agent in 'taddress' agents_add_address ($idAgente, $ip); } - + + if($idGroup && !empty($idAgente)){ + $tpolicy_group_old = db_get_all_rows_sql("SELECT id_policy FROM tpolicy_groups + WHERE id_group = ".$idGroup); + + if($tpolicy_group_old){ + foreach ($tpolicy_group_old as $key => $old_group) { + db_process_sql_insert ('tpolicy_agents', + array('id_policy' => $old_group['id_policy'], 'id_agent' => $idAgente)); + } + } + } + returnData('string', array('type' => 'string', 'data' => $idAgente)); } diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 797660534c..c374170c36 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -404,7 +404,7 @@ function html_print_select_groups($id_user = false, $privilege = "AR", foreach ($include_groups as $value) { $field[$value] = $fields[$value]; } - $fields = $field; + $fields = array_intersect($fields, $field); } if ($strict_user) { diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 471b64e048..d8749dc075 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -2482,7 +2482,6 @@ CREATE TABLE IF NOT EXISTS `tpolicy_queue` ( `id` int(10) unsigned NOT NULL auto_increment, `id_policy` int(10) unsigned NOT NULL default '0', `id_agent` int(10) unsigned NOT NULL default '0', - `id_group` int(10) unsigned NOT NULL default '0', `operation` varchar(15) default '', `progress` int(10) unsigned NOT NULL default '0', `end_utimestamp` int(10) unsigned NOT NULL default 0, From 329050b02bd66d4570ca38a7b631de27486bb31e Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Tue, 18 Jul 2017 12:26:29 +0200 Subject: [PATCH 060/142] Fixed error --- .../godmode/reporting/visual_console_builder.editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index 32a41ee7d2..e1b2a50cf5 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -580,7 +580,7 @@ function readFields() { } values['width'] = $("input[name=width]").val(); values['width_data_image'] = $("#data_image_width").val(); - if(values['width_data_image'] != 0){ + if(values['width_data_image'] != 0 && values['width_data_image'] != undefined){ values['width'] = values['width_data_image']; } values['height'] = $("input[name=height]").val(); From a331de63eb906ba69915ee45bc8cd6bede2a757d Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Tue, 18 Jul 2017 13:31:50 +0200 Subject: [PATCH 061/142] Added new comment to debug in conf --- pandora_agents/pc/AIX/pandora_agent.conf | 3 +- pandora_agents/pc/FreeBSD/pandora_agent.conf | 3 +- pandora_agents/pc/HP-UX/pandora_agent.conf | 3 +- pandora_agents/pc/Linux/pandora_agent.conf | 3 +- pandora_agents/pc/SunOS/pandora_agent.conf | 3 +- pandora_agents/pc/Win32/pandora_agent.conf | 128 +++++++++--------- .../shellscript/aix/pandora_agent.conf | 2 +- .../shellscript/bsd-ipso/pandora_agent.conf | 1 + .../shellscript/hp-ux/pandora_agent.conf | 1 + .../shellscript/linux/pandora_agent.conf | 3 +- .../shellscript/mac_osx/pandora_agent.conf | 3 +- .../shellscript/openWRT/pandora_agent.conf | 3 +- .../shellscript/solaris/pandora_agent.conf | 1 + pandora_agents/unix/AIX/pandora_agent.conf | 3 +- pandora_agents/unix/Darwin/pandora_agent.conf | 3 +- .../unix/FreeBSD/pandora_agent.conf | 3 +- pandora_agents/unix/HP-UX/pandora_agent.conf | 3 +- pandora_agents/unix/NetBSD/pandora_agent.conf | 3 +- pandora_agents/unix/SunOS/pandora_agent.conf | 3 +- 19 files changed, 82 insertions(+), 93 deletions(-) diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf index 0e4014f5e6..6e804303b3 100644 --- a/pandora_agents/pc/AIX/pandora_agent.conf +++ b/pandora_agents/pc/AIX/pandora_agent.conf @@ -15,8 +15,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # By default, agent takes machine name diff --git a/pandora_agents/pc/FreeBSD/pandora_agent.conf b/pandora_agents/pc/FreeBSD/pandora_agent.conf index 207efac3a2..7f5e8e320c 100644 --- a/pandora_agents/pc/FreeBSD/pandora_agent.conf +++ b/pandora_agents/pc/FreeBSD/pandora_agent.conf @@ -17,8 +17,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # By default, agent takes machine name diff --git a/pandora_agents/pc/HP-UX/pandora_agent.conf b/pandora_agents/pc/HP-UX/pandora_agent.conf index f0aeb191e4..141f1c7b3f 100644 --- a/pandora_agents/pc/HP-UX/pandora_agent.conf +++ b/pandora_agents/pc/HP-UX/pandora_agent.conf @@ -17,8 +17,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # By default, agent takes machine name diff --git a/pandora_agents/pc/Linux/pandora_agent.conf b/pandora_agents/pc/Linux/pandora_agent.conf index d9dec84092..0189912d1c 100644 --- a/pandora_agents/pc/Linux/pandora_agent.conf +++ b/pandora_agents/pc/Linux/pandora_agent.conf @@ -17,8 +17,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # Optional. UDP Server to receive orders from outside diff --git a/pandora_agents/pc/SunOS/pandora_agent.conf b/pandora_agents/pc/SunOS/pandora_agent.conf index 4a0110cbe4..93f2908530 100644 --- a/pandora_agents/pc/SunOS/pandora_agent.conf +++ b/pandora_agents/pc/SunOS/pandora_agent.conf @@ -17,8 +17,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # By default, agent takes machine name diff --git a/pandora_agents/pc/Win32/pandora_agent.conf b/pandora_agents/pc/Win32/pandora_agent.conf index 515e60a1af..fef75e8919 100644 --- a/pandora_agents/pc/Win32/pandora_agent.conf +++ b/pandora_agents/pc/Win32/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2010 Artica Soluciones Tecnologicas -# Version 7.0NG.707 +# Version 7.0NG.707 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software @@ -11,109 +11,109 @@ # Edit this file to change your parameters or/and add your own modules # Any line with a # character at the first column will be ignored (comment) - -# General Parameters -# ================== - + +# General Parameters +# ================== + # NOTE: The variables $*$ will be substituted in the installation wizard -server_ip $ServerIP$ -server_path $ServerPath$ -temporal $AgentTemp$ -logfile $AgentLog$ - +server_ip $ServerIP$ +server_path $ServerPath$ +temporal $AgentTemp$ +logfile $AgentLog$ + #include "C:\Archivos de programa\pandora_agent\pandora_agent_alt.conf" #broker_agent name_agent - + # Agent uses your hostname automatically, if you need to change agent name # use directive agent_name (do not use blank spaces, please). # This parameter is CASE SENSITIVE. - -# agent_name My_Custom_Agent_name - -#Parent agent_name -#parent_agent_name caprica - -# address: Enforce to server a ip address to this agent -# You can also try to detect the first IP using "auto", for example -#address auto -# or setting a fixed IP address, like for example: -#address 192.168.36.73 - +# agent_name My_Custom_Agent_name + +#Parent agent_name +#parent_agent_name caprica + +# address: Enforce to server a ip address to this agent +# You can also try to detect the first IP using "auto", for example + +#address auto +# or setting a fixed IP address, like for example: +#address 192.168.36.73 + # Group assigned for this agent (descriptive, p.e: Servers) group $AgentGroup$ - + # This limits operation if temporal dir has not enough free disk. #temporal_min_size 1024 - + # Delay start execution X second before start to minonitoring nothing #startup_delay 30 - + # Interval is defined in seconds interval 300 - + # tranfer_modes: Possible values are local, tentacle (default), ftp and ssh. -transfer_mode tentacle +transfer_mode tentacle server_port 41121 - + # In case of using FTP or tentacle with password. User is always "pandora" #server_pwd pandora - -# Debug mode do not copy XML data files to server. + +# Debug mode renames XML in the temp folder and continues running # debug 1 - + # ODBC connections. Check documentation for more information. # Configuring "ExampleDSN" DSN. Notice that this DSN connection must be configured # under Control panel -> Administrative tools -> ODBC -> DSN # odbc_ExampleDSN_username UserNameForDsn # odbc_ExampleDSN_password Password1234 - + # If set to 1 allows the agent to be configured via the web console # (only works on enterprise version). # remote_config 1 - + # Set XML encoding (ISO-8859-1 by default). #encoding ISO-8859-1 - -# If set to 1 start Drone Agent's Proxy Mode -# proxy_mode 1 - -# Max number of simmultaneus connection for proxy (by default 10) -# proxy_max_connection 10 - -# Proxy timeout (by default 1s) -# proxy_timeout 1 - + +# If set to 1 start Drone Agent's Proxy Mode +# proxy_mode 1 + +# Max number of simmultaneus connection for proxy (by default 10) +# proxy_max_connection 10 + +# Proxy timeout (by default 1s) +# proxy_timeout 1 + # Enable or disable XML buffer. xml_buffer 0 # WMI by default. Set to NT if you don't want to use WMI. win32_monitoring_lib NT - -# Secondary server configuration -# ============================== - -# If secondary_mode is set to on_error, data files are copied to the secondary -# server only if the primary server fails. If set to always, data files are -# always copied to the secondary server. + +# Secondary server configuration +# ============================== + +# If secondary_mode is set to on_error, data files are copied to the secondary +# server only if the primary server fails. If set to always, data files are +# always copied to the secondary server. #secondary_mode on_error #secondary_server_ip localhost -#secondary_server_path /var/spool/pandora/data_in -#secondary_server_port 41121 -#secondary_transfer_mode tentacle -#secondary_server_pwd mypassword -#secondary_server_ssl no -#secondary_server_opts - -# Module Definition +#secondary_server_path /var/spool/pandora/data_in +#secondary_server_port 41121 +#secondary_transfer_mode tentacle +#secondary_server_pwd mypassword +#secondary_server_ssl no +#secondary_server_opts + +# Module Definition # Check online documentation and module library at http://pandorafms.org -# ================= - +# ================= + # CPU Load using WMI module_begin module_name CPU Load -module_type generic_data +module_type generic_data module_wmiquery SELECT LoadPercentage FROM Win32_Processor module_wmicolumn LoadPercentage module_description CPU Load (%) @@ -121,8 +121,8 @@ module_min_warning 80 module_max_warning 90 module_min_critical 91 module_max_critical 100 -module_end - +module_end + # Number processes module_begin module_name Number processes diff --git a/pandora_agents/shellscript/aix/pandora_agent.conf b/pandora_agents/shellscript/aix/pandora_agent.conf index 1d2be693ad..c9a852fa1a 100644 --- a/pandora_agents/shellscript/aix/pandora_agent.conf +++ b/pandora_agents/shellscript/aix/pandora_agent.conf @@ -11,7 +11,7 @@ pandora_path /usr/share/pandora_agent temporal /var/spool/pandora/data_out interval 300 checksum 0 -#agent_name adama +# Debug mode renames XML in the temp folder and continues running debug 0 # By default is 22 (for ssh) #server_port 22 diff --git a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf index 54dca07566..f50992595d 100644 --- a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf +++ b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf @@ -13,6 +13,7 @@ pandora_path /opt/pandora_agent temporal /var/spool/pandora/data_out interval 600 agent_name nokia +# Debug mode renames XML in the temp folder and continues running debug 0 checksum 0 harmless_mode 1 diff --git a/pandora_agents/shellscript/hp-ux/pandora_agent.conf b/pandora_agents/shellscript/hp-ux/pandora_agent.conf index 94f5627291..cd941056fc 100644 --- a/pandora_agents/shellscript/hp-ux/pandora_agent.conf +++ b/pandora_agents/shellscript/hp-ux/pandora_agent.conf @@ -11,6 +11,7 @@ temporal /var/spool/pandora/data_out interval 300 #agent_name satellite_system checksum 1 +# Debug mode renames XML in the temp folder and continues running debug 0 # Module Definition diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf index 23524d4db2..bd946df430 100644 --- a/pandora_agents/shellscript/linux/pandora_agent.conf +++ b/pandora_agents/shellscript/linux/pandora_agent.conf @@ -15,8 +15,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # By default, agent takes machine name diff --git a/pandora_agents/shellscript/mac_osx/pandora_agent.conf b/pandora_agents/shellscript/mac_osx/pandora_agent.conf index 53edc0a423..0300f7c8b3 100644 --- a/pandora_agents/shellscript/mac_osx/pandora_agent.conf +++ b/pandora_agents/shellscript/mac_osx/pandora_agent.conf @@ -15,8 +15,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # By default, agent takes machine name diff --git a/pandora_agents/shellscript/openWRT/pandora_agent.conf b/pandora_agents/shellscript/openWRT/pandora_agent.conf index 811e4181df..ba26d1e65f 100644 --- a/pandora_agents/shellscript/openWRT/pandora_agent.conf +++ b/pandora_agents/shellscript/openWRT/pandora_agent.conf @@ -14,8 +14,7 @@ logfile /opt/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 30 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # By default, agent takes machine name diff --git a/pandora_agents/shellscript/solaris/pandora_agent.conf b/pandora_agents/shellscript/solaris/pandora_agent.conf index f66fa06679..4a933c21f1 100644 --- a/pandora_agents/shellscript/solaris/pandora_agent.conf +++ b/pandora_agents/shellscript/solaris/pandora_agent.conf @@ -11,6 +11,7 @@ temporal /var/spool/pandora/data_out interval 300 #agent_name satellite_system checksum 0 +# Debug mode renames XML in the temp folder and continues running debug 0 # By default is 22 (for ssh) #server_port 22 diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf index 9b5905996f..cda9f409ab 100644 --- a/pandora_agents/unix/AIX/pandora_agent.conf +++ b/pandora_agents/unix/AIX/pandora_agent.conf @@ -15,8 +15,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # By default, agent takes machine name diff --git a/pandora_agents/unix/Darwin/pandora_agent.conf b/pandora_agents/unix/Darwin/pandora_agent.conf index 35fbd8c7f8..79eadf34b3 100644 --- a/pandora_agents/unix/Darwin/pandora_agent.conf +++ b/pandora_agents/unix/Darwin/pandora_agent.conf @@ -17,8 +17,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # Optional. UDP Server to receive orders from outside diff --git a/pandora_agents/unix/FreeBSD/pandora_agent.conf b/pandora_agents/unix/FreeBSD/pandora_agent.conf index 4c1e20f0ff..776e68ae8d 100644 --- a/pandora_agents/unix/FreeBSD/pandora_agent.conf +++ b/pandora_agents/unix/FreeBSD/pandora_agent.conf @@ -18,8 +18,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # Optional. UDP Server to receive orders from outside diff --git a/pandora_agents/unix/HP-UX/pandora_agent.conf b/pandora_agents/unix/HP-UX/pandora_agent.conf index 522ef2f345..547d7e2256 100644 --- a/pandora_agents/unix/HP-UX/pandora_agent.conf +++ b/pandora_agents/unix/HP-UX/pandora_agent.conf @@ -17,8 +17,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # By default, agent takes machine name diff --git a/pandora_agents/unix/NetBSD/pandora_agent.conf b/pandora_agents/unix/NetBSD/pandora_agent.conf index ef6a51d6d2..706400f417 100644 --- a/pandora_agents/unix/NetBSD/pandora_agent.conf +++ b/pandora_agents/unix/NetBSD/pandora_agent.conf @@ -17,8 +17,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # By default, agent takes machine name diff --git a/pandora_agents/unix/SunOS/pandora_agent.conf b/pandora_agents/unix/SunOS/pandora_agent.conf index d642c6d314..882f6cadd5 100644 --- a/pandora_agents/unix/SunOS/pandora_agent.conf +++ b/pandora_agents/unix/SunOS/pandora_agent.conf @@ -17,8 +17,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # By default, agent takes machine name From 4da7b08f84b83ad57eb621180f940f2056040de3 Mon Sep 17 00:00:00 2001 From: fermin831 Date: Tue, 18 Jul 2017 16:23:45 +0200 Subject: [PATCH 062/142] Avoid to launch postinst script on Debian remove fail --- pandora_agents/unix/DEBIAN/prerm | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_agents/unix/DEBIAN/prerm b/pandora_agents/unix/DEBIAN/prerm index 847c25f593..35682fa3c5 100755 --- a/pandora_agents/unix/DEBIAN/prerm +++ b/pandora_agents/unix/DEBIAN/prerm @@ -14,3 +14,4 @@ if [ -x `command -v systemctl` ]; then else update-rc.d -f pandora_agent_daemon remove fi +exit 0 From 1c059f5afc8844b8c62e036d84ea33bd2e6f7be1 Mon Sep 17 00:00:00 2001 From: fermin831 Date: Tue, 18 Jul 2017 17:28:26 +0200 Subject: [PATCH 063/142] Stop agent on uninstall tarball --- pandora_agents/unix/pandora_agent_installer | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 7967cc9d11..723623da19 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -150,6 +150,13 @@ uninstall () { rm /Library/LaunchDaemons/com.pandorafms.pandorafms.plist 2> /dev/null fi + # Stops the agent on uninstall + if [ -f $PANDORA_BASE/etc/init.d/pandora_agent_daemon ]; then + $PANDORA_BASE/etc/init.d/pandora_agent_daemon stop 12> /dev/null + else + echo "$PANDORA_BASE/etc/init.d/pandora_agent_daemon not found to stop agent" + fi + echo "Removing Pandora FMS Agent..." rm -Rf $PANDORA_BASE$PANDORA_BIN 2> /dev/null rm -Rf $PANDORA_BASE$PANDORA_EXEC_BIN 2> /dev/null From b8b6937284637803dc41f052f0e98247984887c3 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 19 Jul 2017 00:01:16 +0200 Subject: [PATCH 064/142] Auto-updated build strings. --- pandora_agents/pc/Win32/pandora_agent.conf | 2 +- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pandora_agents/pc/Win32/pandora_agent.conf b/pandora_agents/pc/Win32/pandora_agent.conf index fef75e8919..c1730d6535 100644 --- a/pandora_agents/pc/Win32/pandora_agent.conf +++ b/pandora_agents/pc/Win32/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2010 Artica Soluciones Tecnologicas -# Version 7.0NG.707 +# Version 7.0NG.707 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index b2baa6978a..a9440597f9 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170718 +Version: 7.0NG.707-170719 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 25f101dcbc..c1b7ad8443 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.707-170718" +pandora_version="7.0NG.707-170719" 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 f05b8948ab..7ee0158f7e 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170718'; +use constant AGENT_BUILD => '170719'; # 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 dee15b601c..8eb9e5145a 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170718 +%define release 170719 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 10905ab433..fb9dadd473 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170718 +%define release 170719 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 723623da19..a1caa62232 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170718" +PI_BUILD="170719" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 5f562b103e..5b2dae76b6 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170718} +{170719} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index e0e4567c8c..7faaccda0e 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.707(Build 170718)") +#define PANDORA_VERSION ("7.0NG.707(Build 170719)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 3fa1197125..4c73bd9315 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.707(Build 170718))" + VALUE "ProductVersion", "(7.0NG.707(Build 170719))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 264e95b72e..3302bc09ff 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170718 +Version: 7.0NG.707-170719 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 26ce1db52d..022d244e77 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.707-170718" +pandora_version="7.0NG.707-170719" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 4a5b4fbe45..9d3dd26af2 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170718'; +$build_version = 'PC170719'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 524954ec77..8ea65412df 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Wed, 19 Jul 2017 10:36:24 +0200 Subject: [PATCH 065/142] Added the last things to the new vc item (module events) --- .../reporting/visual_console_builder.editor.js | 16 ++++++++++++---- .../images/console/signes/module-events.png | Bin 0 -> 6040 bytes .../include/functions_visual_map.php | 8 ++++---- 3 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 pandora_console/images/console/signes/module-events.png diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index e1b2a50cf5..104ddb9ddb 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -1904,10 +1904,17 @@ function setEventsBar(id_data, values) { dataType: 'json', success: function (data) { if (data['no_data'] == true) { - $("#" + id_data + " img").attr('src', url_hack_metaconsole + 'images/console/signes/module_graph.png'); + if (values['width'] == "0" || values['height'] == "0") { + $("#" + id_data + " img").attr('src', url_hack_metaconsole + 'images/console/signes/module-events.png'); + } + else { + $("#" + id_data + " img").attr('src', url_hack_metaconsole + 'images/console/signes/module-events.png'); + $("#" + id_data + " img").css('width', values['width'] + 'px'); + $("#" + id_data + " img").css('height', values['height'] + 'px'); + } } else { - $("#" + id_data + " img").attr('src', url_hack_metaconsole + 'images/console/signes/module_graph.png'); + $("#" + id_data + " img").attr('src', url_hack_metaconsole + 'images/console/signes/module-events.png'); if($('#text-width').val() == 0 || $('#text-height').val() == 0){ $("#" + id_data + " img").css('width', '300px'); @@ -2241,7 +2248,7 @@ function createItem(type, values, id_data) { case 'auto_sla_graph': var sizeStyle = ''; var imageSize = ''; - item = $('
' + + item = $('
' + '
' + values['label'] + '
' + '' + '
' @@ -2742,7 +2749,8 @@ function updateDB(type, idElement , values, event) { update_user_line(type, idElement, top, left); break; default: - + console.log(values); + console.log(idElement); if ((typeof(values['mov_left']) != 'undefined') && (typeof(values['mov_top']) != 'undefined')) { top = parseInt($("#" + idElement) diff --git a/pandora_console/images/console/signes/module-events.png b/pandora_console/images/console/signes/module-events.png new file mode 100644 index 0000000000000000000000000000000000000000..1393364a8418c35fac87bb16783986a65f5f81b2 GIT binary patch literal 6040 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 S=e8680000'; + $img = ''; } else{ - $img = ''; + $img = ''; } } } From 06eadbaf81fa286a4136630e12c9747d4cae685d Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 19 Jul 2017 10:52:01 +0200 Subject: [PATCH 066/142] Fixed urlencode in event popup --- 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 01610e5338..fe34c2ebdb 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -2115,7 +2115,7 @@ function events_page_details ($event, $server = "") { "type" => $graph_type, "period" => SECONDS_1DAY, "id" => $module["id_agente_modulo"], - "label" => rawurlencode(urlencode(base64_encode($module["nombre"]))), + "label" => base64_encode($module["nombre"]), "refresh" => SECONDS_10MINUTES ); From 278330e8f6cee8c59acde1e8d52c325f81f84bc9 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Wed, 19 Jul 2017 11:37:17 +0200 Subject: [PATCH 067/142] Added some fixes to reset pass feature --- .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 10 ++++++++++ pandora_console/index.php | 9 ++++++++- pandora_console/pandoradb.sql | 10 ++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 16b67d8e28..b216b01d3c 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -1337,6 +1337,16 @@ CREATE TABLE IF NOT EXISTS `tcontainer` ( INSERT INTO `tcontainer` SET `name` = 'Default graph container'; +-- ---------------------------------------------------------------------- +-- Table `treset_pass_history` +-- ---------------------------------------------------------------------- +CREATE TABLE IF NOT EXISTS `treset_pass_history` ( + `id` int(10) unsigned NOT NULL auto_increment, + `id_user` varchar(60) NOT NULL, + `reset_moment` date default NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + -- --------------------------------------------------------------------- -- Table `tcontainer_item` -- --------------------------------------------------------------------- diff --git a/pandora_console/index.php b/pandora_console/index.php index ff0e86cb8c..5a32eaa670 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -584,6 +584,13 @@ if (! isset ($config['id_user'])) { $res = update_user_password ($id_user, $pass1); if ($res) { $correct_reset_pass_process = __('Password changed successfully'); + + $values = array(); + $values['id_user'] = $id_user; + $reset_pass_moment = new DateTime('now'); + $reset_pass_moment = $reset_pass_moment->format("Y-m-d H:i:s"); + $values['reset_moment'] = $reset_pass_moment; + db_process_sql_insert('treset_pass_history', $values); } else { $process_error_message = __('Failed to change password'); @@ -641,7 +648,7 @@ if (! isset ($config['id_user'])) { if (!$check_user) { $reset = false; - $error = __('User doesn\'t exist in database'); + $error = __('Error in reset password request'); $show_error = true; } else { diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 9733792280..91362e2d59 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1143,6 +1143,16 @@ CREATE TABLE IF NOT EXISTS `tuser_double_auth` ( FOREIGN KEY (`id_user`) REFERENCES tusuario(`id_user`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- ---------------------------------------------------------------------- +-- Table `treset_pass_history` +-- ---------------------------------------------------------------------- +CREATE TABLE IF NOT EXISTS `treset_pass_history` ( + `id` int(10) unsigned NOT NULL auto_increment, + `id_user` varchar(60) NOT NULL, + `reset_moment` datetime not null default 0, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + -- ---------------------------------------------------------------------- -- Table `tnews` -- ---------------------------------------------------------------------- From 5fd6c039171ffa399f9de02262e16144d69d9e80 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 19 Jul 2017 12:32:45 +0200 Subject: [PATCH 068/142] Change agent name by alias in gis map --- pandora_console/operation/gis_maps/ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/operation/gis_maps/ajax.php b/pandora_console/operation/gis_maps/ajax.php index deed8688a4..634fb17ef5 100644 --- a/pandora_console/operation/gis_maps/ajax.php +++ b/pandora_console/operation/gis_maps/ajax.php @@ -246,7 +246,7 @@ switch ($opt) { $row = array(); $row[] = __('Agent'); $row[] = ''.$agent['nombre'].''; + . $agent['id_agente'] . '">'.$agent['alias'].''; $table->data[] = $row; // Position From 31a8995176b11f0285537354f2b408d6d03b9e53 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Wed, 19 Jul 2017 19:02:20 +0200 Subject: [PATCH 069/142] Fix restore element width when press double click over data image simple_value - #412 --- .../godmode/reporting/visual_console_builder.editor.js | 9 ++++++--- pandora_console/include/functions_visual_map_editor.php | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index 4a0fa19d2e..36bcefa215 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -576,8 +576,10 @@ function readFields() { } values['width'] = $("input[name=width]").val(); values['width_data_image'] = $("#data_image_width").val(); - if(values['width_data_image'] != 0){ - values['width'] = values['width_data_image']; + if(selectedItem == 'simple_value' || creationItem == 'simple_value'){ + if(values['width_data_image'] != 0){ + values['width'] = values['width_data_image']; + } } values['height'] = $("input[name=height]").val(); values['parent'] = $("select[name=parent]").val(); @@ -2989,7 +2991,7 @@ function eventsItems(drag) { } if(selectedItem == 'simple_value'){ - + $('#data_image_width').val(event.currentTarget.clientWidth); var found = $('#'+idItem).find("img"); if(found.length > 0){ @@ -3344,6 +3346,7 @@ function click_button_toolbox(id) { $("#period_row." + id).css('display', 'none'); break; case 'label': + $("#data_image_width").val(100); toolbuttonActive = creationItem = 'label'; toggle_item_palette(); break; diff --git a/pandora_console/include/functions_visual_map_editor.php b/pandora_console/include/functions_visual_map_editor.php index e2e01a21d6..2ba31b6a48 100755 --- a/pandora_console/include/functions_visual_map_editor.php +++ b/pandora_console/include/functions_visual_map_editor.php @@ -314,7 +314,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { $form_items['module_row']['html'] = '' . __('Module') . ' ' . - html_print_select(array(), 'module', '', '', __('Any'), 0, true). ' + html_print_select(array(), 'module', '', '', __('Any'), 0, true). ' '; From 728fb7cc69c6b76a6029500731d71a711fb5fdea Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 20 Jul 2017 00:01:18 +0200 Subject: [PATCH 070/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index a9440597f9..ee77385f12 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170719 +Version: 7.0NG.707-170720 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 c1b7ad8443..12b8d9f099 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.707-170719" +pandora_version="7.0NG.707-170720" 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 7ee0158f7e..3f6a337845 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170719'; +use constant AGENT_BUILD => '170720'; # 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 8eb9e5145a..05acf65e4e 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170719 +%define release 170720 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index fb9dadd473..5aeecfe8ee 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170719 +%define release 170720 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 a1caa62232..f0add54ad3 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170719" +PI_BUILD="170720" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 5b2dae76b6..eeb545f50c 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170719} +{170720} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 7faaccda0e..3917358edf 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.707(Build 170719)") +#define PANDORA_VERSION ("7.0NG.707(Build 170720)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 4c73bd9315..fd59c0ec06 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.707(Build 170719))" + VALUE "ProductVersion", "(7.0NG.707(Build 170720))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 3302bc09ff..543ada6c0d 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170719 +Version: 7.0NG.707-170720 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 022d244e77..08feaacb9f 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.707-170719" +pandora_version="7.0NG.707-170720" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 9d3dd26af2..3e2860feaa 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170719'; +$build_version = 'PC170720'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 8ea65412df..d0afdb4dfd 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Thu, 20 Jul 2017 13:36:16 +0200 Subject: [PATCH 071/142] fixed errors entities in mail --- pandora_console/godmode/agentes/configurar_agente.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index c804ddc22c..27e1608eac 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1228,7 +1228,7 @@ if ($update_module) { 'min_ff_event_critical' => $ff_event_critical, 'each_ff' => $each_ff, 'ff_timeout' => $ff_timeout, - 'unit' => $unit, + 'unit' => io_safe_output($unit), 'macros' => $macros, 'quiet' => $quiet_module, 'critical_instructions' => $critical_instructions, @@ -1388,7 +1388,7 @@ if ($create_module) { 'min_ff_event_critical' => $ff_event_critical, 'each_ff' => $each_ff, 'ff_timeout' => $ff_timeout, - 'unit' => $unit, + 'unit' => io_safe_output($unit), 'macros' => $macros, 'quiet' => $quiet_module, 'critical_instructions' => $critical_instructions, From f88f375ea35a2eb4fbbccf87cdc072e39bb7572d Mon Sep 17 00:00:00 2001 From: enriquecd Date: Thu, 20 Jul 2017 15:14:20 +0200 Subject: [PATCH 072/142] Filter agents by server automatico module graph and fix bug - #1088 --- .../include/functions_reporting.php | 70 ++++++------------- 1 file changed, 23 insertions(+), 47 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index ffde723fe7..36debe9a70 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -128,26 +128,6 @@ function reporting_make_reporting_data($report = null, $id_report, $content['period'] = $period; } - if(defined('METACONSOLE')){ - if (is_array($content['id_agent'])) { - $new_array = array(); - foreach ($content['id_agent'] as $key => $value) { - $meta_id = explode("|",$value); - array_push($new_array,$meta_id[1]); - } - $content['id_agent'] = $new_array; - } - else { - $meta_id = explode("|",$content['id_agent']); - if ($meta_id[1] != null) { - $content['id_agent'] = array(); - $content['id_agent'] = $meta_id[1]; - } - } - - - } - $content['style'] = json_decode(io_safe_output($content['style']), true); if(isset($content['style']['name_label'])){ //Add macros name @@ -166,19 +146,17 @@ function reporting_make_reporting_data($report = null, $id_report, continue; } } + + + if(sizeof($content['id_agent']) != 1){ + $content['style']['name_label'] = str_replace("_agent_",sizeof($content['id_agent']).__(' agents'),$content['style']['name_label']); + } + if(sizeof($content['id_agent_module']) != 1){ + $content['style']['name_label'] = str_replace("_module_",sizeof($content['id_agent_module']).__(' modules'),$content['style']['name_label']); + } - - if(sizeof($content['id_agent']) != 1){ - $content['style']['name_label'] = str_replace("_agent_",sizeof($content['id_agent']).__(' agents'),$content['style']['name_label']); - } - - if(sizeof($content['id_agent_module']) != 1){ - $content['style']['name_label'] = str_replace("_module_",sizeof($content['id_agent_module']).__(' modules'),$content['style']['name_label']); - } - - $content['name'] = reporting_label_macro($items_label, $content['style']['name_label']); - + $content['name'] = reporting_label_macro($items_label, $content['style']['name_label']); if ($metaconsole_on) { //Restore db connection @@ -5811,12 +5789,17 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', require_once ($config["homedir"] . '/include/functions_graph.php'); - if ($config['metaconsole']) { - $id_meta = metaconsole_get_id_server($content["server_name"]); - - - $server = metaconsole_get_connection_by_id ($id_meta); - metaconsole_connect($server); + if ($type_report == 'automatic_graph') { + // Do none + } + else { + if ($config['metaconsole']) { + $id_meta = metaconsole_get_id_server($content["server_name"]); + + + $server = metaconsole_get_connection_by_id ($id_meta); + metaconsole_connect($server); + } } $graph = db_get_row ("tgraph", "id_graph", $content['id_gs']); @@ -5869,8 +5852,7 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', 'id_agent' =>modules_get_agentmodule_agent($graph_item['id_agent_module']), 'id_agent_module'=>$graph_item['id_agent_module']); } - - $label = reporting_label_macro($item, $content['style']['label']); + $labels[$graph_item['id_agent_module']] = $label; } } @@ -5889,13 +5871,6 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', $height = 50; } } - if (defined('METACONSOLE')) { - $modules_new = array(); - foreach ($modules as $mod) { - $modules_new[] = $mod['module']; - } - $modules = $modules_new; - } switch ($type) { case 'dinamic': @@ -10292,6 +10267,7 @@ function reporting_get_agentmodule_sla_working_timestamp ($period, $date_end, $w } function reporting_label_macro ($item, $label) { + switch ($item['type']) { case 'event_report_agent': case 'alert_report_agent': @@ -10317,7 +10293,6 @@ function reporting_label_macro ($item, $label) { $label = str_replace("_address_", $agent_name, $label); } break; - case 'automatic_graph': case 'simple_graph': case 'module_histogram_graph': case 'custom_graph': @@ -10337,6 +10312,7 @@ function reporting_label_macro ($item, $label) { case 'TTO': case 'MTBF': case 'MTTR': + case 'automatic_graph': if (preg_match("/_agent_/", $label)) { $agent_name = agents_get_alias($item['id_agent']); $label = str_replace("_agent_", $agent_name, $label); From 9cc461ec8b1f31ee247c4bdec87485dd8c99fd51 Mon Sep 17 00:00:00 2001 From: Enrique Camargo Date: Thu, 20 Jul 2017 15:23:46 +0200 Subject: [PATCH 073/142] Update functions_reporting.php --- pandora_console/include/functions_reporting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 36debe9a70..1a87280c15 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -5852,7 +5852,7 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', 'id_agent' =>modules_get_agentmodule_agent($graph_item['id_agent_module']), 'id_agent_module'=>$graph_item['id_agent_module']); } - + $label = reporting_label_macro($item, $content['style']['label']); $labels[$graph_item['id_agent_module']] = $label; } } From ef007f8a6f0411bb7504237438b4ee6e14562cea Mon Sep 17 00:00:00 2001 From: enriquecd Date: Thu, 20 Jul 2017 15:53:43 +0200 Subject: [PATCH 074/142] Fix labels - #1088 --- pandora_console/include/functions_reporting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 1a87280c15..f64bb7d0ed 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -5852,7 +5852,7 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', 'id_agent' =>modules_get_agentmodule_agent($graph_item['id_agent_module']), 'id_agent_module'=>$graph_item['id_agent_module']); } - $label = reporting_label_macro($item, $content['style']['label']); + $labels[$graph_item['id_agent_module']] = $label; } } From 1d35620ea65ba91edd3a61b3dff673ceaf2e273c Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 21 Jul 2017 00:01:16 +0200 Subject: [PATCH 075/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index ee77385f12..123ec79e09 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170720 +Version: 7.0NG.707-170721 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 12b8d9f099..3befeff580 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.707-170720" +pandora_version="7.0NG.707-170721" 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 3f6a337845..c76059472b 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170720'; +use constant AGENT_BUILD => '170721'; # 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 05acf65e4e..043e84ec75 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170720 +%define release 170721 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 5aeecfe8ee..11a7a0149b 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170720 +%define release 170721 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 f0add54ad3..9bef9306e7 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170720" +PI_BUILD="170721" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index eeb545f50c..c5033366b2 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170720} +{170721} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 3917358edf..31882ee8bd 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.707(Build 170720)") +#define PANDORA_VERSION ("7.0NG.707(Build 170721)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index fd59c0ec06..de7879e15a 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.707(Build 170720))" + VALUE "ProductVersion", "(7.0NG.707(Build 170721))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 543ada6c0d..4a3cbd1d33 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170720 +Version: 7.0NG.707-170721 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 08feaacb9f..ac27655143 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.707-170720" +pandora_version="7.0NG.707-170721" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 3e2860feaa..904642948f 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170720'; +$build_version = 'PC170721'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index d0afdb4dfd..eaefe271c8 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Fri, 21 Jul 2017 12:19:56 +0200 Subject: [PATCH 076/142] Expand layer --- pandora_console/operation/gis_maps/render_view.php | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_console/operation/gis_maps/render_view.php b/pandora_console/operation/gis_maps/render_view.php index 07e08582ec..36e20bf709 100644 --- a/pandora_console/operation/gis_maps/render_view.php +++ b/pandora_console/operation/gis_maps/render_view.php @@ -242,6 +242,7 @@ if ($config["pure"] != 0) { var new_height = $(document).height(); $("#map").css("height", new_height - 60); + $("svg[id*=OpenLayers]").css("height", new_height - 60); }); From aa5d18ff3fa9a22deecf46132bee95356e31600d Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 21 Jul 2017 14:45:23 +0200 Subject: [PATCH 077/142] fixed errors in agent buffered always --- pandora_agents/unix/pandora_agent | 129 ++++++++++++++++++++++++------ 1 file changed, 103 insertions(+), 26 deletions(-) diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index c76059472b..b1d4e9ef1d 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -906,14 +906,13 @@ sub fix_directory ($) { ################################################################################ # Sends a file to the server. ################################################################################ -#sub send_file ($;$) { +#sub send_file ($;$$$) { sub send_file { - my ($file, $secondary) = @_; + my ($file, $secondary, $rc_primary, $flag_always) = @_; my $output; - my $pid = fork(); return 1 unless defined $pid; - + if ($pid == 0) { # execute the transfer program by child process. eval { @@ -942,14 +941,14 @@ sub send_file { }; if ($@) { - log_message ('error', "Error sending file '$file': File transfer command is not responding."); + log_message ('error', "Error sending file '$file' to '" . $Conf{'server_ip'} . ":" . $Conf{'server_port'}. "': File transfer command is not responding."); exit 1; } # Get the errorlevel my $rc = $? >> 8; if ($rc != 0) { - log_message ('error', "Error sending file '$file': $output"); + log_message ('error', "Error sending file '$file' to '" . $Conf{'server_ip'} . ":" . $Conf{'server_port'}. "': $output"); } exit $rc; } @@ -958,39 +957,104 @@ sub send_file { waitpid ($pid, 0); my $rc = $? >> 8; - return $rc unless (defined ($secondary)); + if( ($Conf{'secondary_mode'} eq 'always') && ( !defined($flag_always) ) ){ + # Send the file to the secondary server + return $rc unless ($Conf{'secondary_mode'} eq 'always'); + + if(defined ($secondary)){ + if( ($rc != 0 && ($file =~ /\.data/)) ){ + $rc_primary = 1; + } + swap_servers (); + $rc = send_file ($file, undef, $rc_primary); + swap_servers (); - # Send the file to the secondary server - return $rc unless ($Conf{'secondary_mode'} eq 'always' || ($Conf{'secondary_mode'} eq 'on_error' && $rc != 0)); - - swap_servers (); - $rc = send_file ($file); - swap_servers (); - return $rc; + return $rc; + } + else{ + my $rc_secondary = 0; + if( ($rc != 0) && ($file =~ /\.data/)){ + $rc_secondary = 1; + } + + if ( $rc_secondary == 1 && defined($rc_primary) ){ + return 1; + } + + if ( $rc_secondary == 1 ){ + if (! -d "$Conf{'temporal'}/secondary"){ + mkdir "$Conf{'temporal'}/secondary"; + } + eval { + copy("$file", "$Conf{'temporal'}/secondary/"); + }; + if ($@) { + # We shouldn't reach this point... + die ("Cannot write on $Conf{'temporal'}/secondary/"); + } + return 0; + } + + if ( defined($rc_primary) ){ + if (! -d "$Conf{'temporal'}/primary"){ + mkdir "$Conf{'temporal'}/primary"; + } + eval { + copy("$file", "$Conf{'temporal'}/primary/"); + }; + if ($@) { + # We shouldn't reach this point... + die ("Cannot write on $Conf{'temporal'}/primary/"); + } + return 0; + } + + if ( $rc_secondary == 0 && !defined($rc_primary) ){ + return 0; + } + } + } + elsif ( ($Conf{'secondary_mode'} eq 'always') && defined($flag_always) ){ + return $rc; + } + else{ + return $rc unless (defined ($secondary)); + + # Send the file to the secondary server + return $rc unless ($Conf{'secondary_mode'} eq 'always' || ($Conf{'secondary_mode'} eq 'on_error' && $rc != 0)); + + swap_servers (); + $rc = send_file ($file); + swap_servers (); + return $rc; + } } ################################################################################ # Send buffered XML files. ################################################################################ -sub send_buffered_xml_files () { - +sub send_buffered_xml_files ($;$) { + my ($temporal_file, $flag_always) = @_; # Read XML files from the temporal directory - opendir(TEMPORAL, $Conf{'temporal'}) or return; - while (my $xml_file = readdir(TEMPORAL)) { - + opendir(TEMPORAL, $temporal_file) or return; + if (defined($flag_always) && ($flag_always == 2)){ + swap_servers (); + } + while (my $xml_file = readdir(TEMPORAL)) { # Skip non data files and symlinks - next if ($xml_file !~ m/^$Conf{'agent_name'}\.[0-9]+\.data$/ || -l "$Conf{'temporal'}/$xml_file"); - - my $rc = send_file ("$Conf{'temporal'}/$xml_file", 1); - + next if ($xml_file !~ m/^$Conf{'agent_name'}\.[0-9]+\.data$/ || -l "$temporal_file/$xml_file"); + my $rc = send_file ("$temporal_file/$xml_file", 1, undef, $flag_always); if ($rc == 0) { if ($Conf{'debug'} eq '1') { - rename "$Conf{'temporal'}/$xml_file", "$Conf{'temporal'}/$xml_file". "sent"; + rename "$temporal_file/$xml_file", "$temporal_file/$xml_file". "sent"; } else { - unlink ("$Conf{'temporal'}/$xml_file"); + unlink ("$temporal_file/$xml_file"); } } } + if (defined($flag_always) && ($flag_always == 2)){ + swap_servers (); + } } ################################################################################ @@ -2769,7 +2833,20 @@ while (1) { # Send buffered XML data files if ($Conf{'xml_buffer'} == 1) { - send_buffered_xml_files (); + if($Conf{'secondary_mode'} eq 'always'){ + $Conf{'__temporal_primary'} = "$Conf{'temporal'}/primary"; + $Conf{'__temporal_secondary'} = "$Conf{'temporal'}/secondary"; + if (-d "$Conf{'__temporal_primary'}"){ + send_buffered_xml_files ($Conf{'__temporal_primary'}, 1); + } + if (-d "$Conf{'__temporal_secondary'}"){ + send_buffered_xml_files ($Conf{'__temporal_secondary'}, 2); + } + send_buffered_xml_files ($Conf{'temporal'}); + } + else{ + send_buffered_xml_files ($Conf{'temporal'}); + } } } From 75a9a41a0ba55acbe0ec5d1522ec45cf2b3fc68e Mon Sep 17 00:00:00 2001 From: enriquecd Date: Fri, 21 Jul 2017 14:57:03 +0200 Subject: [PATCH 078/142] Add report info option in metaconsole 7 open - #1085 --- pandora_console/include/functions_config.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 6a60622462..0317a34141 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -1653,6 +1653,10 @@ function config_process_config () { config_update_value ('command_snapshot', 1); } + if (!isset($config['custom_report_info'])) { + config_update_value ('custom_report_info', 1); + } + // Juanma (06/05/2014) New feature: Custom front page for reports if (!isset($config['custom_report_front'])) { config_update_value ('custom_report_front', 0); From b5caec31b54476cf716217e97663171070d24bb5 Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 22 Jul 2017 00:01:45 +0200 Subject: [PATCH 079/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 123ec79e09..228e08f9f6 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170721 +Version: 7.0NG.707-170722 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 3befeff580..5bc91cdabc 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.707-170721" +pandora_version="7.0NG.707-170722" 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 c76059472b..2b9c3f8101 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170721'; +use constant AGENT_BUILD => '170722'; # 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 043e84ec75..7a3dd6cdac 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170721 +%define release 170722 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 11a7a0149b..5e47bc0296 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170721 +%define release 170722 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 9bef9306e7..3b92912317 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170721" +PI_BUILD="170722" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index c5033366b2..af4ba043ae 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170721} +{170722} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 31882ee8bd..8d9d916d8f 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.707(Build 170721)") +#define PANDORA_VERSION ("7.0NG.707(Build 170722)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index de7879e15a..838ef13ee4 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.707(Build 170721))" + VALUE "ProductVersion", "(7.0NG.707(Build 170722))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 4a3cbd1d33..94f4bb586d 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170721 +Version: 7.0NG.707-170722 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 ac27655143..6a5fdfc3c7 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.707-170721" +pandora_version="7.0NG.707-170722" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 904642948f..f57859c3c1 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170721'; +$build_version = 'PC170722'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index eaefe271c8..3ddf6ef5cf 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Sun, 23 Jul 2017 00:01:13 +0200 Subject: [PATCH 080/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 228e08f9f6..c0d98e312c 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170722 +Version: 7.0NG.707-170723 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 5bc91cdabc..98eb76dafd 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.707-170722" +pandora_version="7.0NG.707-170723" 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 2b9c3f8101..29d0ab8503 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170722'; +use constant AGENT_BUILD => '170723'; # 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 7a3dd6cdac..a789b59e78 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170722 +%define release 170723 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 5e47bc0296..4d193fb159 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170722 +%define release 170723 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 3b92912317..39915431d0 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170722" +PI_BUILD="170723" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index af4ba043ae..163ca61d7c 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170722} +{170723} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 8d9d916d8f..438bf49b45 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.707(Build 170722)") +#define PANDORA_VERSION ("7.0NG.707(Build 170723)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 838ef13ee4..dfe7b6fff5 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.707(Build 170722))" + VALUE "ProductVersion", "(7.0NG.707(Build 170723))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 94f4bb586d..1eebfca7d3 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170722 +Version: 7.0NG.707-170723 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 6a5fdfc3c7..b1aff17ed8 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.707-170722" +pandora_version="7.0NG.707-170723" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index f57859c3c1..305848d865 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170722'; +$build_version = 'PC170723'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 3ddf6ef5cf..ca33a0a71a 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Mon, 24 Jul 2017 00:01:17 +0200 Subject: [PATCH 081/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index c0d98e312c..fb0020c623 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170723 +Version: 7.0NG.707-170724 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 98eb76dafd..61ef71f330 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.707-170723" +pandora_version="7.0NG.707-170724" 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 29d0ab8503..e6dee72481 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170723'; +use constant AGENT_BUILD => '170724'; # 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 a789b59e78..2cfb6500c6 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170723 +%define release 170724 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 4d193fb159..966039b6de 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170723 +%define release 170724 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 39915431d0..71a9468513 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170723" +PI_BUILD="170724" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 163ca61d7c..bcf9f04587 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170723} +{170724} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 438bf49b45..e5c5c6831c 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.707(Build 170723)") +#define PANDORA_VERSION ("7.0NG.707(Build 170724)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index dfe7b6fff5..df7354adc7 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.707(Build 170723))" + VALUE "ProductVersion", "(7.0NG.707(Build 170724))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 1eebfca7d3..95d67a3259 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170723 +Version: 7.0NG.707-170724 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 b1aff17ed8..f4846cae5a 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.707-170723" +pandora_version="7.0NG.707-170724" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 305848d865..e0201f7871 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170723'; +$build_version = 'PC170724'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index ca33a0a71a..8c486ed8c1 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Mon, 24 Jul 2017 10:53:04 +0200 Subject: [PATCH 082/142] fixed errors in graph container --- .../godmode/reporting/create_container.php | 17 ++++++++++--- .../godmode/reporting/graph_container.php | 2 +- pandora_console/images/image_problem_area.png | Bin 0 -> 21148 bytes pandora_console/include/ajax/graph.ajax.php | 24 ++++++++++-------- pandora_console/include/styles/pandora.css | 21 +++++++++++++++ 5 files changed, 49 insertions(+), 15 deletions(-) create mode 100644 pandora_console/images/image_problem_area.png diff --git a/pandora_console/godmode/reporting/create_container.php b/pandora_console/godmode/reporting/create_container.php index fed5a6242a..9be93af597 100644 --- a/pandora_console/godmode/reporting/create_container.php +++ b/pandora_console/godmode/reporting/create_container.php @@ -41,7 +41,7 @@ if (is_ajax()){ $id_agent = get_parameter('id_agent'); $id_agent_module = get_parameter('id_agent_module'); $time_lapse = get_parameter('time_lapse'); - $only_avg = (int) get_parameter('only_avg'); + $only_avg = (bool) get_parameter('only_avg'); $values = array( 'id_container' => $id_container2, @@ -76,6 +76,7 @@ if (is_ajax()){ $agent_alias = get_parameter('agent_alias',''); $module_name = get_parameter('module_name',''); $tag = get_parameter('tag',0); + $only_avg = (bool) get_parameter('only_avg'); $values = array( 'id_container' => $id_container2, @@ -85,8 +86,8 @@ if (is_ajax()){ 'id_module_group' => $module_group, 'agent' => $agent_alias, 'module' => $module_name, - 'id_tag' => $tag); - + 'id_tag' => $tag, + 'only_average' => $only_avg); $id_item = db_process_sql_insert('tcontainer_item', $values); return; } @@ -433,7 +434,13 @@ if($edit_container){ $tag, '', __('Any'), 0, true, false, false); $table->data[] = $data; $table->rowclass[] = ''; - + + $data = array(); + $data[0] = __('Only average'); + $data[1] = html_print_checkbox('only_avg', 1, false,true); + $table->data[] = $data; + $table->rowclass[] = ''; + $data = array(); $data[0] = ""; $data[1] = ""; @@ -592,6 +599,7 @@ echo html_print_input_hidden('id_agent', 0); var group = $("#container_id_group1").val(); var module_group = $("#combo_modulegroup").val(); var tag = $("#tag").val(); + var only_avg = $("#checkbox-only_avg1").prop("checked"); var id_container = ; jQuery.post ("ajax.php", {"page" : "godmode/reporting/create_container", @@ -603,6 +611,7 @@ echo html_print_input_hidden('id_agent', 0); "module_name" : module_name, "tag" : tag, "id_container" : id_container, + "only_avg" : only_avg, }, function (data, status) { var url = location.href.replace('&update_container=1', ""); diff --git a/pandora_console/godmode/reporting/graph_container.php b/pandora_console/godmode/reporting/graph_container.php index beef4167d2..6c4903fbb8 100644 --- a/pandora_console/godmode/reporting/graph_container.php +++ b/pandora_console/godmode/reporting/graph_container.php @@ -94,7 +94,7 @@ echo "
"; }, success: function(data) { $("#div_"+hash).remove(); - $("#tgl_div_"+hash).prepend("
"+data+"
"); + $("#tgl_div_"+hash).prepend("
"+data+"
"); if($('div[class *= graph]').length == 0 && $('div[class *= bullet]').length == 0 && $('div[id *= gauge_]').length == 0){ $("#div_"+hash).remove(); diff --git a/pandora_console/images/image_problem_area.png b/pandora_console/images/image_problem_area.png new file mode 100644 index 0000000000000000000000000000000000000000..d89324cf816c44eb9d2402253f8637baa9835faa GIT binary patch literal 21148 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 Yt_ATO=lgZ@

AGENT " .$sql_alias[0]['alias']." MODULE ".$sql_modulo[0]['nombre']."


"; + $table .= "

AGENT " .$sql_alias[0]['alias']." MODULE ".$sql_modulo[0]['nombre']."


"; $table .= grafico_modulo_sparse( $value['id_agent_module'], $value['time_lapse'], 0, - 800, + 1000, 300, '', '', @@ -225,11 +225,11 @@ if ($get_graphs){ } else { $height = 300; } - $table .= "

CUSTOM GRAPH ".$graph[0]['name']."


"; + $table .= "

".$graph[0]['name']."


"; $table .= graphic_combined_module($modules, $weights, $value['time_lapse'], - 800, + 1000, $height, '', '', @@ -259,8 +259,10 @@ if ($get_graphs){ } break; case 'dynamic_graph': - $alias = " AND alias like '%".io_safe_output($value['agent'])."%'"; - + if($value['agent'] != ''){ + $alias = " AND alias REGEXP '".$value['agent']."'"; + } + if($value['id_group'] === '0'){ $id_group = ""; } else { @@ -281,8 +283,10 @@ if ($get_graphs){ $id_tag = " AND ttag_module.id_tag = ".$value['id_tag']; } - $module_name = " AND nombre like '%".io_safe_output($value['module'])."%'"; - + if($value['module'] != ''){ + $module_name = " AND nombre REGEXP '".$value['module']."'"; + } + $id_agent_module = db_get_all_rows_sql("SELECT tagente_modulo.id_agente_modulo FROM tagente_modulo ". $tag . "WHERE 1=1" . $id_module_group . $module_name . " AND id_agente IN (SELECT id_agente FROM tagente WHERE 1=1" .$alias.$id_group.")" @@ -296,13 +300,13 @@ if ($get_graphs){ $sql_alias2 = db_get_all_rows_sql("SELECT alias from tagente WHERE id_agente = ". $sql_modulo2[0]['id_agente']); - $table .= "

AGENT " .$sql_alias2[0]['alias']." MODULE ".$sql_modulo2[0]['nombre']."


"; + $table .= "

AGENT " .$sql_alias2[0]['alias']." MODULE ".$sql_modulo2[0]['nombre']."


"; $table .= grafico_modulo_sparse( $value2['id_agente_modulo'], $value['time_lapse'], 0, - 800, + 1000, 300, '', '', diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 9ee675f508..bb9b009d4a 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -4159,4 +4159,25 @@ div#footer_help{ /*view-agents lastest events for this agent*/ #div_all_events_24h{ padding: 4px; +} + +/*styles graph conteiner*/ +.graph_conteiner_inside > .parent_graph{ + width: 100% !important; +} + +.graph_conteiner_inside > .parent_graph > .menu_graph{ + left: 90% !important; +} + +.graph_conteiner_inside > .parent_graph > .noresizevc{ + width: 90% !important; +} + +.graph_conteiner_inside > div > .nodata_container > .nodata_text { + display: none; +} + +.graph_conteiner_inside > div > .nodata_container{ + background-size: 120px 80px !important; } \ No newline at end of file From 17229cbcd784cc9e443b83e9df6f297326bb4c9b Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Mon, 24 Jul 2017 11:09:20 +0200 Subject: [PATCH 083/142] Add a script to count .data files by agent. --- pandora_server/util/pandora_xml_count.README | 17 ++++++ pandora_server/util/pandora_xml_count.pl | 55 ++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 pandora_server/util/pandora_xml_count.README create mode 100755 pandora_server/util/pandora_xml_count.pl diff --git a/pandora_server/util/pandora_xml_count.README b/pandora_server/util/pandora_xml_count.README new file mode 100644 index 0000000000..88a2021952 --- /dev/null +++ b/pandora_server/util/pandora_xml_count.README @@ -0,0 +1,17 @@ +Pandora FMS XML count tool +========================== + +This is a small diagnosis tool that counts XML data files in Pandora FMS's spool directory by agent. + +Usage example +------------- + +$ perl ./pandora_xml_count.pl /var/spool/pandora_data_in +Number of .data files Agent name +--------------------- ---------- +1 Agent80 +1 Agent25 +42 Agent22 +... ... +41122 Agent21 + diff --git a/pandora_server/util/pandora_xml_count.pl b/pandora_server/util/pandora_xml_count.pl new file mode 100755 index 0000000000..cd81843c96 --- /dev/null +++ b/pandora_server/util/pandora_xml_count.pl @@ -0,0 +1,55 @@ +#!/usr/bin/perl +################################################################################ +# Pandora XML count tool. +################################################################################ +# Copyright (c) 2017 Artica Soluciones Tecnologicas S.L. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; version 2 +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +################################################################################ +use strict; +use warnings; + +# Check command line arguments. +if (!defined($ARGV[0])) { + die("Usage: $0 \n\n"); +} +my $spool_dir = $ARGV[0]; + +# Open Pandora's spool directory. +opendir(my $dh, $spool_dir) || die("Error opening directory $spool_dir: $!\n\n"); + +# Count files by agent. +my %totals; +while (my $file = readdir($dh)) { + + # Skip . and .. + next if ($file eq '.') or ($file eq '..'); + + # Skip files unknown to the Data Server. + next if ($file !~ /^(.*)[\._]\d+\.data$/); + + # Update the totals. + my $agent = $1; + if (!defined($totals{$agent})) { + $totals{$agent} = 1; + } else { + $totals{$agent} += 1; + } +} +closedir($dh); + +# Print the totals. +print "Number of .data files\t\tAgent name\n"; +print "---------------------\t\t----------\n"; +foreach my $agent (sort { $totals{$a} <=> $totals{$b}} keys(%totals)) { + print "$totals{$agent}\t\t\t\t$agent\n"; +} From 4dfbdca423fe4066e1c6e9ffca9713f9d8d29479 Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 24 Jul 2017 15:53:31 +0200 Subject: [PATCH 084/142] add new field table view agents for type of agent --- .../godmode/agentes/modificar_agente.php | 9 ++++ pandora_console/include/functions_ui.php | 22 ++++++++ .../operation/agentes/estado_agente.php | 50 +++++++++++-------- 3 files changed, 61 insertions(+), 20 deletions(-) diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index 4fa9725bf9..712abb5dbb 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -488,6 +488,7 @@ if ($agents !== false) { '' . html_print_image("images/sort_up.png", true, array("style" => $selectOsUp)) . '' . '' . html_print_image("images/sort_down.png", true, array("style" => $selectOsDown)) . ''; echo ""; + echo "".__('Type'). ""; echo "".__('Group'). ' ' . '' . html_print_image("images/sort_up.png", true, array("style" => $selectGroupUp)) . '' . '' . html_print_image("images/sort_down.png", true, array("style" => $selectGroupDown)) . ''; @@ -606,6 +607,14 @@ if ($agents !== false) { echo ""; ui_print_os_icon ($agent["id_os"], false); echo ""; + + // Type agent (Networt, Software or Satellite) + echo ""; + echo ui_print_type_agent_icon ($agent["id_os"], $agent['ultimo_contacto_remoto'], + $agent['ultimo_contacto'], $agent['remote'], $agent['agent_version']); + echo ""; + + // Group icon and name echo "" . ui_print_group_icon ($id_grupo, true).""; // Description diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 5aa917b5d4..46a9556e4b 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -660,6 +660,28 @@ function ui_print_os_icon ($id_os, $name = true, $return = false, return $output; } +function ui_print_type_agent_icon ( $id_os = false, $remote_contact = false, $contact = false, + $return = false, $remote = 0, $version = ""){ + + if($id_os == 19){ + //Satellite + $options['title'] = __('Satellite'); + $output = html_print_image("images/op_satellite.png", true, $options, false, false, false, true); + } + else if ($remote_contact == $contact && $remote == 0 && $version == ""){ + //Network + $options['title'] = __('Network'); + $output = html_print_image("images/network.png", true, $options, false, false, false, true); + } + else{ + //Software + $options['title'] = __('Software'); + $output = html_print_image("images/data.png", true, $options, false, false, false, true); + } + + return $output; +} + /** * Prints an agent name with the correct link * diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index 64a9f65097..c58c72bdd2 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -466,7 +466,10 @@ else { 'unknown_count', 'notinit_count', 'total_count', - 'fired_count'), + 'fired_count', + 'ultimo_contacto_remoto', + 'remote', + 'agent_version'), $access, $order); } @@ -498,11 +501,11 @@ $table->head[1] = __('Description'). ' ' . $table->size[1] = "16%"; -$table->head[9] = __('Remote'). ' ' . +$table->head[10] = __('Remote'). ' ' . '' . html_print_image("images/sort_up.png", true, array("style" => $selectRemoteUp, "alt" => "up")) . '' . '' . html_print_image("images/sort_down.png", true, array("style" => $selectRemoteDown, "alt" => "down")) . ''; -$table->size[9] = "9%"; +$table->size[10] = "9%"; $table->head[2] = __('OS'). ' ' . '' . html_print_image("images/sort_up.png", true, array("style" => $selectOsUp, "alt" => "up")) . '' . @@ -517,21 +520,24 @@ $table->size[3] = "10%"; $table->head[4] = __('Group'). ' ' . '' . html_print_image("images/sort_up.png", true, array("style" => $selectGroupUp, "alt" => "up")) . '' . '' . html_print_image("images/sort_down.png", true, array("style" => $selectGroupDown, "alt" => "down")) . ''; -$table->size[4] = "15%"; +$table->size[4] = "8%"; -$table->head[5] = __('Modules'); -$table->size[5] = "10%"; +$table->head[5] = __('Type'); +$table->size[5] = "8%"; -$table->head[6] = __('Status'); -$table->size[6] = "4%"; +$table->head[6] = __('Modules'); +$table->size[6] = "10%"; -$table->head[7] = __('Alerts'); +$table->head[7] = __('Status'); $table->size[7] = "4%"; -$table->head[8] = __('Last contact'). ' ' . +$table->head[8] = __('Alerts'); +$table->size[8] = "4%"; + +$table->head[9] = __('Last contact'). ' ' . '' . html_print_image("images/sort_up.png", true, array("style" => $selectLastContactUp, "alt" => "up")) . '' . '' . html_print_image("images/sort_down.png", true, array("style" => $selectLastContactDown, "alt" => "down")) . ''; -$table->size[8] = "15%"; +$table->size[9] = "15%"; $table->align = array (); @@ -542,9 +548,9 @@ $table->align[5] = "left"; $table->align[6] = "left"; $table->align[7] = "left"; $table->align[8] = "left"; +$table->align[9] = "left"; $table->style = array(); -//$table->style[0] = 'width: 15%'; $table->data = array (); @@ -584,14 +590,14 @@ foreach ($agents as $agent) { $data[1] = ui_print_truncate_text($agent["description"], 'description', false, true, true, '[…]', 'font-size: 6.5pt'); - $data[9] = ""; + $data[10] = ""; if (enterprise_installed()) { enterprise_include_once('include/functions_config_agents.php'); if (enterprise_hook('config_agents_has_remote_configuration',array($agent["id_agente"]))) { - $data[9] = html_print_image("images/application_edit.png", true, array("align" => 'middle', "title" => __('Remote config'))); + $data[10] = html_print_image("images/application_edit.png", true, array("align" => 'middle', "title" => __('Remote config'))); } } @@ -602,14 +608,18 @@ foreach ($agents as $agent) { $data[4] = ui_print_group_icon ($agent["id_grupo"], true); $agent['not_init_count'] = $agent['notinit_count']; - $data[5] = reporting_tiny_stats($agent, true, 'modules', ':', $strict_user); + + $data[5] = ui_print_type_agent_icon ($agent["id_os"], $agent['ultimo_contacto_remoto'], + $agent['ultimo_contacto'], $agent['remote'], + $agent['agent_version']); + + $data[6] = reporting_tiny_stats($agent, true, 'modules', ':', $strict_user); + + $data[7] = $status_img; + $data[8] = $alert_img; - $data[6] = $status_img; - - $data[7] = $alert_img; - - $data[8] = agents_get_interval_status ($agent); + $data[9] = agents_get_interval_status ($agent); // This old code was returning "never" on agents without modules, BAD !! // And does not print outdated agents in red. WRONG !!!! From 9ddb47741f90b986022420bbdfd4714c4e70ee4d Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Mon, 24 Jul 2017 16:34:22 +0200 Subject: [PATCH 085/142] Added new events bar to meta --- .../include/functions_reporting_html.php | 131 ++++++++++++++++++ .../include/graphs/flot/pandora.flot.js | 13 +- .../include/graphs/functions_flot.php | 4 +- 3 files changed, 143 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 49e651e5ef..b6c520b4b3 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -3780,6 +3780,7 @@ function reporting_get_event_histogram ($events, $text_header_event = false) { ); } } + $table = new stdClass(); if (!$text_header_event) { $table->width = '100%'; @@ -3839,6 +3840,136 @@ function reporting_get_event_histogram ($events, $text_header_event = false) { return $event_graph; } +function reporting_get_event_histogram_meta ($width) { + global $config; + if (!defined("METACONSOLE")) { + include_once ($config['homedir'] .'/include/graphs/functions_gd.php'); + } + else { + include_once ('../../include/graphs/functions_gd.php'); + } + + $period = SECONDS_1HOUR; + + if (!$text_header_event) { + $text_header_event = __('Events info (1hr.)'); + } + + $ttl = 1; + $urlImage = ui_get_full_url(false, true, false, false); + + $data = array (); + + $resolution = $config['graph_res'] * ($period * 2 / $width); // Number of "slices" we want in graph + + $interval = (int) ($period / $resolution); + $date = get_system_time (); + $datelimit = $date - $period; + $periodtime = floor ($period / $interval); + $time = array (); + $data = array (); + $legend = array(); + $full_legend = array(); + $full_legend_date = array(); + + $colors = array( + EVENT_CRIT_MAINTENANCE => COL_MAINTENANCE, + EVENT_CRIT_INFORMATIONAL => COL_INFORMATIONAL, + EVENT_CRIT_NORMAL => COL_NORMAL, + EVENT_CRIT_MINOR => COL_MINOR, + EVENT_CRIT_WARNING => COL_WARNING, + EVENT_CRIT_MAJOR => COL_MAJOR, + EVENT_CRIT_CRITICAL => COL_CRITICAL + ); + + $cont = 0; + for ($i = 0; $i < $interval; $i++) { + $bottom = $datelimit + ($periodtime * $i); + if (! $graphic_type) { + if ($config['flash_charts']) { + $name = date('H:i:s', $bottom); + } + else { + $name = date('H\h', $bottom); + } + } + else { + $name = $bottom; + } + + // Show less values in legend + if ($cont == 0 or $cont % 2) + $legend[$cont] = $name; + + if ($from_agent_view) { + $full_date = date('Y/m/d', $bottom); + $full_legend_date[$cont] = $full_date; + } + + $full_legend[$cont] = $name; + + $top = $datelimit + ($periodtime * ($i + 1)); + $event = db_get_row_filter ('tmetaconsole_event', + array ( + 'utimestamp > '.$bottom, + 'utimestamp < '.$top), + 'criticity, utimestamp'); + + if (!empty($event['utimestamp'])) { + $data[$cont]['utimestamp'] = $periodtime; + switch ($event['criticity']) { + case EVENT_CRIT_WARNING: + $data[$cont]['data'] = 2; + break; + case EVENT_CRIT_CRITICAL: + $data[$cont]['data'] = 3; + break; + default: + $data[$cont]['data'] = 1; + break; + } + } + else { + $data[$cont]['utimestamp'] = $periodtime; + $data[$cont]['data'] = 1; + } + $cont++; + } + + $table = new stdClass(); + + $table->width = '100%'; + + $table->data = array (); + $table->size = array (); + $table->head = array (); + $table->title = '' . $text_header_event . ''; + $table->data[0][0] = "" ; + + if (!empty($data)) { + $slicebar = flot_slicesbar_graph($data, $period, "100%", 30, $full_legend, $colors, $config['fontpath'], $config['round_corner'], $url, '', '', false, 0, $full_legend_date); + + $table->data[0][0] = $slicebar; + } + else { + $table->data[0][0] = __('No events'); + } + + if (!$text_header_event) { + $event_graph = '
+ ' . + $text_header_event . + '' . + html_print_table($table, true) . '
'; + } + else { + $table->class = 'noclass'; + $event_graph = html_print_table($table, true); + } + + return $event_graph; +} + function reporting_html_planned_downtimes_table ($planned_downtimes) { global $config; diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 8b4ddca948..699b15819b 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -614,10 +614,10 @@ function pandoraFlotSlicebar(graph_id, values, datacolor, labels, legend, acumul legend = legend.split(separator); acumulate_data = acumulate_data.split(separator); datacolor = datacolor.split(separator); - if (full_legend != "") { + if (full_legend != false) { full_legend = full_legend.split(separator); } - console.log(full_legend); + // Check possible adapt_keys on classes check_adaptions(graph_id); @@ -706,13 +706,18 @@ function pandoraFlotSlicebar(graph_id, values, datacolor, labels, legend, acumul var year = dateObj.getUTCFullYear(); newdate = year + "/" + month + "/" + day; } - + if(!to){ to= '23:59'; } if (full_legend != "") { - window.location='index.php?sec=eventos&sec2=operation/events/events&id_agent='+id_agent+'&date_from='+newdate+'&time_from='+from+'&date_to='+newdate2+'&time_to='+to+'&status=-1'; + if (newdate2 == undefined) { + window.location='index.php?sec=eventos&sec2=operation/events/events&id_agent='+id_agent+'&date_from='+newdate+'&time_from='+from+'&status=-1'; + } + else { + window.location='index.php?sec=eventos&sec2=operation/events/events&id_agent='+id_agent+'&date_from='+newdate+'&time_from='+from+'&date_to='+newdate2+'&time_to='+to+'&status=-1'; + } } else { window.location='index.php?sec=eventos&sec2=operation/events/events&id_agent='+id_agent+'&date_from='+newdate+'&time_from='+from+'&date_to='+newdate+'&time_to='+to+'&status=-1'; diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index 243412fe08..48b9db9652 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -932,7 +932,6 @@ function flot_slicesbar_graph ($graph_data, $period, $width, $height, $legend, $ $acumulate += $value; $c++; - //$return .= "
$value
"; if ($value > $max) { $max = $value; } @@ -946,6 +945,9 @@ function flot_slicesbar_graph ($graph_data, $period, $width, $height, $legend, $ if (!empty($full_legend_date)) { $full_legend_date = io_safe_output(implode($separator,$full_legend_date)); } + else { + $full_legend_date = false; + } $acumulate_data = io_safe_output(implode($separator,$acumulate_data)); // Store data series in javascript format From daa952649b57f7d131401e8990b9037264c0ec43 Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 25 Jul 2017 00:01:13 +0200 Subject: [PATCH 086/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index fb0020c623..0ef62da8cc 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170724 +Version: 7.0NG.707-170725 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 61ef71f330..75a11dd118 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.707-170724" +pandora_version="7.0NG.707-170725" 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 a9279f6b03..7b881cbf68 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170724'; +use constant AGENT_BUILD => '170725'; # 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 2cfb6500c6..655a846f24 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170724 +%define release 170725 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 966039b6de..1fa02b416d 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170724 +%define release 170725 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 71a9468513..342e0bb164 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170724" +PI_BUILD="170725" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index bcf9f04587..f6d33f77c3 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170724} +{170725} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index e5c5c6831c..362f601657 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.707(Build 170724)") +#define PANDORA_VERSION ("7.0NG.707(Build 170725)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index df7354adc7..c788baf296 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.707(Build 170724))" + VALUE "ProductVersion", "(7.0NG.707(Build 170725))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 95d67a3259..4193d5bea3 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170724 +Version: 7.0NG.707-170725 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 f4846cae5a..d66a601242 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.707-170724" +pandora_version="7.0NG.707-170725" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index e0201f7871..27e9275145 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170724'; +$build_version = 'PC170725'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 8c486ed8c1..7913c50ce4 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Tue, 25 Jul 2017 08:36:21 +0200 Subject: [PATCH 087/142] Added good colours to meta tactical events bar --- .../include/functions_reporting_html.php | 29 ++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index b6c520b4b3..690a55d630 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -3918,11 +3918,32 @@ function reporting_get_event_histogram_meta ($width) { if (!empty($event['utimestamp'])) { $data[$cont]['utimestamp'] = $periodtime; switch ($event['criticity']) { - case EVENT_CRIT_WARNING: - $data[$cont]['data'] = 2; + case 0: + $data[$cont]['data'] = EVENT_CRIT_MAINTENANCE; break; - case EVENT_CRIT_CRITICAL: - $data[$cont]['data'] = 3; + case 1: + $data[$cont]['data'] = EVENT_CRIT_INFORMATIONAL; + break; + case 2: + $data[$cont]['data'] = EVENT_CRIT_NORMAL; + break; + case 3: + $data[$cont]['data'] = EVENT_CRIT_WARNING; + break; + case 4: + $data[$cont]['data'] = EVENT_CRIT_CRITICAL; + break; + case 5: + $data[$cont]['data'] = EVENT_CRIT_MINOR; + break; + case 6: + $data[$cont]['data'] = EVENT_CRIT_MAJOR; + break; + case 20: + $data[$cont]['data'] = EVENT_CRIT_NOT_NORMAL; + break; + case 34: + $data[$cont]['data'] = EVENT_CRIT_WARNING_OR_CRITICAL; break; default: $data[$cont]['data'] = 1; From 729503f50904c336ef1e794eb7db6c52d500a594 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 26 Jul 2017 00:01:13 +0200 Subject: [PATCH 088/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 0ef62da8cc..a9d191b4b0 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170725 +Version: 7.0NG.707-170726 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 75a11dd118..9191bd6cbd 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.707-170725" +pandora_version="7.0NG.707-170726" 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 7b881cbf68..a63e5ee721 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170725'; +use constant AGENT_BUILD => '170726'; # 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 655a846f24..3ecd4f1759 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170725 +%define release 170726 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 1fa02b416d..74878238d1 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.707 -%define release 170725 +%define release 170726 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 342e0bb164..4d4fb5135e 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170725" +PI_BUILD="170726" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index f6d33f77c3..621801b9e0 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170725} +{170726} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 362f601657..aa4fb9248f 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.707(Build 170725)") +#define PANDORA_VERSION ("7.0NG.707(Build 170726)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index c788baf296..e721133a63 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.707(Build 170725))" + VALUE "ProductVersion", "(7.0NG.707(Build 170726))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 4193d5bea3..11614027b4 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170725 +Version: 7.0NG.707-170726 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 d66a601242..8212430c33 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.707-170725" +pandora_version="7.0NG.707-170726" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 27e9275145..e1fb00ef3c 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170725'; +$build_version = 'PC170726'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 7913c50ce4..8cb44c20ca 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Wed, 26 Jul 2017 13:36:42 +0200 Subject: [PATCH 089/142] Changed some lines in configurar_agente --- .../godmode/agentes/configurar_agente.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index c804ddc22c..65ea6aa5aa 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1010,14 +1010,26 @@ if ($update_module || $create_module) { $new_configuration_data .= "$line\n"; } } + + $values_macros = array(); + $values_macros['macros'] = base64_encode(json_encode($macros)); + + $macros_for_data = enterprise_hook( + 'config_agents_get_macros_data_conf', array($values_macros)); + + if ($macros_for_data != '') { + $_new_configuration_data = str_replace('module_end', + $macros_for_data . "module_end", $_new_configuration_data); + } + /* $macros_for_data = enterprise_hook('config_agents_get_macros_data_conf', array($_POST)); if ($macros_for_data !== ENTERPRISE_NOT_HOOK && $macros_for_data != '') { // Add macros to configuration file $new_configuration_data = str_replace('module_end', $macros_for_data."module_end", $new_configuration_data); } - + */ $configuration_data = $new_configuration_data; } From 240b6e017fe39e2eb71cfbdf66879b6e946709ec Mon Sep 17 00:00:00 2001 From: enriquecd Date: Wed, 26 Jul 2017 13:50:55 +0200 Subject: [PATCH 090/142] Adapt historical_db checkbox for sql reports to sql templates - #1157 --- pandora_console/godmode/reporting/reporting_builder.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index b7994e6a1c..ac6d35d4b4 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -1124,8 +1124,8 @@ switch ($action) { $values['treport_custom_sql_id'] = get_parameter('id_custom'); if ($values['treport_custom_sql_id'] == 0) { $values['external_source'] = get_parameter('sql'); - $values['historical_db'] = get_parameter('historical_db_check'); } + $values['historical_db'] = get_parameter('historical_db_check'); } else if ($values['type'] == 'url') { $values['external_source'] = get_parameter('url'); @@ -1214,7 +1214,6 @@ switch ($action) { break; } - $resultOperationDB = db_process_sql_update( 'treport_content', $values, @@ -1446,8 +1445,8 @@ switch ($action) { $values['treport_custom_sql_id'] = get_parameter('id_custom'); if ($values['treport_custom_sql_id'] == 0) { $values['external_source'] = get_parameter('sql'); - $values['historical_db'] = get_parameter('historical_db_check'); } + $values['historical_db'] = get_parameter('historical_db_check'); } elseif ($values['type'] == 'url') { $values['external_source'] = get_parameter('url'); From a9d76e2748c97d61828fe4610abe1434ca3ac5f4 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 26 Jul 2017 17:03:41 +0200 Subject: [PATCH 091/142] Updated version and build strings. --- pandora_agents/pc/AIX/pandora_agent.conf | 2 +- pandora_agents/pc/FreeBSD/pandora_agent.conf | 2 +- pandora_agents/pc/HP-UX/pandora_agent.conf | 2 +- pandora_agents/pc/Linux/pandora_agent.conf | 2 +- pandora_agents/pc/NT4/pandora_agent.conf | 2 +- pandora_agents/pc/SunOS/pandora_agent.conf | 2 +- pandora_agents/pc/Win32/pandora_agent.conf | 2 +- pandora_agents/shellscript/aix/pandora_agent.conf | 2 +- pandora_agents/shellscript/bsd-ipso/pandora_agent.conf | 2 +- pandora_agents/shellscript/hp-ux/pandora_agent.conf | 2 +- pandora_agents/shellscript/linux/pandora_agent.conf | 2 +- pandora_agents/shellscript/mac_osx/pandora_agent.conf | 2 +- pandora_agents/shellscript/openWRT/pandora_agent.conf | 2 +- pandora_agents/shellscript/solaris/pandora_agent.conf | 2 +- pandora_agents/unix/AIX/pandora_agent.conf | 2 +- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/Darwin/pandora_agent.conf | 2 +- pandora_agents/unix/FreeBSD/pandora_agent.conf | 2 +- pandora_agents/unix/HP-UX/pandora_agent.conf | 2 +- pandora_agents/unix/Linux/pandora_agent.conf | 2 +- pandora_agents/unix/NT4/pandora_agent.conf | 2 +- pandora_agents/unix/NetBSD/pandora_agent.conf | 2 +- pandora_agents/unix/SunOS/pandora_agent.conf | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 4 ++-- pandora_agents/unix/pandora_agent.spec | 4 ++-- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/bin/pandora_agent.conf | 2 +- pandora_agents/win32/installer/pandora.mpi | 4 ++-- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 4 ++-- pandora_console/pandora_console.spec | 4 ++-- pandora_console/pandora_console_install | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/conf/pandora_server.conf.new | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/pandora_server.redhat.spec | 4 ++-- pandora_server/pandora_server.spec | 4 ++-- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 48 files changed, 55 insertions(+), 55 deletions(-) diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf index 6e804303b3..4ec24dd4fc 100644 --- a/pandora_agents/pc/AIX/pandora_agent.conf +++ b/pandora_agents/pc/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.707, AIX version +# Version 7.0NG.708, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/FreeBSD/pandora_agent.conf b/pandora_agents/pc/FreeBSD/pandora_agent.conf index 7f5e8e320c..5b84348657 100644 --- a/pandora_agents/pc/FreeBSD/pandora_agent.conf +++ b/pandora_agents/pc/FreeBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.707, FreeBSD Version +# Version 7.0NG.708, FreeBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/HP-UX/pandora_agent.conf b/pandora_agents/pc/HP-UX/pandora_agent.conf index 141f1c7b3f..67368fc92d 100644 --- a/pandora_agents/pc/HP-UX/pandora_agent.conf +++ b/pandora_agents/pc/HP-UX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.707, HP-UX Version +# Version 7.0NG.708, HP-UX Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/Linux/pandora_agent.conf b/pandora_agents/pc/Linux/pandora_agent.conf index 0189912d1c..67cedc9d0a 100644 --- a/pandora_agents/pc/Linux/pandora_agent.conf +++ b/pandora_agents/pc/Linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.707, GNU/Linux +# Version 7.0NG.708, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/NT4/pandora_agent.conf b/pandora_agents/pc/NT4/pandora_agent.conf index 29781cd47c..1922741fd4 100644 --- a/pandora_agents/pc/NT4/pandora_agent.conf +++ b/pandora_agents/pc/NT4/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.707, GNU/Linux +# Version 7.0NG.708, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/SunOS/pandora_agent.conf b/pandora_agents/pc/SunOS/pandora_agent.conf index 93f2908530..b9314d2a5a 100644 --- a/pandora_agents/pc/SunOS/pandora_agent.conf +++ b/pandora_agents/pc/SunOS/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.707, Solaris Version +# Version 7.0NG.708, Solaris Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/Win32/pandora_agent.conf b/pandora_agents/pc/Win32/pandora_agent.conf index c1730d6535..90d17489d0 100644 --- a/pandora_agents/pc/Win32/pandora_agent.conf +++ b/pandora_agents/pc/Win32/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2010 Artica Soluciones Tecnologicas -# Version 7.0NG.707 +# Version 7.0NG.708 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software diff --git a/pandora_agents/shellscript/aix/pandora_agent.conf b/pandora_agents/shellscript/aix/pandora_agent.conf index c9a852fa1a..d624a8d66d 100644 --- a/pandora_agents/shellscript/aix/pandora_agent.conf +++ b/pandora_agents/shellscript/aix/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.707, AIX version +# Version 7.0NG.708, AIX version # General Parameters # ================== diff --git a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf index f50992595d..9edc972282 100644 --- a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf +++ b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.707 +# Version 7.0NG.708 # FreeBSD/IPSO version # Licenced under GPL licence, 2003-2007 Sancho Lerena diff --git a/pandora_agents/shellscript/hp-ux/pandora_agent.conf b/pandora_agents/shellscript/hp-ux/pandora_agent.conf index cd941056fc..f77b766dab 100644 --- a/pandora_agents/shellscript/hp-ux/pandora_agent.conf +++ b/pandora_agents/shellscript/hp-ux/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.707, HPUX Version +# Version 7.0NG.708, HPUX Version # General Parameters # ================== diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf index bd946df430..d37678b502 100644 --- a/pandora_agents/shellscript/linux/pandora_agent.conf +++ b/pandora_agents/shellscript/linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.707 +# Version 7.0NG.708 # Licensed under GPL license v2, # (c) 2003-2010 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/mac_osx/pandora_agent.conf b/pandora_agents/shellscript/mac_osx/pandora_agent.conf index 0300f7c8b3..da67ed5470 100644 --- a/pandora_agents/shellscript/mac_osx/pandora_agent.conf +++ b/pandora_agents/shellscript/mac_osx/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.707 +# Version 7.0NG.708 # Licensed under GPL license v2, # (c) 2003-2009 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/openWRT/pandora_agent.conf b/pandora_agents/shellscript/openWRT/pandora_agent.conf index ba26d1e65f..d8a9d19ee3 100644 --- a/pandora_agents/shellscript/openWRT/pandora_agent.conf +++ b/pandora_agents/shellscript/openWRT/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.707 +# Version 7.0NG.708 # Licensed under GPL license v2, # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/solaris/pandora_agent.conf b/pandora_agents/shellscript/solaris/pandora_agent.conf index 4a933c21f1..1b4a021236 100644 --- a/pandora_agents/shellscript/solaris/pandora_agent.conf +++ b/pandora_agents/shellscript/solaris/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.707, Solaris version +# Version 7.0NG.708, Solaris version # General Parameters # ================== diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf index cda9f409ab..dfdc519a04 100644 --- a/pandora_agents/unix/AIX/pandora_agent.conf +++ b/pandora_agents/unix/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.707, AIX version +# Version 7.0NG.708, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index a9d191b4b0..6555b3726d 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170726 +Version: 7.0NG.708 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 9191bd6cbd..fc3b8de892 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.707-170726" +pandora_version="7.0NG.708" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/Darwin/pandora_agent.conf b/pandora_agents/unix/Darwin/pandora_agent.conf index 79eadf34b3..81ce878b4e 100644 --- a/pandora_agents/unix/Darwin/pandora_agent.conf +++ b/pandora_agents/unix/Darwin/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.707, GNU/Linux +# Version 7.0NG.708, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2012 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/FreeBSD/pandora_agent.conf b/pandora_agents/unix/FreeBSD/pandora_agent.conf index 776e68ae8d..535a637421 100644 --- a/pandora_agents/unix/FreeBSD/pandora_agent.conf +++ b/pandora_agents/unix/FreeBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.707, FreeBSD Version +# Version 7.0NG.708, FreeBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2016 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/HP-UX/pandora_agent.conf b/pandora_agents/unix/HP-UX/pandora_agent.conf index 547d7e2256..962d1a4047 100644 --- a/pandora_agents/unix/HP-UX/pandora_agent.conf +++ b/pandora_agents/unix/HP-UX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.707, HP-UX Version +# Version 7.0NG.708, HP-UX Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf index 8d9893c24a..efaa9ac0bc 100644 --- a/pandora_agents/unix/Linux/pandora_agent.conf +++ b/pandora_agents/unix/Linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.707, GNU/Linux +# Version 7.0NG.708, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2014 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/NT4/pandora_agent.conf b/pandora_agents/unix/NT4/pandora_agent.conf index d2feeff65c..8a153581e2 100644 --- a/pandora_agents/unix/NT4/pandora_agent.conf +++ b/pandora_agents/unix/NT4/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.707, GNU/Linux +# Version 7.0NG.708, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/NetBSD/pandora_agent.conf b/pandora_agents/unix/NetBSD/pandora_agent.conf index 706400f417..8cb4f47058 100644 --- a/pandora_agents/unix/NetBSD/pandora_agent.conf +++ b/pandora_agents/unix/NetBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.707, NetBSD Version +# Version 7.0NG.708, NetBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/SunOS/pandora_agent.conf b/pandora_agents/unix/SunOS/pandora_agent.conf index 882f6cadd5..290d3614a3 100644 --- a/pandora_agents/unix/SunOS/pandora_agent.conf +++ b/pandora_agents/unix/SunOS/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.707, Solaris Version +# Version 7.0NG.708, Solaris Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index a63e5ee721..456095be18 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -40,7 +40,7 @@ my $Sem = undef; # Semaphore used to control the number of threads my $ThreadSem = undef; -use constant AGENT_VERSION => '7.0NG.707'; +use constant AGENT_VERSION => '7.0NG.708'; use constant AGENT_BUILD => '170726'; # Agent log default file size maximum and instances diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 3ecd4f1759..068c82fd66 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -2,8 +2,8 @@ #Pandora FMS Linux Agent # %define name pandorafms_agent_unix -%define version 7.0NG.707 -%define release 170726 +%define version 7.0NG.708 +%define release 1 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 74878238d1..63778598df 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -2,8 +2,8 @@ #Pandora FMS Linux Agent # %define name pandorafms_agent_unix -%define version 7.0NG.707 -%define release 170726 +%define version 7.0NG.708 +%define release 1 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 4d4fb5135e..b8a6c0b2b6 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -9,7 +9,7 @@ # Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license. # ********************************************************************** -PI_VERSION="7.0NG.707" +PI_VERSION="7.0NG.708" PI_BUILD="170726" OS_NAME=`uname -s` diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index c2db09fe55..288e42e3a7 100644 --- a/pandora_agents/win32/bin/pandora_agent.conf +++ b/pandora_agents/win32/bin/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2014 Artica Soluciones Tecnologicas -# Version 7.0NG.707 +# Version 7.0NG.708 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 621801b9e0..decb965545 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -3,7 +3,7 @@ AllowLanguageSelection {Yes} AppName -{Pandora FMS Windows Agent v7.0NG.707} +{Pandora FMS Windows Agent v7.0NG.708} ApplicationID {17E3D2CF-CA02-406B-8A80-9D31C17BD08F} @@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives {No} Windows,Executable -{<%AppName%>-<%Version%>-Setup<%Ext%>} +{<%AppName%>-Setup<%Ext%>} Windows,FileDescription {<%AppName%> <%Version%> Setup} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index aa4fb9248f..5f9d259ed8 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.707(Build 170726)") +#define PANDORA_VERSION ("7.0NG.708(Build 170726)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index e721133a63..4a0cc9d02e 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.707(Build 170726))" + VALUE "ProductVersion", "(7.0NG.708(Build 170726))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 11614027b4..09abf76925 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170726 +Version: 7.0NG.708 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 8212430c33..9f216ce00f 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.707-170726" +pandora_version="7.0NG.708" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index e1fb00ef3c..38cd0d625d 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -23,7 +23,7 @@ * Pandora build version and version */ $build_version = 'PC170726'; -$pandora_version = 'v7.0NG.707'; +$pandora_version = 'v7.0NG.708'; // Do not overwrite default timezone set if defined. $script_tz = @date_default_timezone_get(); diff --git a/pandora_console/install.php b/pandora_console/install.php index 8cb44c20ca..5831f65b77 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -70,7 +70,7 @@
Date: Thu, 27 Jul 2017 00:01:13 +0200 Subject: [PATCH 092/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 4 ++-- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 6555b3726d..bd9484cf9f 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.708 +Version: 7.0NG.708-170727 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 fc3b8de892..7197bb9312 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.708" +pandora_version="7.0NG.708-170727" 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 456095be18..514e0fa3a7 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.708'; -use constant AGENT_BUILD => '170726'; +use constant AGENT_BUILD => '170727'; # 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 068c82fd66..1bf6e651c7 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.708 -%define release 1 +%define release 170727 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 63778598df..7f6e7803a3 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.708 -%define release 1 +%define release 170727 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 b8a6c0b2b6..c8688e8bd2 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.708" -PI_BUILD="170726" +PI_BUILD="170727" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index decb965545..ac3083f21a 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170726} +{170727} ViewReadme {Yes} @@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives {No} Windows,Executable -{<%AppName%>-Setup<%Ext%>} +{<%AppName%>-<%Version%>-Setup<%Ext%>} Windows,FileDescription {<%AppName%> <%Version%> Setup} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 5f9d259ed8..912d524bcf 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.708(Build 170726)") +#define PANDORA_VERSION ("7.0NG.708(Build 170727)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 4a0cc9d02e..4d405b037c 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.708(Build 170726))" + VALUE "ProductVersion", "(7.0NG.708(Build 170727))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 09abf76925..a621d22cda 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.708 +Version: 7.0NG.708-170727 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 9f216ce00f..dc51bdeaba 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.708" +pandora_version="7.0NG.708-170727" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 38cd0d625d..cc8f6a4de8 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170726'; +$build_version = 'PC170727'; $pandora_version = 'v7.0NG.708'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 5831f65b77..a9871fe99b 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Thu, 27 Jul 2017 09:33:52 +0200 Subject: [PATCH 093/142] fixed query in server --- pandora_server/bin/pandora_server | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pandora_server/bin/pandora_server b/pandora_server/bin/pandora_server index 4d12de8adb..709b6c7b04 100755 --- a/pandora_server/bin/pandora_server +++ b/pandora_server/bin/pandora_server @@ -607,13 +607,7 @@ sub main() { $server->update(); } - # Update fallen servers - my @servers_db = get_db_rows ($DBH, "SELECT id_server, server_keepalive FROM tserver"); - for (@servers_db) { - my %server_db = %$_; - my $expected_update = strftime ("%Y-%m-%d %H:%M:%S", localtime(time() - $server_db{'server_keepalive'} * 2)); - db_do ($DBH, "UPDATE tserver SET status = 0 WHERE keepalive < ? AND id_server = ?", $expected_update, $server_db{'id_server'}); - } + db_do ($DBH, "UPDATE tserver SET status = 0 WHERE now()-keepalive > 2*server_keepalive"); # Set the master server pandora_set_master(\%Config, $DBH); From 39f4b48d84a92dac9a7cb6b6726cefe1cc9d2180 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Thu, 27 Jul 2017 11:08:19 +0200 Subject: [PATCH 094/142] Added some changes about update modules from local component with macros --- .../godmode/agentes/configurar_agente.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 65ea6aa5aa..777d5facdc 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1000,7 +1000,7 @@ if ($update_module || $create_module) { $macros = io_json_mb_encode($macros); - $conf_array = explode("\n",$configuration_data); + $conf_array = explode("\n", io_safe_output($configuration_data)); foreach ($conf_array as $line) { if (preg_match("/^module_name\s*(.*)/", $line, $match)) { $new_configuration_data .= "module_name $name\n"; @@ -1010,16 +1010,15 @@ if ($update_module || $create_module) { $new_configuration_data .= "$line\n"; } } - + $values_macros = array(); - $values_macros['macros'] = base64_encode(json_encode($macros)); - + $values_macros['macros'] = base64_encode($macros); + $macros_for_data = enterprise_hook( 'config_agents_get_macros_data_conf', array($values_macros)); - + if ($macros_for_data != '') { - $_new_configuration_data = str_replace('module_end', - $macros_for_data . "module_end", $_new_configuration_data); + $new_configuration_data = str_replace('module_end', $macros_for_data . "module_end", $new_configuration_data); } /* @@ -1030,7 +1029,10 @@ if ($update_module || $create_module) { $new_configuration_data = str_replace('module_end', $macros_for_data."module_end", $new_configuration_data); } */ - $configuration_data = $new_configuration_data; + $configuration_data = str_replace('\\', "\", + io_safe_input($new_configuration_data));; + + html_debug($configuration_data, true); } // Services are an enterprise feature, From 02ce575d9ffc7c1558d4d6d6aac9d3b364e656e7 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Thu, 27 Jul 2017 12:39:38 +0200 Subject: [PATCH 095/142] Added a last fix --- pandora_console/godmode/agentes/configurar_agente.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 777d5facdc..9f5e0b3226 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1001,9 +1001,10 @@ if ($update_module || $create_module) { $macros = io_json_mb_encode($macros); $conf_array = explode("\n", io_safe_output($configuration_data)); + foreach ($conf_array as $line) { if (preg_match("/^module_name\s*(.*)/", $line, $match)) { - $new_configuration_data .= "module_name $name\n"; + $new_configuration_data .= "module_name " . io_safe_output($name) . "\n"; } // We delete from conf all the module macros starting with _field else if(!preg_match("/^module_macro_field.*/", $line, $match)) { From 55c70098ba401dfd1d08614af05b58188ed77f84 Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 28 Jul 2017 00:01:13 +0200 Subject: [PATCH 096/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index bd9484cf9f..34b9a6c8c6 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.708-170727 +Version: 7.0NG.708-170728 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 7197bb9312..3c966af5cf 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.708-170727" +pandora_version="7.0NG.708-170728" 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 514e0fa3a7..ab53784cf9 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.708'; -use constant AGENT_BUILD => '170727'; +use constant AGENT_BUILD => '170728'; # 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 1bf6e651c7..3dba4fdd04 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.708 -%define release 170727 +%define release 170728 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 7f6e7803a3..2eeae4c183 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.708 -%define release 170727 +%define release 170728 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 c8688e8bd2..2aa06d73ec 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.708" -PI_BUILD="170727" +PI_BUILD="170728" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index ac3083f21a..7791ee6337 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170727} +{170728} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 912d524bcf..bc5b0fbfee 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.708(Build 170727)") +#define PANDORA_VERSION ("7.0NG.708(Build 170728)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 4d405b037c..0ed14aaa07 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.708(Build 170727))" + VALUE "ProductVersion", "(7.0NG.708(Build 170728))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index a621d22cda..80dd9486d9 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.708-170727 +Version: 7.0NG.708-170728 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 dc51bdeaba..d5b24dfee2 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.708-170727" +pandora_version="7.0NG.708-170728" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index cc8f6a4de8..fb9580d3d6 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170727'; +$build_version = 'PC170728'; $pandora_version = 'v7.0NG.708'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index a9871fe99b..172f12af8e 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Fri, 28 Jul 2017 12:46:17 +0200 Subject: [PATCH 097/142] Revert "Use session and not exec sql if already exists acl perms in session - #1017" This reverts commit 78bb583824ebe779b263852493d1e2a4144235b0. --- pandora_console/include/functions.php | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 1ef37e74bc..b4e25c9eac 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -1796,26 +1796,6 @@ function check_acl($id_user, $id_group, $access, $onlyOneGroup = false) { $id_group = (int) $id_group; } - if($_SESSION['check_acl'] != null){ - if (empty ($_SESSION['check_acl'])) - return 0; - - $result = 0; - $acl_column = get_acl_column($access); - foreach ($_SESSION['check_acl'] as $row) { - // For each profile for this pair of group and user do... - if (isset($row[$acl_column])) { - $result += $row[$acl_column]; - } - } - - if ($result >= 1) { - return 1; - } - - return 0; - } - $parents_id = array($id_group); if ($id_group != 0 && $onlyOneGroup !== true) { $group = db_get_row_filter('tgrupo', array('id_grupo' => $id_group)); @@ -1864,13 +1844,8 @@ function check_acl($id_user, $id_group, $access, $onlyOneGroup = false) { OR tusuario_perfil.id_grupo = 0)", $id_user, implode(', ', $parents_id)); } - - - $rowdup = db_get_all_rows_sql ($query); - $_SESSION['check_acl'] = $rowdup; - if (empty ($rowdup)) return 0; From cc40fcccc29a43cb14ce80d53948dd8b60dcefdd Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 29 Jul 2017 00:01:14 +0200 Subject: [PATCH 098/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 34b9a6c8c6..f9166bc5f6 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.708-170728 +Version: 7.0NG.708-170729 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 3c966af5cf..9d0a40d5c8 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.708-170728" +pandora_version="7.0NG.708-170729" 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 ab53784cf9..24f2003357 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.708'; -use constant AGENT_BUILD => '170728'; +use constant AGENT_BUILD => '170729'; # 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 3dba4fdd04..e146c9ee65 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.708 -%define release 170728 +%define release 170729 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 2eeae4c183..4efc1a8d37 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.708 -%define release 170728 +%define release 170729 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 2aa06d73ec..136375b57b 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.708" -PI_BUILD="170728" +PI_BUILD="170729" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 7791ee6337..fa8342d95c 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170728} +{170729} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index bc5b0fbfee..0cbe9082d2 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.708(Build 170728)") +#define PANDORA_VERSION ("7.0NG.708(Build 170729)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 0ed14aaa07..fafed8bb33 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.708(Build 170728))" + VALUE "ProductVersion", "(7.0NG.708(Build 170729))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 80dd9486d9..eac81ea28d 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.708-170728 +Version: 7.0NG.708-170729 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 d5b24dfee2..089eefa56c 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.708-170728" +pandora_version="7.0NG.708-170729" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index fb9580d3d6..25e260839f 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170728'; +$build_version = 'PC170729'; $pandora_version = 'v7.0NG.708'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 172f12af8e..e46cf19599 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Sun, 30 Jul 2017 00:01:13 +0200 Subject: [PATCH 099/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index f9166bc5f6..68dbe54253 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.708-170729 +Version: 7.0NG.708-170730 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 9d0a40d5c8..80f2028fc9 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.708-170729" +pandora_version="7.0NG.708-170730" 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 24f2003357..259ef73bb6 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.708'; -use constant AGENT_BUILD => '170729'; +use constant AGENT_BUILD => '170730'; # 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 e146c9ee65..943d59dc47 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.708 -%define release 170729 +%define release 170730 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 4efc1a8d37..2992ab2451 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.708 -%define release 170729 +%define release 170730 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 136375b57b..28efe3b8db 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.708" -PI_BUILD="170729" +PI_BUILD="170730" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index fa8342d95c..d2b6f760b1 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170729} +{170730} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 0cbe9082d2..50b7c855da 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.708(Build 170729)") +#define PANDORA_VERSION ("7.0NG.708(Build 170730)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index fafed8bb33..189d198757 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.708(Build 170729))" + VALUE "ProductVersion", "(7.0NG.708(Build 170730))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index eac81ea28d..f45a8d8e73 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.708-170729 +Version: 7.0NG.708-170730 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 089eefa56c..3a626ec472 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.708-170729" +pandora_version="7.0NG.708-170730" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 25e260839f..4bb5bab509 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170729'; +$build_version = 'PC170730'; $pandora_version = 'v7.0NG.708'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index e46cf19599..72ed078e2b 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Mon, 31 Jul 2017 00:01:13 +0200 Subject: [PATCH 100/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 68dbe54253..434367f3b6 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.708-170730 +Version: 7.0NG.708-170731 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 80f2028fc9..2a67fd2711 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.708-170730" +pandora_version="7.0NG.708-170731" 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 259ef73bb6..8bcc90f5e3 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.708'; -use constant AGENT_BUILD => '170730'; +use constant AGENT_BUILD => '170731'; # 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 943d59dc47..48f6dde6eb 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.708 -%define release 170730 +%define release 170731 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 2992ab2451..d8597e913e 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.708 -%define release 170730 +%define release 170731 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 28efe3b8db..4e4d22a7b3 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.708" -PI_BUILD="170730" +PI_BUILD="170731" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index d2b6f760b1..d6214005d5 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170730} +{170731} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 50b7c855da..d40c5948ee 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.708(Build 170730)") +#define PANDORA_VERSION ("7.0NG.708(Build 170731)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 189d198757..a9ca9803f9 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.708(Build 170730))" + VALUE "ProductVersion", "(7.0NG.708(Build 170731))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index f45a8d8e73..02e8d51d28 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.708-170730 +Version: 7.0NG.708-170731 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 3a626ec472..a621e33e70 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.708-170730" +pandora_version="7.0NG.708-170731" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 4bb5bab509..6dc707a26b 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170730'; +$build_version = 'PC170731'; $pandora_version = 'v7.0NG.708'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 72ed078e2b..cf90ea8dc3 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Mon, 31 Jul 2017 12:50:50 +0200 Subject: [PATCH 101/142] Fixed last timestamp in interface charts --- pandora_console/include/functions_graph.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index f834faf483..fa24976438 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -1092,25 +1092,25 @@ function graphic_combined_module ($module_list, $weight_list, $period, // Set the title and time format if ($temp_range <= SECONDS_1DAY) { - $time_format = 'd.m.Y H:i:s'; + $time_format = 'Y M d H:i:s'; } elseif ($temp_range < SECONDS_15DAYS) { - $time_format = 'M d'; + $time_format = 'Y M d'; $time_format_2 = 'H:i'; if ($projection != false) { $time_format_2 = 'H\h'; } } elseif ($temp_range <= SECONDS_1MONTH) { - $time_format = 'M d'; + $time_format = 'Y M d'; $time_format_2 = 'H\h'; } elseif ($temp_range <= SECONDS_1MONTH) { - $time_format = 'M d'; + $time_format = 'Y M d'; $time_format_2 = 'H\h'; - } + } elseif ($period < SECONDS_6MONTHS) { - $time_format = 'M d'; + $time_format = 'Y M d'; $time_format_2 = 'H\h'; } else { @@ -1382,7 +1382,8 @@ function graphic_combined_module ($module_list, $weight_list, $period, // Calculate chart data $last_known = $previous_data; - for ($l = 0; $l < $resolution; $l++) { + + for ($l = 0; $l <= $resolution; $l++) { $countAvg ++; $timestamp = $datelimit + ($interval * $l); @@ -1398,6 +1399,7 @@ function graphic_combined_module ($module_list, $weight_list, $period, // Read data that falls in the current interval $interval_min = $last_known; $interval_max = $last_known; + while (isset ($data[$j]) && $data[$j]['utimestamp'] >= $timestamp && $data[$j]['utimestamp'] < ($timestamp + $interval)) { if ($data[$j]['datos'] > $interval_max) { $interval_max = $data[$j]['datos']; From d298ba4d40c7b83b7303aeba58166f5a82f5f7ab Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Mon, 31 Jul 2017 14:55:38 +0200 Subject: [PATCH 102/142] Center texts --- pandora_console/include/functions_visual_map.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 3dd229ff17..1869e8cb39 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -110,13 +110,11 @@ function visual_map_print_item($mode = "read", $layoutData, $border_color = $layoutData['border_color']; $fill_color = $layoutData['fill_color']; $label_position = $layoutData['label_position']; - + $sizeStyle = ''; $borderStyle = ''; $imageSize = ''; - - - + if (!empty($proportion)) { $top = $top * $proportion['proportion_height']; $left = $left * $proportion['proportion_width']; @@ -202,7 +200,7 @@ function visual_map_print_item($mode = "read", $layoutData, $text = '
' . $label .'
'; } else { - $text = '
' . $label .'
'; + $text = '
' . $label .'
'; } From 7e508a4137742cd1ab02a04ef9780857beef749f Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 1 Aug 2017 00:01:14 +0200 Subject: [PATCH 103/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 434367f3b6..554958e8fd 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.708-170731 +Version: 7.0NG.708-170801 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 2a67fd2711..bfa29742e9 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.708-170731" +pandora_version="7.0NG.708-170801" 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 8bcc90f5e3..c3c4299d11 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.708'; -use constant AGENT_BUILD => '170731'; +use constant AGENT_BUILD => '170801'; # 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 48f6dde6eb..ef73ff7c4d 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.708 -%define release 170731 +%define release 170801 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index d8597e913e..ee64e007d3 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.708 -%define release 170731 +%define release 170801 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 4e4d22a7b3..f23a1b182b 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.708" -PI_BUILD="170731" +PI_BUILD="170801" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index d6214005d5..3d83d2b987 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170731} +{170801} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index d40c5948ee..1b72993838 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.708(Build 170731)") +#define PANDORA_VERSION ("7.0NG.708(Build 170801)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index a9ca9803f9..a9ca9c87d4 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.708(Build 170731))" + VALUE "ProductVersion", "(7.0NG.708(Build 170801))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 02e8d51d28..97e7ffa1cd 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.708-170731 +Version: 7.0NG.708-170801 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 a621e33e70..d445a41099 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.708-170731" +pandora_version="7.0NG.708-170801" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 6dc707a26b..508b99818b 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170731'; +$build_version = 'PC170801'; $pandora_version = 'v7.0NG.708'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index cf90ea8dc3..0fa2b96fbe 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Tue, 1 Aug 2017 10:39:02 +0200 Subject: [PATCH 104/142] added service functions in the API --- pandora_console/include/functions_api.php | 251 ++++++++++++++++++++++ 1 file changed, 251 insertions(+) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 55828d1d94..bba8cb1cc3 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -9556,6 +9556,257 @@ function api_set_create_special_day($thrash1, $thrash2, $other, $thrash3) { } } +/** + * Create a service and return service id. + * + * @param $thrash1 Don't use. + * @param $thrash2 Don't use. + * @param array $other it's array, $other as param is ;;; + * ;;;;; + * ;; + * in this order and separator char (after text ; ) and separator + * (pass in param othermode as othermode=url_encode_separator_) + * @param $thrash3 Don't use + * + * example: + * http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_service&return_type=json + * &other=test1%7CDescripcion de prueba%7C12%7C1%7C0.5%7C1&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora + */ +function api_set_create_service($thrash1, $thrash2, $other, $thrash3) { + + $name = $other['data'][0]; + $description = $other['data'][1]; + $id_group = $other['data'][2]; + $critical = $other['data'][3]; + $warning = $other['data'][4]; + $mode = 0; + $id_agent = $other['data'][5]; + $sla_interval = $other['data'][6]; + $sla_limit = $other['data'][7]; + $id_warning_module_template = $other['data'][8]; + $id_critical_module_template = $other['data'][9]; + $id_unknown_module_template = 0; + $id_critical_module_sla = $other['data'][10]; + + if(empty($name)){ + returnError('error_create_service', __('Error in creation service. No name')); + return; + } + if(empty($id_group)){ + // By default applications + $id_group = 12; + } + if(empty($critical)){ + $critical = 1; + } + if(empty($warning)){ + $warning = 0.5; + } + if(empty($id_agent)){ + returnError('error_create_service', __('Error in creation service. No agent id')); + return; + } + if(empty($sla_interval)){ + // By default one month + $sla_interval = 2592000; + } + if(empty($sla_limit)){ + $sla_limit = 95; + } + if(empty($id_warning_module_template)){ + $id_warning_module_template = 0; + } + if(empty($id_critical_module_template)){ + $id_critical_module_template = 0; + } + if(empty($id_critical_module_sla)){ + $id_critical_module_sla = 0; + } + + $result = services_create_service ($name, $description, $id_group, + $critical, $warning, SECONDS_5MINUTES, $mode, $id_agent, $sla_interval, $sla_limit, + $id_warning_module_template, $id_critical_module_template, + $id_unknown_module_template, $id_critical_module_sla); + + if($result){ + returnData('string', array('type' => 'string', 'data' => $result)); + } else { + returnError('error_create_service', __('Error in creation service')); + } +} + +/** + * Update a service. + * + * @param $thrash1 service id. + * @param $thrash2 Don't use. + * @param array $other it's array, $other as param is ;;;; + * ;;;;; + * ;; + * in this order and separator char (after text ; ) and separator + * (pass in param othermode as othermode=url_encode_separator_) + * @param $thrash3 Don't use + * + * example: + * http://172.17.0.1/pandora_console/include/api.php?op=set&op2=update_service&return_type=json + * &id=4&other=test2%7CDescripcion%7C%7C%7C0.6%7C&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora + * + */ +function api_set_update_service($thrash1, $thrash2, $other, $thrash3) { + + $id_service = $thrash1; + if(empty($id_service)){ + returnError('error_update_service', __('Error in update service. No service id')); + return; + } + + $service = db_get_row('tservice', + 'id', $id_service); + + $name = $other['data'][0]; + if(empty($name)){ + $name = $service['name']; + } + $description = $other['data'][1]; + if(empty($description)){ + $description = $service['description']; + } + $id_group = $other['data'][2]; + if(empty($id_group)){ + $id_group = $service['id_group']; + } + $critical = $other['data'][3]; + if(empty($critical)){ + $critical = $service['critical']; + } + $warning = $other['data'][4]; + if(empty($warning)){ + $warning = $service['warning']; + } + + $mode = 0; + + $id_agent = $other['data'][5]; + if(empty($id_agent)){ + $id_agent = $service['id_agent_module']; + } + $sla_interval = $other['data'][6]; + if(empty($sla_interval)){ + $sla_interval = $service['sla_interval']; + } + $sla_limit = $other['data'][7]; + if(empty($sla_limit)){ + $sla_limit = $service['sla_limit']; + } + $id_warning_module_template = $other['data'][8]; + if(empty($id_warning_module_template)){ + $id_warning_module_template = $service['id_template_alert_warning']; + } + $id_critical_module_template = $other['data'][9]; + if(empty($id_critical_module_template)){ + $id_critical_module_template = $service['id_template_alert_critical']; + } + + $id_unknown_module_template = 0; + + $id_critical_module_sla = $other['data'][10]; + if(empty($id_critical_module_sla)){ + $id_critical_module_sla = $service['id_template_alert_critical_sla']; + } + + $result = services_update_service ($id_service, $name,$description, $id_group, $critical, $warning, + SECONDS_5MINUTES, $mode, $id_agent,$sla_interval, $sla_limit,$id_warning_module_template, + $id_critical_module_template,$id_unknown_module_template,$id_critical_module_sla); + + + if($result){ + returnData('string', array('type' => 'string', 'data' => $result)); + } else { + returnError('error_update_service', __('Error in update service')); + } + +} + +/** + * Add elements to service. + * + * @param $thrash1 service id. + * @param $thrash2 Don't use. + * @param array $other it's a json, $other as param is ;;; + * ;;;;; + * ;; + * in this order and separator char (after text ; ) and separator + * (pass in param othermode as othermode=url_encode_separator_) + * @param $thrash3 Don't use + * + * example: + * http://172.17.0.1/pandora_console/include/api.php?op=set&op2=add_element_service&return_type=json&id=1 + * &other=W3sidHlwZSI6ImFnZW50IiwiaWQiOjIsImRlc2NyaXB0aW9uIjoiamlqaWppIiwid2VpZ2h0X2NyaXRpY2FsIjowLCJ3ZWlnaHRfd2FybmluZyI6MCwid2VpZ2h0X3Vua25vd24iOjAsIndlaWdodF9vayI6MH0seyJ0eXBlIjoibW9kdWxlIiwiaWQiOjEsImRlc2NyaXB0aW9uIjoiSG9sYSBxdWUgdGFsIiwid2VpZ2h0X2NyaXRpY2FsIjowLCJ3ZWlnaHRfd2FybmluZyI6MCwid2VpZ2h0X3Vua25vd24iOjAsIndlaWdodF9vayI6MH0seyJ0eXBlIjoic2VydmljZSIsImlkIjozLCJkZXNjcmlwdGlvbiI6ImplamVqZWplIiwid2VpZ2h0X2NyaXRpY2FsIjowLCJ3ZWlnaHRfd2FybmluZyI6MCwid2VpZ2h0X3Vua25vd24iOjAsIndlaWdodF9vayI6MH1d + * &other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora + * + */ +function api_set_add_element_service($thrash1, $thrash2, $other, $thrash3) { + + $id = $thrash1; + + if(empty($id)){ + returnError('error_add_service_element', __('Error adding elements to service. No service id')); + return; + } + + $array_json = json_decode(base64_decode(io_safe_output($other['data'][0])), true); + if(!empty($array_json)){ + $results = false; + foreach ($array_json as $key => $element) { + if($element['id'] == 0){ + continue; + } + switch ($element['type']) { + case 'agent': + $id_agente_modulo = 0; + $id_service_child = 0; + $agent_id = $element['id']; + break; + + case 'module': + $agent_id = 0; + $id_service_child = 0; + $id_agente_modulo = $element['id']; + break; + + case 'service': + $agent_id = 0; + $id_agente_modulo = 0; + $id_service_child = $element['id']; + break; + } + + $values = array( + 'id_agente_modulo' => $id_agente_modulo, + 'description' => $element['description'], + 'id_service' => $id, + 'weight_critical' => $element['weight_critical'], + 'weight_warning' => $element['weight_warning'], + 'weight_unknown' => $element['weight_unknown'], + 'weight_ok' => $element['weight_ok'], + 'id_agent' => $agent_id, + 'id_service_child' => $id_service_child, + 'id_server_meta' => 0); + + $result = db_process_sql_insert('tservice_element',$values); + if($result && !$results){ + $results = $result; + } + } + } + + if($results){ + returnData('string', array('type' => 'string', 'data' => 1)); + } else { + returnError('error_add_service_element', __('Error adding elements to service')); + } + +} /** * Update a special day. And return a message with the result of the operation. * From c363a2e0859ff9a6b85c12761aba0ba4a4d66cdc Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 2 Aug 2017 00:01:14 +0200 Subject: [PATCH 105/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 554958e8fd..bd80aaaf37 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.708-170801 +Version: 7.0NG.708-170802 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 bfa29742e9..cf24cc22c3 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.708-170801" +pandora_version="7.0NG.708-170802" 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 c3c4299d11..8f74943345 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.708'; -use constant AGENT_BUILD => '170801'; +use constant AGENT_BUILD => '170802'; # 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 ef73ff7c4d..3c3540dda4 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.708 -%define release 170801 +%define release 170802 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index ee64e007d3..20c2dd5f2d 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.708 -%define release 170801 +%define release 170802 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 f23a1b182b..b8d24050cd 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.708" -PI_BUILD="170801" +PI_BUILD="170802" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 3d83d2b987..4020d83223 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170801} +{170802} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 1b72993838..03a3a57fcf 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.708(Build 170801)") +#define PANDORA_VERSION ("7.0NG.708(Build 170802)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index a9ca9c87d4..baef56c360 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.708(Build 170801))" + VALUE "ProductVersion", "(7.0NG.708(Build 170802))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 97e7ffa1cd..fab0a96f79 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.708-170801 +Version: 7.0NG.708-170802 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 d445a41099..c539466823 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.708-170801" +pandora_version="7.0NG.708-170802" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 508b99818b..22e767639d 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170801'; +$build_version = 'PC170802'; $pandora_version = 'v7.0NG.708'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 0fa2b96fbe..9308a75d27 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Wed, 2 Aug 2017 15:41:44 +0900 Subject: [PATCH 106/142] [bug fix] deleting a module had caused unextected alert deletion. #156 --- pandora_console/godmode/agentes/configurar_agente.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 5305588aa7..613cf8ef29 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1527,7 +1527,8 @@ if ($delete_module) { // DELETE agent module ! if ($result === false) $error++; - if (alerts_delete_alert_agent_module($id_borrar_modulo) === false) + if (alerts_delete_alert_agent_module(false, + array('id_agente_module' => $id_borrar_modulo)) === false) $error++; $result = db_process_delete_temp('ttag_module', 'id_agente_modulo', From 408efec325e7407e14e085915030c5effa7663e5 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 2 Aug 2017 10:12:45 +0200 Subject: [PATCH 107/142] Updated version and build strings. --- pandora_agents/pc/AIX/pandora_agent.conf | 2 +- pandora_agents/pc/FreeBSD/pandora_agent.conf | 2 +- pandora_agents/pc/HP-UX/pandora_agent.conf | 2 +- pandora_agents/pc/Linux/pandora_agent.conf | 2 +- pandora_agents/pc/NT4/pandora_agent.conf | 2 +- pandora_agents/pc/SunOS/pandora_agent.conf | 2 +- pandora_agents/pc/Win32/pandora_agent.conf | 2 +- pandora_agents/shellscript/aix/pandora_agent.conf | 2 +- pandora_agents/shellscript/bsd-ipso/pandora_agent.conf | 2 +- pandora_agents/shellscript/hp-ux/pandora_agent.conf | 2 +- pandora_agents/shellscript/linux/pandora_agent.conf | 2 +- pandora_agents/shellscript/mac_osx/pandora_agent.conf | 2 +- pandora_agents/shellscript/openWRT/pandora_agent.conf | 2 +- pandora_agents/shellscript/solaris/pandora_agent.conf | 2 +- pandora_agents/unix/AIX/pandora_agent.conf | 2 +- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/Darwin/pandora_agent.conf | 2 +- pandora_agents/unix/FreeBSD/pandora_agent.conf | 2 +- pandora_agents/unix/HP-UX/pandora_agent.conf | 2 +- pandora_agents/unix/Linux/pandora_agent.conf | 2 +- pandora_agents/unix/NT4/pandora_agent.conf | 2 +- pandora_agents/unix/NetBSD/pandora_agent.conf | 2 +- pandora_agents/unix/SunOS/pandora_agent.conf | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 4 ++-- pandora_agents/unix/pandora_agent.spec | 4 ++-- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/bin/pandora_agent.conf | 2 +- pandora_agents/win32/installer/pandora.mpi | 4 ++-- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 4 ++-- pandora_console/pandora_console.spec | 4 ++-- pandora_console/pandora_console_install | 2 +- pandora_console/pandoradb_data.sql | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/conf/pandora_server.conf.new | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/pandora_server.redhat.spec | 4 ++-- pandora_server/pandora_server.spec | 4 ++-- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 49 files changed, 56 insertions(+), 56 deletions(-) diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf index 4ec24dd4fc..77d34249b3 100644 --- a/pandora_agents/pc/AIX/pandora_agent.conf +++ b/pandora_agents/pc/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.708, AIX version +# Version 7.0NG.709, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/FreeBSD/pandora_agent.conf b/pandora_agents/pc/FreeBSD/pandora_agent.conf index 5b84348657..f33e609eeb 100644 --- a/pandora_agents/pc/FreeBSD/pandora_agent.conf +++ b/pandora_agents/pc/FreeBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.708, FreeBSD Version +# Version 7.0NG.709, FreeBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/HP-UX/pandora_agent.conf b/pandora_agents/pc/HP-UX/pandora_agent.conf index 67368fc92d..e17adcc4c3 100644 --- a/pandora_agents/pc/HP-UX/pandora_agent.conf +++ b/pandora_agents/pc/HP-UX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.708, HP-UX Version +# Version 7.0NG.709, HP-UX Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/Linux/pandora_agent.conf b/pandora_agents/pc/Linux/pandora_agent.conf index 67cedc9d0a..a5ba94c7ee 100644 --- a/pandora_agents/pc/Linux/pandora_agent.conf +++ b/pandora_agents/pc/Linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.708, GNU/Linux +# Version 7.0NG.709, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/NT4/pandora_agent.conf b/pandora_agents/pc/NT4/pandora_agent.conf index 1922741fd4..77e78b23f2 100644 --- a/pandora_agents/pc/NT4/pandora_agent.conf +++ b/pandora_agents/pc/NT4/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.708, GNU/Linux +# Version 7.0NG.709, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/SunOS/pandora_agent.conf b/pandora_agents/pc/SunOS/pandora_agent.conf index b9314d2a5a..8ee5d38f40 100644 --- a/pandora_agents/pc/SunOS/pandora_agent.conf +++ b/pandora_agents/pc/SunOS/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.708, Solaris Version +# Version 7.0NG.709, Solaris Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/Win32/pandora_agent.conf b/pandora_agents/pc/Win32/pandora_agent.conf index 90d17489d0..2ebef28d78 100644 --- a/pandora_agents/pc/Win32/pandora_agent.conf +++ b/pandora_agents/pc/Win32/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2010 Artica Soluciones Tecnologicas -# Version 7.0NG.708 +# Version 7.0NG.709 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software diff --git a/pandora_agents/shellscript/aix/pandora_agent.conf b/pandora_agents/shellscript/aix/pandora_agent.conf index d624a8d66d..987de91b06 100644 --- a/pandora_agents/shellscript/aix/pandora_agent.conf +++ b/pandora_agents/shellscript/aix/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.708, AIX version +# Version 7.0NG.709, AIX version # General Parameters # ================== diff --git a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf index 9edc972282..712756d13c 100644 --- a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf +++ b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.708 +# Version 7.0NG.709 # FreeBSD/IPSO version # Licenced under GPL licence, 2003-2007 Sancho Lerena diff --git a/pandora_agents/shellscript/hp-ux/pandora_agent.conf b/pandora_agents/shellscript/hp-ux/pandora_agent.conf index f77b766dab..7113ea627b 100644 --- a/pandora_agents/shellscript/hp-ux/pandora_agent.conf +++ b/pandora_agents/shellscript/hp-ux/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.708, HPUX Version +# Version 7.0NG.709, HPUX Version # General Parameters # ================== diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf index d37678b502..b35313bcc4 100644 --- a/pandora_agents/shellscript/linux/pandora_agent.conf +++ b/pandora_agents/shellscript/linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.708 +# Version 7.0NG.709 # Licensed under GPL license v2, # (c) 2003-2010 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/mac_osx/pandora_agent.conf b/pandora_agents/shellscript/mac_osx/pandora_agent.conf index da67ed5470..609632ea33 100644 --- a/pandora_agents/shellscript/mac_osx/pandora_agent.conf +++ b/pandora_agents/shellscript/mac_osx/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.708 +# Version 7.0NG.709 # Licensed under GPL license v2, # (c) 2003-2009 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/openWRT/pandora_agent.conf b/pandora_agents/shellscript/openWRT/pandora_agent.conf index d8a9d19ee3..00abe55972 100644 --- a/pandora_agents/shellscript/openWRT/pandora_agent.conf +++ b/pandora_agents/shellscript/openWRT/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.708 +# Version 7.0NG.709 # Licensed under GPL license v2, # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/solaris/pandora_agent.conf b/pandora_agents/shellscript/solaris/pandora_agent.conf index 1b4a021236..abbb8bd535 100644 --- a/pandora_agents/shellscript/solaris/pandora_agent.conf +++ b/pandora_agents/shellscript/solaris/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.708, Solaris version +# Version 7.0NG.709, Solaris version # General Parameters # ================== diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf index dfdc519a04..914716f866 100644 --- a/pandora_agents/unix/AIX/pandora_agent.conf +++ b/pandora_agents/unix/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.708, AIX version +# Version 7.0NG.709, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index bd80aaaf37..22a9e6e40d 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.708-170802 +Version: 7.0NG.709 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 cf24cc22c3..6ed7ccd692 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.708-170802" +pandora_version="7.0NG.709" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/Darwin/pandora_agent.conf b/pandora_agents/unix/Darwin/pandora_agent.conf index 81ce878b4e..a1d986c5c3 100644 --- a/pandora_agents/unix/Darwin/pandora_agent.conf +++ b/pandora_agents/unix/Darwin/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.708, GNU/Linux +# Version 7.0NG.709, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2012 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/FreeBSD/pandora_agent.conf b/pandora_agents/unix/FreeBSD/pandora_agent.conf index 535a637421..bbfe88e1fa 100644 --- a/pandora_agents/unix/FreeBSD/pandora_agent.conf +++ b/pandora_agents/unix/FreeBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.708, FreeBSD Version +# Version 7.0NG.709, FreeBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2016 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/HP-UX/pandora_agent.conf b/pandora_agents/unix/HP-UX/pandora_agent.conf index 962d1a4047..50ccf8fe55 100644 --- a/pandora_agents/unix/HP-UX/pandora_agent.conf +++ b/pandora_agents/unix/HP-UX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.708, HP-UX Version +# Version 7.0NG.709, HP-UX Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf index efaa9ac0bc..af2bd05ab3 100644 --- a/pandora_agents/unix/Linux/pandora_agent.conf +++ b/pandora_agents/unix/Linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.708, GNU/Linux +# Version 7.0NG.709, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2014 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/NT4/pandora_agent.conf b/pandora_agents/unix/NT4/pandora_agent.conf index 8a153581e2..4b97428ffe 100644 --- a/pandora_agents/unix/NT4/pandora_agent.conf +++ b/pandora_agents/unix/NT4/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.708, GNU/Linux +# Version 7.0NG.709, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/NetBSD/pandora_agent.conf b/pandora_agents/unix/NetBSD/pandora_agent.conf index 8cb4f47058..63bddc1d66 100644 --- a/pandora_agents/unix/NetBSD/pandora_agent.conf +++ b/pandora_agents/unix/NetBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.708, NetBSD Version +# Version 7.0NG.709, NetBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/SunOS/pandora_agent.conf b/pandora_agents/unix/SunOS/pandora_agent.conf index 290d3614a3..24902ea131 100644 --- a/pandora_agents/unix/SunOS/pandora_agent.conf +++ b/pandora_agents/unix/SunOS/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.708, Solaris Version +# Version 7.0NG.709, Solaris Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 8f74943345..ae6591c102 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -40,7 +40,7 @@ my $Sem = undef; # Semaphore used to control the number of threads my $ThreadSem = undef; -use constant AGENT_VERSION => '7.0NG.708'; +use constant AGENT_VERSION => '7.0NG.709'; use constant AGENT_BUILD => '170802'; # Agent log default file size maximum and instances diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 3c3540dda4..c5fe50025b 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -2,8 +2,8 @@ #Pandora FMS Linux Agent # %define name pandorafms_agent_unix -%define version 7.0NG.708 -%define release 170802 +%define version 7.0NG.709 +%define release 1 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 20c2dd5f2d..f210593a2f 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -2,8 +2,8 @@ #Pandora FMS Linux Agent # %define name pandorafms_agent_unix -%define version 7.0NG.708 -%define release 170802 +%define version 7.0NG.709 +%define release 1 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index b8d24050cd..728a6f1468 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -9,7 +9,7 @@ # Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license. # ********************************************************************** -PI_VERSION="7.0NG.708" +PI_VERSION="7.0NG.709" PI_BUILD="170802" OS_NAME=`uname -s` diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index 288e42e3a7..ca2b3526f4 100644 --- a/pandora_agents/win32/bin/pandora_agent.conf +++ b/pandora_agents/win32/bin/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2014 Artica Soluciones Tecnologicas -# Version 7.0NG.708 +# Version 7.0NG.709 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 4020d83223..585366329c 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -3,7 +3,7 @@ AllowLanguageSelection {Yes} AppName -{Pandora FMS Windows Agent v7.0NG.708} +{Pandora FMS Windows Agent v7.0NG.709} ApplicationID {17E3D2CF-CA02-406B-8A80-9D31C17BD08F} @@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives {No} Windows,Executable -{<%AppName%>-<%Version%>-Setup<%Ext%>} +{<%AppName%>-Setup<%Ext%>} Windows,FileDescription {<%AppName%> <%Version%> Setup} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 03a3a57fcf..53af786a6b 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.708(Build 170802)") +#define PANDORA_VERSION ("7.0NG.709(Build 170802)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index baef56c360..d880ee6440 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.708(Build 170802))" + VALUE "ProductVersion", "(7.0NG.709(Build 170802))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index fab0a96f79..c9fed88159 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.708-170802 +Version: 7.0NG.709 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 c539466823..ef38b9072c 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.708-170802" +pandora_version="7.0NG.709" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 22e767639d..90d044ea7b 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -23,7 +23,7 @@ * Pandora build version and version */ $build_version = 'PC170802'; -$pandora_version = 'v7.0NG.708'; +$pandora_version = 'v7.0NG.709'; // Do not overwrite default timezone set if defined. $script_tz = @date_default_timezone_get(); diff --git a/pandora_console/install.php b/pandora_console/install.php index 9308a75d27..01a2fd2050 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -70,7 +70,7 @@
Date: Thu, 3 Aug 2017 00:01:15 +0200 Subject: [PATCH 108/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 4 ++-- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 22a9e6e40d..ea9b820631 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.709 +Version: 7.0NG.709-170803 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 6ed7ccd692..d0c34e56f7 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.709" +pandora_version="7.0NG.709-170803" 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 ae6591c102..bc986608f1 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.709'; -use constant AGENT_BUILD => '170802'; +use constant AGENT_BUILD => '170803'; # 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 c5fe50025b..adb545c275 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.709 -%define release 1 +%define release 170803 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index f210593a2f..8972b700ce 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.709 -%define release 1 +%define release 170803 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 728a6f1468..e88801b733 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.709" -PI_BUILD="170802" +PI_BUILD="170803" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 585366329c..26b6ac8468 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170802} +{170803} ViewReadme {Yes} @@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives {No} Windows,Executable -{<%AppName%>-Setup<%Ext%>} +{<%AppName%>-<%Version%>-Setup<%Ext%>} Windows,FileDescription {<%AppName%> <%Version%> Setup} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 53af786a6b..e839d47c22 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.709(Build 170802)") +#define PANDORA_VERSION ("7.0NG.709(Build 170803)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index d880ee6440..8862317076 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.709(Build 170802))" + VALUE "ProductVersion", "(7.0NG.709(Build 170803))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index c9fed88159..fda743aac4 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.709 +Version: 7.0NG.709-170803 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 ef38b9072c..97bb223fc3 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.709" +pandora_version="7.0NG.709-170803" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 90d044ea7b..60bf0cb9e0 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170802'; +$build_version = 'PC170803'; $pandora_version = 'v7.0NG.709'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 01a2fd2050..d31cd7727d 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Thu, 3 Aug 2017 12:41:47 +0200 Subject: [PATCH 109/142] Added label in automatic graph --- .../include/functions_reporting.php | 41 +++++++++++-------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index f64bb7d0ed..0959cebe38 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -5789,17 +5789,10 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', require_once ($config["homedir"] . '/include/functions_graph.php'); - if ($type_report == 'automatic_graph') { - // Do none - } - else { - if ($config['metaconsole']) { - $id_meta = metaconsole_get_id_server($content["server_name"]); - - - $server = metaconsole_get_connection_by_id ($id_meta); - metaconsole_connect($server); - } + if ($config['metaconsole'] && $type_report != 'automatic_graph') { + $id_meta = metaconsole_get_id_server($content["server_name"]); + $server = metaconsole_get_connection_by_id ($id_meta); + metaconsole_connect($server); } $graph = db_get_row ("tgraph", "id_graph", $content['id_gs']); @@ -5853,6 +5846,22 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', 'id_agent_module'=>$graph_item['id_agent_module']); } + if($type_report == 'automatic_graph'){ + $label = (isset($content['style']['label'])) ? $content['style']['label'] : ''; + if (!empty($label)) { + if ($config['metaconsole']) { + $id_meta = metaconsole_get_id_server($content["server_name"]); + $server = metaconsole_get_connection_by_id ($id_meta); + metaconsole_connect($server); + } + $label = reporting_label_macro($content, $label); + + if ($config['metaconsole']) { + metaconsole_restore_db(); + } + } + } + $labels[$graph_item['id_agent_module']] = $label; } } @@ -5909,15 +5918,11 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', break; } - if ($type_report == 'automatic_graph') { - // Do none - } - else { - if ($config['metaconsole']) { - metaconsole_restore_db(); - } + if ($config['metaconsole'] && $type_report != 'automatic_graph') { + metaconsole_restore_db(); } + return reporting_check_structure_content($return); } From ea06ba213bb387060143b37c27bc64b4c3f88ee7 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Thu, 3 Aug 2017 13:05:57 +0200 Subject: [PATCH 110/142] Added registration method to reset pass --- .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 3 ++- pandora_console/include/functions.php | 10 ++++++++++ pandora_console/index.php | 15 +++++++++------ pandora_console/pandoradb.sql | 3 ++- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index a629abc0ad..f37c3244ae 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -1357,7 +1357,8 @@ INSERT INTO `tcontainer` SET `name` = 'Default graph container'; CREATE TABLE IF NOT EXISTS `treset_pass_history` ( `id` int(10) unsigned NOT NULL auto_increment, `id_user` varchar(60) NOT NULL, - `reset_moment` date default NULL, + `reset_moment` datetime NOT NULL, + `success` tinyint(1) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index b4e25c9eac..b8ece40c98 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -2754,4 +2754,14 @@ function remove_right_zeros ($value) { } } +function register_pass_change_try ($id_user, $success) { + $values = array(); + $values['id_user'] = $id_user; + $reset_pass_moment = new DateTime('now'); + $reset_pass_moment = $reset_pass_moment->format("Y-m-d H:i:s"); + $values['reset_moment'] = $reset_pass_moment; + $values['success'] = $success; + db_process_sql_insert('treset_pass_history', $values); +} + ?> diff --git a/pandora_console/index.php b/pandora_console/index.php index 5a32eaa670..683490f646 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -585,18 +585,17 @@ if (! isset ($config['id_user'])) { if ($res) { $correct_reset_pass_process = __('Password changed successfully'); - $values = array(); - $values['id_user'] = $id_user; - $reset_pass_moment = new DateTime('now'); - $reset_pass_moment = $reset_pass_moment->format("Y-m-d H:i:s"); - $values['reset_moment'] = $reset_pass_moment; - db_process_sql_insert('treset_pass_history', $values); + register_pass_change_try($id_user, 1); } else { + register_pass_change_try($id_user, 0); + $process_error_message = __('Failed to change password'); } } else { + register_pass_change_try($id_user, 0); + $process_error_message = __('Passwords must be the same'); } require_once ('general/login_page.php'); @@ -612,6 +611,7 @@ if (! isset ($config['id_user'])) { if ($db_reset_pass_entry) { if (($db_reset_pass_entry + SECONDS_2HOUR) < time()) { + register_pass_change_try($id_user, 0); $process_error_message = __('Too much time since password change request'); delete_reset_pass_entry($id_user); require_once ('general/login_page.php'); @@ -622,6 +622,7 @@ if (! isset ($config['id_user'])) { } } else { + register_pass_change_try($id_user, 0); $process_error_message = __('This user has not requested a password change'); require_once ('general/login_page.php'); } @@ -648,6 +649,7 @@ if (! isset ($config['id_user'])) { if (!$check_user) { $reset = false; + register_pass_change_try($user_reset_pass, 0); $error = __('Error in reset password request'); $show_error = true; } @@ -656,6 +658,7 @@ if (! isset ($config['id_user'])) { if (!$check_mail) { $reset = false; + register_pass_change_try($user_reset_pass, 0); $error = __('This user doesn\'t have a valid email address'); $show_error = true; } diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 0cb01cf9b5..75b93af530 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1149,7 +1149,8 @@ CREATE TABLE IF NOT EXISTS `tuser_double_auth` ( CREATE TABLE IF NOT EXISTS `treset_pass_history` ( `id` int(10) unsigned NOT NULL auto_increment, `id_user` varchar(60) NOT NULL, - `reset_moment` datetime not null default 0, + `reset_moment` datetime NOT NULL, + `success` tinyint(1) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; From fb9f1872872290a15f208de83424d5e51960e1fc Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 3 Aug 2017 13:09:41 +0200 Subject: [PATCH 111/142] fixed error exportation csv in custom graphs --- .../include/graphs/flot/jquery.flot.exportdata.pandora.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/graphs/flot/jquery.flot.exportdata.pandora.js b/pandora_console/include/graphs/flot/jquery.flot.exportdata.pandora.js index bb7c5d56dd..e8bb747901 100644 --- a/pandora_console/include/graphs/flot/jquery.flot.exportdata.pandora.js +++ b/pandora_console/include/graphs/flot/jquery.flot.exportdata.pandora.js @@ -88,7 +88,10 @@ else if (typeof labels[index] !== 'undefined') date = labels[index]; - result.data.push([date, value,dataObject.label]); + var clean_label = dataObject.label; + clean_label = clean_label.replace( new RegExp("<.*?>", "g"), ""); + clean_label = clean_label.replace( new RegExp(";", "g"), ""); + result.data.push([date, value, clean_label]); }); } /* [ @@ -139,7 +142,7 @@ try { var elements = []; - var custom_graph = $('input:hidden[name=custom_graph]').value; + var custom_graph = $('#hidden-custom_graph').val(); if (custom_graph) { dataObject = retrieveDataOject(dataObjects); From 0932004781cac5e49c934a4a9cdff8a568bd00e0 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 3 Aug 2017 13:13:34 +0200 Subject: [PATCH 112/142] Fixed label in automatic graph in node --- .../include/functions_reporting.php | 44 +++++++++++-------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index f64bb7d0ed..ceb28ad19a 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -5789,17 +5789,10 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', require_once ($config["homedir"] . '/include/functions_graph.php'); - if ($type_report == 'automatic_graph') { - // Do none - } - else { - if ($config['metaconsole']) { - $id_meta = metaconsole_get_id_server($content["server_name"]); - - - $server = metaconsole_get_connection_by_id ($id_meta); - metaconsole_connect($server); - } + if ($config['metaconsole'] && $type_report != 'automatic_graph') { + $id_meta = metaconsole_get_id_server($content["server_name"]); + $server = metaconsole_get_connection_by_id ($id_meta); + metaconsole_connect($server); } $graph = db_get_row ("tgraph", "id_graph", $content['id_gs']); @@ -5853,6 +5846,26 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', 'id_agent_module'=>$graph_item['id_agent_module']); } + if($type_report == 'automatic_graph'){ + $label = (isset($content['style']['label'])) ? $content['style']['label'] : ''; + + if (!empty($label)) { + if ($config['metaconsole']) { + $id_meta = metaconsole_get_id_server($content["server_name"]); + $server = metaconsole_get_connection_by_id ($id_meta); + metaconsole_connect($server); + } + $label = reporting_label_macro($content, $label); + + if ($config['metaconsole']) { + metaconsole_restore_db(); + } + } + } else { + $label = (isset($content['style']['label'])) ? $content['style']['label'] : ''; + $label = reporting_label_macro($content, $label); + } + $labels[$graph_item['id_agent_module']] = $label; } } @@ -5909,13 +5922,8 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', break; } - if ($type_report == 'automatic_graph') { - // Do none - } - else { - if ($config['metaconsole']) { - metaconsole_restore_db(); - } + if ($config['metaconsole'] && $type_report != 'automatic_graph') { + metaconsole_restore_db(); } return reporting_check_structure_content($return); From df4b66fbd58babbdde3b3d036abe1a7168651d8b Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 3 Aug 2017 13:51:56 +0200 Subject: [PATCH 113/142] fixed error cli version snmp --- pandora_server/lib/PandoraFMS/Core.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 7acb66ecd8..5c993d2bba 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -2759,7 +2759,7 @@ sub pandora_create_module_from_hash ($$$) { # Encrypt SNMP v3 passwords. if ($parameters->{'id_tipo_modulo'} >= 15 && $parameters->{'id_tipo_modulo'} <= 18 && - $parameters->{'tcp_send'} == 3) { + $parameters->{'tcp_send'} eq '3') { $parameters->{'custom_string_2'} = pandora_input_password($pa_config, $parameters->{'custom_string_2'}); } From 88411aedf51e4e4b1c3af21058065b1f17f0a8d0 Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 3 Aug 2017 15:07:49 +0200 Subject: [PATCH 114/142] fixed minor error --- pandora_server/util/pandora_manage.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 80332a637f..078ce63eb5 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -129,7 +129,7 @@ sub help_screen{ help_screen_line('--create_data_module', " [ \n\t \n\t \n\t \n\t \n\t ]", 'Add data server module to agent'); help_screen_line('--create_web_module', " [ \n\t \n\t \n\t \n\t \n\t ].\n\t The valid data types are web_data, web_proc, web_content_data or web_content_string", 'Add web server module to agent'); help_screen_line('--create_network_module', " \n\t [ \n\t \n\t \n\t \n\t \n\t ]", 'Add not snmp network module to agent'); - help_screen_line('--create_snmp_module', " \n\t [ \n\t \n\t \n\t \n\t \n\t + help_screen_line('--create_snmp_module', " \n\t [ \n\t \n\t \n\t \n\t \n\t \n\t \n\t ]", 'Add snmp network module to agent'); help_screen_line('--create_plugin_module', " \n\t [ \n\t \n\t \n\t \n\t \n\t \n\t ]", 'Add plug-in module to agent'); help_screen_line('--create_module_group', ''); From c4171ac2487626eda5796ba63fe5cafbb2982567 Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 3 Aug 2017 17:09:27 +0200 Subject: [PATCH 115/142] fixed errors metaconsole reports serialize data --- pandora_console/include/functions_reporting.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index f64bb7d0ed..bf3b38540d 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -2447,7 +2447,14 @@ function reporting_database_serialized($report, $content) { $return['agent_name'] = $agent_name; $return['module_name'] = $module_name; - + if ($config['metaconsole']) { + $id_meta = metaconsole_get_id_server($content["server_name"]); + + + $server = metaconsole_get_connection_by_id ($id_meta); + metaconsole_connect($server); + } + $datelimit = $report["datetime"] - $content['period']; $search_in_history_db = db_search_in_history_db($datelimit); @@ -2523,6 +2530,10 @@ function reporting_database_serialized($report, $content) { $data[] = $row; } } + + if ($config['metaconsole']) { + metaconsole_restore_db(); + } $return["data"] = $data; From 2d8697eaebfb485a04c315146f9efe2c2a91408f Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 4 Aug 2017 00:01:14 +0200 Subject: [PATCH 116/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index ea9b820631..60b5ed7e5d 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.709-170803 +Version: 7.0NG.709-170804 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 d0c34e56f7..b616068ff8 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.709-170803" +pandora_version="7.0NG.709-170804" 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 bc986608f1..0d4d061826 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.709'; -use constant AGENT_BUILD => '170803'; +use constant AGENT_BUILD => '170804'; # 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 adb545c275..056b36ff57 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.709 -%define release 170803 +%define release 170804 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 8972b700ce..a3519d272f 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.709 -%define release 170803 +%define release 170804 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 e88801b733..d85ec7ebd7 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.709" -PI_BUILD="170803" +PI_BUILD="170804" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 26b6ac8468..654aefe4ba 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170803} +{170804} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index e839d47c22..d8b78303f3 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.709(Build 170803)") +#define PANDORA_VERSION ("7.0NG.709(Build 170804)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 8862317076..fde791982e 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.709(Build 170803))" + VALUE "ProductVersion", "(7.0NG.709(Build 170804))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index fda743aac4..78317ad279 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.709-170803 +Version: 7.0NG.709-170804 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 97bb223fc3..9f48a68abc 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.709-170803" +pandora_version="7.0NG.709-170804" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 60bf0cb9e0..970ecda668 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170803'; +$build_version = 'PC170804'; $pandora_version = 'v7.0NG.709'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index d31cd7727d..1654528ce3 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Sat, 5 Aug 2017 00:01:13 +0200 Subject: [PATCH 117/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 60b5ed7e5d..31ff788cf7 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.709-170804 +Version: 7.0NG.709-170805 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 b616068ff8..965739b923 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.709-170804" +pandora_version="7.0NG.709-170805" 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 0d4d061826..dfa803f177 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.709'; -use constant AGENT_BUILD => '170804'; +use constant AGENT_BUILD => '170805'; # 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 056b36ff57..b2d0f8c7a6 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.709 -%define release 170804 +%define release 170805 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index a3519d272f..98f40beee8 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.709 -%define release 170804 +%define release 170805 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 d85ec7ebd7..feed1c3eae 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.709" -PI_BUILD="170804" +PI_BUILD="170805" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 654aefe4ba..5fc8b837f5 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170804} +{170805} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index d8b78303f3..2c2434609c 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.709(Build 170804)") +#define PANDORA_VERSION ("7.0NG.709(Build 170805)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index fde791982e..0065a9e2b8 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.709(Build 170804))" + VALUE "ProductVersion", "(7.0NG.709(Build 170805))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 78317ad279..7ff75cee6e 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.709-170804 +Version: 7.0NG.709-170805 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 9f48a68abc..d139b38407 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.709-170804" +pandora_version="7.0NG.709-170805" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 970ecda668..c1f9847619 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170804'; +$build_version = 'PC170805'; $pandora_version = 'v7.0NG.709'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 1654528ce3..fea5c38921 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Sun, 6 Aug 2017 00:01:13 +0200 Subject: [PATCH 118/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 31ff788cf7..4f1e203c6d 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.709-170805 +Version: 7.0NG.709-170806 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 965739b923..ce0adb682f 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.709-170805" +pandora_version="7.0NG.709-170806" 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 dfa803f177..be3ab44678 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.709'; -use constant AGENT_BUILD => '170805'; +use constant AGENT_BUILD => '170806'; # 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 b2d0f8c7a6..f0594cb403 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.709 -%define release 170805 +%define release 170806 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 98f40beee8..9fa015168c 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.709 -%define release 170805 +%define release 170806 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 feed1c3eae..5d097afc08 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.709" -PI_BUILD="170805" +PI_BUILD="170806" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 5fc8b837f5..ee1a30a4c8 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170805} +{170806} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 2c2434609c..cbb5eb9ca7 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.709(Build 170805)") +#define PANDORA_VERSION ("7.0NG.709(Build 170806)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 0065a9e2b8..ac1e942b56 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.709(Build 170805))" + VALUE "ProductVersion", "(7.0NG.709(Build 170806))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 7ff75cee6e..b89e2689bd 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.709-170805 +Version: 7.0NG.709-170806 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 d139b38407..ec0d8dfe56 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.709-170805" +pandora_version="7.0NG.709-170806" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index c1f9847619..fffafe2443 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170805'; +$build_version = 'PC170806'; $pandora_version = 'v7.0NG.709'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index fea5c38921..398e0105cb 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Mon, 7 Aug 2017 00:01:14 +0200 Subject: [PATCH 119/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 4f1e203c6d..1600284bcf 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.709-170806 +Version: 7.0NG.709-170807 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 ce0adb682f..8802a4d681 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.709-170806" +pandora_version="7.0NG.709-170807" 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 be3ab44678..62a49f81bf 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.709'; -use constant AGENT_BUILD => '170806'; +use constant AGENT_BUILD => '170807'; # 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 f0594cb403..8760f149f9 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.709 -%define release 170806 +%define release 170807 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 9fa015168c..bf3ff34e59 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.709 -%define release 170806 +%define release 170807 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 5d097afc08..b04e47f701 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.709" -PI_BUILD="170806" +PI_BUILD="170807" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index ee1a30a4c8..2ccdc610f1 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170806} +{170807} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index cbb5eb9ca7..1630d61ac6 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.709(Build 170806)") +#define PANDORA_VERSION ("7.0NG.709(Build 170807)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index ac1e942b56..fc46ee253c 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.709(Build 170806))" + VALUE "ProductVersion", "(7.0NG.709(Build 170807))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index b89e2689bd..d8f8fdb5d0 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.709-170806 +Version: 7.0NG.709-170807 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 ec0d8dfe56..3beab55d45 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.709-170806" +pandora_version="7.0NG.709-170807" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index fffafe2443..072114f230 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170806'; +$build_version = 'PC170807'; $pandora_version = 'v7.0NG.709'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 398e0105cb..8415462224 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Mon, 7 Aug 2017 11:30:49 +0200 Subject: [PATCH 120/142] Fixed issue in public console --- pandora_console/operation/gis_maps/public_console.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora_console/operation/gis_maps/public_console.php b/pandora_console/operation/gis_maps/public_console.php index 01a3af722a..68c94f9c60 100755 --- a/pandora_console/operation/gis_maps/public_console.php +++ b/pandora_console/operation/gis_maps/public_console.php @@ -58,7 +58,7 @@ $confMap = gis_get_map_conf($idMap); // Default open map (used to overwrite unlicensed google map view) $confMapDefault = get_good_con(); -$confMapUrlDefault = json_decode($confMapDefault['conection_data'], true)['url']; +$confMapUrlDefault = json_decode($confMapDefault['conection_data'], true); $num_baselayer=0; // Initialy there is no Gmap base layer. @@ -77,7 +77,7 @@ if ($confMap !== false) { case 'Gmap': if (!isset($decodeJSON['gmap_key']) || empty($decodeJSON['gmap_key'])) { // If there is not gmap_key, show the default view - $baselayers[$num_baselayer]['url'] = $confMapUrlDefault; + $baselayers[$num_baselayer]['url'] = $confMapUrlDefault['url']; $baselayers[$num_baselayer]['typeBaseLayer'] = 'OSM'; } else { $baselayers[$num_baselayer]['gmap_type'] = $decodeJSON['gmap_type']; @@ -207,6 +207,7 @@ if ($layers != false) { var new_height = $(document).height(); $("#map").css("height", new_height - 60); + $("svg[id*=OpenLayers]").css("height", new_height - 60); }); \ No newline at end of file From 590bfbfe84917ff0807838f3216db8d21115799b Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 7 Aug 2017 13:57:04 +0200 Subject: [PATCH 121/142] mr-5 add queries --- pandora_console/extras/mr/5.sql | 15 +++++++++++++++ .../pandoradb_migrate_6.0_to_7.0.mysql.sql | 16 +++++----------- pandora_console/pandoradb.sql | 2 +- 3 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 pandora_console/extras/mr/5.sql diff --git a/pandora_console/extras/mr/5.sql b/pandora_console/extras/mr/5.sql new file mode 100644 index 0000000000..afce7e0442 --- /dev/null +++ b/pandora_console/extras/mr/5.sql @@ -0,0 +1,15 @@ +START TRANSACTION; + +SET @st_oum707 = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'tgraph_source' AND table_schema = DATABASE() AND column_name = 'id_server') > 0, + "SELECT 1", + "ALTER TABLE tgraph_source ADD COLUMN id_server int(11) UNSIGNED NOT NULL default 0" +)); + +PREPARE pr_oum707 FROM @st_oum707; +EXECUTE pr_oum707; +DEALLOCATE PREPARE pr_oum707; + +ALTER TABLE tserver_export_data MODIFY `module_name` varchar(600) BINARY NOT NULL default ''; + +COMMIT; \ No newline at end of file diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index f37c3244ae..b3174434db 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -1408,16 +1408,10 @@ ALTER TABLE tserver_export MODIFY `name` varchar(600) BINARY NOT NULL default '' -- Table `tgraph_source` column 'id_server' -- --------------------------------------------------------------------- -START TRANSACTION; +ALTER TABLE tgraph_source ADD COLUMN id_server int(11) UNSIGNED NOT NULL default 0; -SET @st_oum707 = (SELECT IF( - (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'tgraph_source' AND table_schema = DATABASE() AND column_name = 'id_server') > 0, - "SELECT 1", - "ALTER TABLE tgraph_source ADD COLUMN id_server int(11) UNSIGNED NOT NULL default 0" -)); +-- --------------------------------------------------------------------- +-- Table `tserver_export_data` +-- --------------------------------------------------------------------- -PREPARE pr_oum707 FROM @st_oum707; -EXECUTE pr_oum707; -DEALLOCATE PREPARE pr_oum707; - -COMMIT; \ No newline at end of file +ALTER TABLE tserver_export_data MODIFY `module_name` varchar(600) BINARY NOT NULL default ''; diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 75b93af530..2166167065 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1418,7 +1418,7 @@ CREATE TABLE IF NOT EXISTS `tserver_export_data` ( `id` int(20) unsigned NOT NULL auto_increment, `id_export_server` int(10) unsigned default NULL, `agent_name` varchar(100) NOT NULL default '', - `module_name` varchar(100) NOT NULL default '', + `module_name` varchar(600) NOT NULL default '', `module_type` varchar(100) NOT NULL default '', `data` varchar(255) default NULL, `timestamp` datetime NOT NULL default '1970-01-01 00:00:00', From 6a2d3a7011e365421aa4df2cde397c43283ec521 Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 7 Aug 2017 17:02:56 +0200 Subject: [PATCH 122/142] fixed minor error --- pandora_console/godmode/reporting/create_container.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/reporting/create_container.php b/pandora_console/godmode/reporting/create_container.php index 9be93af597..b77588f589 100644 --- a/pandora_console/godmode/reporting/create_container.php +++ b/pandora_console/godmode/reporting/create_container.php @@ -76,7 +76,7 @@ if (is_ajax()){ $agent_alias = get_parameter('agent_alias',''); $module_name = get_parameter('module_name',''); $tag = get_parameter('tag',0); - $only_avg = (bool) get_parameter('only_avg'); + $only_avg_dyn = get_parameter('only_avg',0); $values = array( 'id_container' => $id_container2, @@ -87,7 +87,7 @@ if (is_ajax()){ 'agent' => $agent_alias, 'module' => $module_name, 'id_tag' => $tag, - 'only_average' => $only_avg); + 'only_average' => $only_avg_dyn); $id_item = db_process_sql_insert('tcontainer_item', $values); return; } From d5cff431281835115add2030760b9ac5c6eb5afb Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 8 Aug 2017 00:01:14 +0200 Subject: [PATCH 123/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 1600284bcf..15d41ba7f2 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.709-170807 +Version: 7.0NG.709-170808 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 8802a4d681..43e962649f 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.709-170807" +pandora_version="7.0NG.709-170808" 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 62a49f81bf..a2c8d82e9f 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.709'; -use constant AGENT_BUILD => '170807'; +use constant AGENT_BUILD => '170808'; # 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 8760f149f9..71e7f1dde8 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.709 -%define release 170807 +%define release 170808 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index bf3ff34e59..6d475e5168 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.709 -%define release 170807 +%define release 170808 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 b04e47f701..5371bbf3cd 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.709" -PI_BUILD="170807" +PI_BUILD="170808" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 2ccdc610f1..1c3a63d517 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170807} +{170808} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 1630d61ac6..965e91c17d 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.709(Build 170807)") +#define PANDORA_VERSION ("7.0NG.709(Build 170808)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index fc46ee253c..d29a75bf6a 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.709(Build 170807))" + VALUE "ProductVersion", "(7.0NG.709(Build 170808))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index d8f8fdb5d0..2c5e635415 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.709-170807 +Version: 7.0NG.709-170808 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 3beab55d45..56417e3ede 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.709-170807" +pandora_version="7.0NG.709-170808" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 072114f230..713444d48b 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170807'; +$build_version = 'PC170808'; $pandora_version = 'v7.0NG.709'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 8415462224..101163c446 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Tue, 8 Aug 2017 12:07:28 +0200 Subject: [PATCH 124/142] fixed error in graph container --- .../godmode/reporting/create_container.php | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/pandora_console/godmode/reporting/create_container.php b/pandora_console/godmode/reporting/create_container.php index b77588f589..1ff4ed3aa1 100644 --- a/pandora_console/godmode/reporting/create_container.php +++ b/pandora_console/godmode/reporting/create_container.php @@ -41,8 +41,13 @@ if (is_ajax()){ $id_agent = get_parameter('id_agent'); $id_agent_module = get_parameter('id_agent_module'); $time_lapse = get_parameter('time_lapse'); - $only_avg = (bool) get_parameter('only_avg'); - + $only_avg = get_parameter('only_avg'); + if($only_avg != 'false'){ + $only_avg = 1; + } + else{ + $only_avg = 0; + } $values = array( 'id_container' => $id_container2, 'type' => "simple_graph", @@ -76,8 +81,13 @@ if (is_ajax()){ $agent_alias = get_parameter('agent_alias',''); $module_name = get_parameter('module_name',''); $tag = get_parameter('tag',0); - $only_avg_dyn = get_parameter('only_avg',0); - + $only_avg = get_parameter('only_avg'); + if($only_avg != 'false'){ + $only_avg = 1; + } + else{ + $only_avg = 0; + } $values = array( 'id_container' => $id_container2, 'type' => "dynamic_graph", @@ -87,7 +97,7 @@ if (is_ajax()){ 'agent' => $agent_alias, 'module' => $module_name, 'id_tag' => $tag, - 'only_average' => $only_avg_dyn); + 'only_average' => $only_avg); $id_item = db_process_sql_insert('tcontainer_item', $values); return; } @@ -437,7 +447,7 @@ if($edit_container){ $data = array(); $data[0] = __('Only average'); - $data[1] = html_print_checkbox('only_avg', 1, false,true); + $data[1] = html_print_checkbox('only_avg_2', 1, false,true); $table->data[] = $data; $table->rowclass[] = ''; @@ -599,7 +609,7 @@ echo html_print_input_hidden('id_agent', 0); var group = $("#container_id_group1").val(); var module_group = $("#combo_modulegroup").val(); var tag = $("#tag").val(); - var only_avg = $("#checkbox-only_avg1").prop("checked"); + var only_avg = $("#checkbox-only_avg_2").prop("checked"); var id_container = ; jQuery.post ("ajax.php", {"page" : "godmode/reporting/create_container", From 032995fc83b2f943bd04ca69ea32dd29b065526d Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 8 Aug 2017 14:59:30 +0200 Subject: [PATCH 125/142] Disabled select for not admins --- pandora_console/operation/agentes/stat_win.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php index 5199f58506..7e76b2fabc 100644 --- a/pandora_console/operation/agentes/stat_win.php +++ b/pandora_console/operation/agentes/stat_win.php @@ -531,4 +531,14 @@ ui_include_time_picker(true); $(window).resize(function() { $("#field_list").css('height', ($(window).height() - 160) + 'px'); }); + + + $("#period_select").attr('disabled', 'disabled'); + + From f96032eeaa5da058d6b2f6d558597c15bf28e68e Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 9 Aug 2017 00:01:15 +0200 Subject: [PATCH 126/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 15d41ba7f2..8c06d4c68c 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.709-170808 +Version: 7.0NG.709-170809 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 43e962649f..6cec456223 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.709-170808" +pandora_version="7.0NG.709-170809" 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 a2c8d82e9f..9ecda1d16d 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.709'; -use constant AGENT_BUILD => '170808'; +use constant AGENT_BUILD => '170809'; # 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 71e7f1dde8..b1dca5a181 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.709 -%define release 170808 +%define release 170809 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 6d475e5168..29ca24cc08 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.709 -%define release 170808 +%define release 170809 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 5371bbf3cd..9bc0d6c4ba 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.709" -PI_BUILD="170808" +PI_BUILD="170809" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 1c3a63d517..b3aa936cb0 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170808} +{170809} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 965e91c17d..e9ee752438 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.709(Build 170808)") +#define PANDORA_VERSION ("7.0NG.709(Build 170809)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index d29a75bf6a..732e897082 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.709(Build 170808))" + VALUE "ProductVersion", "(7.0NG.709(Build 170809))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 2c5e635415..4ffbd96f74 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.709-170808 +Version: 7.0NG.709-170809 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 56417e3ede..05b9d583d7 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.709-170808" +pandora_version="7.0NG.709-170809" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 713444d48b..a5e16e3ff6 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170808'; +$build_version = 'PC170809'; $pandora_version = 'v7.0NG.709'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 101163c446..b9549887a7 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Wed, 9 Aug 2017 09:27:06 +0200 Subject: [PATCH 127/142] =?UTF-8?q?Revert=20"Merge=20branch=20'1196-Time-r?= =?UTF-8?q?ange-en-gr=C3=A1ficas-de-m=C3=B3dulo-dev'=20into=20'develop'"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts merge request !722 --- pandora_console/operation/agentes/stat_win.php | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php index 7e76b2fabc..5199f58506 100644 --- a/pandora_console/operation/agentes/stat_win.php +++ b/pandora_console/operation/agentes/stat_win.php @@ -531,14 +531,4 @@ ui_include_time_picker(true); $(window).resize(function() { $("#field_list").css('height', ($(window).height() - 160) + 'px'); }); - - - $("#period_select").attr('disabled', 'disabled'); - - From be0a91ed2c30dcebca1632d2702df37f6dfb6c44 Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 9 Aug 2017 10:35:57 +0200 Subject: [PATCH 128/142] fixed minor error sql delete module --- pandora_console/godmode/agentes/configurar_agente.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 613cf8ef29..c5ee3b6c88 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1528,7 +1528,7 @@ if ($delete_module) { // DELETE agent module ! $error++; if (alerts_delete_alert_agent_module(false, - array('id_agente_module' => $id_borrar_modulo)) === false) + array('id_agent_module' => $id_borrar_modulo)) === false) $error++; $result = db_process_delete_temp('ttag_module', 'id_agente_modulo', From 2bcc01c9ba2ce13e86917d24e4d71163e41b5f3f Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 9 Aug 2017 11:33:12 +0200 Subject: [PATCH 129/142] Fixed time range with user no admin --- .../operation/agentes/interface_traffic_graph_win.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandora_console/operation/agentes/interface_traffic_graph_win.php b/pandora_console/operation/agentes/interface_traffic_graph_win.php index 5dce55b101..8d676b4340 100644 --- a/pandora_console/operation/agentes/interface_traffic_graph_win.php +++ b/pandora_console/operation/agentes/interface_traffic_graph_win.php @@ -139,7 +139,10 @@ $interface_traffic_modules = array( } // Get input parameters - $period = (int) get_parameter('period', SECONDS_1HOUR); + $period = get_parameter ("period"); + if ($period == "") { + $period = get_parameter ("period_select", SECONDS_1DAY); + } $width = (int) get_parameter("width", 555); $height = (int) get_parameter("height", 245); $start_date = (string) get_parameter("start_date", date("Y-m-d")); From bbe63a30ec7fdc01ee38ddbf6cfc6e7b3ff48901 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 10 Aug 2017 00:01:15 +0200 Subject: [PATCH 130/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 8c06d4c68c..5f9c101616 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.709-170809 +Version: 7.0NG.709-170810 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 6cec456223..1c6b787d4d 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.709-170809" +pandora_version="7.0NG.709-170810" 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 9ecda1d16d..c16468b92e 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.709'; -use constant AGENT_BUILD => '170809'; +use constant AGENT_BUILD => '170810'; # 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 b1dca5a181..a778ccc059 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.709 -%define release 170809 +%define release 170810 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 29ca24cc08..2b281df13a 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.709 -%define release 170809 +%define release 170810 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 9bc0d6c4ba..f1b8644da7 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.709" -PI_BUILD="170809" +PI_BUILD="170810" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index b3aa936cb0..f2bb362264 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170809} +{170810} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index e9ee752438..8708179d46 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.709(Build 170809)") +#define PANDORA_VERSION ("7.0NG.709(Build 170810)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 732e897082..16b6a3f779 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.709(Build 170809))" + VALUE "ProductVersion", "(7.0NG.709(Build 170810))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 4ffbd96f74..6cce8d6b78 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.709-170809 +Version: 7.0NG.709-170810 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 05b9d583d7..558d712f0f 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.709-170809" +pandora_version="7.0NG.709-170810" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index a5e16e3ff6..04205964f6 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170809'; +$build_version = 'PC170810'; $pandora_version = 'v7.0NG.709'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index b9549887a7..9342f42eb5 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Thu, 10 Aug 2017 10:37:06 +0200 Subject: [PATCH 131/142] Updated version and build strings. --- pandora_agents/pc/AIX/pandora_agent.conf | 2 +- pandora_agents/pc/FreeBSD/pandora_agent.conf | 2 +- pandora_agents/pc/HP-UX/pandora_agent.conf | 2 +- pandora_agents/pc/Linux/pandora_agent.conf | 2 +- pandora_agents/pc/NT4/pandora_agent.conf | 2 +- pandora_agents/pc/SunOS/pandora_agent.conf | 2 +- pandora_agents/pc/Win32/pandora_agent.conf | 2 +- pandora_agents/shellscript/aix/pandora_agent.conf | 2 +- pandora_agents/shellscript/bsd-ipso/pandora_agent.conf | 2 +- pandora_agents/shellscript/hp-ux/pandora_agent.conf | 2 +- pandora_agents/shellscript/linux/pandora_agent.conf | 2 +- pandora_agents/shellscript/mac_osx/pandora_agent.conf | 2 +- pandora_agents/shellscript/openWRT/pandora_agent.conf | 2 +- pandora_agents/shellscript/solaris/pandora_agent.conf | 2 +- pandora_agents/unix/AIX/pandora_agent.conf | 2 +- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/Darwin/pandora_agent.conf | 2 +- pandora_agents/unix/FreeBSD/pandora_agent.conf | 2 +- pandora_agents/unix/HP-UX/pandora_agent.conf | 2 +- pandora_agents/unix/Linux/pandora_agent.conf | 2 +- pandora_agents/unix/NT4/pandora_agent.conf | 2 +- pandora_agents/unix/NetBSD/pandora_agent.conf | 2 +- pandora_agents/unix/SunOS/pandora_agent.conf | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 4 ++-- pandora_agents/unix/pandora_agent.spec | 4 ++-- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/bin/pandora_agent.conf | 2 +- pandora_agents/win32/installer/pandora.mpi | 4 ++-- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 4 ++-- pandora_console/pandora_console.spec | 4 ++-- pandora_console/pandora_console_install | 2 +- pandora_console/pandoradb_data.sql | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/conf/pandora_server.conf.new | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/pandora_server.redhat.spec | 4 ++-- pandora_server/pandora_server.spec | 4 ++-- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 49 files changed, 56 insertions(+), 56 deletions(-) diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf index 77d34249b3..de9e79aa1d 100644 --- a/pandora_agents/pc/AIX/pandora_agent.conf +++ b/pandora_agents/pc/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.709, AIX version +# Version 7.0NG.710, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/FreeBSD/pandora_agent.conf b/pandora_agents/pc/FreeBSD/pandora_agent.conf index f33e609eeb..ee89a53dbb 100644 --- a/pandora_agents/pc/FreeBSD/pandora_agent.conf +++ b/pandora_agents/pc/FreeBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.709, FreeBSD Version +# Version 7.0NG.710, FreeBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/HP-UX/pandora_agent.conf b/pandora_agents/pc/HP-UX/pandora_agent.conf index e17adcc4c3..5f5de4fa76 100644 --- a/pandora_agents/pc/HP-UX/pandora_agent.conf +++ b/pandora_agents/pc/HP-UX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.709, HP-UX Version +# Version 7.0NG.710, HP-UX Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/Linux/pandora_agent.conf b/pandora_agents/pc/Linux/pandora_agent.conf index a5ba94c7ee..5093e1effa 100644 --- a/pandora_agents/pc/Linux/pandora_agent.conf +++ b/pandora_agents/pc/Linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.709, GNU/Linux +# Version 7.0NG.710, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/NT4/pandora_agent.conf b/pandora_agents/pc/NT4/pandora_agent.conf index 77e78b23f2..3afa73c7b0 100644 --- a/pandora_agents/pc/NT4/pandora_agent.conf +++ b/pandora_agents/pc/NT4/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.709, GNU/Linux +# Version 7.0NG.710, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/SunOS/pandora_agent.conf b/pandora_agents/pc/SunOS/pandora_agent.conf index 8ee5d38f40..ef6d1fdef8 100644 --- a/pandora_agents/pc/SunOS/pandora_agent.conf +++ b/pandora_agents/pc/SunOS/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.709, Solaris Version +# Version 7.0NG.710, Solaris Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/Win32/pandora_agent.conf b/pandora_agents/pc/Win32/pandora_agent.conf index 2ebef28d78..fa941aa97b 100644 --- a/pandora_agents/pc/Win32/pandora_agent.conf +++ b/pandora_agents/pc/Win32/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2010 Artica Soluciones Tecnologicas -# Version 7.0NG.709 +# Version 7.0NG.710 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software diff --git a/pandora_agents/shellscript/aix/pandora_agent.conf b/pandora_agents/shellscript/aix/pandora_agent.conf index 987de91b06..07e7ad3da0 100644 --- a/pandora_agents/shellscript/aix/pandora_agent.conf +++ b/pandora_agents/shellscript/aix/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.709, AIX version +# Version 7.0NG.710, AIX version # General Parameters # ================== diff --git a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf index 712756d13c..63f463a932 100644 --- a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf +++ b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.709 +# Version 7.0NG.710 # FreeBSD/IPSO version # Licenced under GPL licence, 2003-2007 Sancho Lerena diff --git a/pandora_agents/shellscript/hp-ux/pandora_agent.conf b/pandora_agents/shellscript/hp-ux/pandora_agent.conf index 7113ea627b..20951ab529 100644 --- a/pandora_agents/shellscript/hp-ux/pandora_agent.conf +++ b/pandora_agents/shellscript/hp-ux/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.709, HPUX Version +# Version 7.0NG.710, HPUX Version # General Parameters # ================== diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf index b35313bcc4..3a2d4a3e4b 100644 --- a/pandora_agents/shellscript/linux/pandora_agent.conf +++ b/pandora_agents/shellscript/linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.709 +# Version 7.0NG.710 # Licensed under GPL license v2, # (c) 2003-2010 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/mac_osx/pandora_agent.conf b/pandora_agents/shellscript/mac_osx/pandora_agent.conf index 609632ea33..88b68a7a25 100644 --- a/pandora_agents/shellscript/mac_osx/pandora_agent.conf +++ b/pandora_agents/shellscript/mac_osx/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.709 +# Version 7.0NG.710 # Licensed under GPL license v2, # (c) 2003-2009 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/openWRT/pandora_agent.conf b/pandora_agents/shellscript/openWRT/pandora_agent.conf index 00abe55972..54ece23c85 100644 --- a/pandora_agents/shellscript/openWRT/pandora_agent.conf +++ b/pandora_agents/shellscript/openWRT/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.709 +# Version 7.0NG.710 # Licensed under GPL license v2, # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/solaris/pandora_agent.conf b/pandora_agents/shellscript/solaris/pandora_agent.conf index abbb8bd535..70cd00c95f 100644 --- a/pandora_agents/shellscript/solaris/pandora_agent.conf +++ b/pandora_agents/shellscript/solaris/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.709, Solaris version +# Version 7.0NG.710, Solaris version # General Parameters # ================== diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf index 914716f866..5c0c53125b 100644 --- a/pandora_agents/unix/AIX/pandora_agent.conf +++ b/pandora_agents/unix/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.709, AIX version +# Version 7.0NG.710, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 5f9c101616..902bb45aa6 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.709-170810 +Version: 7.0NG.710 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 1c6b787d4d..b0cbcc9f56 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.709-170810" +pandora_version="7.0NG.710" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/Darwin/pandora_agent.conf b/pandora_agents/unix/Darwin/pandora_agent.conf index a1d986c5c3..be6d94e65a 100644 --- a/pandora_agents/unix/Darwin/pandora_agent.conf +++ b/pandora_agents/unix/Darwin/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.709, GNU/Linux +# Version 7.0NG.710, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2012 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/FreeBSD/pandora_agent.conf b/pandora_agents/unix/FreeBSD/pandora_agent.conf index bbfe88e1fa..6862ed1ee6 100644 --- a/pandora_agents/unix/FreeBSD/pandora_agent.conf +++ b/pandora_agents/unix/FreeBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.709, FreeBSD Version +# Version 7.0NG.710, FreeBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2016 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/HP-UX/pandora_agent.conf b/pandora_agents/unix/HP-UX/pandora_agent.conf index 50ccf8fe55..57c45b4df6 100644 --- a/pandora_agents/unix/HP-UX/pandora_agent.conf +++ b/pandora_agents/unix/HP-UX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.709, HP-UX Version +# Version 7.0NG.710, HP-UX Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf index af2bd05ab3..842a51aad7 100644 --- a/pandora_agents/unix/Linux/pandora_agent.conf +++ b/pandora_agents/unix/Linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.709, GNU/Linux +# Version 7.0NG.710, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2014 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/NT4/pandora_agent.conf b/pandora_agents/unix/NT4/pandora_agent.conf index 4b97428ffe..b8c11f135e 100644 --- a/pandora_agents/unix/NT4/pandora_agent.conf +++ b/pandora_agents/unix/NT4/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.709, GNU/Linux +# Version 7.0NG.710, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/NetBSD/pandora_agent.conf b/pandora_agents/unix/NetBSD/pandora_agent.conf index 63bddc1d66..6c8eb8b422 100644 --- a/pandora_agents/unix/NetBSD/pandora_agent.conf +++ b/pandora_agents/unix/NetBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.709, NetBSD Version +# Version 7.0NG.710, NetBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/SunOS/pandora_agent.conf b/pandora_agents/unix/SunOS/pandora_agent.conf index 24902ea131..5a4f581471 100644 --- a/pandora_agents/unix/SunOS/pandora_agent.conf +++ b/pandora_agents/unix/SunOS/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.709, Solaris Version +# Version 7.0NG.710, Solaris Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index c16468b92e..459b91d04f 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -40,7 +40,7 @@ my $Sem = undef; # Semaphore used to control the number of threads my $ThreadSem = undef; -use constant AGENT_VERSION => '7.0NG.709'; +use constant AGENT_VERSION => '7.0NG.710'; use constant AGENT_BUILD => '170810'; # Agent log default file size maximum and instances diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index a778ccc059..5028e2ef7d 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -2,8 +2,8 @@ #Pandora FMS Linux Agent # %define name pandorafms_agent_unix -%define version 7.0NG.709 -%define release 170810 +%define version 7.0NG.710 +%define release 1 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 2b281df13a..c072a4ecef 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -2,8 +2,8 @@ #Pandora FMS Linux Agent # %define name pandorafms_agent_unix -%define version 7.0NG.709 -%define release 170810 +%define version 7.0NG.710 +%define release 1 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index f1b8644da7..faafc5642d 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -9,7 +9,7 @@ # Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license. # ********************************************************************** -PI_VERSION="7.0NG.709" +PI_VERSION="7.0NG.710" PI_BUILD="170810" OS_NAME=`uname -s` diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index ca2b3526f4..ea387c7f6b 100644 --- a/pandora_agents/win32/bin/pandora_agent.conf +++ b/pandora_agents/win32/bin/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2014 Artica Soluciones Tecnologicas -# Version 7.0NG.709 +# Version 7.0NG.710 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index f2bb362264..96786e4f32 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -3,7 +3,7 @@ AllowLanguageSelection {Yes} AppName -{Pandora FMS Windows Agent v7.0NG.709} +{Pandora FMS Windows Agent v7.0NG.710} ApplicationID {17E3D2CF-CA02-406B-8A80-9D31C17BD08F} @@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives {No} Windows,Executable -{<%AppName%>-<%Version%>-Setup<%Ext%>} +{<%AppName%>-Setup<%Ext%>} Windows,FileDescription {<%AppName%> <%Version%> Setup} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 8708179d46..74a349e35a 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.709(Build 170810)") +#define PANDORA_VERSION ("7.0NG.710(Build 170810)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 16b6a3f779..acbd8469c6 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.709(Build 170810))" + VALUE "ProductVersion", "(7.0NG.710(Build 170810))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 6cce8d6b78..5302798b19 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.709-170810 +Version: 7.0NG.710 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 558d712f0f..38b0546630 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.709-170810" +pandora_version="7.0NG.710" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 04205964f6..38c24ddd10 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -23,7 +23,7 @@ * Pandora build version and version */ $build_version = 'PC170810'; -$pandora_version = 'v7.0NG.709'; +$pandora_version = 'v7.0NG.710'; // Do not overwrite default timezone set if defined. $script_tz = @date_default_timezone_get(); diff --git a/pandora_console/install.php b/pandora_console/install.php index 9342f42eb5..470f146d80 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -70,7 +70,7 @@
Date: Thu, 10 Aug 2017 15:45:53 +0200 Subject: [PATCH 132/142] Fixed issue with simple value --- pandora_console/include/ajax/visual_console_builder.ajax.php | 1 - 1 file changed, 1 deletion(-) diff --git a/pandora_console/include/ajax/visual_console_builder.ajax.php b/pandora_console/include/ajax/visual_console_builder.ajax.php index 580a089b4e..6f2bae0b40 100755 --- a/pandora_console/include/ajax/visual_console_builder.ajax.php +++ b/pandora_console/include/ajax/visual_console_builder.ajax.php @@ -457,7 +457,6 @@ switch ($action) { $values['period'] = $period; $values['width'] = $width; } - break; case 'percentile_bar': case 'percentile_item': case 'static_graph': From 0915e46e4c7592d99a0183b35bedfcd7ba39d73b Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 10 Aug 2017 17:45:00 +0200 Subject: [PATCH 133/142] fixed errors in visual console on simple value --- pandora_console/include/functions_visual_map.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 1869e8cb39..e88c1ffe02 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -1538,7 +1538,7 @@ function visual_map_print_item($mode = "read", $layoutData, if(get_parameter('action') == 'edit'){ //html_debug($layoutData); //echo 'Data value'; - if(strip_tags($io_safe_output_text) != '_VALUE_'){ + if( (strip_tags($io_safe_output_text) != '_VALUE_') || (strip_tags($io_safe_output_text) != '(_VALUE_)') ){ echo $io_safe_output_text; } else{ From 941341585e167c634b5d76984afd8f6ddfc92ac5 Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 11 Aug 2017 00:01:13 +0200 Subject: [PATCH 134/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 4 ++-- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 902bb45aa6..e12de89272 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.710 +Version: 7.0NG.710-170811 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 b0cbcc9f56..42a1f4e3ae 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.710" +pandora_version="7.0NG.710-170811" 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 459b91d04f..e545115c26 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.710'; -use constant AGENT_BUILD => '170810'; +use constant AGENT_BUILD => '170811'; # 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 5028e2ef7d..251303a761 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.710 -%define release 1 +%define release 170811 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index c072a4ecef..891ecc8522 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.710 -%define release 1 +%define release 170811 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 faafc5642d..dd7aa395e6 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.710" -PI_BUILD="170810" +PI_BUILD="170811" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 96786e4f32..fdc8ac959e 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170810} +{170811} ViewReadme {Yes} @@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives {No} Windows,Executable -{<%AppName%>-Setup<%Ext%>} +{<%AppName%>-<%Version%>-Setup<%Ext%>} Windows,FileDescription {<%AppName%> <%Version%> Setup} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 74a349e35a..92b35794bf 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.710(Build 170810)") +#define PANDORA_VERSION ("7.0NG.710(Build 170811)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index acbd8469c6..703bbe6867 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.710(Build 170810))" + VALUE "ProductVersion", "(7.0NG.710(Build 170811))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 5302798b19..72f215144b 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.710 +Version: 7.0NG.710-170811 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 38b0546630..7e3f1bc402 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.710" +pandora_version="7.0NG.710-170811" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 38c24ddd10..9a6d07402d 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170810'; +$build_version = 'PC170811'; $pandora_version = 'v7.0NG.710'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 470f146d80..fd83bc4054 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Fri, 11 Aug 2017 09:13:26 +0200 Subject: [PATCH 135/142] fixed errors visual console --- .../godmode/reporting/visual_console_builder.editor.js | 6 +++--- pandora_console/include/functions_visual_map.php | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index ee2c23c5de..00d86be5a1 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -412,7 +412,9 @@ function update_button_palette_callback() { return; } $("#" + idItem).html(values['label']); - if(values['label'].replace( /<.*?>/g, '' ) == '_VALUE_'){ + if( (values['label'].replace( /<.*?>/g, '' ) != '_VALUE_') + && (values['label'].replace( /<.*?>/g, '' ) != '(_VALUE_)') ){ + $("#text_" + idItem).html(''); $("#" + idItem).html(''); } @@ -2751,8 +2753,6 @@ function updateDB(type, idElement , values, event) { update_user_line(type, idElement, top, left); break; default: - console.log(values); - console.log(idElement); if ((typeof(values['mov_left']) != 'undefined') && (typeof(values['mov_top']) != 'undefined')) { top = parseInt($("#" + idElement) diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index e88c1ffe02..3ea05cc8b1 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -1547,7 +1547,10 @@ function visual_map_print_item($mode = "read", $layoutData, } else{ - if(strip_tags($io_safe_output_text) != '_VALUE_'){ + if(strip_tags($io_safe_output_text) == '_VALUE_'){ + echo str_replace(array('_VALUE_','_value_'), $value, $io_safe_output_text); + } + elseif(strip_tags($io_safe_output_text) == '(_VALUE_)'){ echo str_replace(array('_VALUE_','_value_'), $value, $io_safe_output_text); } else{ From 9760a7b7fe2bd5c76907ac86631b0a7ee2894ea3 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Fri, 11 Aug 2017 11:10:35 +0200 Subject: [PATCH 136/142] Add perl-Test-WWW-Selenium to the testing Docker image. (cherry picked from commit f6c3922bba23b290b71ff742eb13807563ad3fd6) --- tests/enterprise_base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/enterprise_base/Dockerfile b/tests/enterprise_base/Dockerfile index c4bd6406e0..c99b835c19 100644 --- a/tests/enterprise_base/Dockerfile +++ b/tests/enterprise_base/Dockerfile @@ -2,7 +2,7 @@ FROM pandorafms/pandorafms-base MAINTAINER Pandora FMS Team # Pandora FMS Server dependencies -RUN yum install -y fping +RUN yum install -y fping perl-Test-WWW-Selenium RUN ln -s /usr/bin/braa /usr/local/bin/braa From 5973ec75455fc3989d125dc76086765e85deb330 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Fri, 11 Aug 2017 11:48:25 +0200 Subject: [PATCH 137/142] fixed errors in visual console on simple value 2 --- .../reporting/visual_console_builder.editor.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index 00d86be5a1..3cea48be21 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -405,12 +405,12 @@ function update_button_palette_callback() { break; case 'simple_value': //checkpoint - if(($('#text-label_ifr').contents().find('#tinymce p').html() == '_VALUE_' || - $('#text-label_ifr').contents().find('#tinymce').html() == '_VALUE_') - && $('#data_image_check').html() != 'On'){ - alert('_VALUE_ exactly value is only enable for data image. Please change label text or select a data image module.'); - return; - } + // if(($('#text-label_ifr').contents().find('#tinymce p').html() == '_VALUE_' || + // $('#text-label_ifr').contents().find('#tinymce').html() == '_VALUE_') + // && $('#data_image_check').html() != 'On'){ + // alert('_VALUE_ exactly value is only enable for data image. Please change label text or select a data image module.'); + // return; + // } $("#" + idItem).html(values['label']); if( (values['label'].replace( /<.*?>/g, '' ) != '_VALUE_') && (values['label'].replace( /<.*?>/g, '' ) != '(_VALUE_)') ){ From bc022aba2b2c203890b17db9e3d37ddec9dc01fd Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 12 Aug 2017 00:01:13 +0200 Subject: [PATCH 138/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index e12de89272..8cdcbaf013 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.710-170811 +Version: 7.0NG.710-170812 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 42a1f4e3ae..cc69f188a1 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.710-170811" +pandora_version="7.0NG.710-170812" 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 e545115c26..01ae1677db 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.710'; -use constant AGENT_BUILD => '170811'; +use constant AGENT_BUILD => '170812'; # 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 251303a761..0609402ba2 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.710 -%define release 170811 +%define release 170812 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 891ecc8522..4b6b6bbb7c 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.710 -%define release 170811 +%define release 170812 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 dd7aa395e6..58f5b57347 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.710" -PI_BUILD="170811" +PI_BUILD="170812" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index fdc8ac959e..c51ffbb968 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170811} +{170812} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 92b35794bf..3c72052baf 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.710(Build 170811)") +#define PANDORA_VERSION ("7.0NG.710(Build 170812)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 703bbe6867..bd59ca7433 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.710(Build 170811))" + VALUE "ProductVersion", "(7.0NG.710(Build 170812))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 72f215144b..2b16b31616 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.710-170811 +Version: 7.0NG.710-170812 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 7e3f1bc402..32b2b62b97 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.710-170811" +pandora_version="7.0NG.710-170812" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 9a6d07402d..f58f4c33be 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170811'; +$build_version = 'PC170812'; $pandora_version = 'v7.0NG.710'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index fd83bc4054..9fee2f83e1 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Sun, 13 Aug 2017 00:01:12 +0200 Subject: [PATCH 139/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 8cdcbaf013..1e6912e9af 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.710-170812 +Version: 7.0NG.710-170813 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 cc69f188a1..a79d69ee92 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.710-170812" +pandora_version="7.0NG.710-170813" 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 01ae1677db..1d343901ec 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.710'; -use constant AGENT_BUILD => '170812'; +use constant AGENT_BUILD => '170813'; # 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 0609402ba2..719c204c34 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.710 -%define release 170812 +%define release 170813 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 4b6b6bbb7c..8e64e6936d 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.710 -%define release 170812 +%define release 170813 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 58f5b57347..5565101120 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.710" -PI_BUILD="170812" +PI_BUILD="170813" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index c51ffbb968..079b7c75f4 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170812} +{170813} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 3c72052baf..0b20eaa41c 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.710(Build 170812)") +#define PANDORA_VERSION ("7.0NG.710(Build 170813)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index bd59ca7433..005daadacf 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.710(Build 170812))" + VALUE "ProductVersion", "(7.0NG.710(Build 170813))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 2b16b31616..a094ff261b 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.710-170812 +Version: 7.0NG.710-170813 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 32b2b62b97..0b345d45d2 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.710-170812" +pandora_version="7.0NG.710-170813" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index f58f4c33be..6278049eae 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170812'; +$build_version = 'PC170813'; $pandora_version = 'v7.0NG.710'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 9fee2f83e1..111f837ed5 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Mon, 14 Aug 2017 00:01:13 +0200 Subject: [PATCH 140/142] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 1e6912e9af..d237ebbb86 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.710-170813 +Version: 7.0NG.710-170814 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 a79d69ee92..cd388a7756 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.710-170813" +pandora_version="7.0NG.710-170814" 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 1d343901ec..bfbf06947a 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.710'; -use constant AGENT_BUILD => '170813'; +use constant AGENT_BUILD => '170814'; # 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 719c204c34..960499bd88 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.710 -%define release 170813 +%define release 170814 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 8e64e6936d..df40ac3401 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.710 -%define release 170813 +%define release 170814 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 5565101120..912685dd4a 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.710" -PI_BUILD="170813" +PI_BUILD="170814" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 079b7c75f4..4b2ee2bfe6 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170813} +{170814} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 0b20eaa41c..f317542ecd 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.710(Build 170813)") +#define PANDORA_VERSION ("7.0NG.710(Build 170814)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 005daadacf..be3cd5af52 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.710(Build 170813))" + VALUE "ProductVersion", "(7.0NG.710(Build 170814))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index a094ff261b..0c8325ffc5 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.710-170813 +Version: 7.0NG.710-170814 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 0b345d45d2..3f318005a9 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.710-170813" +pandora_version="7.0NG.710-170814" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 6278049eae..f9ec6e8fb4 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170813'; +$build_version = 'PC170814'; $pandora_version = 'v7.0NG.710'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 111f837ed5..b239c780e7 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Mon, 14 Aug 2017 12:36:49 +0200 Subject: [PATCH 141/142] Xaxisname deleted from xaxes --- pandora_console/include/graphs/flot/pandora.flot.js | 1 - 1 file changed, 1 deletion(-) diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 78510da704..ee108f10b8 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -1476,7 +1476,6 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, xaxes: [{ axisLabelFontSizePixels: font_size, axisLabelUseCanvas: false, - axisLabel: xaxisname, tickFormatter: xFormatter, labelHeight: 50, color: '', From 2f8e8703b7c2ea898a510e231111d6576a9efeb3 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 14 Aug 2017 14:53:56 +0200 Subject: [PATCH 142/142] Fixed --- .../include/functions_visual_map.php | 24 ++++++------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 3ea05cc8b1..8fa2492fc3 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -1531,32 +1531,22 @@ function visual_map_print_item($mode = "read", $layoutData, } } - //$io_safe_output_text = str_replace(array('_VALUE_','_value_'), $value, $io_safe_output_text); - - - if(get_parameter('action') == 'edit'){ - //html_debug($layoutData); - //echo 'Data value'; - if( (strip_tags($io_safe_output_text) != '_VALUE_') || (strip_tags($io_safe_output_text) != '(_VALUE_)') ){ + if( (strip_tags($io_safe_output_text) != '_VALUE_') || (strip_tags($io_safe_output_text) != '(_VALUE_)') ) { echo $io_safe_output_text; } - else{ + else { echo ""; } - + } else { + if(strrpos(strip_tags($io_safe_output_text),'(_VALUE_)') !== false || (strip_tags($io_safe_output_text) == '(_VALUE_)')) { + echo str_replace(array("(_VALUE_)","(_value_)"), $value, $io_safe_output_text); } - else{ - if(strip_tags($io_safe_output_text) == '_VALUE_'){ + elseif(strrpos(strip_tags($io_safe_output_text),'_VALUE_') !== false || (strip_tags($io_safe_output_text) == '_VALUE_')) { echo str_replace(array('_VALUE_','_value_'), $value, $io_safe_output_text); - } - elseif(strip_tags($io_safe_output_text) == '(_VALUE_)'){ - echo str_replace(array('_VALUE_','_value_'), $value, $io_safe_output_text); - } - else{ + } else { echo str_replace('>', ' style="width:'.$layoutData['width'].'px">',$value); } - } //Restore db connection