From 671618c6f0b067b541015e7d7cf0253348dde877 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 25 Feb 2013 14:30:16 +0000 Subject: [PATCH] 2013-02-25 Miguel de Dios * lib/PandoraFMS/Core.pm: erased the spam traces (useful for the developers but not for to users) in the code for the Planned Downtimes. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7713 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 6 ++++++ pandora_server/lib/PandoraFMS/Core.pm | 31 --------------------------- 2 files changed, 6 insertions(+), 31 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index b4ae0b48e1..5b4f18c90c 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,9 @@ +2013-02-25 Miguel de Dios + + * lib/PandoraFMS/Core.pm: erased the spam traces (useful for the + developers but not for to users) in the code for the Planned + Downtimes. + 2013-02-22 Sancho Lerena * lib/PandoraFMS/Tools.pm: My MacOS boxes was being ignored diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index f95fa89011..aa897d2072 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -1182,18 +1182,12 @@ sub pandora_planned_downtime_set_disabled_elements($$$) { } } - logger($pa_config, "[PLANNED_DOWNTIME] " . - "Only Alerts " . $only_alerts . ".", 10); - if ($only_alerts == 0) { db_do ($dbh, 'UPDATE tagente SET disabled = 1 WHERE id_agente = ?', $downtime_agent->{'id_agent'}); } else { - logger($pa_config, "[PLANNED_DOWNTIME] " . - "Disabled Agent " . $downtime_agent->{'id_agent'} . ".", 10); - db_do ($dbh, 'UPDATE talert_template_modules SET disabled = 1 WHERE id_agent_module IN ( @@ -1368,9 +1362,6 @@ sub pandora_planned_downtime_quiet_once_start($$) { my ($pa_config, $dbh) = @_; my $utimestamp = time(); - logger($pa_config, "[PLANNED_DOWNTIME] " . - "Enter pandora_planned_downtime_quiet_once_start().", 10); - # Start pending downtimes my @downtimes = get_db_rows($dbh, 'SELECT * FROM tplanned_downtime @@ -1475,7 +1466,6 @@ sub pandora_planned_downtime_monthly_start($$) { "Server ".$pa_config->{'servername'}." started planned downtime: ".$downtime->{'name'}, 0, 0, 1, 0, 0, 'system', 0, $dbh); - logger($pa_config, $downtime->{'type_downtime'}, 10); if ($downtime->{'type_downtime'} eq "quiet") { pandora_planned_downtime_set_quiet_elements($pa_config, $dbh, $downtime->{'id'}); @@ -1483,8 +1473,6 @@ sub pandora_planned_downtime_monthly_start($$) { elsif (($downtime->{'type_downtime'} eq "disable_agents") || ($downtime->{'type_downtime'} eq "disable_agents_alerts")) { - logger($pa_config, "ON DISABLE AGENTS/ALERTS", 10); - pandora_planned_downtime_set_disabled_elements($pa_config, $dbh, $downtime); } @@ -1545,11 +1533,6 @@ sub pandora_planned_downtime_monthly_stop($$) { AND type_execution <> "once"'); foreach my $downtime (@downtimes) { - - logger($pa_config, "Stop Time: " . $time, 10); - logger($pa_config, "Stop periodically_time_from: " . - $downtime->{'periodically_time_from'}, 10); - #Convert to identical type. #my $date_downtime = Time::Piece->strptime( # $downtime->{'periodically_time_to'}, @@ -1591,8 +1574,6 @@ sub pandora_planned_downtime_monthly_stop($$) { elsif (($downtime->{'type_downtime'} eq "disable_agents") || ($downtime->{'type_downtime'} eq "disable_agents_alerts")) { - logger($pa_config, "OFF DISABLE AGENTS/ALERTS", 10); - pandora_planned_downtime_unset_disabled_elements($pa_config, $dbh, $downtime); } @@ -1657,10 +1638,6 @@ sub pandora_planned_downtime_weekly_start($$) { $found = 1; } - logger($pa_config, "Debug time = " . $time, 10); - logger($pa_config, "Debug periodically_time_to = " . - $downtime->{'periodically_time_to'}, 10); - if ($found) { #Convert to identical type. #my $date_downtime = Time::Piece->strptime( @@ -1742,11 +1719,6 @@ sub pandora_planned_downtime_weekly_stop($$) { # "%H:%M:%S"); # #if ($date_now_time <= $date_downtime) { - - logger($pa_config, "Debug time = " . $time, 10); - logger($pa_config, "Debug periodically_time_to = " . - $downtime->{'periodically_time_to'}, 10); - if (($number_day_week == 1) && ($downtime->{'monday'})) { $found = 1; @@ -1820,9 +1792,6 @@ Update planned downtimes. sub pandora_planned_downtime ($$) { my ($pa_config, $dbh) = @_; - logger($pa_config, "[PLANNED_DOWNTIME] " . - "Enter pandora_planned_downtime()\n", 10); - pandora_planned_downtime_disabled_once_start($pa_config, $dbh); pandora_planned_downtime_disabled_once_stop($pa_config, $dbh);