2014-06-17 Vanessa Gil <vanessa.gil@artica.es>
* lib/PandoraFMS/Core.pm: Added macros '_alert_critical_instructions_' and '_alert_warning_instructions_'. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10340 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
81df6e92fb
commit
23a2b75bb3
|
@ -1,3 +1,9 @@
|
|||
2014-06-17 Vanessa Gil <vanessa.gil@artica.es>
|
||||
|
||||
* lib/PandoraFMS/Core.pm: Added macros
|
||||
'_alert_critical_instructions_' and
|
||||
'_alert_warning_instructions_'.
|
||||
|
||||
2014-07-11 Hirofumi Kosaka <kosaka@rworks.jp>
|
||||
|
||||
* util/pandora_manage.pl: To handle multi-byte strings in
|
||||
|
|
|
@ -512,6 +512,9 @@ sub pandora_process_alert ($$$$$$$$;$) {
|
|||
my $warning_instructions = get_db_value ($dbh, 'SELECT warning_instructions FROM tagente_modulo WHERE id_agente_modulo = ?', $alert->{'id_agent_module'});
|
||||
my $unknown_instructions = get_db_value ($dbh, 'SELECT unknown_instructions FROM tagente_modulo WHERE id_agente_modulo = ?', $alert->{'id_agent_module'});
|
||||
|
||||
$alert->{'critical_instructions'} = $critical_instructions;
|
||||
$alert->{'warning_instructions'} = $warning_instructions;
|
||||
|
||||
# Generate an event
|
||||
if ($table eq 'tevent_alert') {
|
||||
pandora_event ($pa_config, "Alert ceased (" .
|
||||
|
@ -666,6 +669,14 @@ sub pandora_execute_alert ($$$$$$$$;$) {
|
|||
return;
|
||||
}
|
||||
|
||||
# Critical_instructions, warning_instructions, unknown_instructions
|
||||
my $critical_instructions = get_db_value ($dbh, 'SELECT critical_instructions FROM tagente_modulo WHERE id_agente_modulo = ?', $alert->{'id_agent_module'});
|
||||
my $warning_instructions = get_db_value ($dbh, 'SELECT warning_instructions FROM tagente_modulo WHERE id_agente_modulo = ?', $alert->{'id_agent_module'});
|
||||
my $unknown_instructions = get_db_value ($dbh, 'SELECT unknown_instructions FROM tagente_modulo WHERE id_agente_modulo = ?', $alert->{'id_agent_module'});
|
||||
|
||||
$alert->{'critical_instructions'} = $critical_instructions;
|
||||
$alert->{'warning_instructions'} = $warning_instructions;
|
||||
|
||||
# Execute actions
|
||||
my $event_generated = 0;
|
||||
foreach my $action (@actions) {
|
||||
|
@ -692,11 +703,6 @@ sub pandora_execute_alert ($$$$$$$$;$) {
|
|||
}
|
||||
}
|
||||
|
||||
# Critical_instructions, warning_instructions, unknown_instructions
|
||||
my $critical_instructions = get_db_value ($dbh, 'SELECT critical_instructions FROM tagente_modulo WHERE id_agente_modulo = ?', $alert->{'id_agent_module'});
|
||||
my $warning_instructions = get_db_value ($dbh, 'SELECT warning_instructions FROM tagente_modulo WHERE id_agente_modulo = ?', $alert->{'id_agent_module'});
|
||||
my $unknown_instructions = get_db_value ($dbh, 'SELECT unknown_instructions FROM tagente_modulo WHERE id_agente_modulo = ?', $alert->{'id_agent_module'});
|
||||
|
||||
# Generate an event only if an event has not already been generated by an alert action
|
||||
if ($event_generated == 0) {
|
||||
|
||||
|
@ -840,6 +846,8 @@ sub pandora_execute_action ($$$$$$$$$;$) {
|
|||
_alert_times_fired_ => $alert->{'times_fired'},
|
||||
_alert_priority_ => $alert->{'priority'},
|
||||
_alert_text_severity_ => get_priority_name($alert->{'priority'}),
|
||||
_alert_critical_instructions_ => $alert->{'critical_instructions'},
|
||||
_alert_warning_instructions_ => $alert->{'warning_instructions'},
|
||||
_groupcontact_ => (defined ($group)) ? $group->{'contact'} : '',
|
||||
_groupother_ => (defined ($group)) ? $group->{'other'} : '',
|
||||
_module_ => (defined ($module)) ? $module->{'nombre'} : '',
|
||||
|
|
Loading…
Reference in New Issue