From b85fa1344dd0f0f1249f866cfa5b5834b20e4c1b Mon Sep 17 00:00:00 2001 From: ramonn Date: Fri, 30 Jan 2009 10:46:24 +0000 Subject: [PATCH] 2009-01-30 Ramon Novoa * lib/PandoraFMS/DB.pm: Fixed regexp alerts. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1413 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 4 ++++ pandora_server/lib/PandoraFMS/DB.pm | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 9dceefb75d..f16c9a2cd0 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,7 @@ +2009-01-30 Ramon Novoa + + * lib/PandoraFMS/DB.pm: Fixed regexp alerts. + 2009-01-28 Sancho Lerena * bin/pandora_server: Fixed a typo in call to pandora_writestate() who diff --git a/pandora_server/lib/PandoraFMS/DB.pm b/pandora_server/lib/PandoraFMS/DB.pm index 3e62875400..1246bd1429 100644 --- a/pandora_server/lib/PandoraFMS/DB.pm +++ b/pandora_server/lib/PandoraFMS/DB.pm @@ -242,11 +242,11 @@ sub pandora_evaluate_alert (%$%$$$) { return $status; } elsif ($alert_data->{'type'} eq "regex") { - if ($alert_data->{'matches_value'} == 1 && $module_data =~ m/$alert_data->{'alert_text'}/i) { + if ($alert_data->{'value'} == 1 && $module_data =~ m/$alert_data->{'value'}/i) { return $status; } - if ($module_data !~ m/$alert_data->{'alert_text'}/i) { + if ($module_data !~ m/$alert_data->{'value'}/i) { return $status; } }