mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
2012-05-10 Sergio Martin <sergio.martin@artica.es>
* lib/PandoraFMS/DB.pm lib/PandoraFMS/Core.pm: Added the macro _alert_text_severity_ to the alerts git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6284 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
7eb3f27b04
commit
4897288d66
@ -1,3 +1,9 @@
|
|||||||
|
2012-05-10 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* lib/PandoraFMS/DB.pm
|
||||||
|
lib/PandoraFMS/Core.pm: Added the macro _alert_text_severity_ to
|
||||||
|
the alerts
|
||||||
|
|
||||||
2012-05-09 Dario Rodriguez <dario.rodriguez@artica.es>
|
2012-05-09 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||||
|
|
||||||
* util/plugin/ipmi-plugin.pl,
|
* util/plugin/ipmi-plugin.pl,
|
||||||
|
@ -762,6 +762,7 @@ sub pandora_execute_action ($$$$$$$$$;$) {
|
|||||||
_alert_threshold_ => $alert->{'time_threshold'},
|
_alert_threshold_ => $alert->{'time_threshold'},
|
||||||
_alert_times_fired_ => $alert->{'times_fired'},
|
_alert_times_fired_ => $alert->{'times_fired'},
|
||||||
_alert_priority_ => $alert->{'priority'},
|
_alert_priority_ => $alert->{'priority'},
|
||||||
|
_alert_text_severity_ => get_priority_name($alert->{'priority'}),
|
||||||
_module_ => (defined ($module)) ? $module->{'nombre'} : '',
|
_module_ => (defined ($module)) ? $module->{'nombre'} : '',
|
||||||
_modulegroup_ => (defined ($module)) ? (get_module_group_name ($dbh, $module->{'id_module_group'}) || '') : '',
|
_modulegroup_ => (defined ($module)) ? (get_module_group_name ($dbh, $module->{'id_module_group'}) || '') : '',
|
||||||
_moduledescription_ => (defined ($module)) ? $module->{'descripcion'} : '',
|
_moduledescription_ => (defined ($module)) ? $module->{'descripcion'} : '',
|
||||||
|
@ -65,6 +65,7 @@ our @EXPORT = qw(
|
|||||||
get_os_id
|
get_os_id
|
||||||
get_plugin_id
|
get_plugin_id
|
||||||
get_profile_id
|
get_profile_id
|
||||||
|
get_priority_name
|
||||||
get_server_id
|
get_server_id
|
||||||
get_template_id
|
get_template_id
|
||||||
get_template_module_id
|
get_template_module_id
|
||||||
@ -674,6 +675,37 @@ sub db_concat ($$) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##########################################################################
|
||||||
|
## Get priority/severity name from the associated ID
|
||||||
|
##########################################################################
|
||||||
|
sub get_priority_name ($) {
|
||||||
|
my ($priority_id) = @_;
|
||||||
|
|
||||||
|
if($priority_id == 0) {
|
||||||
|
return 'Maintenance';
|
||||||
|
}
|
||||||
|
elsif($priority_id == 1) {
|
||||||
|
return 'Informational';
|
||||||
|
}
|
||||||
|
elsif($priority_id == 2) {
|
||||||
|
return 'Normal';
|
||||||
|
}
|
||||||
|
elsif($priority_id == 3) {
|
||||||
|
return 'Warning';
|
||||||
|
}
|
||||||
|
elsif($priority_id == 4) {
|
||||||
|
return 'Critical';
|
||||||
|
}
|
||||||
|
elsif($priority_id == 5) {
|
||||||
|
return 'Minor';
|
||||||
|
}
|
||||||
|
elsif($priority_id == 6) {
|
||||||
|
return 'Major';
|
||||||
|
}
|
||||||
|
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
# End of function declaration
|
# End of function declaration
|
||||||
# End of defined Code
|
# End of defined Code
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user