2012-08-21 Miguel de Dios <miguel.dedios@artica.es>
* lib/PandoraFMS/Core.pm: added in the modules the same feature to set agent in "Quiet" mode. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6899 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
42e86caa45
commit
dfa6db8688
|
@ -1,3 +1,8 @@
|
|||
2012-08-21 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* lib/PandoraFMS/Core.pm: added in the modules the same feature to
|
||||
set agent in "Quiet" mode.
|
||||
|
||||
2012-08-21 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* lib/PandoraFMS/Server.pm:: added the feature to set a agent in
|
||||
|
|
|
@ -227,6 +227,11 @@ sub pandora_generate_alerts ($$$$$$$$;$$$) {
|
|||
|
||||
return;
|
||||
}
|
||||
if ($module->{'quiet'} == 1) {
|
||||
logger($pa_config, "Generate Alert. The module '" . $module->{'nombre'} . "' is in quiet mode.", 10);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
# Do not generate alerts for disabled groups
|
||||
if (is_group_disabled ($dbh, $agent->{'id_grupo'})) {
|
||||
|
@ -1605,12 +1610,23 @@ sub pandora_event ($$$$$$$$$$;$$$$$) {
|
|||
my ($pa_config, $evento, $id_grupo, $id_agente, $severity,
|
||||
$id_alert_am, $id_agentmodule, $event_type, $event_status, $dbh, $source, $user_name, $comment, $id_extra, $tags) = @_;
|
||||
|
||||
my $agent = get_db_single_row ($dbh, 'SELECT *
|
||||
FROM tagente WHERE id_agente = ?', $id_agente);
|
||||
if ($agent->{'quiet'} == 1) {
|
||||
logger($pa_config, "Generate Event. The agent '" . $agent->{'nombre'} . "' is in quiet mode.", 10);
|
||||
|
||||
return;
|
||||
if ($id_agente != 0) {
|
||||
my $agent = get_db_single_row ($dbh, 'SELECT *
|
||||
FROM tagente WHERE id_agente = ?', $id_agente);
|
||||
if ($agent->{'quiet'} == 1) {
|
||||
logger($pa_config, "Generate Event. The agent '" . $agent->{'nombre'} . "' is in quiet mode.", 10);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
if ($id_agentmodule != 0) {
|
||||
my $module = get_db_single_row ($dbh, 'SELECT *
|
||||
FROM tagente_modulo WHERE id_agente_modulo = ?', $id_agentmodule);
|
||||
if ($module->{'quiet'} == 1) {
|
||||
logger($pa_config, "Generate Event. The module '" . $module->{'nombre'} . "' is in quiet mode.", 10);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
logger($pa_config, "Generating event '$evento' for agent ID $id_agente module ID $id_agentmodule.", 10);
|
||||
|
|
Loading…
Reference in New Issue