From 97749c7c10d19f8a993b3aa899246416920ea5f9 Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 26 Jan 2016 00:01:13 +0100 Subject: [PATCH 1/5] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_console/pandoradb.data.oracle.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/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 41a552ad2e..b4711b6706 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 6.1dev-160125 +Version: 6.1dev-160126 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 4402798359..fdc2036a18 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="6.1dev-160125" +pandora_version="6.1dev-160126" 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 d6fc3e0303..7ba88a742d 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 => '6.1dev'; -use constant AGENT_BUILD => '160125'; +use constant AGENT_BUILD => '160126'; # 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 0392083a31..0cb5052b70 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 6.1dev -%define release 160125 +%define release 160126 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 3e2d63478f..34e42fc2f8 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 6.1dev -%define release 160125 +%define release 160126 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 38b2a447cb..9c3d52ddf2 100644 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="6.1dev" -PI_BUILD="160125" +PI_BUILD="160126" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index add488b963..b14e539114 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{160125} +{160126} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 963751d774..584e5e9fa4 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 ("6.1dev(Build 160125)") +#define PANDORA_VERSION ("6.1dev(Build 160126)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index fabc7edf6b..85212901c7 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", "(6.1dev(Build 160125))" + VALUE "ProductVersion", "(6.1dev(Build 160126))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index e846f183c7..c86b184137 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 6.1dev-160125 +Version: 6.1dev-160126 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 1a2a0eaf86..fca6a59ffe 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="6.1dev-160125" +pandora_version="6.1dev-160126" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 8754d8b28b..5474820287 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 = 'PC160125'; +$build_version = 'PC160126'; $pandora_version = 'v6.1dev'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 84132db572..3333a59320 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Tue, 26 Jan 2016 09:33:42 +0100 Subject: [PATCH 2/5] Fixed warning of php. Tiquet: 3255 --- .../include/functions_reporting.php | 360 +++++++++--------- 1 file changed, 181 insertions(+), 179 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 43281dfad8..f65e84f6a2 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -3792,198 +3792,200 @@ function reporting_availability($report, $content) { $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); + + if (!empty($items)) { + 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']) + || modules_is_not_init($item['id_agent_module'])) { + //Restore dbconnection + if (($config ['metaconsole'] == 1) && $server_name != '' && defined('METACONSOLE')) { + metaconsole_restore_db(); + } + continue; } - } - - - - if (modules_is_disable_agent($item['id_agent_module']) - || modules_is_not_init($item['id_agent_module'])) { + + $row = array(); + + $text = ""; + + // HACK it is saved in show_graph field. + // Show interfaces instead the modules + if ($content['show_graph']) { + $text = $row['availability_item'] = agents_get_address( + modules_get_agentmodule_agent($item['id_agent_module'])); + + if (empty($text)) { + $text = $row['availability_item'] = __('No Address'); + } + } + else { + $text = $row['availability_item'] = modules_get_agentmodule_name( + $item['id_agent_module']); + } + + $row['agent'] = modules_get_agentmodule_agent_name( + $item['id_agent_module']); + + $text = $row['agent'] . " (" . $text . ")"; + + $sla_value = reporting_get_agentmodule_sla( + $item['id_agent_module'], + $content['period'], + 0.50, + 1.50, + $report["datetime"], + null, + $content['time_from'], + $content['time_to']); + + $count_checks = modules_get_count_datas( + $item['id_agent_module'], + $report["datetime"] - $content['period'], + $report["datetime"]); + + + if ($sla_value === false) { + $row['checks'] = __('Unknown'); + $row['failed'] = __('Unknown'); + $row['fail'] = __('Unknown'); + $row['poling_time'] = __('Unknown'); + $row['time_unavaliable'] = __('Unknown'); + $row['ok'] = __('Unknown'); + $row['order'] = 0; + + $percent_ok = 0; + } + else { + $percent_ok = format_numeric($sla_value, 2); + $percent_fail = (100 - $percent_ok); + + $row['checks'] = format_numeric($count_checks, 0); + $row['ok'] = format_numeric($percent_ok,2) . " %"; + $row['order'] = $percent_ok; + $row['fail'] = format_numeric($percent_fail,2) . " %"; + $row['failed'] = + format_numeric($percent_fail * $count_checks / 100, 0); + + + $row['poling_time'] = + human_time_description_raw( + ($percent_ok * $count_checks / 100) * modules_get_interval($item['id_agent_module']), + true); + + $row['time_unavaliable'] = "-"; + if ($percent_fail > 0) { + $row['time_unavaliable'] = + human_time_description_raw( + ($percent_fail * $count_checks / 100) * modules_get_interval($item['id_agent_module']), + true); + } + + } + + $data[] = $row; + + + $avg = (($avg * $count) + $percent_ok) / ($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(); } - continue; - } - - $row = array(); - - $text = ""; - - // HACK it is saved in show_graph field. - // Show interfaces instead the modules - if ($content['show_graph']) { - $text = $row['availability_item'] = agents_get_address( - modules_get_agentmodule_agent($item['id_agent_module'])); - - if (empty($text)) { - $text = $row['availability_item'] = __('No Address'); - } - } - else { - $text = $row['availability_item'] = modules_get_agentmodule_name( - $item['id_agent_module']); - } - - $row['agent'] = modules_get_agentmodule_agent_name( - $item['id_agent_module']); - - $text = $row['agent'] . " (" . $text . ")"; - - $sla_value = reporting_get_agentmodule_sla( - $item['id_agent_module'], - $content['period'], - 0.50, - 1.50, - $report["datetime"], - null, - $content['time_from'], - $content['time_to']); - - $count_checks = modules_get_count_datas( - $item['id_agent_module'], - $report["datetime"] - $content['period'], - $report["datetime"]); - - - if ($sla_value === false) { - $row['checks'] = __('Unknown'); - $row['failed'] = __('Unknown'); - $row['fail'] = __('Unknown'); - $row['poling_time'] = __('Unknown'); - $row['time_unavaliable'] = __('Unknown'); - $row['ok'] = __('Unknown'); - $row['order'] = 0; - - $percent_ok = 0; - } - else { - $percent_ok = format_numeric($sla_value, 2); - $percent_fail = (100 - $percent_ok); - - $row['checks'] = format_numeric($count_checks, 0); - $row['ok'] = format_numeric($percent_ok,2) . " %"; - $row['order'] = $percent_ok; - $row['fail'] = format_numeric($percent_fail,2) . " %"; - $row['failed'] = - format_numeric($percent_fail * $count_checks / 100, 0); - - - $row['poling_time'] = - human_time_description_raw( - ($percent_ok * $count_checks / 100) * modules_get_interval($item['id_agent_module']), - true); - - $row['time_unavaliable'] = "-"; - if ($percent_fail > 0) { - $row['time_unavaliable'] = - human_time_description_raw( - ($percent_fail * $count_checks / 100) * modules_get_interval($item['id_agent_module']), - true); - } - - } - - $data[] = $row; - - - $avg = (($avg * $count) + $percent_ok) / ($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; - } + $count++; } - //Restore dbconnection - if (($config ['metaconsole'] == 1) && $server_name != '' && defined('METACONSOLE')) { - metaconsole_restore_db(); + 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 ($row['order'] < $t_row['order']) { + 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 ($row['order'] > $t_row['order']) { + break; + } + + $i++; + } + + array_splice($temp, $i, 0, array($row)); + } + + $data = $temp; + break; } - - $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 ($row['order'] < $t_row['order']) { - 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 ($row['order'] > $t_row['order']) { - break; - } - - $i++; - } - - array_splice($temp, $i, 0, array($row)); - } - - $data = $temp; - break; - } - - $return["data"] = $data; $return["resume"] = array(); $return["resume"]['min_text'] = $min_text; From 0ac40e51e683608bb48285801cf8d4ec59592c16 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Tue, 26 Jan 2016 11:44:45 +0100 Subject: [PATCH 3/5] Fixed problems in reports view in metaconsole. Tiquet: #3176 --- .../operation/reporting/reporting_viewer.php | 75 ++++++------------- 1 file changed, 23 insertions(+), 52 deletions(-) diff --git a/pandora_console/operation/reporting/reporting_viewer.php b/pandora_console/operation/reporting/reporting_viewer.php index 6cf735c6dc..b88cfe3f89 100755 --- a/pandora_console/operation/reporting/reporting_viewer.php +++ b/pandora_console/operation/reporting/reporting_viewer.php @@ -178,62 +178,33 @@ $table->style[0] = 'text-align:center;'; $table->data = array (); $table->data[0][0] = html_print_image("images/reporting32.png", true, array("width" => "32", "height" => "32")); -if (defined("METACONSOLE")) { - if ($report['description'] != '') { - $table->data[0][1] = '
' . __("Description: ") . $report['description'] . '
'; - } - else { - $table->data[0][1] = '
' . __("Name: ") . $report['name'] . '
'; - } - - $table->data[0][1] .= '
'.__('Set initial date') . html_print_checkbox('enable_init_date', 1, $enable_init_date, true); - $html_enterprise = enterprise_hook('reporting_print_button_PDF', array($id_report)); - if ($html_enterprise !== ENTERPRISE_NOT_HOOK) { - $table->data[0][1] .= $html_enterprise; - } - $table->data[0][1] .= '
'; - - $table->data[1][1] = '
' . __('From') . ': '; - $table->data[1][1] .= html_print_input_text ('date_init', $date_init, '', 12, 10, true). ' '; - $table->data[1][1] .= html_print_input_text ('time_init', $time_init, '', 10, 7, true). '
'; - $table->data[1][2] = '
' . __('Items period before') . ':'; - $table->data[1][2] .= html_print_input_text ('date', $date, '', 12, 10, true) . ' '; - $table->data[1][2] .= html_print_input_text ('time', $time, '', 10, 7, true) . ' '; - $table->data[1][2] .= html_print_submit_button (__('Update'), 'date_submit', false, 'class="sub next"', true) . '
'; - $table->data[1][2] .= '
' . __('to') . ':'; - $table->data[1][2] .= html_print_input_text ('date', $date, '', 12, 10, true) . ' '; - $table->data[1][2] .= html_print_input_text ('time', $time, '', 10, 7, true) . ' '; - $table->data[1][2] .= html_print_submit_button (__('Update'), 'date_submit', false, 'class="sub next"', true) . '
'; + +if (reporting_get_description($id_report)) { + $table->data[0][1] = '
' . + reporting_get_description($id_report) . '
'; } else { - if (reporting_get_description($id_report)) { - $table->data[0][1] = '
' . - reporting_get_description($id_report) . '
'; - } - else { - $table->data[0][1] = '
' . - reporting_get_name($id_report) . '
'; - } - - $table->data[0][1] .= '
'.__('Set initial date') . html_print_checkbox('enable_init_date', 1, $enable_init_date, true); - $html_enterprise = enterprise_hook('reporting_print_button_PDF', - array($id_report)); - if ($html_enterprise !== ENTERPRISE_NOT_HOOK) { - $table->data[0][1] .= $html_enterprise; - } - $table->data[0][1] .= '
'; - - $table->data[1][1] = '
' . __('From') . ':
'; - $table->data[1][1] .= html_print_input_text ('date_init', $date_init, '', 12, 10, true). ' '; - $table->data[1][1] .= html_print_input_text ('time_init', $time_init, '', 10, 7, true). ' '; - $table->data[1][2] = '
' . __('Items period before') . ':
'; - $table->data[1][2] .= '
' . __('to') . ':
'; - $table->data[1][2] .= html_print_input_text ('date', $date, '', 12, 10, true). ' '; - $table->data[1][2] .= html_print_input_text ('time', $time, '', 10, 7, true). ' '; - $table->data[1][2] .= html_print_submit_button (__('Update'), 'date_submit', false, 'class="sub next"', true); - + $table->data[0][1] = '
' . + reporting_get_name($id_report) . '
'; } +$table->data[0][1] .= '
'.__('Set initial date') . html_print_checkbox('enable_init_date', 1, $enable_init_date, true); +$html_enterprise = enterprise_hook('reporting_print_button_PDF', + array($id_report)); +if ($html_enterprise !== ENTERPRISE_NOT_HOOK) { + $table->data[0][1] .= $html_enterprise; +} +$table->data[0][1] .= '
'; + +$table->data[1][1] = '
' . __('From') . ':
'; +$table->data[1][1] .= html_print_input_text ('date_init', $date_init, '', 12, 10, true). ' '; +$table->data[1][1] .= html_print_input_text ('time_init', $time_init, '', 10, 7, true). ' '; +$table->data[1][2] = '
' . __('Items period before') . ':
'; +$table->data[1][2] .= '
' . __('to') . ':
'; +$table->data[1][2] .= html_print_input_text ('date', $date, '', 12, 10, true). ' '; +$table->data[1][2] .= html_print_input_text ('time', $time, '', 10, 7, true). ' '; +$table->data[1][2] .= html_print_submit_button (__('Update'), 'date_submit', false, 'class="sub next"', true); + echo '
'; html_print_table ($table); html_print_input_hidden ('id_report', $id_report); From fcfd6e4070dba59d8c5a9a297832a241b28b2fa7 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Tue, 26 Jan 2016 15:03:41 +0100 Subject: [PATCH 4/5] Fixed problems with created modules synthetic. Tiquet: #3034 --- pandora_server/util/pandora_manage.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index d6b506aa0b..a27173931e 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -3320,17 +3320,17 @@ sub cli_create_synthetic() { my $agent_name = @ARGV[4]; my @module_data = @ARGV[5..$#ARGV]; my $module; - my (@filterdata,@data_module,$module_data); + my (@filterdata,@data_module); if ($synthetic_type ne 'arithmetic' && $synthetic_type ne 'average') { print("[ERROR] Type of syntethic module doesn't exists \n\n"); exit 1; } - if (scalar(@{$module_data}) == 0) { + if (scalar(@{module_data}) == 0) { print("[ERROR] No modules data \n\n"); exit 1; } - if ($name_module == '') { + if ($name_module eq '') { print("[ERROR] No module name \n\n"); exit 1; } @@ -3384,7 +3384,9 @@ sub cli_create_synthetic() { $module->{'id_agente'} = $id_agent; $module->{'nombre'} = safe_input($name_module); + my $id_tipo_modulo = get_db_value ($dbh, "SELECT id_tipo FROM ttipo_modulo WHERE nombre = ?", "generic_data"); $module->{'id_modulo'} = 5; + $module->{'id_tipo_modulo'} = $id_tipo_modulo; my $id_module = db_process_insert($dbh, 'id_agente_modulo', 'tagente_modulo', $module); @@ -3395,10 +3397,12 @@ sub cli_create_synthetic() { print("[OK] The modules are creating ID: $id_module \n\n"); } else { + db_do ($dbh, 'DELETE FROM tagente_modulo WHERE id_agente_modulo = ?', $id_module); print("[ERROR] Problems with creating data module. \n\n"); } } else { + db_do ($dbh, 'DELETE FROM tagente_modulo WHERE nombre = ? AND id_agente = ?', $name_module, $id_agent); print("[INFO] Problems with creating module \n\n"); } } From 9bd9be0d1aec22b318904ededa72bbf2cfa765bc Mon Sep 17 00:00:00 2001 From: fermin831 Date: Tue, 26 Jan 2016 17:55:42 +0100 Subject: [PATCH 5/5] Changed permission to tarball installer and added a warning to advise of missing dependencies (perl-Sys-Syslog) TICKET: #3264 --- pandora_agents/unix/pandora_agent_installer | 3 +++ 1 file changed, 3 insertions(+) mode change 100644 => 100755 pandora_agents/unix/pandora_agent_installer diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer old mode 100644 new mode 100755 index 9c3d52ddf2..6581e710aa --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -486,6 +486,9 @@ install () { echo " ($HOME/.ssh/id_dsa) under /home/pandora/.ssh/authorized_keys " echo "on your Pandora FMS Server host" echo " " + echo "You may need to install manually some additional required dependencies:" + echo "perl-Sys-Syslog" + echo " " echo "You also need to setup your $PANDORA_BASE$PANDORA_CFG/pandora_agent.conf config file" echo " " if [ "$OS_NAME" = "FreeBSD" ]