2007-07-13 Sancho Lerena <slerena@artica.es>
* bin/pandora_recon.pl: Another patch, to create records in tagente_estado using different values for "estado" field, (100 for non-monitors, 0 for monitors), in the same way console does. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@561 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
2857266c97
commit
380352d7dc
|
@ -1,5 +1,9 @@
|
|||
2007-07-13 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* bin/pandora_recon.pl: Another patch, to create records in
|
||||
tagente_estado using different values for "estado" field, (100 for
|
||||
non-monitors, 0 for monitors), in the same way console does.
|
||||
|
||||
* bin/pandora_recon.pl: Testing changes for two items: (a) Bug
|
||||
detected in forking startup (-D). (b) Bug detected due creation of
|
||||
modules without inserting record in tagente_estado table.
|
||||
|
|
|
@ -418,7 +418,14 @@ sub pandora_task_create_agentmodules {
|
|||
$dbh->do($query_sql3);
|
||||
my $last_id_agente_modulo = $dbh->{'mysql_insertid'};
|
||||
logger($pa_config,"Recon Server: Creating module $name for agent $ip_adress",3);
|
||||
my $query_sql4 = "INSERT INTO tagente_estado (id_agente_modulo, datos, timestamp, cambio, estado, id_agente, last_try, utimestamp, current_interval, running_by) VALUES ($last_id_agente_modulo, '', '0000-00-00 00:00:00', 0, 0, $agent_id, '0000-00-00 00:00:00', 0, $interval, 0)";
|
||||
my $query_sql4;
|
||||
if (($type == 2) || ($type == 6) || ($type == 9) || ($type == 12) || ($type == 18)) {
|
||||
# for monitors
|
||||
$query_sql4 = "INSERT INTO tagente_estado (id_agente_modulo, datos, timestamp, cambio, estado, id_agente, last_try, utimestamp, current_interval, running_by) VALUES ($last_id_agente_modulo, '', '0000-00-00 00:00:00', 0, 0, $agent_id, '0000-00-00 00:00:00', 0, $interval, 0)";
|
||||
} else {
|
||||
# not monitors
|
||||
$query_sql4 = "INSERT INTO tagente_estado (id_agente_modulo, datos, timestamp, cambio, estado, id_agente, last_try, utimestamp, current_interval, running_by) VALUES ($last_id_agente_modulo, '', '0000-00-00 00:00:00', 0, 100, $agent_id, '0000-00-00 00:00:00', 0, $interval, 0)";
|
||||
}
|
||||
$dbh->do($query_sql4);
|
||||
}
|
||||
$exec_sql2->finish();
|
||||
|
|
Loading…
Reference in New Issue