From f90fe2042f2142be569f327e58cf49c13e1bbc1c Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 9 Jul 2013 09:28:10 +0000 Subject: [PATCH] 2013-07-09 Miguel de Dios * lib/PandoraFMS/PredictionServer.pm, util/pandora_xml_stress.pl: improved the source code style. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8499 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 5 +++++ pandora_server/lib/PandoraFMS/PredictionServer.pm | 2 ++ pandora_server/util/pandora_xml_stress.pl | 4 ++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index c743d5463e..27eb8f61b1 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2013-07-09 Miguel de Dios + + * lib/PandoraFMS/PredictionServer.pm, util/pandora_xml_stress.pl: + improved the source code style. + 2013-07-05 Ramon Novoa * lib/PandoraFMS/Core.pm: Added macros _snmp_oid_ and _snmp_value_ to diff --git a/pandora_server/lib/PandoraFMS/PredictionServer.pm b/pandora_server/lib/PandoraFMS/PredictionServer.pm index ad0124851c..3c4268d497 100644 --- a/pandora_server/lib/PandoraFMS/PredictionServer.pm +++ b/pandora_server/lib/PandoraFMS/PredictionServer.pm @@ -156,6 +156,7 @@ sub exec_prediction_module ($$$$) { # Service modules if ($agent_module->{'prediction_module'} == 2) { + if ($agent_module->{'custom_string_1'} eq 'SLA') { logger ($pa_config, "Executing service module SLA " . $agent_module->{'id_agente_modulo'} . " " . @@ -170,6 +171,7 @@ sub exec_prediction_module ($$$$) { enterprise_hook ('exec_service_module', [$pa_config, $agent_module, $server_id, $dbh]); logger ($pa_config, "End execution", 5); } + return; } diff --git a/pandora_server/util/pandora_xml_stress.pl b/pandora_server/util/pandora_xml_stress.pl index 8c2fd142e0..a8bc305c15 100755 --- a/pandora_server/util/pandora_xml_stress.pl +++ b/pandora_server/util/pandora_xml_stress.pl @@ -188,7 +188,7 @@ sub generate_xml_files ($$$$$$) { $xml_data .= "\t\t$module_name\n"; $xml_data .= "\t\t$module_description\n"; $xml_data .= "\t\t$module_type\n"; - + if ($module_min_critical ne '') { $xml_data .= "\t\t$module_min_critical\n"; } @@ -389,7 +389,7 @@ sub generate_data_from_source ($$$) { $pointer = $pointers->{$module_name}; - $pointer = $pointer % ($#data_array+1); + $pointer = $pointer % ($#data_array + 1); $data = $data_array[$pointer];