mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
2011-10-06 Koichiro Kikuchi <koichiro@rworks.jp>
* pandora_server/lib/PandoraFMS/DB.pm: Added function to get module group name. * pandora_server/lib/PandoraFMS/Core.pm: Added new alert macros. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5044 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
31c10ccf4b
commit
fe99cace2c
@ -1,3 +1,8 @@
|
|||||||
|
2011-10-06 Koichiro Kikuchi <koichiro@rworks.jp>
|
||||||
|
|
||||||
|
* lib/PandoraFMS/DB.pm: Added function to get module group name.
|
||||||
|
* lib/PandoraFMS/Core.pm: Added new alert macros.
|
||||||
|
|
||||||
2011-09-29 Sancho Lerena <slerena@artica.es>
|
2011-09-29 Sancho Lerena <slerena@artica.es>
|
||||||
|
|
||||||
* pandora_server/lib/PandoraFMS/SNMPServer.pm
|
* pandora_server/lib/PandoraFMS/SNMPServer.pm
|
||||||
|
@ -728,8 +728,12 @@ sub pandora_execute_action ($$$$$$$$$;$) {
|
|||||||
_alert_times_fired_ => $alert->{'times_fired'},
|
_alert_times_fired_ => $alert->{'times_fired'},
|
||||||
_alert_priority_ => $alert->{'priority'},
|
_alert_priority_ => $alert->{'priority'},
|
||||||
_module_ => (defined ($module)) ? $module->{'nombre'} : '',
|
_module_ => (defined ($module)) ? $module->{'nombre'} : '',
|
||||||
|
_modulegroup_ => (defined ($module)) ? (get_module_group_name ($dbh, $module->{'id_module_group'}) || '') : '',
|
||||||
_moduledescription_ => (defined ($module)) ? $module->{'descripcion'} : '',
|
_moduledescription_ => (defined ($module)) ? $module->{'descripcion'} : '',
|
||||||
_id_agent_ => (defined ($module)) ? $module->{'id_agente'} : '',
|
_id_agent_ => (defined ($module)) ? $module->{'id_agente'} : '',
|
||||||
|
_interval_ => (defined ($module) && $module->{'module_interval'} != 0) ? $module->{'module_interval'} : (defined ($agent)) ? $agent->{'intervalo'} : '',
|
||||||
|
_target_ip_ => (defined ($module)) ? $module->{'ip_target'} : '',
|
||||||
|
_target_port_ => (defined ($module)) ? $module->{'tcp_port'} : '',
|
||||||
_policy_ => (defined ($module)) ? enterprise_hook('get_policy_name', [$dbh, $module->{'id_policy_module'}]) : '',
|
_policy_ => (defined ($module)) ? enterprise_hook('get_policy_name', [$dbh, $module->{'id_policy_module'}]) : '',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -56,6 +56,7 @@ our @EXPORT = qw(
|
|||||||
get_group_name
|
get_group_name
|
||||||
get_module_agent_id
|
get_module_agent_id
|
||||||
get_module_group_id
|
get_module_group_id
|
||||||
|
get_module_group_name
|
||||||
get_module_id
|
get_module_id
|
||||||
get_module_name
|
get_module_name
|
||||||
get_nc_profile_name
|
get_nc_profile_name
|
||||||
@ -301,6 +302,15 @@ sub get_module_group_id ($$) {
|
|||||||
return defined ($rc) ? $rc : -1;
|
return defined ($rc) ? $rc : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##########################################################################
|
||||||
|
## Return module group name given the module group id.
|
||||||
|
##########################################################################
|
||||||
|
sub get_module_group_name ($$) {
|
||||||
|
my ($dbh, $module_group_id) = @_;
|
||||||
|
|
||||||
|
return get_db_value ($dbh, "SELECT name FROM tmodule_group WHERE id_mg = ?", $module_group_id);
|
||||||
|
}
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
## Return a network component's profile name given its ID.
|
## Return a network component's profile name given its ID.
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user