2010-03-03 Ramon Novoa <rnovoa@artica.es>

* lib/PandoraFMS/Core.pm: Added 'matches_value' support to 'onchange'
          alerts.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2456 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
Ramon Novoa 2010-03-03 12:17:20 +00:00
parent 63ca79bf0a
commit 5ae3511c56
2 changed files with 14 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2010-03-03 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Core.pm: Added 'matches_value' support to 'onchange'
alerts.
2010-03-02 Raúl Mateos <raulofpandora@gmail.com>
* util/tentacle_serverd, util/pandora_server: Updated year. Changed

View File

@ -265,14 +265,17 @@ sub pandora_evaluate_alert ($$$$$$$) {
}
if ($alert->{'type'} eq "onchange") {
if (is_numeric($last_data_value)){
if ($last_data_value == $data){
return $status;
if ($alert->{'matches_value'} == 1) {
if (is_numeric($last_data_value)){
return $status if ($last_data_value == $data);
} else {
return $status if ($last_data_value eq $data);
}
} else {
if ($last_data_value eq $data){
return $status;
if (is_numeric($last_data_value)){
return $status if ($last_data_value != $data);
} else {
return $status if ($last_data_value ne $data);
}
}
}