mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
2010-05-25 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/DB.pm: Added functions to get alert data (needed by pandora_manage.pl). git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2795 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
ce265ad792
commit
2164045cd3
@ -1,3 +1,8 @@
|
|||||||
|
2010-05-25 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* lib/PandoraFMS/DB.pm: Added functions to get alert data (needed by
|
||||||
|
pandora_manage.pl).
|
||||||
|
|
||||||
2010-05-25 Ramon Novoa <rnovoa@artica.es>
|
2010-05-25 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* lib/PandoraFMS/DB.pm: Added functions to get the id of an OS, a
|
* lib/PandoraFMS/DB.pm: Added functions to get the id of an OS, a
|
||||||
|
@ -43,6 +43,8 @@ our @EXPORT = qw(
|
|||||||
get_server_id
|
get_server_id
|
||||||
get_group_id
|
get_group_id
|
||||||
get_os_id
|
get_os_id
|
||||||
|
get_template_id
|
||||||
|
get_template_module_id
|
||||||
is_group_disabled
|
is_group_disabled
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -148,6 +150,26 @@ sub get_agent_module_id ($$$) {
|
|||||||
return defined ($rc) ? $rc : -1;
|
return defined ($rc) ? $rc : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##########################################################################
|
||||||
|
## Return template id given the template name.
|
||||||
|
##########################################################################
|
||||||
|
sub get_template_id ($$) {
|
||||||
|
my ($dbh, $template_name) = @_;
|
||||||
|
|
||||||
|
my $rc = get_db_value ($dbh, "SELECT id FROM talert_templates WHERE name = ?", $template_name);
|
||||||
|
return defined ($rc) ? $rc : -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
##########################################################################
|
||||||
|
## Return the module template id given the module id and the template id.
|
||||||
|
##########################################################################
|
||||||
|
sub get_template_module_id ($$$) {
|
||||||
|
my ($dbh, $module_id, $template_id) = @_;
|
||||||
|
|
||||||
|
my $rc = get_db_value ($dbh, "SELECT id FROM talert_template_modules WHERE id_agent_module = ? AND id_alert_template = ?", $module_id, $template_id);
|
||||||
|
return defined ($rc) ? $rc : -1;
|
||||||
|
}
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
## Returns true if the given group is disabled, false otherwise.
|
## Returns true if the given group is disabled, false otherwise.
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user