From 48ca7ac999fe59f23f04ba97114d3b8202cc7f57 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 31 Mar 2015 10:48:51 +0200 Subject: [PATCH 001/104] Killed the magical numbers and unicorns. --- pandora_console/include/functions_treeview.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_treeview.php b/pandora_console/include/functions_treeview.php index a3f6d7ee33..f8dc28c8d9 100755 --- a/pandora_console/include/functions_treeview.php +++ b/pandora_console/include/functions_treeview.php @@ -452,14 +452,14 @@ function treeview_printTable($id_agente, $server_data = array()) { if ($config["agentaccess"]) { $access_graph = '
'; - $access_graph .= graphic_agentaccess($id_agente, 290, 110, 86400, true); + $access_graph .= graphic_agentaccess($id_agente, 290, 110, SECONDS_1DAY, true); $access_graph .= '

'; ui_toggle($access_graph, __('Agent access rate (24h)')); } $events_graph = '
'; - $events_graph .= graph_graphic_agentevents ($id_agente, 290, 15, 86400, '', true); + $events_graph .= graph_graphic_agentevents ($id_agente, 290, 15, SECONDS_1DAY, '', true); $events_graph .= '


'; ui_toggle($events_graph, __('Events (24h)')); From 4749f3255bbb17a7a9e53d1e13bbae7a01e6ef9d Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 31 Mar 2015 12:53:21 +0200 Subject: [PATCH 002/104] Starting to make the availability general report --- .../godmode/reporting/reporting_builder.php | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 5e1ae7e08a..24c6b22e53 100644 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -93,11 +93,11 @@ if ($idReport != 0) { $edit = true; break; } - + if (! $edit) { // The user that created the report should can delete it. Despite its permissions. $delete_report_bypass = false; - + if ($action == 'delete_report') { if ($config['id_user'] == $report['id_user'] || is_user_admin ($config["id_user"])) { $delete_report_bypass = true; @@ -339,14 +339,14 @@ switch ($action) { } break; } - + if (! $delete) { db_pandora_audit("ACL Violation", "Trying to access report builder deletion"); require ("general/noaccess.php"); exit; } - + $result = reports_delete_report ($idReport); if ($result !== false) db_pandora_audit("Report management", "Delete report #$idReport"); @@ -431,8 +431,14 @@ switch ($action) { $filter['metaconsole'] = 0; $reports = reports_get_reports ($filter, - array ('name', 'id_report', 'description', 'private', - 'id_user', 'id_group', 'non_interactive'), $return_all_group, 'RR', $group); + array ( + 'name', + 'id_report', + 'description', + 'private', + 'id_user', + 'id_group', + 'non_interactive'), $return_all_group, 'RR', $group); $table->width = '0px'; if (sizeof ($reports)) { @@ -644,7 +650,7 @@ switch ($action) { } break; case 'update': - case 'save': + case 'save': switch ($activeTab) { case 'main': $reportName = get_parameter('name'); @@ -724,8 +730,9 @@ switch ($action) { $first_page = $config['custom_report_front_firstpage']; $footer = $config['custom_report_front_footer']; - } else { - + } + else { + $start_url = ui_get_full_url(false, false, false, false); $first_page = "<p style="text-align: center;">&nbsp;</p> <p style="text-align: center;">&nbsp;</p> <p style="text-align: center;">&nbsp;</p> <p style="text-align: center;">&nbsp;</p> <p style="text-align: center;">&nbsp;</p> <p style="text-align: center;">&nbsp;</p> <p style="text-align: center;">&nbsp;</p> <p style="text-align: center;"><img src="" . $start_url . "/images/pandora_report_logo.png" alt="" width="800" /></p> <p style="text-align: center;">&nbsp;</p> <p style="text-align: center;"><span style="font-size: xx-large;">(_REPORT_NAME_)</span></p> <p style="text-align: center;"><span style="font-size: large;">(_DATETIME_)</span></p>"; $logo = $header = $footer = null; @@ -1548,7 +1555,7 @@ switch ($action) { switch ($activeTab) { case 'main': $buttons['list_reports']['active'] = true; - $subsection = ' » '.__('Custom reporting'); + $subsection = ' » ' . __('Custom reporting'); break; default: $subsection = reporting_enterprise_add_subsection_main($activeTab, $buttons); From 88115eb9d93a068feb42a97b665cdf2b049551aa Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 31 Mar 2015 18:23:33 +0200 Subject: [PATCH 003/104] Working in the new type of report availability. --- .../reporting_builder.item_editor.php | 33 ++++++++++++++++--- .../godmode/reporting/reporting_builder.php | 2 +- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 3651367b9f..97f3326eed 100644 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -58,6 +58,7 @@ $group = 0; $group_by_agent = 0; $order_uptodown = 0; $show_resume = 0; +$show_address_agent = 0; $top_n = 0; $top_n_value = 10; $exception_condition = REPORT_EXCEPTION_CONDITION_EVERYTHING; @@ -419,7 +420,9 @@ switch ($action) { $period = $item['period']; $order_uptodown = $item['order_uptodown']; $show_resume = $item['show_resume']; - $show_graph = $item['show_graph']; + // HACK it is saved in show_graph field. + // Show interfaces instead the modules + $show_address_agent = $item['show_graph']; break; case 'group_report': $description = $item['description']; @@ -1063,9 +1066,28 @@ html_print_input_hidden('id_item', $idItem); - + + + + + + + + + - + + + @@ -1313,7 +1335,8 @@ function print_General_list($width, $action, $idItem = null) { 'avg' => __('rate'), 'max' => __('max'), 'min' => __('min'), - 'sum' => __('sum')); + 'sum' => __('sum'), + 'ava' => __('Avail')); include_once($config['homedir'] . '/include/functions_html.php'); ?> @@ -1901,6 +1924,7 @@ function chooseType() { $("#general_list").hide(); $("#row_order_uptodown").hide(); $("#row_show_resume").hide(); + $("#row_show_address_agent").hide(); $("#row_show_graph").hide(); $("#row_max_min_avg").hide(); $("#row_only_avg").hide(); @@ -2181,6 +2205,7 @@ function chooseType() { $("#general_list").show(); $("#row_order_uptodown").show(); $("#row_show_resume").show(); + $("#row_show_address_agent").show(); $("#row_show_in_two_columns").show(); $("#row_last_value").show(); diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 24c6b22e53..5547ffff3d 100644 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -736,7 +736,7 @@ switch ($action) { $start_url = ui_get_full_url(false, false, false, false); $first_page = "<p style="text-align: center;">&nbsp;</p> <p style="text-align: center;">&nbsp;</p> <p style="text-align: center;">&nbsp;</p> <p style="text-align: center;">&nbsp;</p> <p style="text-align: center;">&nbsp;</p> <p style="text-align: center;">&nbsp;</p> <p style="text-align: center;">&nbsp;</p> <p style="text-align: center;"><img src="" . $start_url . "/images/pandora_report_logo.png" alt="" width="800" /></p> <p style="text-align: center;">&nbsp;</p> <p style="text-align: center;"><span style="font-size: xx-large;">(_REPORT_NAME_)</span></p> <p style="text-align: center;"><span style="font-size: large;">(_DATETIME_)</span></p>"; $logo = $header = $footer = null; - + } $idOrResult = db_process_sql_insert('treport', From 4345ec6fa301315dc40d93accc2cea9d4e7383d1 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 31 Mar 2015 18:30:51 +0200 Subject: [PATCH 004/104] Working in the new type of report availability. --- pandora_console/include/functions_reporting.php | 8 ++++++++ pandora_console/include/functions_reports.php | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 5a8eb06b06..54f862de49 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -5311,6 +5311,12 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f case 'network_interfaces_report': reporting_network_interfaces_table($content, $report, $mini, $item_title, $table); break; + case 'availability': + if (empty($item_title)) { + $item_title = __('Availability'); + } + reporting_header_content($mini, $content, $report, $table, $item_title); + break; case 'general': if (empty($item_title)) { $item_title = __('General'); @@ -5330,6 +5336,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f array_push($table->data, $data_desc); } + + switch ($group_by_agent) { //0 means not group by agent case 0: diff --git a/pandora_console/include/functions_reports.php b/pandora_console/include/functions_reports.php index 62b1c924c5..1e48c57d86 100644 --- a/pandora_console/include/functions_reports.php +++ b/pandora_console/include/functions_reports.php @@ -576,7 +576,8 @@ function reports_get_report_types ($template = false, $not_editor = false) { 'name' => __('Top n')); $types['network_interfaces_report'] = array('optgroup' => __('Grouped'), 'name' => __('Network interfaces')); - + $types['availability'] = array('optgroup' => __('Grouped'), + 'name' => __('Availability')); $types['text'] = array('optgroup' => __('Text/HTML '), From 92ac38f5abee54f9c301d2a1e0789111a80ba1b1 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 1 Apr 2015 00:01:38 +0200 Subject: [PATCH 005/104] 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/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_console/pandoradb_data.sql | 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/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 774bc010f5..25a4eb6511 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP2-150329 +Version: 5.1SP2-150401 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 b904eb8e47..1613b97d14 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="5.1SP2-150329" +pandora_version="5.1SP2-150401" 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 a55b24cc67..05b417394e 100644 --- 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 => '5.1SP2'; -use constant AGENT_BUILD => '150329'; +use constant AGENT_BUILD => '150401'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 5413f5cfe5..1465da55b4 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 5.1SP2 -%define release 150329 +%define release 150401 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 6c3bcf687f..cabab277a8 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 5.1SP2 -%define release 150329 +%define release 150401 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 8cef78e254..5b71f847c1 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150329} +{150401} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 328e1acdf8..37f2fccb28 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 ("5.1SP2(Build 150329)") +#define PANDORA_VERSION ("5.1SP2(Build 150401)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 3b85880a01..1b7344eeac 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", "(5.1SP2(Build 150329))" + VALUE "ProductVersion", "(5.1SP2(Build 150401))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index bd7626a20f..1776471715 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP2-150329 +Version: 5.1SP2-150401 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 f04bce65dd..5ca9dca60c 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="5.1SP2-150329" +pandora_version="5.1SP2-150401" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index a3f08e2943..f50c28cf4a 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 = 'PC150329'; +$build_version = 'PC150401'; $pandora_version = 'v5.1SP2'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 29518401e5..07c581412d 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Wed, 1 Apr 2015 15:51:19 +0200 Subject: [PATCH 006/104] Working in the avaliability item in report. --- .../reporting_builder.item_editor.php | 127 ++++++++++++++---- .../godmode/reporting/reporting_builder.php | 12 +- .../operation/reporting/reporting_xml.php | 6 +- 3 files changed, 117 insertions(+), 28 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 97f3326eed..334aec1df0 100644 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -420,6 +420,12 @@ switch ($action) { $period = $item['period']; $order_uptodown = $item['order_uptodown']; $show_resume = $item['show_resume']; + break; + case 'availability': + $description = $item['description']; + $period = $item['period']; + $order_uptodown = $item['order_uptodown']; + $show_resume = $item['show_resume']; // HACK it is saved in show_graph field. // Show interfaces instead the modules $show_address_agent = $item['show_graph']; @@ -501,7 +507,8 @@ switch ($action) { break; } -$urlForm = $config['homeurl'] . 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=' . $actionParameter . '&id_report=' . $idReport; +$urlForm = $config['homeurl'] . + 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=' . $actionParameter . '&id_report=' . $idReport; echo '
'; html_print_input_hidden('id_item', $idItem); @@ -538,8 +545,8 @@ html_print_input_hidden('id_item', $idItem); - + '; if ($action == 'new') { html_print_submit_button(__('Create item'), 'create_item', false, 'class="sub wand"'); @@ -1173,7 +1180,8 @@ function print_SLA_list($width, $action, $idItem = null) { global $config; global $meta; - $report_item_type = db_get_value ('type', 'treport_content', 'id_rc', $idItem); + $report_item_type = db_get_value('type', 'treport_content', 'id_rc', + $idItem); ?> @@ -1325,9 +1333,10 @@ function print_SLA_list($width, $action, $idItem = null) { __('rate'), 'max' => __('max'), 'min' => __('min'), - 'sum' => __('sum'), - 'ava' => __('Avail')); + 'sum' => __('sum')); include_once($config['homedir'] . '/include/functions_html.php'); ?>
- - - - + + + + + + + + + + '; - $itemsGeneral = db_get_all_rows_filter('treport_content_item', array('id_report_content' => $idItem)); + $itemsGeneral = db_get_all_rows_filter( + 'treport_content_item', + array('id_report_content' => $idItem)); if ($itemsGeneral === false) { $itemsGeneral = array(); } + foreach ($itemsGeneral as $item) { $server_name = $item ['server_name']; // Metaconsole db connection @@ -1377,22 +1401,41 @@ function print_General_list($width, $action, $idItem = null) { continue; } } - $idAgent = db_get_value_filter('id_agente', 'tagente_modulo', array('id_agente_modulo' => $item['id_agent_module'])); + $idAgent = db_get_value_filter( + 'id_agente', 'tagente_modulo', + array('id_agente_modulo' => $item['id_agent_module'])); + $nameAgent = agents_get_name ($idAgent); $nameModule = db_get_value_filter('nombre', 'tagente_modulo', array('id_agente_modulo' => $item['id_agent_module'])); $server_name_element = ''; if ($meta && $server_name != '') - $server_name_element .= ' (' . $server_name . ')'; + $server_name_element .= ' (' . $server_name . ')'; - echo ' + + if ($type == "availability") { + echo ' - '; + } + else { + echo ' + + + + + '; + } + + if ($meta) { //Restore db connection metaconsole_restore_db(); @@ -1404,7 +1447,13 @@ function print_General_list($width, $action, $idItem = null) { - + + + @@ -1431,8 +1480,25 @@ function print_General_list($width, $action, $idItem = null) { ui_print_agent_autocomplete_input($params); ?> - - + + + + @@ -1805,7 +1871,13 @@ function addGeneralRow() { var idAgent = $("input[name=id_agent_general]").val(); var serverId = $("input[name=id_server]").val(); var idModule = $("#id_agent_module_general").val(); - var operation = $("#id_operation_module_general").val(); + var operation; + if ($("#id_operation_module_general").length) { + operation = $("#id_operation_module_general").val(); + } + else { + operation = ""; + } var nameModule = $("#id_agent_module_general :selected").text(); var nameOperation = $("#id_operation_module_general :selected").text(); @@ -1840,6 +1912,7 @@ function addGeneralRow() { nameModule = data; } }); + //Truncate nameOperation var params = []; params.push("truncate_text=1"); @@ -1855,6 +1928,7 @@ function addGeneralRow() { nameOperation = data; } }); + var params = []; params.push("add_general=1"); params.push("id=" + $("input[name=id_item]").val()); @@ -2205,7 +2279,6 @@ function chooseType() { $("#general_list").show(); $("#row_order_uptodown").show(); $("#row_show_resume").show(); - $("#row_show_address_agent").show(); $("#row_show_in_two_columns").show(); $("#row_last_value").show(); @@ -2214,6 +2287,14 @@ function chooseType() { $("input[name='last_value']").prop("checked", true); } break; + case 'availability': + $("#row_description").show(); + $("#row_period").show(); + $("#general_list").show(); + $("#row_order_uptodown").show(); + $("#row_show_address_agent").show(); + $("#row_show_in_two_columns").show(); + break; case 'group_report': $("#row_group").show(); $("#row_servers").show(); diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 5547ffff3d..8f28978954 100644 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -776,7 +776,8 @@ switch ($action) { break; case 'item_editor': $resultOperationDB = null; - $report = db_get_row_filter('treport', array('id_report' => $idReport)); + $report = db_get_row_filter('treport', + array('id_report' => $idReport)); $reportName = $report['name']; $idGroupReport = $report['id_group']; @@ -849,11 +850,19 @@ switch ($action) { $values['top_n_value'] = get_parameter('max_values'); $good_format = true; break; + case 'availability': + $good_format = true; + // HACK it is saved in show_graph field. + // Show interfaces instead the modules + $values['show_graph'] = + get_parameter('checkbox_show_address_agent'); + break; default: $values['period'] = get_parameter('period'); $values['top_n'] = get_parameter('radiobutton_max_min_avg',0); $values['top_n_value'] = get_parameter('quantity'); $values['text'] = get_parameter('text'); + $values['show_graph'] = get_parameter('combo_graph_options'); $good_format = true; } @@ -885,7 +894,6 @@ switch ($action) { $values['order_uptodown'] = get_parameter ('radiobutton_order_uptodown'); $values['exception_condition'] = (int)get_parameter('exception_condition', 0); $values['exception_condition_value'] = get_parameter('exception_condition_value'); - $values['show_graph'] = get_parameter('combo_graph_options'); $values['id_module_group'] = get_parameter('combo_modulegroup'); $values['id_group'] = get_parameter ('combo_group'); $values['server_name'] = get_parameter ('server_name'); diff --git a/pandora_console/operation/reporting/reporting_xml.php b/pandora_console/operation/reporting/reporting_xml.php index 4454a8bace..bcfdaf1742 100644 --- a/pandora_console/operation/reporting/reporting_xml.php +++ b/pandora_console/operation/reporting/reporting_xml.php @@ -383,15 +383,15 @@ foreach ($contents as $content) { $data["module"] = io_safe_output_xml (db_get_value ('nombre', 'tagente_modulo', 'id_agente_modulo', $content['id_agent_module'])); $data["agent"] = io_safe_output_xml (modules_get_agentmodule_agent_name ($content['id_agent_module'])); - html_debug_print($content, true); + $graph = db_get_row ("tgraph", "id_graph", $content['id_gs']); $data["title"] = __('Custom graph'); $data["objdata"] = array(); - html_debug_print($graph, true); + $result = db_get_all_rows_field_filter ("tgraph_source","id_graph",$content['id_gs']); $modules = array (); $weights = array (); - html_debug_print($result, true); + if ($result === false) { $result = array(); } From 3b2f7b04b3a5c608937ba7c0e90fa83ef7154230 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 2 Apr 2015 00:01:40 +0200 Subject: [PATCH 007/104] 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/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_console/pandoradb_data.sql | 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/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 25a4eb6511..ab62a1ea11 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP2-150401 +Version: 5.1SP2-150402 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 1613b97d14..91560cc47c 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="5.1SP2-150401" +pandora_version="5.1SP2-150402" 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 05b417394e..410d80d161 100644 --- 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 => '5.1SP2'; -use constant AGENT_BUILD => '150401'; +use constant AGENT_BUILD => '150402'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 1465da55b4..06d5671a8c 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 5.1SP2 -%define release 150401 +%define release 150402 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 cabab277a8..1efafb28c5 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 5.1SP2 -%define release 150401 +%define release 150402 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 5b71f847c1..8276c289cd 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150401} +{150402} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 37f2fccb28..4a8a8e6d31 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 ("5.1SP2(Build 150401)") +#define PANDORA_VERSION ("5.1SP2(Build 150402)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 1b7344eeac..f2d5b506dc 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", "(5.1SP2(Build 150401))" + VALUE "ProductVersion", "(5.1SP2(Build 150402))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 1776471715..531ef36810 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP2-150401 +Version: 5.1SP2-150402 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 5ca9dca60c..1e93dc892c 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="5.1SP2-150401" +pandora_version="5.1SP2-150402" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index f50c28cf4a..8c11ffa5e1 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 = 'PC150401'; +$build_version = 'PC150402'; $pandora_version = 'v5.1SP2'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 07c581412d..f4c47e5534 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Mon, 6 Apr 2015 00:01:24 +0200 Subject: [PATCH 008/104] 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/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_console/pandoradb_data.sql | 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/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index ab62a1ea11..ebafb5166f 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP2-150402 +Version: 5.1SP2-150406 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 91560cc47c..c8a2df140c 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="5.1SP2-150402" +pandora_version="5.1SP2-150406" 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 410d80d161..911e397771 100644 --- 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 => '5.1SP2'; -use constant AGENT_BUILD => '150402'; +use constant AGENT_BUILD => '150406'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 06d5671a8c..44ff738920 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 5.1SP2 -%define release 150402 +%define release 150406 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 1efafb28c5..d71e8e8ce6 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 5.1SP2 -%define release 150402 +%define release 150406 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 8276c289cd..db6b073d60 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150402} +{150406} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 4a8a8e6d31..e368a390b6 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 ("5.1SP2(Build 150402)") +#define PANDORA_VERSION ("5.1SP2(Build 150406)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index f2d5b506dc..dc0be85716 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", "(5.1SP2(Build 150402))" + VALUE "ProductVersion", "(5.1SP2(Build 150406))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 531ef36810..a8d38bebd7 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP2-150402 +Version: 5.1SP2-150406 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 1e93dc892c..f78d9501f0 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="5.1SP2-150402" +pandora_version="5.1SP2-150406" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 8c11ffa5e1..8664f779de 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 = 'PC150402'; +$build_version = 'PC150406'; $pandora_version = 'v5.1SP2'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index f4c47e5534..a987c5c32c 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Mon, 6 Apr 2015 10:25:03 +0200 Subject: [PATCH 009/104] Add order in parent select in static graph in visual console, Tiquet: #2067 (cherry picked from commit 790c81a25082cd3353912d69f03f204bd2c885bb) --- .../godmode/reporting/visual_console_builder.editor.js | 2 +- pandora_console/include/functions_visual_map.php | 3 ++- 2 files changed, 3 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 044f37350a..88dad97b3b 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -809,7 +809,7 @@ function cleanFields(item) { tinymce.get('text-label').setContent("(_VALUE_)"); } - fill_parent_select(); + //fill_parent_select(); var anyText = $("#any_text").html(); //Trick for catch the translate text. $("#module") diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 4a2d6bef2e..90eb1ba6e9 100644 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -2304,7 +2304,8 @@ function visual_map_create_internal_name_item($label = null, $type, $image, $age } function visual_map_get_items_parents($idVisual) { - $items = db_get_all_rows_filter('tlayout_data',array('id_layout' => $idVisual)); + $items = db_get_all_rows_sql(sprintf("SELECT * FROM tlayout_data where id_layout = %s order by label",$idVisual)); + //$items = db_get_all_fields_in_table('tlayout_data',array('id_layout' => $idVisual)); if ($items == false) { $items = array(); } From f894656d870999098ccb3c0a666d32dbe583da75 Mon Sep 17 00:00:00 2001 From: Vanessa Gil Date: Mon, 6 Apr 2015 15:26:26 +0200 Subject: [PATCH 010/104] Fixed bug #2062 --- pandora_console/operation/events/events.build_query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/operation/events/events.build_query.php b/pandora_console/operation/events/events.build_query.php index 0c88c4a1c6..441cd5da9e 100644 --- a/pandora_console/operation/events/events.build_query.php +++ b/pandora_console/operation/events/events.build_query.php @@ -169,7 +169,7 @@ if (!empty($tag_with)) { foreach ($tag_with as $id_tag) { if ($first) $first = false; else $sql_post .= " OR "; - $sql_post .= "tags = '" . tags_get_name($id_tag) . "'"; + $sql_post .= "tags LIKE ('%" . tags_get_name($id_tag) . "%')"; } $sql_post .= ' ) '; } From baaf21148e1fddde2d2de7bbf368dce4d46dcd57 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 6 Apr 2015 15:30:52 +0200 Subject: [PATCH 011/104] Cleaned source code style. --- .../operation/reporting/reporting_viewer.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pandora_console/operation/reporting/reporting_viewer.php b/pandora_console/operation/reporting/reporting_viewer.php index affefb1b74..dc2b0b917a 100644 --- a/pandora_console/operation/reporting/reporting_viewer.php +++ b/pandora_console/operation/reporting/reporting_viewer.php @@ -46,17 +46,17 @@ enterprise_include("include/functions_reporting.php"); $pure = get_parameter('pure',0); // Get different date to search the report. -$date = (string) get_parameter ('date', date(DATE_FORMAT)); -$time = (string) get_parameter ('time', date(TIME_FORMAT)); +$date = (string)get_parameter('date', date(DATE_FORMAT)); +$time = (string)get_parameter('time', date(TIME_FORMAT)); $datetime = strtotime ($date . ' ' . $time); $report["datetime"] = $datetime; // Calculations in order to modify init date of the report -$date_init_less = strtotime(date('Y-m-j')) - 86400; +$date_init_less = strtotime(date('Y-m-j')) - SECONDS_1DAY; $date_init = get_parameter('date_init', date(DATE_FORMAT, $date_init_less)); $time_init = get_parameter('time_init', date(TIME_FORMAT, $date_init_less)); -$datetime_init = strtotime ($date_init.' '.$time_init); +$datetime_init = strtotime($date_init . ' ' . $time_init); $enable_init_date = get_parameter('enable_init_date', 0); // Standard header @@ -68,17 +68,17 @@ $options = array(); $options['list_reports'] = array('active' => false, 'text' => '' . html_print_image("images/report_list.png", true, array ("title" => __('Report list'))) .''); - + if (check_acl ($config['id_user'], 0, "RW")) { $options['main']['text'] = '' . html_print_image("images/op_reporting.png", true, array ("title" => __('Main data'))) .''; - + $options['list_items']['text'] = '' . html_print_image("images/list.png", true, array ("title" => __('List items'))) .''; - + $options['item_editor']['text'] = '' . html_print_image("images/pen.png", true, array ("title" => __('Item editor'))) .''; - + if (enterprise_installed()) { $options = reporting_enterprise_add_Tabs($options, $id_report); } From 38f94086c75aa5138c309540636972bc21e5744f Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 6 Apr 2015 16:30:30 +0200 Subject: [PATCH 012/104] Working in the item availability. --- pandora_console/include/functions.php | 4 +- pandora_console/include/functions_db.php | 6 +- pandora_console/include/functions_modules.php | 118 ++++++- .../include/functions_reporting.php | 305 ++++++++++++++++++ 4 files changed, 426 insertions(+), 7 deletions(-) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index dff4d02a1d..adbe187e9f 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -477,8 +477,8 @@ function human_time_description_raw ($seconds, $exactly = false, $units = 'large $returnTime .= "$mins $minutesString "; } else { - $returnTime = sprintf("%02d",$hours) . ':' . - sprintf("%02d",$mins); + $returnTime = sprintf("%02d", $hours) . ':' . + sprintf("%02d", $mins); } } diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index b8cd3e683f..719049c30e 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -1195,16 +1195,16 @@ function db_get_fields($table) { */ function db_search_in_history_db ($utimestamp) { global $config; - + $search_in_history_db = false; if ($config['history_db_enabled'] == 1) { $history_db_start_period = $config['history_db_days'] * SECONDS_1DAY; - + // If the date is newer than the newest history db data if (time() - $history_db_start_period >= $utimestamp) $search_in_history_db = true; } - + return $search_in_history_db; } diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index e813aa5dd1..7c20204208 100644 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -1355,6 +1355,120 @@ function modules_get_moduletypes ($type = "all", $rows = "nombre") { return $return; } +function modules_get_first_contact_date($id_agent_module) { + global $config; + + // TODO REMOVE THE TIME IN PLANNED DOWNTIME + + // TODO FOR OTHER KIND OF DATA + + $sql = " + SELECT utimestamp + FROM tagente_datos + WHERE id_agente_modulo = " . (int)($id_agent_module) . " + ORDER BY utimestamp ASC + LIMIT 1"; + + $first_date = db_get_sql($sql, 0, $config['history_db_enabled']); + + return $first_date; +} + +function modules_get_count_datas($id_agent_module, $date_init, $date_end) { + $interval = modules_get_interval ($id_agent_module); + + // TODO REMOVE THE TIME IN PLANNED DOWNTIME + + //MIRAR SI ESTA ANTES DEL TIEMPO EL MODULO + + if (!is_numeric($date_init)) { + $date_init = strtotime($date_init); + } + + if (!is_numeric($date_end)) { + $date_end = strtotime($date_end); + } + + $first_date = modules_get_first_contact_date($id_agent_module); + + if ($date_init < $first_date) { + $date_init = $first_date; + } + + $diff = $date_end - $date_init; + + return ($diff / $interval); +} + +function modules_get_data_with_value($id_agent_module, $date_init, + $date_end, $value, $split_interval = false) { + + global $config; + + // TODO REMOVE THE TIME IN PLANNED DOWNTIME + + // TODO FOR OTHER KIND OF DATA + + if (!is_numeric($date_init)) { + $date_init = strtotime($date_init); + } + + if (!is_numeric($date_end)) { + $date_end = strtotime($date_end); + } + + $sql = " + SELECT * + FROM tagente_datos + WHERE + datos = " . (int)$value . " + AND id_agente_modulo = " . (int)$id_agent_module . " + AND (utimestamp >= " . $date_init . " AND utimestamp <= " . $date_end . ")"; + + $data = db_get_all_rows_sql($sql, + $config['history_db_enabled']); + + if (empty($data)) { + $data = array(); + } + + if ($split_interval) { + $temp = array(); + $previous_utimestamp = false; + foreach ($data as $row) { + if ($previous_utimestamp === false) { + $previous_utimestamp = $row['utimestamp']; + + $temp[] = $row; + } + else { + $diff = $row['utimestamp'] - $previous_utimestamp; + + $interval = modules_get_interval($id_agent_module); + + if ($diff > $interval) { + $fake_count = (int)($diff / $interval); + + $fake = $row; + for ($iterator = 1; $iterator <= $fake_count; $iterator++) { + $fake['utimestamp'] = $previous_utimestamp + ($iterator * $interval); + $temp[] = $fake; + } + } + else { + $temp[] = $row; + } + + $previous_utimestamp = $row['utimestamp']; + + $data = $temp; + } + } + } + + return $data; +} + /** * Get the interval value of an agent module. * @@ -1520,7 +1634,7 @@ function modules_get_previous_data ($id_agent_module, $utimestamp = 0, $string = $id_agent_module, $utimestamp, $utimestamp - SECONDS_2DAY); $search_in_history_db = db_search_in_history_db($utimestamp); - + return db_get_row_sql ($sql, $search_in_history_db); } @@ -1554,7 +1668,7 @@ function modules_get_next_data ($id_agent_module, $utimestamp = 0, $string = 0) $id_agent_module, $utimestamp + $interval, $utimestamp); $search_in_history_db = db_search_in_history_db($utimestamp); - + return db_get_row_sql ($sql, $search_in_history_db); } diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 54f862de49..079db000e4 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -400,6 +400,11 @@ function reporting_get_agentmodule_data_sum ($id_agent_module, return $total; } +function reporting_get_agentmodule_availability($id_agent_module, $period = 0, $timeFrom = null, $timeTo = null) { + global $config; + +} + /** * Get SLA of a module. * @@ -5316,6 +5321,306 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f $item_title = __('Availability'); } reporting_header_content($mini, $content, $report, $table, $item_title); + + // Put description at the end of the module (if exists) + $table->colspan[1][0] = 3; + if ($content["description"] != "") { + $data_desc = array(); + $data_desc[0] = $content["description"]; + array_push($table->data, $data_desc); + } + + $sql = sprintf(" + SELECT id_agent_module, + server_name, operation + FROM treport_content_item + WHERE id_report_content = %d", + $content['id_rc']); + + $items = db_process_sql ($sql); + if (empty($items)) { + $data = array (); + $table->colspan[2][0] = 3; + $data[0] = + __('There are no Agent/Modules defined'); + array_push ($table->data, $data); + break; + } + + $data = array(); + + $avg = 0; + $min = null; + $min_text = ""; + $max = null; + $max_text = ""; + $count = 0; + foreach ($items as $item) { + //aaMetaconsole connection + $server_name = $item ['server_name']; + if (($config ['metaconsole'] == 1) && $server_name != '' && defined('METACONSOLE')) { + $connection = metaconsole_get_connection($server_name); + if (metaconsole_load_external_db($connection) != NOERR) { + //ui_print_error_message ("Error connecting to ".$server_name); + continue; + } + } + + if (modules_is_disable_agent($item['id_agent_module'])) { + continue; + } + + $row = array(); + + $text = ""; + + // HACK it is saved in show_graph field. + // Show interfaces instead the modules + if ($content['show_graph']) { + $text = $row['ip_address'] = agents_get_address( + modules_get_agentmodule_agent($item['id_agent_module'])); + } + else { + $text = $row['module'] = modules_get_agentmodule_name( + $item['id_agent_module']); + } + $row['agent'] = modules_get_agentmodule_agent_name( + $item['id_agent_module']); + + $text = $row['agent'] . " (" . $text . ")"; + + $monitor_value = reporting_get_agentmodule_sla( + $item['id_agent_module'], + $content['period'], + 1, + false, + $report["datetime"]); + + if ($monitor_value === false) { + $row['checks'] = __('Unknown'); + $row['failed'] = __('Unknown'); + $row['fail'] = __('Unknown'); + $row['poling_time'] = __('Unknown'); + $row['time_unavaliable'] = __('Unknown'); + $row['ok'] = __('Unknown'); + } + else { + $count_checks = modules_get_count_datas( + $item['id_agent_module'], + $report["datetime"] - $content['period'], + $report["datetime"]); + $count_fails = count( + modules_get_data_with_value( + $item['id_agent_module'], + $report["datetime"] - $content['period'], + $report["datetime"], + 0, true)); + $percent_ok = (($count_checks - $count_fails) * 100) / $count_checks; + $percent_fail = 100 - $percent_ok; + + $row['ok'] = format_numeric($percent_ok, 2) . " %"; + $row['fail'] = format_numeric($percent_fail, 2) . " %"; + $row['checks'] = format_numeric($count_checks, 2); + $row['failed'] = format_numeric($count_fails ,2); + $row['poling_time'] = human_time_description_raw( + ($count_checks - $count_fails) * modules_get_interval($item['id_agent_module']), + true); + $row['time_unavaliable'] = "-"; + if ($count_fails > 0) { + $row['time_unavaliable'] = human_time_description_raw( + $count_fails * modules_get_interval($item['id_agent_module']), + true); + } + + $availability_data = + reporting_get_agentmodule_availability( + $item['id_agent_module']); + } + + $data[] = $row; + + + $avg = (($avg * $count) + $monitor_value) / ($count + 1); + if (is_null($min)) { + $min = $percent_ok; + $min_text = $text; + } + else { + if ($min > $percent_ok) { + $min = $percent_ok; + $min_text = $text; + } + } + if (is_null($max)) { + $max = $percent_ok; + $max_text = $text; + } + else { + if ($max < $percent_ok) { + $max = $percent_ok; + $max_text = $text; + } + } + + //Restore dbconnection + if (($config ['metaconsole'] == 1) && $server_name != '' && defined('METACONSOLE')) { + metaconsole_restore_db(); + } + + $count++; + } + + switch ($content['order_uptodown']) { + case REPORT_ITEM_ORDER_BY_AGENT_NAME: + $temp = array(); + foreach ($data as $row) { + $i = 0; + foreach ($temp as $t_row) { + if (strcmp($row['agent'], $t_row['agent']) < 0) { + break; + } + + $i++; + } + + array_splice($temp, $i, 0, array($row)); + } + + $data = $temp; + break; + case REPORT_ITEM_ORDER_BY_ASCENDING: + $temp = array(); + foreach ($data as $row) { + $i = 0; + foreach ($temp as $t_row) { + if ($content['show_graph']) { + if (strcmp($row['ip_address'], $t_row['ip_address']) < 0) { + break; + } + } + else { + if (strcmp($row['module'], $t_row['module']) < 0) { + break; + } + } + + $i++; + } + + array_splice($temp, $i, 0, array($row)); + } + + $data = $temp; + break; + case REPORT_ITEM_ORDER_BY_DESCENDING: + $temp = array(); + foreach ($data as $row) { + $i = 0; + foreach ($temp as $t_row) { + if ($content['show_graph']) { + if (strcmp($row['ip_address'], $t_row['ip_address']) > 0) { + break; + } + } + else { + if (strcmp($row['module'], $t_row['module']) > 0) { + break; + } + } + + $i++; + } + + array_splice($temp, $i, 0, array($row)); + } + + $data = $temp; + break; + } + + + + $table1->width = '99%'; + $table1->data = array (); + $table1->head = array (); + $table1->head[0] = __('Agent'); + // HACK it is saved in show_graph field. + // Show interfaces instead the modules + if ($content['show_graph']) { + $table1->head[1] = __('IP Address'); + } + else { + $table1->head[1] = __('Module'); + } + $table1->head[2] = __('# Checks'); + $table1->head[3] = __('# Failed'); + $table1->head[4] = __('% Fail'); + $table1->head[5] = __('Poling time'); + $table1->head[6] = __('Time unavailable'); + $table1->head[7] = __('% Ok'); + + $table1->style[0] = 'text-align: left'; + $table1->style[1] = 'text-align: left'; + $table1->style[2] = 'text-align: right'; + $table1->style[3] = 'text-align: right'; + $table1->style[4] = 'text-align: right'; + $table1->style[5] = 'text-align: right'; + $table1->style[6] = 'text-align: right'; + $table1->style[7] = 'text-align: right'; + + foreach ($data as $row) { + $table_row = array(); + $table_row[] = $row['agent']; + if ($content['show_graph']) { + $table_row[] = $row['ip_address']; + } + else { + $table_row[] = $row['module']; + } + $table_row[] = $row['checks']; + $table_row[] = $row['failed']; + $table_row[] = $row['fail']; + $table_row[] = $row['poling_time']; + $table_row[] = $row['time_unavaliable']; + $table_row[] = $row['ok']; + + $table1->data[] = $table_row; + } + + $table->colspan[2][0] = 3; + $data = array(); + $data[0] = html_print_table($table1, true); + array_push ($table->data, $data); + + if ($content['show_resume']) { + $table1->width = '99%'; + $table1->data = array (); + $table1->head = array (); + $table1->style = array(); + $table1->head['min_text'] = ''; + $table1->head['min'] = __('Min Value'); + $table1->head['avg'] = __('Average Value'); + $table1->head['max_text'] = ''; + $table1->head['max'] = __('Max Value'); + $table1->style['min_text'] = 'text-align: left'; + $table1->style['min'] = 'text-align: right'; + $table1->style['avg'] = 'text-align: right'; + $table1->style['max_text'] = 'text-align: left'; + $table1->style['max'] = 'text-align: right'; + + $table1->data[] = array( + 'min_text' => $min_text, + 'min' => format_numeric($min, 2) . "%", + 'avg' => format_numeric($avg, 2) . "%", + 'max_text' => $max_text, + 'max' => format_numeric($max, 2) . "%" + ); + + $table->colspan[3][0] = 3; + $data = array(); + $data[0] = html_print_table($table1, true); + array_push ($table->data, $data); + } break; case 'general': if (empty($item_title)) { From cf045581e5d46ab30df0e3d7eba2f8c776e9b818 Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 7 Apr 2015 00:01:40 +0200 Subject: [PATCH 013/104] 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/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_console/pandoradb_data.sql | 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/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index ebafb5166f..1e53e7c21e 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP2-150406 +Version: 5.1SP2-150407 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 c8a2df140c..cce62f9944 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="5.1SP2-150406" +pandora_version="5.1SP2-150407" 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 911e397771..fc1786ef41 100644 --- 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 => '5.1SP2'; -use constant AGENT_BUILD => '150406'; +use constant AGENT_BUILD => '150407'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 44ff738920..acc991a623 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 5.1SP2 -%define release 150406 +%define release 150407 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 d71e8e8ce6..5c70d5b391 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 5.1SP2 -%define release 150406 +%define release 150407 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index db6b073d60..7bdd8830d5 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150406} +{150407} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index e368a390b6..7dcded22c8 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 ("5.1SP2(Build 150406)") +#define PANDORA_VERSION ("5.1SP2(Build 150407)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index dc0be85716..a708a2182f 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", "(5.1SP2(Build 150406))" + VALUE "ProductVersion", "(5.1SP2(Build 150407))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index a8d38bebd7..db358d0174 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP2-150406 +Version: 5.1SP2-150407 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 f78d9501f0..a5b2d2f618 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="5.1SP2-150406" +pandora_version="5.1SP2-150407" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 8664f779de..6e8009cf17 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 = 'PC150406'; +$build_version = 'PC150407'; $pandora_version = 'v5.1SP2'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index a987c5c32c..1d60318d36 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Tue, 7 Apr 2015 15:03:46 +0200 Subject: [PATCH 014/104] Added the feature of time compare overlapped in the simple graph and simple graph baseline in reports. --- .../reporting_builder.item_editor.php | 15 +++++ .../godmode/reporting/reporting_builder.php | 27 ++++++++- pandora_console/include/functions_graph.php | 5 +- .../include/functions_reporting.php | 57 ++++++++++++++++--- 4 files changed, 91 insertions(+), 13 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 334aec1df0..4664d09202 100644 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -88,6 +88,7 @@ $inventory_modules = array(); $date = null; // Only avg is selected by default for the simple graphs $only_avg = true; +$time_compare_overlapped = false; //Added for events items $filter_event_validated = false; @@ -188,6 +189,9 @@ switch ($action) { $projection_period = $item['top_n_value']; $period_pg = $item['period']; } + + // HACK it is saved in show_graph field. + $time_compare_overlapped = $item['show_graph']; break; case 'prediction_date': $description = $item['description']; @@ -1032,6 +1036,14 @@ html_print_input_hidden('id_item', $idItem); ?> +
+ + + @@ -2002,6 +2014,7 @@ function chooseType() { $("#row_show_graph").hide(); $("#row_max_min_avg").hide(); $("#row_only_avg").hide(); + $("#row_time_compare_overlapped").hide(); $("#row_quantity").hide(); $("#row_exception_condition_value").hide(); $("#row_exception_condition").hide(); @@ -2045,6 +2058,7 @@ function chooseType() { $("#row_event_graphs").show(); break; case 'simple_graph': + $("#row_time_compare_overlapped").show(); $("#row_only_avg").show(); // The break hasn't be forgotten, this element // only should be shown on the simple graphs. @@ -2055,6 +2069,7 @@ function chooseType() { $("#row_period").show(); $("#row_show_in_two_columns").show(); $("#row_show_in_landscape").show(); + $("#row_time_compare_overlapped").show(); break; case 'projection_graph': $("#row_description").show(); diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 8f28978954..3a56cf5ae9 100644 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -851,11 +851,19 @@ switch ($action) { $good_format = true; break; case 'availability': - $good_format = true; // HACK it is saved in show_graph field. // Show interfaces instead the modules $values['show_graph'] = get_parameter('checkbox_show_address_agent'); + $good_format = true; + break; + case 'simple_graph': + case 'simple_baseline_graph': + // HACK it is saved in show_graph field. + $values['show_graph'] = + (int)get_parameter('time_compare_overlapped'); + $values['period'] = get_parameter('period'); + $good_format = true; break; default: $values['period'] = get_parameter('period'); @@ -1073,11 +1081,27 @@ switch ($action) { $values['top_n_value'] = get_parameter('max_values'); $good_format = true; break; + case 'availability': + // HACK it is saved in show_graph field. + // Show interfaces instead the modules + $values['show_graph'] = + get_parameter('checkbox_show_address_agent'); + $good_format = true; + break; + case 'simple_graph': + case 'simple_baseline_graph': + // HACK it is saved in show_graph field. + $values['show_graph'] = + (int)get_parameter('time_compare_overlapped'); + $values['period'] = get_parameter('period'); + $good_format = true; + break; default: $values['period'] = get_parameter('period'); $values['top_n'] = get_parameter('radiobutton_max_min_avg',0); $values['top_n_value'] = get_parameter('quantity'); $values['text'] = get_parameter('text'); + $values['show_graph'] = get_parameter('combo_graph_options'); $good_format = true; } @@ -1125,7 +1149,6 @@ switch ($action) { $values['order_uptodown'] = get_parameter ('radiobutton_order_uptodown',0); $values['exception_condition'] = (int)get_parameter('radiobutton_exception_condition', 0); $values['exception_condition_value'] = get_parameter('exception_condition_value'); - $values['show_graph'] = get_parameter('combo_graph_options'); $values['id_module_group'] = get_parameter('combo_modulegroup'); $values['id_group'] = get_parameter ('combo_group'); $values['server_name'] = get_parameter ('server_name'); diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 8f58184070..d2b3d5f6f8 100755 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -705,8 +705,8 @@ function grafico_modulo_sparse_data ($agent_module_id, $period, $show_events, }*/ if ($show_unknown) { - $legend['unknown'.$series_suffix] = __('Unknown').$series_suffix_str; - $chart_extra_data['legend_unknown'] = $legend['unknown'.$series_suffix_str]; + $legend['unknown' . $series_suffix] = __('Unknown') . $series_suffix_str; + $chart_extra_data['legend_unknown'] = $legend['unknown' . $series_suffix_str]; } } @@ -721,7 +721,6 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events, global $config; global $graphic_type; - $flash_chart = $config['flash_charts']; enterprise_include_once("include/functions_reporting.php"); diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 079db000e4..34c7761038 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -3510,12 +3510,29 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f $urlImage = ui_get_full_url(false, false, false, false); - $data[0] = grafico_modulo_string ($content['id_agent_module'], $content['period'], - false, $sizgraph_w, $sizgraph_h, '', '', false, $only_avg, false, - $report["datetime"], $only_image, $urlImage); + $data[0] = grafico_modulo_string ( + $content['id_agent_module'], + $content['period'], + false, + $sizgraph_w, + $sizgraph_h, + '', + '', + false, + $only_avg, + false, + $report["datetime"], + $only_image, + $urlImage); } else { + // HACK it is saved in show_graph field. + $time_compare_overlapped = false; + if ($content['show_graph']) { + $time_compare_overlapped = 'overlapped'; + } + $data[0] = grafico_modulo_sparse( $content['id_agent_module'], @@ -3538,7 +3555,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f 1, false, '', - false, + $time_compare_overlapped, true); } @@ -3657,11 +3674,35 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f array_push ($table->data, $data_desc); } + // HACK it is saved in show_graph field. + $time_compare_overlapped = false; + if ($content['show_graph']) { + $time_compare_overlapped = 'overlapped'; + } + $data = array (); - $data[0] = grafico_modulo_sparse($content['id_agent_module'], $content['period'], - false, $sizgraph_w, $sizgraph_h, '', '', false, true, true, - $report["datetime"], '', true, 0, true, $only_image, - ui_get_full_url(false, false, false, false)); + $data[0] = grafico_modulo_sparse( + $content['id_agent_module'], + $content['period'], + false, + $sizgraph_w, + $sizgraph_h, + '', + '', + false, + true, + true, + $report["datetime"], + '', + true, + 0, + true, + only_image, + ui_get_full_url(false, false, false, false), + 1, + false, + '', + $time_compare_overlapped); /*$data[0] = graphic_combined_module( $modules, From 6f71a01b0c4cabdb14e2953239b1330c12f5ec26 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 7 Apr 2015 17:11:04 +0200 Subject: [PATCH 015/104] Fixed the separator (sometimes it is other) in the ajax call get_agent_modules_json_for_multiple_agents. --- pandora_console/include/ajax/module.php | 12 ++++++------ pandora_console/operation/agentes/ver_agente.php | 7 ++++++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index dc1b29dae1..2904992e12 100644 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -66,8 +66,9 @@ if ($search_modules) { if ($get_module_detail) { - + // This script is included manually to be included after jquery and avoid error ui_include_time_picker(); + ui_require_jquery_file("ui.datepicker-" . get_user_language(), "include/javascript/i18n/"); $module_id = (int)get_parameter('id_module'); $period = get_parameter("period", SECONDS_1DAY); @@ -80,8 +81,8 @@ if ($get_module_detail) { $group = agents_get_agentmodule_group ($module_id); - $agentId = get_parameter("id_agent"); - $server_name = get_parameter('server_name'); + $agentId = (int) get_parameter("id_agent"); + $server_name = (string) get_parameter('server_name'); if (defined ('METACONSOLE')) { $server = metaconsole_get_connection ($server_name); @@ -128,7 +129,7 @@ if ($get_module_detail) { $formtable->data[0][3] = "". html_print_image ("images/refresh.png", true, array ("style" => 'vertical-align: middle;', "border" => "0" )) . ""; $formtable->rowspan[0][3] = 2; $formtable->cellstyle[0][3] = 'vertical-align: middle;'; - + $formtable->data[1][0] = html_print_radio_button_extended( "selection_mode", 'range','', $selection_mode, false, '', 'style="margin-right: 15px;"', true) . __("Specify time range"); @@ -285,9 +286,8 @@ if ($get_module_detail) { html_print_table($table); } - if (defined ('METACONSOLE')) { + if (defined ('METACONSOLE')) metaconsole_restore_db(); - } return; } diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index 17a3043c56..86980495b2 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -246,7 +246,12 @@ if (is_ajax ()) { foreach ($idAgents as $idA) { if (empty($metaconsole_server_name)) { - $row = explode ('|', $idA); + if (strstr($idA, "|@_@|")) { + $row = explode ('|@_@|', $idA); + } + else { + $row = explode ('|', $idA); + } $server_name = $row[0]; $id_agent = $row [1]; } From 08b376fc92a69461440f27d2ea8c6afcb2b1a610 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 8 Apr 2015 00:01:27 +0200 Subject: [PATCH 016/104] 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/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_console/pandoradb_data.sql | 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/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 1e53e7c21e..3c715db549 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP2-150407 +Version: 5.1SP2-150408 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 cce62f9944..16f9af3f1c 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="5.1SP2-150407" +pandora_version="5.1SP2-150408" 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 fc1786ef41..cf6922ddf9 100644 --- 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 => '5.1SP2'; -use constant AGENT_BUILD => '150407'; +use constant AGENT_BUILD => '150408'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index acc991a623..ceec05540d 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 5.1SP2 -%define release 150407 +%define release 150408 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 5c70d5b391..2c0ecee30a 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 5.1SP2 -%define release 150407 +%define release 150408 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 7bdd8830d5..feab9b3ed1 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150407} +{150408} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 7dcded22c8..0a3dc99c4a 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 ("5.1SP2(Build 150407)") +#define PANDORA_VERSION ("5.1SP2(Build 150408)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index a708a2182f..cc5d6b6a30 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", "(5.1SP2(Build 150407))" + VALUE "ProductVersion", "(5.1SP2(Build 150408))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index db358d0174..8fea959849 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP2-150407 +Version: 5.1SP2-150408 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 a5b2d2f618..f0ed8f18e5 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="5.1SP2-150407" +pandora_version="5.1SP2-150408" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 6e8009cf17..4a4339adcf 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 = 'PC150407'; +$build_version = 'PC150408'; $pandora_version = 'v5.1SP2'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 1d60318d36..5cc700e0bb 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Wed, 8 Apr 2015 16:57:36 +0200 Subject: [PATCH 017/104] Remove a javascript debug trace (backport from develop). --- .../extensions/realtime_graphs/realtime_graphs.js | 1 - .../reporting/reporting_builder.item_editor.php | 12 ++++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pandora_console/extensions/realtime_graphs/realtime_graphs.js b/pandora_console/extensions/realtime_graphs/realtime_graphs.js index 6907c5e8ee..0d2b651313 100644 --- a/pandora_console/extensions/realtime_graphs/realtime_graphs.js +++ b/pandora_console/extensions/realtime_graphs/realtime_graphs.js @@ -176,7 +176,6 @@ function clearGraph() { if (data.length == 0) { return; } - console.log(data); for(i = 0; i < data[0].data.length; i ++) { data[0].data[i][1] = 0; diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 4664d09202..64e873d8ec 100644 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -64,10 +64,10 @@ $top_n_value = 10; $exception_condition = REPORT_EXCEPTION_CONDITION_EVERYTHING; $exception_condition_value = 10; $modulegroup = 0; -$period = 86400; +$period = SECONDS_1DAY; // Added support for projection graphs -$period_pg = 432000; -$projection_period = 432000; +$period_pg = SECONDS_5DAY; +$projection_period = SECONDS_5DAY; $only_display_wrong = 0; // Added support for prediction date report $min_interval = '0.00'; @@ -516,6 +516,8 @@ $urlForm = $config['homeurl'] . echo ''; html_print_input_hidden('id_item', $idItem); + + ?>
' . printSmallFont($nameAgent) . $server_name_element . ' ' . printSmallFont($nameModule) . '' . printSmallFont($operation[$item['operation']]) . ' ' . html_print_image("images/cross.png", true) . '
' . printSmallFont($nameAgent) . $server_name_element . '' . printSmallFont($nameModule) . '' . + printSmallFont($operation[$item['operation']]) . + ' + ' . html_print_image("images/cross.png", true) . ' +
+ + + +
+ +
@@ -1099,7 +1101,7 @@ html_print_input_hidden('id_item', $idItem); ?> - +
+
+
Date: Wed, 8 Apr 2015 17:06:55 +0200 Subject: [PATCH 018/104] Killed some unicorns and arbitrary numbers. This land is for constants. (backport from the develop branch). --- pandora_console/extensions/agents_modules.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index 5542d7447b..89dbe4e489 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -298,20 +298,28 @@ function mainAgentsModules() { echo ""; $win_handle = dechex(crc32($module_id.$module["name"])); $graph_type = return_graphtype (modules_get_agentmodule_type($module_id)); - $link ="winopeng('operation/agentes/stat_win.php?type=$graph_type&period=86400&id=".$module_id."&label=".rawurlencode(urlencode(base64_encode($module["name"])))."&refresh=600','day_".$win_handle."')"; + $link ="winopeng('" . + "operation/agentes/stat_win.php?" . + "type=$graph_type&" . + "period=" . SECONDS_1DAY . "&" . + "id=" . $module_id . "&" . + "label=" . rawurlencode( + urlencode( + base64_encode($module["name"]))) . "&" . + "refresh=" . SECONDS_10MINUTES . "', 'day_".$win_handle."')"; echo ''; switch ($status) { - case 0: + case AGENT_MODULE_STATUS_NORMAL: ui_print_status_image ('module_ok.png', modules_get_last_value($module_id), false, array('width' => '20px', 'height' => '20px')); break; - case 1: + 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')); break; - case 2: + case AGENT_MODULE_STATUS_WARNING: ui_print_status_image ('module_warning.png', modules_get_last_value($module_id), false, array('width' => '20px', 'height' => '20px')); break; - case 3: + case AGENT_MODULE_STATUS_UNKNOWN: ui_print_status_image ('module_unknown.png', modules_get_last_value($module_id), false, array('width' => '20px', 'height' => '20px')); break; case 4: From 654549f13bd8c4a210ec5628241ac0aaf70ba419 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Wed, 8 Apr 2015 17:07:18 +0200 Subject: [PATCH 019/104] Remove a javascript debug trace (backport from develop). --- pandora_console/extensions/system_info.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pandora_console/extensions/system_info.php b/pandora_console/extensions/system_info.php index 4f1209241a..b1cc79a235 100644 --- a/pandora_console/extensions/system_info.php +++ b/pandora_console/extensions/system_info.php @@ -550,11 +550,7 @@ function mainSystemInfo() { function generate_info () { $("#submit-generate").hide(); $("#spinner_img").show(); - - console.log($("#checkbox-pandora_diag").prop('checked')); - console.log($("#checkbox-system_info").prop('checked')); - console.log($("#checkbox-log_info").prop('checked')); - + $.ajax({ url: 'ajax.php', type: 'POST', From f06b400e4d6ba694ef40d4ade1ecfe201fed865a Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Wed, 8 Apr 2015 17:45:37 +0200 Subject: [PATCH 020/104] Killed some unicorns and arbitrary numbers. This land is for constants. (backport from the develop branch). --- pandora_console/general/header.php | 5 +- .../godmode/agentes/agent_manager.php | 122 ++++++++++-------- .../godmode/agentes/configurar_agente.php | 25 ++-- .../agentes/module_manager_editor_common.php | 33 +++-- .../godmode/alerts/alert_commands.php | 1 + .../godmode/alerts/alert_templates.php | 3 +- .../godmode/alerts/configure_alert_action.php | 1 + pandora_console/godmode/category/category.php | 1 + .../godmode/category/edit_category.php | 2 +- pandora_console/godmode/db/db_audit.php | 12 +- .../godmode/events/custom_events.php | 4 +- .../godmode/events/event_filter.php | 5 +- .../massive/massive_add_action_alerts.php | 19 +-- .../godmode/massive/massive_add_alerts.php | 3 + .../godmode/massive/massive_copy_modules.php | 16 +++ .../godmode/massive/massive_delete_agents.php | 3 + .../godmode/massive/massive_delete_alerts.php | 4 + .../massive/massive_delete_modules.php | 3 + .../godmode/massive/massive_edit_agents.php | 6 +- .../godmode/massive/massive_edit_modules.php | 7 +- .../godmode/massive/massive_operations.php | 12 +- pandora_console/index.php | 3 +- .../operation/gis_maps/public_console.php | 2 +- 23 files changed, 192 insertions(+), 100 deletions(-) diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index 9c1524aabf..e44761f481 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -45,8 +45,9 @@ config_check(); } $logo_title = 'Pandora FMS Enterprise'; } - - echo html_print_image($custom_logo, true, array("alt" => $logo_title, "border" => '0')); + + echo html_print_image($custom_logo, true, + array("alt" => $logo_title, "border" => '0')); ?> diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index a560a73bff..d748cf1d4a 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -268,7 +268,8 @@ $table->data[6][1] = html_print_select (servers_get_names (), // Description $table->data[7][0] = __('Description'); -$table->data[7][1] = html_print_input_text ('comentarios', $comentarios, '', 45, 255, true); +$table->data[7][1] = html_print_input_text ('comentarios', $comentarios, + '', 45, 255, true); html_print_table ($table); unset($table); @@ -376,10 +377,12 @@ if ($config['activate_gis']) { } $table->data[6][0] = __('Url address'); -$table->data[6][1] = html_print_input_text ('url_description', $url_description, '', 45, 255, true); +$table->data[6][1] = html_print_input_text ('url_description', + $url_description, '', 45, 255, true); $table->data[7][0] = __('Quiet'); -$table->data[7][0] .= ui_print_help_tip(__('The agent still runs but the alerts and events will be stop'), true); +$table->data[7][0] .= ui_print_help_tip( + __('The agent still runs but the alerts and events will be stop'), true); $table->data[7][1] = html_print_checkbox('quiet', 1, $quiet, true); ui_toggle(html_print_table ($table, true), __('Advanced options')); @@ -401,13 +404,16 @@ foreach ($fields as $field) { $data[0] = ''.$field['name'].''; - $custom_value = db_get_value_filter('description', 'tagent_custom_data', array('id_field' => $field['id_field'], 'id_agent' => $id_agente)); + $custom_value = db_get_value_filter('description', + 'tagent_custom_data', + array('id_field' => $field['id_field'], 'id_agent' => $id_agente)); if ($custom_value === false) { $custom_value = ''; } - $data[1] = html_print_textarea ('customvalue_'.$field['id_field'], 2, 65, $custom_value, 'style="min-height: 30px;"', true); + $data[1] = html_print_textarea ('customvalue_'.$field['id_field'], + 2, 65, $custom_value, 'style="min-height: 30px;"', true); array_push ($table->data, $data); } @@ -433,12 +439,14 @@ echo ""; if ($id_agente) { - html_print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"'); + html_print_submit_button (__('Update'), 'updbutton', false, + 'class="sub upd"'); html_print_input_hidden ('update_agent', 1); html_print_input_hidden ('id_agente', $id_agente); } else { - html_print_submit_button (__('Create'), 'crtbutton', false, 'class="sub wand"'); + html_print_submit_button (__('Create'), 'crtbutton', false, + 'class="sub wand"'); html_print_input_hidden ('create_agent', 1); } echo '
'; @@ -448,54 +456,64 @@ ui_require_jquery_file ('ajaxqueue'); ui_require_jquery_file ('bgiframe'); ?> diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 308ba166e6..ba02c2f283 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -784,6 +784,7 @@ $edit_module = (bool) get_parameter ('edit_module'); if ($update_module || $create_module) { $id_grupo = agents_get_agent_group ($id_agente); + if (!check_acl ($config["id_user"], $id_grupo, "AW")) { db_pandora_audit("ACL Violation", "Trying to create a module without admin rights"); @@ -803,7 +804,7 @@ if ($update_module || $create_module) { $post_process = (string) get_parameter ('post_process', 0.0); //$prediction_module = 0; - + $max_timeout = (int) get_parameter ('max_timeout'); $max_retries = (int) get_parameter ('max_retries'); $min = (int) get_parameter_post ("min"); @@ -858,8 +859,8 @@ if ($update_module || $create_module) { $macros = io_json_mb_encode($macros); $conf_array = explode("\n",$configuration_data); - foreach($conf_array as $line) { - if(preg_match("/^module_name\s*(.*)/", $line, $match)) { + foreach ($conf_array as $line) { + if (preg_match("/^module_name\s*(.*)/", $line, $match)) { $new_configuration_data .= "module_name $name\n"; } // We delete from conf all the module macros starting with _field @@ -870,7 +871,7 @@ if ($update_module || $create_module) { $macros_for_data = enterprise_hook('config_agents_get_macros_data_conf', array($_POST)); - if($macros_for_data !== ENTERPRISE_NOT_HOOK && $macros_for_data != '') { + 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); } @@ -950,9 +951,10 @@ if ($update_module || $create_module) { $wday = get_parameter('wday'); $cron_interval = "$minute $hour $mday $month $wday"; - if ($prediction_module != 3) { + if ($prediction_module != MODULE_PREDICTION_SYNTHETIC) { unset($serialize_ops); - enterprise_hook('modules_delete_synthetic_operations', array($id_agent_module)); + enterprise_hook('modules_delete_synthetic_operations', + array($id_agent_module)); } $active_snmp_v3 = get_parameter('active_snmp_v3'); @@ -972,7 +974,8 @@ if ($update_module || $create_module) { // Make changes in the conf file if necessary enterprise_include_once('include/functions_config_agents.php'); enterprise_hook('config_agents_write_module_in_conf', - array($id_agente, io_safe_output($old_configuration_data), io_safe_output($configuration_data), $disabled)); + array($id_agente, io_safe_output($old_configuration_data), + io_safe_output($configuration_data), $disabled)); } // MODULE UPDATE @@ -1040,8 +1043,10 @@ if ($update_module) { if ($module_kind == MODULE_DATA) { unset($values['module_interval']); } - - if ($prediction_module == 3 && $serialize_ops == '') { + + if ($prediction_module == MODULE_PREDICTION_SYNTHETIC && + $serialize_ops == '') { + $result = false; } else { @@ -1072,7 +1077,7 @@ if ($update_module) { $edit_module = true; db_pandora_audit("Agent management", - "Fail to try update module '$name' for agent ".$agent["nombre"]); + "Fail to try update module '$name' for agent " . $agent["nombre"]); } else { if ($prediction_module == 3) { diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index 8f832c4ce9..a9c0f5a73d 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -296,8 +296,9 @@ $table_advanced->width = '98%'; $table_advanced->class = 'databox_color'; $table_advanced->data = array (); $table_advanced->style = array (); -$table_advanced->style[0] = 'font-weight: bold; vertical-align: top'; -$table_advanced->style[3] = 'font-weight: bold; vertical-align: top'; +$table_advanced->style[0] = + $table_advanced->style[3] = + 'font-weight: bold; vertical-align: top'; $table_advanced->colspan = array (); $table_advanced->data[0][0] = __('Description'); @@ -356,8 +357,9 @@ else { $table_advanced->data[2][1] .= html_print_input_hidden ('moduletype', $moduletype, true); $table_advanced->data[2][3] = __('Post process').' ' . ui_print_help_icon ('postprocess', true); -$table_advanced->data[2][4] = html_print_input_text ('post_process', - $post_process, '', 15, 25, true, $disabledBecauseInPolicy); +$table_advanced->data[2][4] = + html_print_input_text('post_process', + $post_process, '', 15, 25, true, $disabledBecauseInPolicy); $table_advanced->data[3][0] = __('Min. Value'); $table_advanced->colspan[3][1] = 2; @@ -420,13 +422,18 @@ if ($__code_from == 'modules') { $__table_modules = 'ttag_module'; $__id_where = 'b.id_agente_modulo'; $__id = (int)$id_agent_module; + // Code comes from policy module editor + } else { + global $__id_pol_mod; $__table_modules= 'ttag_policy_module'; $__id_where = 'b.id_policy_module'; $__id = $__id_pol_mod; + + } if (!tags_has_user_acl_tags($config["id_user"])) { @@ -468,28 +475,33 @@ else { true, true, false, false, 'width: 200px', '5'); } } -$table_advanced->data[6][2] = html_print_image('images/darrowright.png', true, array('id' => 'right', 'title' => __('Add tags to module'))); //html_print_input_image ('add', 'images/darrowright.png', 1, '', true, array ('title' => __('Add tags to module'))); +$table_advanced->data[6][2] = html_print_image('images/darrowright.png', true, array('id' => 'right', 'title' => __('Add tags to module'))); //html_print_input_image ('add', 'images/darrowright.png', 1, '', true, array ('title' => __('Add tags to module'))); $table_advanced->data[6][2] .= '



' . html_print_image('images/darrowleft.png', true, array('id' => 'left', 'title' => __('Delete tags to module'))); //html_print_input_image ('add', 'images/darrowleft.png', 1, '', true, array ('title' => __('Delete tags to module'))); $table_advanced->data[6][3] = '' . __('Tags selected') . ''; -$table_advanced->data[6][4] = html_print_select_from_sql ( +$table_advanced->data[6][4] = html_print_select_from_sql ( "SELECT a.id_tag, name FROM ttag a, $__table_modules b WHERE a.id_tag = b.id_tag AND $__id_where = $__id ORDER BY name", 'id_tag_selected[]', '', '','','', true, true, false, false, 'width: 200px', '5'); + + $table_advanced->data[7][0] = __('Quiet'); -$table_advanced->data[7][0] .= ui_print_help_tip(__('The module still stores data but the alerts and events will be stop'), true); +$table_advanced->data[7][0] .= ui_print_help_tip( + __('The module still stores data but the alerts and events will be stop'), true); $table_advanced->colspan[7][1] = 4; $table_advanced->data[7][1] = html_print_checkbox('quiet_module', 1, $quiet_module, true); -$table_advanced->data[8][0] = __('Critical instructions'). ui_print_help_tip(__("Instructions when the status is critical"), true); +$table_advanced->data[8][0] = __('Critical instructions') . + ui_print_help_tip(__("Instructions when the status is critical"), true); $table_advanced->data[8][1] = html_print_textarea ('critical_instructions', 2, 65, $critical_instructions, '', true); $table_advanced->colspan[8][1] = 4; -$table_advanced->data[9][0] = __('Warning instructions'). ui_print_help_tip(__("Instructions when the status is warning"), true); +$table_advanced->data[9][0] = __('Warning instructions') . + ui_print_help_tip(__("Instructions when the status is warning"), true); $table_advanced->data[9][1] = html_print_textarea ('warning_instructions', 2, 65, $warning_instructions, '', true); $table_advanced->colspan[9][1] = 4; @@ -497,7 +509,8 @@ $table_advanced->data[10][0] = __('Unknown instructions'). ui_print_help_tip(__( $table_advanced->data[10][1] = html_print_textarea ('unknown_instructions', 2, 65, $unknown_instructions, '', true); $table_advanced->colspan[10][1] = 4; -$table_advanced->data[11][0] = __('Cron') . ui_print_help_tip (__('If cron is set the module interval is ignored and the module runs on the specified date and time'), true); +$table_advanced->data[11][0] = __('Cron') . + ui_print_help_tip (__('If cron is set the module interval is ignored and the module runs on the specified date and time'), true); $table_advanced->data[11][1] = html_print_extended_select_for_cron ($hour, $minute, $mday, $month, $wday, true); $table_advanced->colspan[11][1] = 4; diff --git a/pandora_console/godmode/alerts/alert_commands.php b/pandora_console/godmode/alerts/alert_commands.php index c92f5ef9e8..c0fa720daf 100644 --- a/pandora_console/godmode/alerts/alert_commands.php +++ b/pandora_console/godmode/alerts/alert_commands.php @@ -70,6 +70,7 @@ if (is_ajax ()) { $fields_rows = array(); for ($i = 1; $i <= 10; $i++) { + if (!empty($fields_descriptions[$i - 1])) { $fdesc = $fields_descriptions[$i - 1] . '
' . diff --git a/pandora_console/godmode/alerts/alert_templates.php b/pandora_console/godmode/alerts/alert_templates.php index 82e5d7854d..dad074fce5 100644 --- a/pandora_console/godmode/alerts/alert_templates.php +++ b/pandora_console/godmode/alerts/alert_templates.php @@ -156,7 +156,7 @@ if ($delete_template) { $id = get_parameter ('id'); $al_template = alerts_get_alert_template($id); - if ($al_template !== false){ + if ($al_template !== false) { // If user tries to delete a template with group=ALL then must have "PM" access privileges if ($al_template['id_group'] == 0) { if (! check_acl ($config['id_user'], 0, "PM")) { @@ -233,6 +233,7 @@ $table->width = '98%'; $table->data = array (); $table->head = array (); $table->style = array (); + $table->style[0] = 'font-weight: bold'; $table->style[2] = 'font-weight: bold'; diff --git a/pandora_console/godmode/alerts/configure_alert_action.php b/pandora_console/godmode/alerts/configure_alert_action.php index fd48c695df..c059bf898d 100644 --- a/pandora_console/godmode/alerts/configure_alert_action.php +++ b/pandora_console/godmode/alerts/configure_alert_action.php @@ -311,6 +311,7 @@ $(document).ready (function () { } } + render_command_preview(original_command); render_command_recovery_preview(original_command); diff --git a/pandora_console/godmode/category/category.php b/pandora_console/godmode/category/category.php index 6352ef1f3e..664def7b51 100755 --- a/pandora_console/godmode/category/category.php +++ b/pandora_console/godmode/category/category.php @@ -126,6 +126,7 @@ if (!empty($result)) { } html_print_table ($table); + } else { // No categories available or selected diff --git a/pandora_console/godmode/category/edit_category.php b/pandora_console/godmode/category/edit_category.php index d65a0fc88f..db5db19543 100755 --- a/pandora_console/godmode/category/edit_category.php +++ b/pandora_console/godmode/category/edit_category.php @@ -119,7 +119,7 @@ echo ""; echo ""; - echo ""; echo ""; diff --git a/pandora_console/godmode/db/db_audit.php b/pandora_console/godmode/db/db_audit.php index b496f9ca78..efebd4968a 100644 --- a/pandora_console/godmode/db/db_audit.php +++ b/pandora_console/godmode/db/db_audit.php @@ -31,22 +31,22 @@ if (! check_acl ($config['id_user'], 0, "DM")) { $time["all"] = get_system_time (); // 1 day ago -$time["1day"] = $time["all"]-86400; +$time["1day"] = $time["all"] - SECONDS_1DAY; // 3 days ago -$time["3day"] = $time["all"]-(86400*3); +$time["3day"] = $time["all"] - ( SECONDS_1DAY * 3); // 1 week ago -$time["1week"] = $time["all"]-(86400*7); +$time["1week"] = $time["all"] - SECONDS_1WEEK; // 2 weeks ago -$time["2week"] = $time["all"]-(86400*14); +$time["2week"] = $time["all"] - SECONDS_2WEEK; // 1 month ago -$time["1month"] = $time["all"]-(86400*30); +$time["1month"] = $time["all"] - SECONDS_1MONTH; // Three months ago -$time["3month"] = $time["all"]-(86400*90); +$time["3month"] = $time["all"] - SECONDS_3MONTHS; // Todo for a good DB maintenance /* diff --git a/pandora_console/godmode/events/custom_events.php b/pandora_console/godmode/events/custom_events.php index 2ce631dd61..1eb7ddde1a 100644 --- a/pandora_console/godmode/events/custom_events.php +++ b/pandora_console/godmode/events/custom_events.php @@ -52,9 +52,11 @@ else if ($update != '') { 'value' => $event_fields ); //update 'event_fields' in tconfig table to keep the value at update. - $result = db_process_sql_update('tconfig', $values, array ('token' => 'event_fields')); + $result = db_process_sql_update('tconfig', $values, + array ('token' => 'event_fields')); } + $result_selected = array(); //show list of fields selected. diff --git a/pandora_console/godmode/events/event_filter.php b/pandora_console/godmode/events/event_filter.php index 49659619b0..51933576b0 100644 --- a/pandora_console/godmode/events/event_filter.php +++ b/pandora_console/godmode/events/event_filter.php @@ -78,7 +78,10 @@ $own_info = get_user_info ($config['id_user']); // Get group list that user has access $groups_user = users_get_groups ($config['id_user'], "EW", users_can_manage_group_all(), true); -$sql = "SELECT * FROM tevent_filter WHERE id_group_filter IN (".implode(',', array_keys ($groups_user)).")"; +$sql = " + SELECT * + FROM tevent_filter + WHERE id_group_filter IN (".implode(',', array_keys ($groups_user)).")"; $filters = db_get_all_rows_sql($sql); if ($filters === false) diff --git a/pandora_console/godmode/massive/massive_add_action_alerts.php b/pandora_console/godmode/massive/massive_add_action_alerts.php index 4c3715a598..b92b677909 100644 --- a/pandora_console/godmode/massive/massive_add_action_alerts.php +++ b/pandora_console/godmode/massive/massive_add_action_alerts.php @@ -37,7 +37,7 @@ if (is_ajax ()) { return; } - if(is_array($id_agents) && count($id_agents) == 1 && $id_agents[0] == '') { + if (is_array($id_agents) && count($id_agents) == 1 && $id_agents[0] == '') { $id_agents = false; } @@ -56,7 +56,7 @@ $recursion = get_parameter ('recursion'); $add = (bool) get_parameter_post ('add'); if ($add) { - if(empty($id_agents) || $id_agents[0] == 0) + if (empty($id_agents) || $id_agents[0] == 0) ui_print_result_message (false, '', __('Could not be added').". ".__('No agents selected')); else { $actions = get_parameter ('action'); @@ -76,9 +76,9 @@ if ($add) { $options = array(); - if($fires_min > 0) + if ($fires_min > 0) $options['fires_min'] = $fires_min; - if($fires_max > 0) + if ($fires_max > 0) $options['fires_max'] = $fires_max; if (empty($agent_alerts_id)) { @@ -87,9 +87,9 @@ if ($add) { else { $results = true; foreach ($agent_alerts_id as $agent_alert_id) { - foreach($actions as $action) { + foreach ($actions as $action) { $result = alerts_add_alert_agent_module_action($agent_alert_id, $action, $options); - if($result === false) + if ($result === false) $results = false; } } @@ -169,14 +169,14 @@ html_print_table ($table); $sql = 'SELECT id_agente FROM tagente_modulo WHERE id_agente_modulo IN (SELECT id_agent_module FROM talert_template_modules)'; $agents_with_templates = db_get_all_rows_sql($sql); $agents_with_templates_json = array(); -foreach($agents_with_templates as $ag) { +foreach ($agents_with_templates as $ag) { $agents_with_templates_json[] = $ag['id_agente']; } $agents_with_templates_json = json_encode($agents_with_templates_json); echo ""; -echo '
'; +echo '
'; html_print_input_hidden ('add', 1); html_print_submit_button (__('Add'), 'go', false, 'class="sub add"'); echo '
'; @@ -189,7 +189,10 @@ ui_require_jquery_file ('pandora.controls'); ?> diff --git a/pandora_console/godmode/massive/massive_edit_agents.php b/pandora_console/godmode/massive/massive_edit_agents.php index 847119be7c..3fb7e92e06 100644 --- a/pandora_console/godmode/massive/massive_edit_agents.php +++ b/pandora_console/godmode/massive/massive_edit_agents.php @@ -436,9 +436,13 @@ ui_require_jquery_file ('bgiframe'); ?> + \ No newline at end of file From 6a94a8386727a8b57fcc2cd2424cb4a6e94cc10a Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 29 Apr 2015 00:01:31 +0200 Subject: [PATCH 064/104] 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/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_console/pandoradb_data.sql | 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/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index ba2dc6d7d5..e3febe4dca 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP2-150428 +Version: 5.1SP2-150429 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 d7a097f351..308503db6f 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="5.1SP2-150428" +pandora_version="5.1SP2-150429" 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 40358ef554..914c8bb0cf 100644 --- 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 => '5.1SP2'; -use constant AGENT_BUILD => '150428'; +use constant AGENT_BUILD => '150429'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 9d0daf149d..ae1f4acdf7 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 5.1SP2 -%define release 150428 +%define release 150429 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 b8b273eeb4..4668c48d68 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 5.1SP2 -%define release 150428 +%define release 150429 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 2ec99b0a0d..00c7b6c827 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150428} +{150429} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 7c575758e0..4406e250e7 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 ("5.1SP2(Build 150428)") +#define PANDORA_VERSION ("5.1SP2(Build 150429)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index a2bc2c7b46..756c45569c 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", "(5.1SP2(Build 150428))" + VALUE "ProductVersion", "(5.1SP2(Build 150429))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index a7e6c98f9a..e081f8b07a 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP2-150428 +Version: 5.1SP2-150429 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 b29112738a..ca7ff4f7e2 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="5.1SP2-150428" +pandora_version="5.1SP2-150429" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index acb7e34d23..16ea28cc9b 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 = 'PC150428'; +$build_version = 'PC150429'; $pandora_version = 'v5.1SP2'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 1daf1e40e0..d9d5efa7f3 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Wed, 29 Apr 2015 09:52:44 +0200 Subject: [PATCH 065/104] Fixed error to generate url for view help, tiquet: #2158 --- pandora_console/operation/netflow/nf_live_view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/operation/netflow/nf_live_view.php b/pandora_console/operation/netflow/nf_live_view.php index e49a09d7cb..9c7f65a367 100644 --- a/pandora_console/operation/netflow/nf_live_view.php +++ b/pandora_console/operation/netflow/nf_live_view.php @@ -357,7 +357,7 @@ echo '
"; echo "
"; } else { - echo ""; + echo ""; echo ""; } From 2f45ccc2bb7502a5c1e3c3fbc35eac03e48d4d47 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Wed, 29 Apr 2015 17:20:49 +0200 Subject: [PATCH 066/104] Fixed diferent errors, tiquet: #2127 --- pandora_agents/win32/bin/util/cdromdrives.vbs | 6 ++++- pandora_agents/win32/bin/util/cpuinfo.vbs | 2 +- pandora_agents/win32/bin/util/diskdrives.vbs | 22 ++++++++++++++----- pandora_agents/win32/bin/util/ifaces.vbs | 10 ++++++++- pandora_agents/win32/bin/util/moboinfo.vbs | 4 ++++ pandora_agents/win32/bin/util/monitors.vbs | 4 ++++ pandora_agents/win32/bin/util/printers.vbs | 22 +++++++++++++------ pandora_agents/win32/bin/util/productID.vbs | 2 +- pandora_agents/win32/bin/util/raminfo.vbs | 8 +++++-- .../win32/bin/util/software_installed.vbs | 8 +++---- pandora_agents/win32/bin/util/userslogged.vbs | 9 ++++++-- .../win32/bin/util/videocardinfo.vbs | 8 +++++-- 12 files changed, 77 insertions(+), 28 deletions(-) diff --git a/pandora_agents/win32/bin/util/cdromdrives.vbs b/pandora_agents/win32/bin/util/cdromdrives.vbs index 8edd6a8172..fc73a2bd32 100644 --- a/pandora_agents/win32/bin/util/cdromdrives.vbs +++ b/pandora_agents/win32/bin/util/cdromdrives.vbs @@ -1,9 +1,13 @@ +' Pandora FMS Agent Inventory Plugin for Microsoft Windows (All platfforms) +' (c) 2015 Borja Sanchez +' This plugin extends agent inventory feature. Only enterprise version +' -------------------------------------------------------------------------- on error resume next 'WMI CD_ROM_drives_info Wscript.StdOut.WriteLine "" Wscript.StdOut.WriteLine "" -Wscript.StdOut.WriteLine "CDROMs" +Wscript.StdOut.WriteLine "CDROM" Wscript.StdOut.WriteLine "" Wscript.StdOut.WriteLine "" diff --git a/pandora_agents/win32/bin/util/cpuinfo.vbs b/pandora_agents/win32/bin/util/cpuinfo.vbs index cd65e2dcfd..4255ec9b77 100644 --- a/pandora_agents/win32/bin/util/cpuinfo.vbs +++ b/pandora_agents/win32/bin/util/cpuinfo.vbs @@ -12,7 +12,7 @@ Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\ Set colCPUs = objWMIService.ExecQuery("Select name,maxclockspeed,caption from Win32_Processor") For Each cpu In colCPUs - Wscript.StdOut.WriteLine "" + Wscript.StdOut.WriteLine "" Next Wscript.StdOut.WriteLine "" diff --git a/pandora_agents/win32/bin/util/diskdrives.vbs b/pandora_agents/win32/bin/util/diskdrives.vbs index 3cba8eb106..57ec380b6e 100644 --- a/pandora_agents/win32/bin/util/diskdrives.vbs +++ b/pandora_agents/win32/bin/util/diskdrives.vbs @@ -1,21 +1,31 @@ +' Pandora FMS Agent Inventory Plugin for Microsoft Windows (All platfforms) +' (c) 2015 Borja Sanchez +' This plugin extends agent inventory feature. Only enterprise version +' -------------------------------------------------------------------------- on error resume next 'WMI disksinfo Wscript.StdOut.WriteLine "" Wscript.StdOut.WriteLine "" -Wscript.StdOut.WriteLine "Disks" +Wscript.StdOut.WriteLine "HD" Wscript.StdOut.WriteLine "" Wscript.StdOut.WriteLine "" strComputer = "." Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") -Set colHDDs = objWMIService.ExecQuery("Select caption,size,serialnumber from win32_diskdrive") +Set colHDDs = objWMIService.ExecQuery("Select * from win32_diskdrive") For Each disco In colHDDs - Wscript.StdOut.WriteLine "" + If ((not IsNull(disco.size)) AND (disco.size > 0)) then + Wscript.StdOut.Write "" + End If Next Wscript.StdOut.WriteLine "" diff --git a/pandora_agents/win32/bin/util/ifaces.vbs b/pandora_agents/win32/bin/util/ifaces.vbs index 45be437a78..d08d23bc5e 100644 --- a/pandora_agents/win32/bin/util/ifaces.vbs +++ b/pandora_agents/win32/bin/util/ifaces.vbs @@ -1,3 +1,7 @@ +' Pandora FMS Agent Inventory Plugin for Microsoft Windows (All platfforms) +' (c) 2015 Borja Sanchez +' This plugin extends agent inventory feature. Only enterprise version +' -------------------------------------------------------------------------- on error resume next 'WMI real interfaces info ' exlusions: @@ -14,7 +18,11 @@ Wscript.StdOut.WriteLine "" strComputer = "." Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") -Set colAdapters = objWMIService.ExecQuery("Select * from Win32_NetworkAdapter Where not PNPDeviceID like 'ROOT%%' and not PNPDeviceID like 'SW%%'") +Set colAdapters = objWMIService.ExecQuery("Select * from Win32_NetworkAdapter " & _ + "Where not PNPDeviceID like 'ROOT%%' " & _ + "and not PNPDeviceID like 'SW%%' " & _ + "and not ServiceName is null " & _ + "and not ServiceName like 'vwifimp' ") For Each iface In colAdapters ' return model MACAddress IPAddress diff --git a/pandora_agents/win32/bin/util/moboinfo.vbs b/pandora_agents/win32/bin/util/moboinfo.vbs index 74753c0db5..5557d894c0 100644 --- a/pandora_agents/win32/bin/util/moboinfo.vbs +++ b/pandora_agents/win32/bin/util/moboinfo.vbs @@ -1,3 +1,7 @@ +' Pandora FMS Agent Inventory Plugin for Microsoft Windows (All platfforms) +' (c) 2015 Borja Sanchez +' This plugin extends agent inventory feature. Only enterprise version +' -------------------------------------------------------------------------- on error resume next 'WMI mobo info diff --git a/pandora_agents/win32/bin/util/monitors.vbs b/pandora_agents/win32/bin/util/monitors.vbs index c767a5a992..7655d18328 100644 --- a/pandora_agents/win32/bin/util/monitors.vbs +++ b/pandora_agents/win32/bin/util/monitors.vbs @@ -1,3 +1,7 @@ +' Pandora FMS Agent Inventory Plugin for Microsoft Windows (All platfforms) +' (c) 2015 Borja Sanchez +' This plugin extends agent inventory feature. Only enterprise version +' -------------------------------------------------------------------------- on error resume next 'WMI monitorsinfo diff --git a/pandora_agents/win32/bin/util/printers.vbs b/pandora_agents/win32/bin/util/printers.vbs index 30c2d080ee..c664ca33b5 100644 --- a/pandora_agents/win32/bin/util/printers.vbs +++ b/pandora_agents/win32/bin/util/printers.vbs @@ -1,3 +1,7 @@ +' Pandora FMS Agent Inventory Plugin for Microsoft Windows (All platfforms) +' (c) 2015 Borja Sanchez +' This plugin extends agent inventory feature. Only enterprise version +' -------------------------------------------------------------------------- On Error Resume Next 'WMI printers attached @@ -33,13 +37,17 @@ For Each objPrinter in colPrinters WScript.stdOut.Write "" end if diff --git a/pandora_agents/win32/bin/util/productID.vbs b/pandora_agents/win32/bin/util/productID.vbs index 65764d9f0d..f25376ef29 100644 --- a/pandora_agents/win32/bin/util/productID.vbs +++ b/pandora_agents/win32/bin/util/productID.vbs @@ -3,7 +3,7 @@ ' (c) 2015 Sancho Lerena ' This plugin extends agent inventory feature. Only enterprise version ' ---------------------------------------------------------------- - +on error resume next Wscript.StdOut.WriteLine "" Wscript.StdOut.WriteLine "" diff --git a/pandora_agents/win32/bin/util/raminfo.vbs b/pandora_agents/win32/bin/util/raminfo.vbs index ee4e1ced98..8750346314 100644 --- a/pandora_agents/win32/bin/util/raminfo.vbs +++ b/pandora_agents/win32/bin/util/raminfo.vbs @@ -1,3 +1,7 @@ +' Pandora FMS Agent Inventory Plugin for Microsoft Windows (All platfforms) +' (c) 2015 Borja Sanchez +' This plugin extends agent inventory feature. Only enterprise version +' -------------------------------------------------------------------------- on error resume next 'WMI raminfo @@ -13,8 +17,8 @@ Set colRAMs = objWMIService.ExecQuery("Select deviceLocator,capacity,speed from For Each ram In colRAMs Wscript.StdOut.WriteLine "" Next diff --git a/pandora_agents/win32/bin/util/software_installed.vbs b/pandora_agents/win32/bin/util/software_installed.vbs index 39ee5fd946..4317a06732 100644 --- a/pandora_agents/win32/bin/util/software_installed.vbs +++ b/pandora_agents/win32/bin/util/software_installed.vbs @@ -1,10 +1,8 @@ -' -' Windows information retriever: Software Installed -' -' WMI/REGISTRY based +' Pandora FMS Agent Inventory Plugin for Microsoft Windows (All platfforms) ' (c) 2015 Sancho Lerena ' (c) 2015 Borja Sanchez -'-------------------------------------------------------- +' This plugin extends agent inventory feature. Only enterprise version +' -------------------------------------------------------------------------- on error resume next Class ObjectList diff --git a/pandora_agents/win32/bin/util/userslogged.vbs b/pandora_agents/win32/bin/util/userslogged.vbs index 5251f23573..fcf810015e 100644 --- a/pandora_agents/win32/bin/util/userslogged.vbs +++ b/pandora_agents/win32/bin/util/userslogged.vbs @@ -1,3 +1,7 @@ +' Pandora FMS Agent Inventory Plugin for Microsoft Windows (All platfforms) +' (c) 2015 Borja Sanchez +' This plugin extends agent inventory feature. Only enterprise version +' -------------------------------------------------------------------------- on error resume next ' Lista todos los usuarios del equipo que han iniciado procesos @@ -57,8 +61,9 @@ Wscript.StdOut.WriteLine "" For Each usuario in loggedUsers - Wscript.StdOut.WriteLine "" + Wscript.StdOut.WriteLine "" next diff --git a/pandora_agents/win32/bin/util/videocardinfo.vbs b/pandora_agents/win32/bin/util/videocardinfo.vbs index e7766c90ba..720389f4c7 100644 --- a/pandora_agents/win32/bin/util/videocardinfo.vbs +++ b/pandora_agents/win32/bin/util/videocardinfo.vbs @@ -1,9 +1,13 @@ +' Pandora FMS Agent Inventory Plugin for Microsoft Windows (All platfforms) +' (c) 2015 Borja Sanchez +' This plugin extends agent inventory feature. Only enterprise version +' -------------------------------------------------------------------------- on error resume next 'WMI video_card_info Wscript.StdOut.WriteLine "" Wscript.StdOut.WriteLine "" -Wscript.StdOut.WriteLine "VideoCards" +Wscript.StdOut.WriteLine "Video" Wscript.StdOut.WriteLine "" Wscript.StdOut.WriteLine "" @@ -13,7 +17,7 @@ Set colVideoCards = objWMIService.ExecQuery("Select caption,AdapterRAM,PNPDevice For Each vcard In colVideoCards Wscript.StdOut.WriteLine "" Next From f5e01b62b2f7aa069ae65a3454f5697ee43134a9 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 30 Apr 2015 00:01:35 +0200 Subject: [PATCH 067/104] 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/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_console/pandoradb_data.sql | 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/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index e3febe4dca..2ba9238891 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP2-150429 +Version: 5.1SP2-150430 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 308503db6f..c12a18cc10 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="5.1SP2-150429" +pandora_version="5.1SP2-150430" 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 914c8bb0cf..33b9411f3a 100644 --- 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 => '5.1SP2'; -use constant AGENT_BUILD => '150429'; +use constant AGENT_BUILD => '150430'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index ae1f4acdf7..6532bb36de 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 5.1SP2 -%define release 150429 +%define release 150430 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 4668c48d68..92c167825d 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 5.1SP2 -%define release 150429 +%define release 150430 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 00c7b6c827..7206fd1d9d 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150429} +{150430} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 4406e250e7..34e2cbec84 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 ("5.1SP2(Build 150429)") +#define PANDORA_VERSION ("5.1SP2(Build 150430)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 756c45569c..cc8a792966 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", "(5.1SP2(Build 150429))" + VALUE "ProductVersion", "(5.1SP2(Build 150430))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index e081f8b07a..9c2383e198 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP2-150429 +Version: 5.1SP2-150430 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 ca7ff4f7e2..1855e6ab43 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="5.1SP2-150429" +pandora_version="5.1SP2-150430" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 16ea28cc9b..18ed816bd7 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 = 'PC150429'; +$build_version = 'PC150430'; $pandora_version = 'v5.1SP2'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index d9d5efa7f3..2dc7d84242 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Thu, 30 Apr 2015 08:46:41 +0200 Subject: [PATCH 068/104] Delete option, in home screen, only in insterprise servers. Tiquet: #2128 --- pandora_console/operation/users/user_edit.php | 1 - 1 file changed, 1 deletion(-) diff --git a/pandora_console/operation/users/user_edit.php b/pandora_console/operation/users/user_edit.php index bc5ff394c4..efbf796252 100644 --- a/pandora_console/operation/users/user_edit.php +++ b/pandora_console/operation/users/user_edit.php @@ -282,7 +282,6 @@ if (!$meta) { $data[1] = __('Home screen'). ui_print_help_tip(__('User can customize the home page. By default, will display \'Agent Detail\'. Example: Select \'Other\' and type sec=estado&sec2=operation/agentes/estado_agente to show agent detail view'), true); $values = array ( 'Default' =>__('Default'), - 'Dashboard'=>__('Dashboard'), 'Visual console'=>__('Visual console'), 'Event list'=>__('Event list'), 'Group view'=>__('Group view'), From 27420a08682f7bd885bb1839b9cb9ddb8d5ac8a1 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Thu, 30 Apr 2015 13:36:58 +0200 Subject: [PATCH 069/104] Execute all previously run actions when an alert recovers. --- pandora_server/lib/PandoraFMS/Core.pm | 61 +++++++++++++++++--------- pandora_server/lib/PandoraFMS/Tools.pm | 6 +++ 2 files changed, 47 insertions(+), 20 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index d467287097..fffe355120 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -624,15 +624,26 @@ sub pandora_execute_alert ($$$$$$$$;$) { # Simple alert if (defined ($alert->{'id_template_module'})) { - @actions = get_db_rows ($dbh, 'SELECT *, talert_template_module_actions.id AS id_alert_template_module_actions - FROM talert_template_module_actions, talert_actions, talert_commands - WHERE talert_template_module_actions.id_alert_action = talert_actions.id - AND talert_actions.id_alert_command = talert_commands.id - AND talert_template_module_actions.id_alert_template_module = ? - AND ((fires_min = 0 AND fires_max = 0) - OR (fires_min <= fires_max AND ? >= fires_min AND ? <= fires_max) - OR (fires_min > fires_max AND ? >= fires_min))', - $alert->{'id_template_module'}, $alert->{'times_fired'}, $alert->{'times_fired'}, $alert->{'times_fired'}); + if ($alert_mode == RECOVERED_ALERT) { + @actions = get_db_rows ($dbh, 'SELECT *, talert_template_module_actions.id AS id_alert_template_module_actions + FROM talert_template_module_actions, talert_actions, talert_commands + WHERE talert_template_module_actions.id_alert_action = talert_actions.id + AND talert_actions.id_alert_command = talert_commands.id + AND talert_template_module_actions.id_alert_template_module = ? + AND ((fires_min = 0 AND fires_max = 0) + OR ? >= fires_min)', + $alert->{'id_template_module'}, $alert->{'times_fired'}); + } else { + @actions = get_db_rows ($dbh, 'SELECT *, talert_template_module_actions.id AS id_alert_template_module_actions + FROM talert_template_module_actions, talert_actions, talert_commands + WHERE talert_template_module_actions.id_alert_action = talert_actions.id + AND talert_actions.id_alert_command = talert_commands.id + AND talert_template_module_actions.id_alert_template_module = ? + AND ((fires_min = 0 AND fires_max = 0) + OR (fires_min <= fires_max AND ? >= fires_min AND ? <= fires_max) + OR (fires_min > fires_max AND ? >= fires_min))', + $alert->{'id_template_module'}, $alert->{'times_fired'}, $alert->{'times_fired'}, $alert->{'times_fired'}); + } # Get default action if ($#actions < 0) { @@ -644,15 +655,25 @@ sub pandora_execute_alert ($$$$$$$$;$) { } # Event alert else { - @actions = get_db_rows ($dbh, 'SELECT * FROM tevent_alert_action, talert_actions, talert_commands - WHERE tevent_alert_action.id_alert_action = talert_actions.id - AND talert_actions.id_alert_command = talert_commands.id - AND tevent_alert_action.id_event_alert = ? - AND ((fires_min = 0 AND fires_max = 0) - OR (fires_min <= fires_max AND ? >= fires_min AND ? <= fires_max) - OR (fires_min > fires_max AND ? >= fires_min))', - $alert->{'id'}, $alert->{'times_fired'}, $alert->{'times_fired'}, $alert->{'times_fired'}); - + if ($alert_mode == RECOVERED_ALERT) { + @actions = get_db_rows ($dbh, 'SELECT * FROM tevent_alert_action, talert_actions, talert_commands + WHERE tevent_alert_action.id_alert_action = talert_actions.id + AND talert_actions.id_alert_command = talert_commands.id + AND tevent_alert_action.id_event_alert = ? + AND ((fires_min = 0 AND fires_max = 0) + OR ? >= fires_min)', + $alert->{'id'}, $alert->{'times_fired'}); + } else { + @actions = get_db_rows ($dbh, 'SELECT * FROM tevent_alert_action, talert_actions, talert_commands + WHERE tevent_alert_action.id_alert_action = talert_actions.id + AND talert_actions.id_alert_command = talert_commands.id + AND tevent_alert_action.id_event_alert = ? + AND ((fires_min = 0 AND fires_max = 0) + OR (fires_min <= fires_max AND ? >= fires_min AND ? <= fires_max) + OR (fires_min > fires_max AND ? >= fires_min))', + $alert->{'id'}, $alert->{'times_fired'}, $alert->{'times_fired'}, $alert->{'times_fired'}); + } + # Get default action if ($#actions < 0) { @actions = get_db_rows ($dbh, 'SELECT * FROM talert_actions, talert_commands @@ -710,7 +731,7 @@ sub pandora_execute_alert ($$$$$$$$;$) { if ($event_generated == 0) { #If we've spotted an alert recovered, we set the new event's severity to 2 (NORMAL), otherwise the original value is maintained. - my ($text, $event, $severity) = ($alert_mode == 0) ? ('recovered', 'alert_recovered', 2) : ('fired', 'alert_fired', $alert->{'priority'}); + my ($text, $event, $severity) = ($alert_mode == RECOVERED_ALERT) ? ('recovered', 'alert_recovered', 2) : ('fired', 'alert_fired', $alert->{'priority'}); pandora_event ($pa_config, "Alert $text (" . safe_output($alert->{'name'}) . ") " . (defined ($module) ? 'assigned to ('. safe_output($module->{'nombre'}) . ")" : ""), (defined ($agent) ? $agent->{'id_grupo'} : 0), (defined ($agent) ? $agent->{'id_agente'} : 0), $severity, (defined ($alert->{'id_template_module'}) ? $alert->{'id_template_module'} : 0), @@ -762,7 +783,7 @@ sub pandora_execute_action ($$$$$$$$$;$) { } # Recovery fields, thanks to Kato Atsushi - if ($alert_mode == 0) { + 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; diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index d01bbcfbd5..33d5d06b29 100644 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -57,6 +57,8 @@ our @EXPORT = qw( ICMPSERVER SNMPSERVER $DEVNULL + RECOVERED_ALERT + FIRED_ALERT cron_get_closest_in_range cron_next_execution cron_next_execution_date @@ -106,6 +108,10 @@ use constant EVENTSERVER => 10; use constant ICMPSERVER => 11; use constant SNMPSERVER => 12; +# Alert modes +use constant RECOVERED_ALERT => 0; +use constant FIRED_ALERT => 1; + # /dev/null our $DEVNULL = ($^O eq 'MSWin32') ? '/Nul' : '/dev/null'; From 6f0d4ba1f9247d3894da754ea8d3585311877acd Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Thu, 30 Apr 2015 13:44:16 +0200 Subject: [PATCH 070/104] Fixed error when read file in windows, when path containt space, tiquet: #2166 and #2114 (cherry picked from commit 70bca63bd6936ba1ae1a71f377b0d063b00922f7) --- pandora_console/include/functions_config.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 4a6daf68ec..6c6da0a993 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -1299,8 +1299,8 @@ function config_check () { } // Get remote file dir. - $remote_config = db_get_value_filter('value', - 'tconfig', array('token' => 'remote_config')); + $remote_config = io_safe_output(db_get_value_filter('value', + 'tconfig', array('token' => 'remote_config'))); if (enterprise_installed()) { @@ -1362,7 +1362,7 @@ function config_check () { 'no_close' => true, 'force_style' => 'color: #000000 !important'), '', true); } - $fontpath = db_get_value_filter('value', 'tconfig', array('token' => 'fontpath')); + $fontpath = io_safe_output(db_get_value_filter('value', 'tconfig', array('token' => 'fontpath'))); if (($fontpath == "") OR (!file_exists ($fontpath))) { $config["alert_cnt"]++; $_SESSION["alert_msg"] .= ui_print_error_message( From e1e64b1a54c58713ff93319f6a15a11ffb355546 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Thu, 30 Apr 2015 16:48:10 +0200 Subject: [PATCH 071/104] Fixed the SLA form editor for to set graphs. TICKET: #2172 --- pandora_console/godmode/reporting/reporting_builder.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 96784421f1..c8c933294c 100644 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -819,6 +819,8 @@ switch ($action) { $values['top_n'] = get_parameter('combo_sla_sort_options',0); $values['top_n_value'] = get_parameter('quantity'); $values['text'] = get_parameter('text'); + $values['show_graph'] = get_parameter('combo_graph_options'); + $good_format = true; break; case 'inventory': @@ -1053,6 +1055,8 @@ switch ($action) { $values['top_n'] = get_parameter('combo_sla_sort_options',0); $values['top_n_value'] = get_parameter('quantity'); $values['text'] = get_parameter('text'); + $values['show_graph'] = get_parameter('combo_graph_options'); + $good_format = true; break; case 'inventory': From 812737c2a75a37618452bce26a6be6225ffcec4d Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Thu, 30 Apr 2015 17:25:29 +0200 Subject: [PATCH 072/104] Fixed the size of the charts for SLA when it is showed in a dashboard. TICKET: #2173 --- .../include/functions_reporting.php | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 4c0bc895c3..6cc2622f66 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -3648,6 +3648,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f $sizem = '1.5'; $sizgraph_w = '450'; $sizgraph_h = '100'; + + $sla_width = '250'; } else { $sizem = '3'; @@ -4508,9 +4510,21 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f $dataslice[0] .= "
"; $dataslice[0] .= modules_get_agentmodule_name ($sla['id_agent_module']); - $dataslice[1] = graph_sla_slicebar ($sla['id_agent_module'], $content['period'], - $sla['sla_min'], $sla['sla_max'], $report['datetime'], $content, $content['time_from'], - $content['time_to'], 650, 25, $urlImage, 1, false, false); + $dataslice[1] = graph_sla_slicebar ( + $sla['id_agent_module'], + $content['period'], + $sla['sla_min'], + $sla['sla_max'], + $report['datetime'], + $content, + $content['time_from'], + $content['time_to'], + $sla_width, + 25, + $urlImage, + 1, + false, + false); array_push ($tableslice->data, $dataslice); } From a13ea780fcdbcd2d7bc2395fc0d07df4a82b86e0 Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 1 May 2015 00:01:32 +0200 Subject: [PATCH 073/104] 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/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_console/pandoradb_data.sql | 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/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 2ba9238891..a1aa103a25 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP2-150430 +Version: 5.1SP2-150501 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 c12a18cc10..7b4ad1d4dc 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="5.1SP2-150430" +pandora_version="5.1SP2-150501" 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 33b9411f3a..b645f309cd 100644 --- 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 => '5.1SP2'; -use constant AGENT_BUILD => '150430'; +use constant AGENT_BUILD => '150501'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 6532bb36de..7c98da14eb 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 5.1SP2 -%define release 150430 +%define release 150501 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 92c167825d..28b9754cf6 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 5.1SP2 -%define release 150430 +%define release 150501 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 7206fd1d9d..204670f85d 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150430} +{150501} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 34e2cbec84..0042800eb3 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 ("5.1SP2(Build 150430)") +#define PANDORA_VERSION ("5.1SP2(Build 150501)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index cc8a792966..147c62468f 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", "(5.1SP2(Build 150430))" + VALUE "ProductVersion", "(5.1SP2(Build 150501))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 9c2383e198..4c313f6ddd 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP2-150430 +Version: 5.1SP2-150501 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 1855e6ab43..5f105f51db 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="5.1SP2-150430" +pandora_version="5.1SP2-150501" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 18ed816bd7..8fceeaf0b6 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 = 'PC150430'; +$build_version = 'PC150501'; $pandora_version = 'v5.1SP2'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 2dc7d84242..4d0615fa18 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Sat, 2 May 2015 00:01:29 +0200 Subject: [PATCH 074/104] 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/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_console/pandoradb_data.sql | 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/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index a1aa103a25..643b828755 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP2-150501 +Version: 5.1SP2-150502 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 7b4ad1d4dc..6405072aaf 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="5.1SP2-150501" +pandora_version="5.1SP2-150502" 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 b645f309cd..40cbf74b6b 100644 --- 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 => '5.1SP2'; -use constant AGENT_BUILD => '150501'; +use constant AGENT_BUILD => '150502'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 7c98da14eb..e2bc0379fb 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 5.1SP2 -%define release 150501 +%define release 150502 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 28b9754cf6..b092d74715 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 5.1SP2 -%define release 150501 +%define release 150502 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 204670f85d..88359dfe3c 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150501} +{150502} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 0042800eb3..772949d1f1 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 ("5.1SP2(Build 150501)") +#define PANDORA_VERSION ("5.1SP2(Build 150502)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 147c62468f..38b744348b 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", "(5.1SP2(Build 150501))" + VALUE "ProductVersion", "(5.1SP2(Build 150502))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 4c313f6ddd..6dbec237f0 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP2-150501 +Version: 5.1SP2-150502 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 5f105f51db..142750943c 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="5.1SP2-150501" +pandora_version="5.1SP2-150502" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 8fceeaf0b6..4d88068e05 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 = 'PC150501'; +$build_version = 'PC150502'; $pandora_version = 'v5.1SP2'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 4d0615fa18..b94c816d35 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Sun, 3 May 2015 00:01:29 +0200 Subject: [PATCH 075/104] 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/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_console/pandoradb_data.sql | 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/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 643b828755..6478f87037 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP2-150502 +Version: 5.1SP2-150503 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 6405072aaf..abb2552470 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="5.1SP2-150502" +pandora_version="5.1SP2-150503" 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 40cbf74b6b..267d3c9d1d 100644 --- 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 => '5.1SP2'; -use constant AGENT_BUILD => '150502'; +use constant AGENT_BUILD => '150503'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index e2bc0379fb..5b8927a44d 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 5.1SP2 -%define release 150502 +%define release 150503 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 b092d74715..1a5ef62653 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 5.1SP2 -%define release 150502 +%define release 150503 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 88359dfe3c..a29dbb3cc6 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150502} +{150503} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 772949d1f1..41bc8914d3 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 ("5.1SP2(Build 150502)") +#define PANDORA_VERSION ("5.1SP2(Build 150503)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 38b744348b..29fc84b10f 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", "(5.1SP2(Build 150502))" + VALUE "ProductVersion", "(5.1SP2(Build 150503))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 6dbec237f0..8f4dcbe1fa 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP2-150502 +Version: 5.1SP2-150503 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 142750943c..c85b5278dc 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="5.1SP2-150502" +pandora_version="5.1SP2-150503" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 4d88068e05..b6cc66694a 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 = 'PC150502'; +$build_version = 'PC150503'; $pandora_version = 'v5.1SP2'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index b94c816d35..8bd01db393 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Mon, 4 May 2015 00:01:31 +0200 Subject: [PATCH 076/104] 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/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_console/pandoradb_data.sql | 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/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 6478f87037..0d319ca84d 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP2-150503 +Version: 5.1SP2-150504 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 abb2552470..4ded436b9d 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="5.1SP2-150503" +pandora_version="5.1SP2-150504" 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 267d3c9d1d..244620b1d2 100644 --- 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 => '5.1SP2'; -use constant AGENT_BUILD => '150503'; +use constant AGENT_BUILD => '150504'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 5b8927a44d..7e1819f3aa 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 5.1SP2 -%define release 150503 +%define release 150504 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 1a5ef62653..cd88e4cbc8 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 5.1SP2 -%define release 150503 +%define release 150504 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index a29dbb3cc6..8dbea89039 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150503} +{150504} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 41bc8914d3..8d0aedf613 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 ("5.1SP2(Build 150503)") +#define PANDORA_VERSION ("5.1SP2(Build 150504)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 29fc84b10f..158fc769a0 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", "(5.1SP2(Build 150503))" + VALUE "ProductVersion", "(5.1SP2(Build 150504))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 8f4dcbe1fa..b2bf700dd6 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP2-150503 +Version: 5.1SP2-150504 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 c85b5278dc..0127c7227d 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="5.1SP2-150503" +pandora_version="5.1SP2-150504" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index b6cc66694a..1b76f28b76 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 = 'PC150503'; +$build_version = 'PC150504'; $pandora_version = 'v5.1SP2'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 8bd01db393..917763e0ba 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Mon, 4 May 2015 12:44:46 +0200 Subject: [PATCH 077/104] Add option to change image when is service and fixed error when updated data. Tiquet: #2175 (cherry picked from commit 19abac33c1ccf43445531a5c8ebf30575abae299) --- .../godmode/reporting/visual_console_builder.elements.php | 1 + pandora_console/godmode/reporting/visual_console_builder.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/reporting/visual_console_builder.elements.php b/pandora_console/godmode/reporting/visual_console_builder.elements.php index 474190ee7d..2e45246063 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.elements.php +++ b/pandora_console/godmode/reporting/visual_console_builder.elements.php @@ -188,6 +188,7 @@ foreach ($layoutDatas as $layoutData) { case STATIC_GRAPH: case ICON: case GROUP_ITEM: + case SERVICE: $table->data[$i + 1][1] = html_print_select ($images_list, 'image_' . $idLayoutData, $layoutData['image'], '', diff --git a/pandora_console/godmode/reporting/visual_console_builder.php b/pandora_console/godmode/reporting/visual_console_builder.php index 44c170c361..6112d845cb 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.php +++ b/pandora_console/godmode/reporting/visual_console_builder.php @@ -233,7 +233,7 @@ switch ($activeTab) { $values['label_color'] = get_parameter('label_color_' . $id, '#000000'); if (enterprise_installed()) { - enterprise_visual_map_update_action_from_list_elements($type, $values); + enterprise_visual_map_update_action_from_list_elements($type, $values, $id); } db_process_sql_update('tlayout_data', $values, array('id' => $id)); From d393a4033c6c0986e8f1e32cf4f01046e4508599 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Mon, 4 May 2015 13:45:49 +0200 Subject: [PATCH 078/104] add new lines to include new file in instalation agent in windows. tiquet: #2127 (cherry picked from commit a12114048bd4b224716fe4624735857c56af272c) --- pandora_agents/win32/bin/pandora_agent.conf | 17 ++++++++++++- .../win32/bin/util/architecture.vbs | 25 +++++++++++++++++++ pandora_agents/win32/bin/util/cpuinfo.vbs | 4 +++ pandora_agents/win32/bin/util/domain.vbs | 25 +++++++++++++++++++ pandora_agents/win32/bin/util/osversion.vbs | 25 +++++++++++++++++++ 5 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 pandora_agents/win32/bin/util/architecture.vbs create mode 100644 pandora_agents/win32/bin/util/domain.vbs create mode 100644 pandora_agents/win32/bin/util/osversion.vbs diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index a19f4be19b..d86812ed24 100644 --- a/pandora_agents/win32/bin/pandora_agent.conf +++ b/pandora_agents/win32/bin/pandora_agent.conf @@ -255,7 +255,22 @@ module_end module_begin module_plugin cscript.exe //B "%PROGRAMFILES%\Pandora_Agent\util\productID.vbs" module_crontab * 12-15 * * 1 -module_end +module_end + +module_begin +module_plugin cscript.exe //B "%PROGRAMFILES%\Pandora_Agent\util\architecture.vbs" +module_crontab * 12-15 * * 1 +module_end + +module_begin +module_plugin cscript.exe //B "%PROGRAMFILES%\Pandora_Agent\util\domain.vbs" +module_crontab * 12-15 * * 1 +module_end + +module_begin +module_plugin cscript.exe //B "%PROGRAMFILES%\Pandora_Agent\util\osversion.vbs" +module_crontab * 12-15 * * 1 +module_end # ---------------------------------------------------------------------------------------------------- # This samples below need to be reconfigured and uncommented. Please read documentation diff --git a/pandora_agents/win32/bin/util/architecture.vbs b/pandora_agents/win32/bin/util/architecture.vbs new file mode 100644 index 0000000000..7a075979a9 --- /dev/null +++ b/pandora_agents/win32/bin/util/architecture.vbs @@ -0,0 +1,25 @@ +' Pandora FMS Agent Inventory Plugin for Microsoft Windows (All platfforms) +' (c) 2015 Borja Sanchez +' This plugin extends agent inventory feature. Only enterprise version +' -------------------------------------------------------------------------- +on error resume next +'WMI architecture + + +Wscript.StdOut.WriteLine "" +Wscript.StdOut.WriteLine "" +Wscript.StdOut.WriteLine "Architecture" +Wscript.StdOut.WriteLine "" +Wscript.StdOut.WriteLine "" + +strComputer = "." +Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") +Set cols = objWMIService.ExecQuery("Select osarchitecture from Win32_OperatingSystem") + +For Each data In cols + Wscript.StdOut.WriteLine "" +Next + +Wscript.StdOut.WriteLine "" +Wscript.StdOut.WriteLine "" +Wscript.StdOut.WriteLine "" diff --git a/pandora_agents/win32/bin/util/cpuinfo.vbs b/pandora_agents/win32/bin/util/cpuinfo.vbs index 4255ec9b77..219ca229ed 100644 --- a/pandora_agents/win32/bin/util/cpuinfo.vbs +++ b/pandora_agents/win32/bin/util/cpuinfo.vbs @@ -1,3 +1,7 @@ +' Pandora FMS Agent Inventory Plugin for Microsoft Windows (All platfforms) +' (c) 2015 Borja Sanchez +' This plugin extends agent inventory feature. Only enterprise version +' -------------------------------------------------------------------------- on error resume next 'WMI cpuinfo diff --git a/pandora_agents/win32/bin/util/domain.vbs b/pandora_agents/win32/bin/util/domain.vbs new file mode 100644 index 0000000000..6cd612cc9c --- /dev/null +++ b/pandora_agents/win32/bin/util/domain.vbs @@ -0,0 +1,25 @@ +' Pandora FMS Agent Inventory Plugin for Microsoft Windows (All platfforms) +' (c) 2015 Borja Sanchez +' This plugin extends agent inventory feature. Only enterprise version +' -------------------------------------------------------------------------- +on error resume next +'WMI domain/workgroup info + + +Wscript.StdOut.WriteLine "" +Wscript.StdOut.WriteLine "" +Wscript.StdOut.WriteLine "Domain" +Wscript.StdOut.WriteLine "" +Wscript.StdOut.WriteLine "" + +strComputer = "." +Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") +Set colItems = objWMIService.ExecQuery("SELECT Domain FROM Win32_ComputerSystem") +For Each objItem In colItems + WScript.StdOut.WriteLine "" +Next + + +Wscript.StdOut.WriteLine "" +Wscript.StdOut.WriteLine "" +Wscript.StdOut.WriteLine "" diff --git a/pandora_agents/win32/bin/util/osversion.vbs b/pandora_agents/win32/bin/util/osversion.vbs new file mode 100644 index 0000000000..c44734748a --- /dev/null +++ b/pandora_agents/win32/bin/util/osversion.vbs @@ -0,0 +1,25 @@ +' Pandora FMS Agent Inventory Plugin for Microsoft Windows (All platfforms) +' (c) 2015 Borja Sanchez +' This plugin extends agent inventory feature. Only enterprise version +' -------------------------------------------------------------------------- +on error resume next +'WMI OS version + + +Wscript.StdOut.WriteLine "" +Wscript.StdOut.WriteLine "" +Wscript.StdOut.WriteLine "OSVersion" +Wscript.StdOut.WriteLine "" +Wscript.StdOut.WriteLine "" + +strComputer = "." +Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") +Set cols = objWMIService.ExecQuery("SELECT version from win32_operatingsystem") + +For Each data In cols + Wscript.StdOut.WriteLine "" +Next + +Wscript.StdOut.WriteLine "" +Wscript.StdOut.WriteLine "" +Wscript.StdOut.WriteLine "" From 0cbb8e9643a9d95f8ae3ae9ae032d971da3da11f Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Mon, 4 May 2015 16:34:25 +0200 Subject: [PATCH 079/104] fixed distance to show box data to graph in agent view, tiquet: #2161 (cherry picked from commit c2ce4fddf41c6d703afd7af6880ef359119e31b0) --- pandora_console/include/graphs/flot/pandora.flot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 5719af4646..ac537e89a1 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -511,8 +511,8 @@ function pandoraFlotSlicebar(graph_id, values, datacolor, labels, legend, acumul $('#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/2)+'px'); - $('#extra_'+graph_id).css('top',plot.offset().top-extra_height-5+'px'); + $('#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(); } }); @@ -860,7 +860,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, $('#timestamp_'+graph_id).text(labels_long[j]); } - $('#timestamp_'+graph_id).css('top', plot.offset().top-$('#timestamp_'+graph_id).height()*1.5); + //$('#timestamp_'+graph_id).css('top', plot.offset().top-$('#timestamp_'+graph_id).height()*1.5); var timesize = $('#timestamp_'+graph_id).width(); From d77b6668bef60fc33b8b28cf4ee1edaacdd48558 Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 5 May 2015 00:01:34 +0200 Subject: [PATCH 080/104] 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/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_console/pandoradb_data.sql | 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/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 0d319ca84d..7fb5377467 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP2-150504 +Version: 5.1SP2-150505 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 4ded436b9d..b2fde815b7 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="5.1SP2-150504" +pandora_version="5.1SP2-150505" 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 244620b1d2..af287308b1 100644 --- 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 => '5.1SP2'; -use constant AGENT_BUILD => '150504'; +use constant AGENT_BUILD => '150505'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 7e1819f3aa..d716c34d9c 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 5.1SP2 -%define release 150504 +%define release 150505 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 cd88e4cbc8..89e09a2130 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 5.1SP2 -%define release 150504 +%define release 150505 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 8dbea89039..b5da066786 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150504} +{150505} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 8d0aedf613..85430bcf6a 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 ("5.1SP2(Build 150504)") +#define PANDORA_VERSION ("5.1SP2(Build 150505)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 158fc769a0..155d676baf 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", "(5.1SP2(Build 150504))" + VALUE "ProductVersion", "(5.1SP2(Build 150505))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index b2bf700dd6..4dd25153db 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP2-150504 +Version: 5.1SP2-150505 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 0127c7227d..0c9a4c1dc6 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="5.1SP2-150504" +pandora_version="5.1SP2-150505" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 1b76f28b76..d574858f15 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 = 'PC150504'; +$build_version = 'PC150505'; $pandora_version = 'v5.1SP2'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 917763e0ba..08b8bc42c9 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Mon, 4 May 2015 17:06:58 +0200 Subject: [PATCH 081/104] Removed debug messages. (cherry picked from commit af118fd4b09a3d7f91971d0f4fc53a15849f1aa4) --- pandora_agents/unix/pandora_agent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index af287308b1..6eced35924 100644 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1223,7 +1223,7 @@ sub guess_os_version ($) { ################################################################################ sub exec_module ($) { my $module = shift; -print "THREAD " . threads->tid() . " EXECUTING MODULE " . $module->{'name'} . "\n"; + # Need something to execute if ($module->{'func'} == 0) { $ThreadSem->up () if (defined ($ThreadSem) && $Conf{'agent_threads'} > 1); From 28a7b8d0d28cc9b6d8e46184244e9b64efca0221 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 6 May 2015 00:01:31 +0200 Subject: [PATCH 082/104] 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/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_console/pandoradb_data.sql | 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/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 7fb5377467..2ba0a5b434 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP2-150505 +Version: 5.1SP2-150506 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 b2fde815b7..0d5744c480 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="5.1SP2-150505" +pandora_version="5.1SP2-150506" 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 6eced35924..a0d9d3e363 100644 --- 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 => '5.1SP2'; -use constant AGENT_BUILD => '150505'; +use constant AGENT_BUILD => '150506'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index d716c34d9c..fe815963c8 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 5.1SP2 -%define release 150505 +%define release 150506 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 89e09a2130..77d8d7f71e 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 5.1SP2 -%define release 150505 +%define release 150506 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index b5da066786..b1efa45b82 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150505} +{150506} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 85430bcf6a..b067c8c049 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 ("5.1SP2(Build 150505)") +#define PANDORA_VERSION ("5.1SP2(Build 150506)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 155d676baf..2b45f845d9 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", "(5.1SP2(Build 150505))" + VALUE "ProductVersion", "(5.1SP2(Build 150506))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 4dd25153db..f2302b1735 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP2-150505 +Version: 5.1SP2-150506 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 0c9a4c1dc6..d4c75a1f76 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="5.1SP2-150505" +pandora_version="5.1SP2-150506" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index d574858f15..2e611d6646 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 = 'PC150505'; +$build_version = 'PC150506'; $pandora_version = 'v5.1SP2'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 08b8bc42c9..a0346f0028 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Wed, 6 May 2015 13:03:34 +0200 Subject: [PATCH 083/104] Add unit to legend left in graph of interface information, tiquet: #2194 --- pandora_console/include/functions_graph.php | 2 +- .../operation/agentes/interface_traffic_graph_win.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 557c732d43..5c9a3852f7 100755 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -1382,7 +1382,7 @@ function graphic_combined_module ($module_list, $weight_list, $period, $height, $color, $module_name_list, $long_index, ui_get_full_url("images/image_problem.opaque.png", false, false, false), "", "", $water_mark, $config['fontpath'], $fixed_font_size, - "", $ttl, $homeurl, $background_color); + $unit, $ttl, $homeurl, $background_color); break; case CUSTOM_GRAPH_STACKED_LINE: return stacked_line_graph($flash_charts, $graph_values, diff --git a/pandora_console/operation/agentes/interface_traffic_graph_win.php b/pandora_console/operation/agentes/interface_traffic_graph_win.php index 2806369664..4ee6dae6b0 100644 --- a/pandora_console/operation/agentes/interface_traffic_graph_win.php +++ b/pandora_console/operation/agentes/interface_traffic_graph_win.php @@ -167,7 +167,7 @@ $interface_traffic_modules = array( array_values($interface_traffic_modules), $config['homeurl'], array_keys($interface_traffic_modules), - array_fill(0, count($interface_traffic_modules),"bytes/s"), + array("bytes"), false); echo '
'; From 6cf4da8d8ae086cb6bde17e8ca0c081308fbb88f Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Wed, 6 May 2015 13:08:30 +0200 Subject: [PATCH 084/104] Fixed error when load data in action alert in manage alerts, tiquet: #2088 --- pandora_console/godmode/alerts/configure_alert_action.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/alerts/configure_alert_action.php b/pandora_console/godmode/alerts/configure_alert_action.php index c059bf898d..10738a7e2b 100644 --- a/pandora_console/godmode/alerts/configure_alert_action.php +++ b/pandora_console/godmode/alerts/configure_alert_action.php @@ -286,7 +286,7 @@ $(document).ready (function () { else { $('#table_macros-field' + i).replaceWith(field_row); - if (old_value != '' && old_recovery_value != ''){ + if (old_value != '' || old_recovery_value != ''){ $("[name=field" + i + "_value]").val(old_value); $("[name=field" + i + "_recovery_value]").val(old_recovery_value); } From c73cb13eeeb66d4e4f88b7823c736f91cc3a99c8 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 7 May 2015 00:01:33 +0200 Subject: [PATCH 085/104] 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/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_console/pandoradb_data.sql | 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/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 2ba0a5b434..477d304bfb 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP2-150506 +Version: 5.1SP2-150507 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 0d5744c480..3ed905b719 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="5.1SP2-150506" +pandora_version="5.1SP2-150507" 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 a0d9d3e363..b6c7a410b6 100644 --- 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 => '5.1SP2'; -use constant AGENT_BUILD => '150506'; +use constant AGENT_BUILD => '150507'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index fe815963c8..26ad85a4f9 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 5.1SP2 -%define release 150506 +%define release 150507 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 77d8d7f71e..96566b4c80 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 5.1SP2 -%define release 150506 +%define release 150507 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index b1efa45b82..f10c06cc28 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150506} +{150507} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index b067c8c049..5c41254305 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 ("5.1SP2(Build 150506)") +#define PANDORA_VERSION ("5.1SP2(Build 150507)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 2b45f845d9..c30b77db1d 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", "(5.1SP2(Build 150506))" + VALUE "ProductVersion", "(5.1SP2(Build 150507))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index f2302b1735..d86a38ae17 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP2-150506 +Version: 5.1SP2-150507 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 d4c75a1f76..f74481a7c1 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="5.1SP2-150506" +pandora_version="5.1SP2-150507" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 2e611d6646..bc61916d38 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 = 'PC150506'; +$build_version = 'PC150507'; $pandora_version = 'v5.1SP2'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index a0346f0028..613e802115 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Tue, 28 Apr 2015 13:36:39 +0200 Subject: [PATCH 086/104] Change lines for start quickly installation,tiquet: #2157 (cherry picked from commit 69affb857ecd17606288c2f434e8950e18e5ba3a) (cherry picked from commit c919c294d6182eb4a2693aa71634b0f595b3d865) --- pandora_agents/win32/bin/pandora_agent.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index d86812ed24..a15cb07fa0 100644 --- a/pandora_agents/win32/bin/pandora_agent.conf +++ b/pandora_agents/win32/bin/pandora_agent.conf @@ -19,7 +19,7 @@ server_ip $ServerIP$ server_path /var/spool/pandora/data_in -temporal "$AgentTemp$" +temporal "C:\Program Files\pandora_agent\temp" #include "C:\Archivos de programa\pandora_agent\pandora_agent_alt.conf" #broker_agent name_agent @@ -47,7 +47,7 @@ address auto #address 192.168.36.73 # Group assigned for this agent (descriptive, p.e: Servers) -group "$AgentGroup$" +group Servers # This limits operation if temporal dir has not enough free disk. #temporal_min_size 1024 From b37aaab53176b0b52a7484584830ded201061af1 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Thu, 7 May 2015 08:47:20 +0200 Subject: [PATCH 087/104] Delete order by Data column in main data agent. tiquet: #2060 --- .../operation/agentes/estado_monitores.php | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/pandora_console/operation/agentes/estado_monitores.php b/pandora_console/operation/agentes/estado_monitores.php index d9fe2074c7..2fef575c64 100644 --- a/pandora_console/operation/agentes/estado_monitores.php +++ b/pandora_console/operation/agentes/estado_monitores.php @@ -157,18 +157,6 @@ switch ($sortField) { break; } break; - case 'data': - switch ($sort) { - case 'up': - $selectDataUp = $selected; - $order = array('field' => 'tagente_estado.datos', 'order' => 'ASC'); - break; - case 'down': - $selectDataDown = $selected; - $order = array('field' => 'tagente_estado.datos', 'order' => 'DESC'); - break; - } - break; case 'last_contact': switch ($sort) { case 'up': @@ -415,9 +403,7 @@ $table->head[5] = __('Status') . ' ' . '' . html_print_image("images/sort_up.png", true, array("style" => $selectStatusUp, "alt" => "up")) . '' . '' . html_print_image("images/sort_down.png", true, array("style" => $selectStatusDown, "alt" => "down")) . ''; $table->head[6] = __('Warn'); -$table->head[7] = __('Data') . ' ' . - '' . html_print_image("images/sort_up.png", true, array("style" => $selectDataUp, "alt" => "up")) . '' . - '' . html_print_image("images/sort_down.png", true, array("style" => $selectDataDown, "alt" => "down")) . ''; +$table->head[7] = __('Data'); $table->head[8] = __('Graph'); $table->head[9] = __('Last contact') . ' ' . '' . html_print_image("images/sort_up.png", true, array("style" => $selectLastContactUp, "alt" => "up")) . '' . From cc7fcf71b302dc554c3932ff8080fd908ad5ebc6 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Thu, 7 May 2015 16:01:09 +0200 Subject: [PATCH 088/104] Add commands to execute in windows server for real time graphs. Tiquet:#2191 --- .../extensions/realtime_graphs/ajax.php | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/pandora_console/extensions/realtime_graphs/ajax.php b/pandora_console/extensions/realtime_graphs/ajax.php index e5121feaf4..0755db403e 100644 --- a/pandora_console/extensions/realtime_graphs/ajax.php +++ b/pandora_console/extensions/realtime_graphs/ajax.php @@ -20,24 +20,43 @@ $graph = $_POST['graph']; $graph_title = $_POST['graph_title']; $refresh = $_POST['refresh']; +$os = strtolower(PHP_OS); + if (substr($os, 0, 3) === 'win') { + $os = 'windows'; +} switch($graph) { case 'cpu_load': - $data = exec("top -bn 2 -d 0.01 | grep '^Cpu' | tail -n 1 | awk '{ print $2+$4+$6 }'"); + if ( $os == 'windows') + $data = exec('wmic cpu get loadpercentage|find /I /V "Loadpercentage" | findstr /r "[0-9]" '); + else + $data = exec("top -bn 2 -d 0.01 | grep '^Cpu' | tail -n 1 | awk '{ print $2+$4+$6 }'"); break; case 'pending_packets': $data = exec("ls /var/spool/pandora/data_in/*.data | wc -l"); break; case 'disk_io_wait': - $data = exec("vmstat 1 3 | tail -1 | awk '{ print $16 }'"); + if ( $os == 'windows') + $data = exec("vmstat 1 3 | tail -1 | awk '{ print $16 }'"); + else + $data = exec("vmstat 1 3 | tail -1 | awk '{ print $16 }'"); break; case 'mysql_load': - $data = exec("ps aux | grep mysqld | grep -v safe | grep -v grep | awk '{ print $3 }'"); + if ( $os == 'windows') + $data = exec('(FOR /F "skip=2 tokens=2 delims=\," %P IN (\'typeperf "\\Process(mysqld)\\% processor time" -sc 1\') DO @echo %P)|find /V /I "..."'); + else + $data = exec("ps aux | grep mysqld | grep -v safe | grep -v grep | awk '{ print $3 }'"); break; case 'apache_load': - $data = exec("ps aux | grep apache2 | grep -v safe | grep -v grep | awk '{ sum+=$3 } END { print sum }'"); + if ( $os == 'windows') + $data = exec('(FOR /F "skip=2 tokens=2 delims=\," %P IN (\'typeperf "\\Process(httpd)\\% processor time" -sc 1\') DO @echo %P)|find /V /I "..."'); + else + $data = exec("ps aux | grep apache2 | grep -v safe | grep -v grep | awk '{ sum+=$3 } END { print sum }'"); break; case 'server_load': - $data = exec("ps aux | grep pandora_server | grep -v grep | awk '{ print $3 }'"); + if ( $os == 'windows') + $data = exec('(FOR /F "skip=2 tokens=2 delims=\," %P IN (\'typeperf "\\Process(pandora_server)\\% processor time" -sc 1\') DO @echo %P)|find /V /I "..."'); + else + $data = exec("ps aux | grep pandora_server | grep -v grep | awk '{ print $3 }'"); break; case 'snmp_interface': $snmp_address = $_POST['snmp_address']; From 0adf313e239ab64b3d579b927f70721d341a4a84 Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 8 May 2015 00:01:32 +0200 Subject: [PATCH 089/104] 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/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_console/pandoradb_data.sql | 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/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 477d304bfb..93a66fdb13 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP2-150507 +Version: 5.1SP2-150508 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 3ed905b719..bd421515e7 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="5.1SP2-150507" +pandora_version="5.1SP2-150508" 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 b6c7a410b6..e411af17c0 100644 --- 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 => '5.1SP2'; -use constant AGENT_BUILD => '150507'; +use constant AGENT_BUILD => '150508'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 26ad85a4f9..050819926e 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 5.1SP2 -%define release 150507 +%define release 150508 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 96566b4c80..340a75df24 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 5.1SP2 -%define release 150507 +%define release 150508 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index f10c06cc28..1c9981af0f 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150507} +{150508} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 5c41254305..12e14c9c35 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 ("5.1SP2(Build 150507)") +#define PANDORA_VERSION ("5.1SP2(Build 150508)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index c30b77db1d..53dc69ad0b 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", "(5.1SP2(Build 150507))" + VALUE "ProductVersion", "(5.1SP2(Build 150508))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index d86a38ae17..9b82e1fe2c 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP2-150507 +Version: 5.1SP2-150508 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 f74481a7c1..ed83141b13 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="5.1SP2-150507" +pandora_version="5.1SP2-150508" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index bc61916d38..b6fb06d73e 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 = 'PC150507'; +$build_version = 'PC150508'; $pandora_version = 'v5.1SP2'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 613e802115..c4cd650263 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Fri, 8 May 2015 09:57:51 +0200 Subject: [PATCH 090/104] Fixed problems withs path in windows, tiquets: #2153,#2114 --- pandora_console/include/functions_config.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 6c6da0a993..fa01e2f3ee 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -119,7 +119,7 @@ function config_update_config () { case 'general': if (!config_update_value ('language', (string) get_parameter ('language'))) $error_update[] = __('Language code for Pandora'); - if (!config_update_value ('remote_config', (string) get_parameter ('remote_config'))) + if (!config_update_value ('remote_config', io_safe_input((string) get_parameter ('remote_config')))) $error_update[] = __('Remote config directory'); if (!config_update_value ('loginhash_pwd', (string) get_parameter ('loginhash_pwd'))) $error_update[] = __('Auto login (hash) password'); @@ -130,7 +130,7 @@ function config_update_config () { $error_update[] = __('Automatic check for updates'); if (!config_update_value ('https', (bool) get_parameter ('https'))) $error_update[] = __('Enforce https'); - if (!config_update_value ('attachment_store', (string) get_parameter ('attachment_store'))) + if (!config_update_value ('attachment_store', io_safe_input((string) get_parameter ('attachment_store')))) $error_update[] = __('Attachment store'); if (!config_update_value ('list_ACL_IPs_for_API', (string) get_parameter('list_ACL_IPs_for_API'))) $error_update[] = __('IP list with API access'); @@ -405,7 +405,7 @@ function config_update_config () { $error_update[] = __('Show QR code header'); if (!config_update_value ('status_images_set', (string) get_parameter ('status_images_set'))) $error_update[] = __('Status icon set'); - if (!config_update_value ('fontpath', (string) get_parameter ('fontpath'))) + if (!config_update_value ('fontpath', io_safe_input((string) get_parameter ('fontpath')))) $error_update[] = __('Font path'); if (!config_update_value ('font_size', get_parameter('font_size'))) $error_update[] = __('Font size'); @@ -443,7 +443,7 @@ function config_update_config () { $error_update[] = __('Fixed menu'); if (!config_update_value ('paginate_module', get_parameter('paginate_module'))) $error_update[] = __('Paginate module'); - if (!config_update_value ('graphviz_bin_dir', get_parameter('graphviz_bin_dir'))) + if (!config_update_value ('graphviz_bin_dir', io_safe_input(get_parameter('graphviz_bin_dir')))) $error_update[] = __('Custom graphviz directory'); if (!config_update_value ('networkmap_max_width', get_parameter('networkmap_max_width'))) $error_update[] = __('Networkmap max width'); @@ -531,7 +531,7 @@ function config_update_config () { $error_update[] = __('Name resolution for IP address'); break; case 'log': - if (!config_update_value ('log_dir', get_parameter('log_dir'))) + if (!config_update_value ('log_dir', io_safe_input(get_parameter('log_dir')))) $error_update[] = __('Netflow max lifetime'); if (!config_update_value ('log_max_lifetime', (int)get_parameter('log_max_lifetime'))) $error_update[] = __('Log max lifetime'); @@ -805,21 +805,21 @@ function config_process_config () { // dir. if (!isset ($config['attachment_store'])) { config_update_value('attachment_store', - $config['homedir'] . '/attachment'); + io_safe_input($config['homedir']) . '/attachment'); } else { //Fixed when the user moves the pandora console to another dir //after the first uses. if (!is_dir($config['attachment_store'])) { config_update_value('attachment_store', - $config['homedir'] . '/attachment'); + io_safe_input($config['homedir']) . '/attachment'); } } if (!isset ($config['fontpath'])) { config_update_value('fontpath', - $config['homedir'] . '/include/fonts/smallfont.ttf'); + io_safe_input($config['homedir']) . '/include/fonts/smallfont.ttf'); } if (!isset ($config['style'])) { From 6cebe0c48ba99649fddeabf6c5c7e9799810424f Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Fri, 8 May 2015 10:04:27 +0200 Subject: [PATCH 091/104] Fixed problems with networks-maps in php.ini configuration, tiquet: #2153 --- pandora_console/include/functions_config.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index fa01e2f3ee..fcf84ae350 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -1408,6 +1408,7 @@ function config_check () { $PHPmemory_limit = config_return_in_bytes(ini_get('memory_limit')); $PHPmax_execution_time = ini_get('max_execution_time'); $PHPsafe_mode = ini_get('safe_mode'); + $PHPdisable_functions = ini_get('disable_functions'); if ($PHPsafe_mode === '1') { $config["alert_cnt"]++; @@ -1452,6 +1453,12 @@ function config_check () { 'message' => sprintf(__('Recommended value is: %s'), sprintf(__('%s or greater'), '500M')) . '

' . __('Please, change it on your PHP configuration file (php.ini) or contact with administrator'), 'no_close' => true, 'force_style' => 'color: #000000 !important'), '', true); } + + if (preg_match("/system/", $PHPdisable_functions) or preg_match("/exec/", $PHPdisable_functions)) { + set_pandora_error_for_header( + __("Variable disable_functions containts functions system() or exec(), in PHP configuration file (php.ini)"). '

' . + __('Please, change it on your PHP configuration file (php.ini) or contact with administrator (Dont forget restart apache process after changes)'), __("Problems with disable functions in PHP.INI")); + } } function config_return_in_bytes($val) { From 8fb384474b8b87c2df1fe7717c9f35cbb9fd64ae Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 9 May 2015 00:01:29 +0200 Subject: [PATCH 092/104] 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/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_console/pandoradb_data.sql | 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/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 93a66fdb13..36ddf385f4 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP2-150508 +Version: 5.1SP2-150509 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 bd421515e7..ebe088e000 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="5.1SP2-150508" +pandora_version="5.1SP2-150509" 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 e411af17c0..5c9eb6610d 100644 --- 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 => '5.1SP2'; -use constant AGENT_BUILD => '150508'; +use constant AGENT_BUILD => '150509'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 050819926e..980e08f0ea 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 5.1SP2 -%define release 150508 +%define release 150509 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 340a75df24..d264cd7173 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 5.1SP2 -%define release 150508 +%define release 150509 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 1c9981af0f..2c7b55df03 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150508} +{150509} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 12e14c9c35..f228e4cb9b 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 ("5.1SP2(Build 150508)") +#define PANDORA_VERSION ("5.1SP2(Build 150509)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 53dc69ad0b..b78cf5ca03 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", "(5.1SP2(Build 150508))" + VALUE "ProductVersion", "(5.1SP2(Build 150509))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 9b82e1fe2c..6389722262 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP2-150508 +Version: 5.1SP2-150509 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 ed83141b13..303ea0b0da 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="5.1SP2-150508" +pandora_version="5.1SP2-150509" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index b6fb06d73e..d174df9f19 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 = 'PC150508'; +$build_version = 'PC150509'; $pandora_version = 'v5.1SP2'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index c4cd650263..49710741db 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Sun, 10 May 2015 00:01:29 +0200 Subject: [PATCH 093/104] 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/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_console/pandoradb_data.sql | 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/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 36ddf385f4..76e8650e56 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP2-150509 +Version: 5.1SP2-150510 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 ebe088e000..6245cf751e 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="5.1SP2-150509" +pandora_version="5.1SP2-150510" 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 5c9eb6610d..5f03cfeec9 100644 --- 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 => '5.1SP2'; -use constant AGENT_BUILD => '150509'; +use constant AGENT_BUILD => '150510'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 980e08f0ea..e9452d1b9e 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 5.1SP2 -%define release 150509 +%define release 150510 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 d264cd7173..847dd29d07 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 5.1SP2 -%define release 150509 +%define release 150510 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 2c7b55df03..523f3ae99b 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150509} +{150510} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index f228e4cb9b..6f6f7de690 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 ("5.1SP2(Build 150509)") +#define PANDORA_VERSION ("5.1SP2(Build 150510)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index b78cf5ca03..5b2807020c 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", "(5.1SP2(Build 150509))" + VALUE "ProductVersion", "(5.1SP2(Build 150510))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 6389722262..7dd305a204 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP2-150509 +Version: 5.1SP2-150510 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 303ea0b0da..e9026187b2 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="5.1SP2-150509" +pandora_version="5.1SP2-150510" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index d174df9f19..cdfb50ac52 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 = 'PC150509'; +$build_version = 'PC150510'; $pandora_version = 'v5.1SP2'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 49710741db..a3bc783eb9 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Mon, 11 May 2015 00:01:31 +0200 Subject: [PATCH 094/104] 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/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_console/pandoradb_data.sql | 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/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 76e8650e56..197178b5d5 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP2-150510 +Version: 5.1SP2-150511 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 6245cf751e..0dbe09b255 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="5.1SP2-150510" +pandora_version="5.1SP2-150511" 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 5f03cfeec9..e8a5b714ae 100644 --- 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 => '5.1SP2'; -use constant AGENT_BUILD => '150510'; +use constant AGENT_BUILD => '150511'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index e9452d1b9e..31441ee215 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 5.1SP2 -%define release 150510 +%define release 150511 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 847dd29d07..076482a227 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 5.1SP2 -%define release 150510 +%define release 150511 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 523f3ae99b..68c72d7f47 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150510} +{150511} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 6f6f7de690..e99d1337ed 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 ("5.1SP2(Build 150510)") +#define PANDORA_VERSION ("5.1SP2(Build 150511)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 5b2807020c..2342936754 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", "(5.1SP2(Build 150510))" + VALUE "ProductVersion", "(5.1SP2(Build 150511))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 7dd305a204..0169423ee4 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP2-150510 +Version: 5.1SP2-150511 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 e9026187b2..a10ebe2398 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="5.1SP2-150510" +pandora_version="5.1SP2-150511" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index cdfb50ac52..4b87a6c838 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 = 'PC150510'; +$build_version = 'PC150511'; $pandora_version = 'v5.1SP2'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index a3bc783eb9..4f40add202 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Mon, 11 May 2015 11:59:02 +0200 Subject: [PATCH 095/104] Fixed error of php --- pandora_console/include/functions_config.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index fcf84ae350..1b7c2b41c7 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -1455,9 +1455,12 @@ function config_check () { } if (preg_match("/system/", $PHPdisable_functions) or preg_match("/exec/", $PHPdisable_functions)) { - set_pandora_error_for_header( - __("Variable disable_functions containts functions system() or exec(), in PHP configuration file (php.ini)"). '

' . - __('Please, change it on your PHP configuration file (php.ini) or contact with administrator (Dont forget restart apache process after changes)'), __("Problems with disable functions in PHP.INI")); + $config["alert_cnt"]++; + $_SESSION["alert_msg"] .= ui_print_info_message( + array('title' => __("Problems with disable functions in PHP.INI"), + 'message' => __("Variable disable_functions containts functions system() or exec(), in PHP configuration file (php.ini)"). '

' . + __('Please, change it on your PHP configuration file (php.ini) or contact with administrator (Dont forget restart apache process after changes)'), + 'no_close' => true, 'force_style' => 'color: #000000 !important'), '', true); } } From 3b3c61aa2e2115d82f5af7050c885f38dfcbe84c Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Mon, 11 May 2015 14:42:37 +0200 Subject: [PATCH 096/104] Fixed error when installing agent in windows, tiquet: 2157 --- pandora_agents/win32/bin/pandora_agent.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index a15cb07fa0..14c4b8d642 100644 --- a/pandora_agents/win32/bin/pandora_agent.conf +++ b/pandora_agents/win32/bin/pandora_agent.conf @@ -19,7 +19,7 @@ server_ip $ServerIP$ server_path /var/spool/pandora/data_in -temporal "C:\Program Files\pandora_agent\temp" +temporal "C:\%ProgramFiles%\pandora_agent\temp" #include "C:\Archivos de programa\pandora_agent\pandora_agent_alt.conf" #broker_agent name_agent From 3b5ba7c06c48f21b83a8154d2cce343618b82891 Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 12 May 2015 00:01:31 +0200 Subject: [PATCH 097/104] 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/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_console/pandoradb_data.sql | 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/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 197178b5d5..add74cd773 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP2-150511 +Version: 5.1SP2-150512 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 0dbe09b255..306fff80ef 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="5.1SP2-150511" +pandora_version="5.1SP2-150512" 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 e8a5b714ae..d8bb0e017b 100644 --- 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 => '5.1SP2'; -use constant AGENT_BUILD => '150511'; +use constant AGENT_BUILD => '150512'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 31441ee215..a799ec3dfe 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 5.1SP2 -%define release 150511 +%define release 150512 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 076482a227..c158b0e31a 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 5.1SP2 -%define release 150511 +%define release 150512 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 68c72d7f47..034de584af 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150511} +{150512} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index e99d1337ed..7af2c7172e 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 ("5.1SP2(Build 150511)") +#define PANDORA_VERSION ("5.1SP2(Build 150512)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 2342936754..7474a97504 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", "(5.1SP2(Build 150511))" + VALUE "ProductVersion", "(5.1SP2(Build 150512))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 0169423ee4..4597217d57 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP2-150511 +Version: 5.1SP2-150512 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 a10ebe2398..9ba2cd42ce 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="5.1SP2-150511" +pandora_version="5.1SP2-150512" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 4b87a6c838..bb507b16a4 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 = 'PC150511'; +$build_version = 'PC150512'; $pandora_version = 'v5.1SP2'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 4f40add202..20e7de5f20 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Tue, 12 May 2015 10:36:44 +0200 Subject: [PATCH 098/104] Fixed generate data and visual of visual console when user used wizard, tiquet: #2196 --- .../include/functions_visual_map.php | 51 ++++++++++--------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 90eb1ba6e9..5cbc676888 100644 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -529,13 +529,13 @@ function visual_map_process_wizard_add_modules ($id_modules, $image, $id_layout, $id_modules = (array) $id_modules; $error = false; - $pos_y = 10; - $pos_x = 10; + $pos_y = 0; + $pos_x = 0; foreach ($id_modules as $id_module) { if ($pos_x > 600) { - $pos_x = 10; - $pos_y = $pos_y + $range; + $pos_x = 0; + $pos_y = $range; } if ($id_server != 0) { @@ -639,7 +639,7 @@ function visual_map_process_wizard_add_modules ($id_modules, $image, $id_layout, db_process_sql_insert ('tlayout_data', $values); - $pos_x = $pos_x + $range; + $pos_x = $range; } $return = ui_print_success_message (__('Modules successfully added to layout'), '', true); @@ -1108,14 +1108,14 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, } echo '
'; - echo ""; + height:' . $mapHeight . 'px; + background: #FFF url('.ui_get_full_url($backgroundImage).') no-repeat 50% 50%;">'; + //echo ""; $layout_datas = db_get_all_rows_field_filter('tlayout_data', @@ -1233,10 +1233,11 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, // Draw image if ($resizedMap) - echo '
'; + echo '
'; else - echo '
'; + echo '
'; + echo "
"; if ($show_links) { if ((!empty($layout_data['id_agent']) && empty($layout_data['id_layout_linked'])) @@ -1412,7 +1413,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, } echo "
"; - echo ""; + echo "" . "
"; break; @@ -1420,9 +1421,9 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, case LABEL: $z_index = 4; if ($resizedMap) - echo '
'; - else - echo '
'; + echo '
'; + else + echo '
'; $endTagA = false; if ($show_links) { @@ -1451,9 +1452,9 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, case ICON: $z_index = 4; if ($resizedMap) - echo '
'; - else - echo '
'; + echo '
'; + else + echo '
'; $endTagA = false; if ($show_links) { @@ -1560,9 +1561,9 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $unit_text = trim(io_safe_output($unit_text)); if ($resizedMap) - echo '
'; - else - echo '
'; + echo '
'; + else + echo '
'; $endTagA = false; @@ -1774,9 +1775,9 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, if ($resizedMap) - echo '
'; + echo '
'; else - echo '
'; + echo '
'; //Metaconsole db connection @@ -1950,7 +1951,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, ((integer)($proportion * $layout_data['pos_y'])); } - echo '
'; + echo '
'; echo io_safe_output($layout_data['label']); echo "
"; From f807ba1bc94f2357d16784714896d942692734d1 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Tue, 12 May 2015 12:10:14 +0200 Subject: [PATCH 099/104] Revert "Fixed generate data and visual of visual console when user used wizard, tiquet: #2196" Problems with funcionality of visual console This reverts commit b3a9cdc45b6a89a2eb00f95e86529d9d1075f9bb. --- .../include/functions_visual_map.php | 51 +++++++++---------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 5cbc676888..90eb1ba6e9 100644 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -529,13 +529,13 @@ function visual_map_process_wizard_add_modules ($id_modules, $image, $id_layout, $id_modules = (array) $id_modules; $error = false; - $pos_y = 0; - $pos_x = 0; + $pos_y = 10; + $pos_x = 10; foreach ($id_modules as $id_module) { if ($pos_x > 600) { - $pos_x = 0; - $pos_y = $range; + $pos_x = 10; + $pos_y = $pos_y + $range; } if ($id_server != 0) { @@ -639,7 +639,7 @@ function visual_map_process_wizard_add_modules ($id_modules, $image, $id_layout, db_process_sql_insert ('tlayout_data', $values); - $pos_x = $range; + $pos_x = $pos_x + $range; } $return = ui_print_success_message (__('Modules successfully added to layout'), '', true); @@ -1108,14 +1108,14 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, } echo '
'; - //echo ""; + height:' . $mapHeight . 'px;">'; + echo ""; $layout_datas = db_get_all_rows_field_filter('tlayout_data', @@ -1233,11 +1233,10 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, // Draw image if ($resizedMap) - echo '
'; + echo '
'; else - echo '
'; + echo '
'; - echo "
"; if ($show_links) { if ((!empty($layout_data['id_agent']) && empty($layout_data['id_layout_linked'])) @@ -1413,7 +1412,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, } echo "
"; - echo "" . "
"; + echo ""; break; @@ -1421,9 +1420,9 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, case LABEL: $z_index = 4; if ($resizedMap) - echo '
'; - else - echo '
'; + echo '
'; + else + echo '
'; $endTagA = false; if ($show_links) { @@ -1452,9 +1451,9 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, case ICON: $z_index = 4; if ($resizedMap) - echo '
'; - else - echo '
'; + echo '
'; + else + echo '
'; $endTagA = false; if ($show_links) { @@ -1561,9 +1560,9 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $unit_text = trim(io_safe_output($unit_text)); if ($resizedMap) - echo '
'; - else - echo '
'; + echo '
'; + else + echo '
'; $endTagA = false; @@ -1775,9 +1774,9 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, if ($resizedMap) - echo '
'; + echo '
'; else - echo '
'; + echo '
'; //Metaconsole db connection @@ -1951,7 +1950,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, ((integer)($proportion * $layout_data['pos_y'])); } - echo '
'; + echo '
'; echo io_safe_output($layout_data['label']); echo "
"; From 232deb0812f981feb6dd9e85d094a83ce5a35c5e Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Tue, 12 May 2015 16:42:34 +0200 Subject: [PATCH 100/104] Fixed generate data and visual of visual console when user used wizard, tiquet: #2196 --- pandora_console/include/functions_visual_map.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 90eb1ba6e9..fa1f2746c0 100644 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -1237,6 +1237,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, else echo '
'; + echo "
"; if ($show_links) { if ((!empty($layout_data['id_agent']) && empty($layout_data['id_layout_linked'])) @@ -1412,7 +1413,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, } echo "
"; - echo ""; + echo "
"; break; From 3b5dd8dd955ae2675cb26c95fe16b715ac704016 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 13 May 2015 00:01:31 +0200 Subject: [PATCH 101/104] 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/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_console/pandoradb_data.sql | 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/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index add74cd773..e1a41ea934 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP2-150512 +Version: 5.1SP2-150513 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 306fff80ef..77f7ddd49d 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="5.1SP2-150512" +pandora_version="5.1SP2-150513" 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 d8bb0e017b..0a72a24542 100644 --- 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 => '5.1SP2'; -use constant AGENT_BUILD => '150512'; +use constant AGENT_BUILD => '150513'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index a799ec3dfe..753cbeed3d 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 5.1SP2 -%define release 150512 +%define release 150513 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 c158b0e31a..179f86a269 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 5.1SP2 -%define release 150512 +%define release 150513 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 034de584af..ebf5109238 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150512} +{150513} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 7af2c7172e..e6d4d4d7de 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 ("5.1SP2(Build 150512)") +#define PANDORA_VERSION ("5.1SP2(Build 150513)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 7474a97504..b09157bb01 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", "(5.1SP2(Build 150512))" + VALUE "ProductVersion", "(5.1SP2(Build 150513))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 4597217d57..4cd69749bf 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP2-150512 +Version: 5.1SP2-150513 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 9ba2cd42ce..596f60b04f 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="5.1SP2-150512" +pandora_version="5.1SP2-150513" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index bb507b16a4..592340924a 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 = 'PC150512'; +$build_version = 'PC150513'; $pandora_version = 'v5.1SP2'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 20e7de5f20..e14ac74c58 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Wed, 13 May 2015 09:44:43 +0200 Subject: [PATCH 102/104] Fixed problems with generate custom events with alerts. Tiquet: #2216 (cherry picked from commit 4c7e52649463035490d38cc96b7430eb85858377) --- 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 fffe355120..2eb5cebc31 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -1000,7 +1000,7 @@ sub pandora_execute_action ($$$$$$$$$;$) { $pa_config, $event_text, (defined ($agent) ? $agent->{'id_grupo'} : 0), - (defined ($fullagent) ? $fullagent->{'id_agente'} : 0), + (defined ($agent) ? $agent->{'id_agente'} : 0), $priority, (defined($alert) ? $alert->{'id'} : 0), (defined($alert) ? $alert->{'id_agent_module'} : 0), From 4a52fcff58ebfca1fff934118f5fadb68a018e89 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Wed, 13 May 2015 10:15:13 +0200 Subject: [PATCH 103/104] This is more effective code from fixed bug, tiquet: #2216 --- pandora_server/lib/PandoraFMS/Core.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 2eb5cebc31..6f2c806091 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -247,7 +247,7 @@ sub get_agent_from_name ($$) { return undef if (! defined ($name) || $name eq ''); - return get_db_single_row ($dbh, 'SELECT * FROM tagente WHERE tagente.nombre = ?', $name); + return get_db_single_row ($dbh, 'SELECT * FROM tagente WHERE tagente.nombre = ?', safe_input($name)); } ########################################################################## @@ -1000,7 +1000,7 @@ sub pandora_execute_action ($$$$$$$$$;$) { $pa_config, $event_text, (defined ($agent) ? $agent->{'id_grupo'} : 0), - (defined ($agent) ? $agent->{'id_agente'} : 0), + (defined ($fullagent) ? $fullagent->{'id_agente'} : 0), $priority, (defined($alert) ? $alert->{'id'} : 0), (defined($alert) ? $alert->{'id_agent_module'} : 0), From 4c84debcc087308223adb71c503cf010ae54a51b Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 14 May 2015 00:01:30 +0200 Subject: [PATCH 104/104] 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/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_console/pandoradb_data.sql | 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/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index e1a41ea934..3a58e8de43 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP2-150513 +Version: 5.1SP2-150514 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 77f7ddd49d..259518309a 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="5.1SP2-150513" +pandora_version="5.1SP2-150514" 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 0a72a24542..63c1b612a4 100644 --- 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 => '5.1SP2'; -use constant AGENT_BUILD => '150513'; +use constant AGENT_BUILD => '150514'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 753cbeed3d..6b5c0e5bec 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 5.1SP2 -%define release 150513 +%define release 150514 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 179f86a269..e18104614e 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 5.1SP2 -%define release 150513 +%define release 150514 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index ebf5109238..7864c72f56 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150513} +{150514} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index e6d4d4d7de..ef79b2c96b 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 ("5.1SP2(Build 150513)") +#define PANDORA_VERSION ("5.1SP2(Build 150514)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index b09157bb01..34980794cf 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", "(5.1SP2(Build 150513))" + VALUE "ProductVersion", "(5.1SP2(Build 150514))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 4cd69749bf..5e6f66294d 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP2-150513 +Version: 5.1SP2-150514 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 596f60b04f..c892b05901 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="5.1SP2-150513" +pandora_version="5.1SP2-150514" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 592340924a..8833c6cbe1 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 = 'PC150513'; +$build_version = 'PC150514'; $pandora_version = 'v5.1SP2'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index e14ac74c58..a0f7e12989 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
"; html_print_label (__("Name"),'name'); echo ""; + echo ""; html_print_input_text ('name_category', $name_category); echo "
" . ui_print_help_icon ('pcap_filter', true, ui_get_full_url(false, false, false, false)) . "" . ui_print_help_icon ('pcap_filter', true) . "" . html_print_textarea ('advanced_filter', 4, 40, $filter['advanced_filter'], "style='min-height: 0px; width: 90%;'", true) . "