2014-03-05 Sergio Martin <sergio.martin@artica.es>
* lib/PandoraFMS/Core.pm: Add action recovery fields to the recovery logic in alerts. Ticket #501 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9506 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
00e6745ed2
commit
d5a72a3ebf
|
@ -1,3 +1,9 @@
|
||||||
|
2014-03-05 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* lib/PandoraFMS/Core.pm: Add action recovery fields to the
|
||||||
|
recovery logic in alerts.
|
||||||
|
Ticket #501
|
||||||
|
|
||||||
2014-01-24 Ramon Novoa <rnovoa@artica.es>
|
2014-01-24 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* lib/PandoraFMS/Config.pm: Updated copyright information.
|
* lib/PandoraFMS/Config.pm: Updated copyright information.
|
||||||
|
|
|
@ -745,15 +745,45 @@ sub pandora_execute_action ($$$$$$$$$;$) {
|
||||||
|
|
||||||
# Recovery fields, thanks to Kato Atsushi
|
# Recovery fields, thanks to Kato Atsushi
|
||||||
if ($alert_mode == 0) {
|
if ($alert_mode == 0) {
|
||||||
$field2 = $alert->{'field2_recovery'} ne "" ? $alert->{'field2_recovery'} : ($field2 ne "" ? "[RECOVER]" . $field2 : "");
|
# Field 1 is a special case where [RECOVER] prefix is not added even when it is defined
|
||||||
$field3 = $alert->{'field3_recovery'} ne "" ? $alert->{'field3_recovery'} : ($field3 ne "" ? "[RECOVER]" . $field3 : "");
|
$field1 = $alert->{'field1_recovery'} ne "" ? $alert->{'field1_recovery'} : $field1;
|
||||||
$field4 = $alert->{'field4_recovery'} ne "" ? $alert->{'field4_recovery'} : ($field4 ne "" ? "[RECOVER]" . $field4 : "");
|
$field1 = $action->{'field1_recovery'} ne "" ? $action->{'field1_recovery'} : $field1;
|
||||||
$field5 = $alert->{'field5_recovery'} ne "" ? $alert->{'field5_recovery'} : ($field5 ne "" ? "[RECOVER]" . $field5 : "");
|
|
||||||
$field6 = $alert->{'field6_recovery'} ne "" ? $alert->{'field6_recovery'} : ($field6 ne "" ? "[RECOVER]" . $field6 : "");
|
$field2 = $field2 ne "" ? "[RECOVER]" . $field2 : "";
|
||||||
$field7 = $alert->{'field7_recovery'} ne "" ? $alert->{'field7_recovery'} : ($field7 ne "" ? "[RECOVER]" . $field7 : "");
|
$field2 = $alert->{'field2_recovery'} ne "" ? $alert->{'field2_recovery'} : $field2;
|
||||||
$field8 = $alert->{'field8_recovery'} ne "" ? $alert->{'field8_recovery'} : ($field8 ne "" ? "[RECOVER]" . $field8 : "");
|
$field2 = $action->{'field2_recovery'} ne "" ? $action->{'field2_recovery'} : $field2;
|
||||||
$field9 = $alert->{'field9_recovery'} ne "" ? $alert->{'field9_recovery'} : ($field9 ne "" ? "[RECOVER]" . $field9 : "");
|
|
||||||
$field10 = $alert->{'field10_recovery'} ne "" ? $alert->{'field10_recovery'} : ($field10 ne "" ? "[RECOVER]" . $field10 : "");
|
$field3 = $field3 ne "" ? "[RECOVER]" . $field3 : "";
|
||||||
|
$field3 = $alert->{'field3_recovery'} ne "" ? $alert->{'field3_recovery'} : $field3;
|
||||||
|
$field3 = $action->{'field3_recovery'} ne "" ? $action->{'field3_recovery'} : $field3;
|
||||||
|
|
||||||
|
$field4 = $field4 ne "" ? "[RECOVER]" . $field4 : "";
|
||||||
|
$field4 = $alert->{'field4_recovery'} ne "" ? $alert->{'field4_recovery'} : $field4;
|
||||||
|
$field4 = $action->{'field4_recovery'} ne "" ? $action->{'field4_recovery'} : $field4;
|
||||||
|
|
||||||
|
$field5 = $field5 ne "" ? "[RECOVER]" . $field5 : "";
|
||||||
|
$field5 = $alert->{'field5_recovery'} ne "" ? $alert->{'field5_recovery'} : $field5;
|
||||||
|
$field5 = $action->{'field5_recovery'} ne "" ? $action->{'field5_recovery'} : $field5;
|
||||||
|
|
||||||
|
$field6 = $field6 ne "" ? "[RECOVER]" . $field6 : "";
|
||||||
|
$field6 = $alert->{'field6_recovery'} ne "" ? $alert->{'field6_recovery'} : $field6;
|
||||||
|
$field6 = $action->{'field6_recovery'} ne "" ? $action->{'field6_recovery'} : $field6;
|
||||||
|
|
||||||
|
$field7 = $field7 ne "" ? "[RECOVER]" . $field7 : "";
|
||||||
|
$field7 = $alert->{'field7_recovery'} ne "" ? $alert->{'field7_recovery'} : $field7;
|
||||||
|
$field7 = $action->{'field7_recovery'} ne "" ? $action->{'field7_recovery'} : $field7;
|
||||||
|
|
||||||
|
$field8 = $field8 ne "" ? "[RECOVER]" . $field8 : "";
|
||||||
|
$field8 = $alert->{'field8_recovery'} ne "" ? $alert->{'field8_recovery'} : $field8;
|
||||||
|
$field8 = $action->{'field8_recovery'} ne "" ? $action->{'field8_recovery'} : $field8;
|
||||||
|
|
||||||
|
$field9 = $field9 ne "" ? "[RECOVER]" . $field9 : "";
|
||||||
|
$field9 = $alert->{'field9_recovery'} ne "" ? $alert->{'field9_recovery'} : $field9;
|
||||||
|
$field9 = $action->{'field9_recovery'} ne "" ? $action->{'field9_recovery'} : $field9;
|
||||||
|
|
||||||
|
$field10 = $field10 ne "" ? "[RECOVER]" . $field10 : "";
|
||||||
|
$field10 = $alert->{'field10_recovery'} ne "" ? $alert->{'field10_recovery'} : $field10;
|
||||||
|
$field10 = $action->{'field10_recovery'} ne "" ? $action->{'field10_recovery'} : $field10;
|
||||||
}
|
}
|
||||||
|
|
||||||
$field1 = decode_entities ($field1);
|
$field1 = decode_entities ($field1);
|
||||||
|
|
Loading…
Reference in New Issue