From 6cb75be3b3df261b215ab9d0932b27a92beef263 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Mon, 4 Mar 2013 12:57:37 +0000 Subject: [PATCH] 2013-03-04 Sergio Martin * util/pandora_manage.pl: Update fired alert counts when use validate_all_alerts option git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7770 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 5 +++++ pandora_server/util/pandora_manage.pl | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index b7b5fb88a6..9df433e2ee 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2013-03-04 Sergio Martin + + * util/pandora_manage.pl: Update fired alert counts when + use validate_all_alerts option + 2013-03-01 Ramon Novoa * lib/PandoraFMS/Core.pm, diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 3fb59589da..6c13b4e4d3 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -2656,6 +2656,10 @@ sub cli_validate_all_alerts() { if($res == -1) { print_log "[ERROR] Alerts cannot be validated\n\n"; } + else { + # Update fired alerts count in agents + db_update ($dbh, "UPDATE tagente SET fired_count = 0"); + } } ############################################################################## @@ -2693,6 +2697,10 @@ sub cli_validate_policy_alerts() { if($res == -1) { print_log "[ERROR] Alerts cannot be validated\n\n"; } + else { + # Update fired alerts count in agents + db_update ($dbh, "UPDATE tagente SET fired_count = 0"); + } } ##############################################################################