2009-01-26 Ramon Novoa <rnovoa@artica.es>

* lib/PandoraFMS/DB.pm: Added a new alert macro (_address_).




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1400 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
Ramon Novoa 2009-01-26 12:01:27 +00:00
parent bcbc4c23aa
commit e49f670e14
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2009-01-26 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/DB.pm: Added a new alert macro (_address_).
2009-01-26 Manuel Arostegui <marostegui@artica.es>
* util/udp_client: Added to repository. Remote alert execution

View File

@ -543,6 +543,9 @@ sub execute_alert (%$$$$$$$$$$$$$$$) {
return;
}
# Get agent address
my $address = get_db_value ('direccion', 'tagente', 'id_agente', $id_agent, $dbh);
# Execute actions
foreach my $action (@actions) {
my $field1 = $action->{'field1'} ne "" ? $action->{'field1'} : $alert->{'field1'};
@ -560,6 +563,7 @@ sub execute_alert (%$$$$$$$$$$$$$$$) {
_field2_ => $field2,
_field3_ => $field3,
_agent_ => $agent,
_address_ => $address,
_timestamp_ => &UnixDate ("today", "%Y-%m-%d %H:%M:%S"),
_data_ => $data,
_alert_description_ => $alert->{'descripcion'},