2009-04-17 Ramon Novoa <rnovoa@artica.es>

* lib/PandoraFMS/PluginServer.pm, lib/PandoraFMS/PredictionServer.pm,
          lib/PandoraFMS/ReconServer.pm, lib/PandoraFMS/NetworkServer.pm,
          lib/PandoraFMS/WMIServer.pm: Fixed some references to database
          columns.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1623 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
ramonn 2009-04-17 08:33:47 +00:00
parent 726c1a8ba0
commit dc1cb9ca66
6 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,10 @@
2009-04-17 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/PluginServer.pm, lib/PandoraFMS/PredictionServer.pm,
lib/PandoraFMS/ReconServer.pm, lib/PandoraFMS/NetworkServer.pm,
lib/PandoraFMS/WMIServer.pm: Fixed some references to database
columns.
2009-04-16 Ramon Novoa <rnovoa@artica.es> 2009-04-16 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/ProducerConsumerServer.pm: Important fix. Queued * lib/PandoraFMS/ProducerConsumerServer.pm: Important fix. Queued

View File

@ -100,7 +100,7 @@ sub data_producer ($) {
} else { } else {
@rows = get_db_rows ($dbh, 'SELECT DISTINCT(tagente_modulo.id_agente_modulo), tagente_modulo.flag, tagente_estado.last_execution_try, UNIX_TIMESTAMP() - tagente_estado.current_interval - tagente_estado.last_execution_try AS time_left @rows = get_db_rows ($dbh, 'SELECT DISTINCT(tagente_modulo.id_agente_modulo), tagente_modulo.flag, tagente_estado.last_execution_try, UNIX_TIMESTAMP() - tagente_estado.current_interval - tagente_estado.last_execution_try AS time_left
FROM tagente, tagente_modulo, tagente_estado FROM tagente, tagente_modulo, tagente_estado
WHERE ((server_name = ?) OR (server_name = ANY(SELECT server_name FROM tserver WHERE status = 0))) WHERE ((server_name = ?) OR (server_name = ANY(SELECT name FROM tserver WHERE status = 0)))
AND tagente_modulo.id_agente = tagente.id_agente AND tagente_modulo.id_agente = tagente.id_agente
AND tagente.disabled = 0 AND tagente.disabled = 0
AND tagente_modulo.disabled = 0 AND tagente_modulo.disabled = 0

View File

@ -98,7 +98,7 @@ sub data_producer ($) {
} else { } else {
@rows = get_db_rows ($dbh, 'SELECT DISTINCT(tagente_modulo.id_agente_modulo), tagente_modulo.flag, UNIX_TIMESTAMP() - tagente_estado.current_interval - tagente_estado.last_execution_try AS time_left @rows = get_db_rows ($dbh, 'SELECT DISTINCT(tagente_modulo.id_agente_modulo), tagente_modulo.flag, UNIX_TIMESTAMP() - tagente_estado.current_interval - tagente_estado.last_execution_try AS time_left
FROM tagente, tagente_modulo, tagente_estado FROM tagente, tagente_modulo, tagente_estado
WHERE ((server_name = ?) OR (server_name = ANY(SELECT server_name FROM tserver WHERE status = 0))) WHERE ((server_name = ?) OR (server_name = ANY(SELECT name FROM tserver WHERE status = 0)))
AND tagente_modulo.id_agente = tagente.id_agente AND tagente_modulo.id_agente = tagente.id_agente
AND tagente.disabled = 0 AND tagente.disabled = 0
AND tagente_modulo.disabled = 0 AND tagente_modulo.disabled = 0

View File

@ -94,7 +94,7 @@ sub data_producer ($) {
} else { } else {
@rows = get_db_rows ($dbh, 'SELECT DISTINCT(tagente_modulo.id_agente_modulo), tagente_modulo.flag @rows = get_db_rows ($dbh, 'SELECT DISTINCT(tagente_modulo.id_agente_modulo), tagente_modulo.flag
FROM tagente, tagente_modulo, tagente_estado FROM tagente, tagente_modulo, tagente_estado
WHERE ((server_name = ?) OR (server_name = ANY(SELECT server_name FROM tserver WHERE status = 0))) WHERE ((server_name = ?) OR (server_name = ANY(SELECT name FROM tserver WHERE status = 0)))
AND tagente_modulo.id_agente = tagente.id_agente AND tagente_modulo.id_agente = tagente.id_agente
AND tagente.disabled = 0 AND tagente.disabled = 0
AND tagente_modulo.disabled = 0 AND tagente_modulo.disabled = 0

View File

@ -326,7 +326,7 @@ sub create_network_profile_modules {
# Create the module # Create the module
my $module_id = db_insert ($dbh, 'INSERT INTO tagente_modulo (id_agente, id_tipo_modulo, descripcion, nombre, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, ip_target, id_module_group, flag, disabled, plugin_user, plugin_pass, plugin_parameter, max_timeout, id_modulo ) my $module_id = db_insert ($dbh, 'INSERT INTO tagente_modulo (id_agente, id_tipo_modulo, descripcion, nombre, max, min, module_interval, tcp_port, tcp_send, tcp_rcv, snmp_community, snmp_oid, ip_target, id_module_group, flag, disabled, plugin_user, plugin_pass, plugin_parameter, max_timeout, id_modulo )
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 1, 0, ?, ?, ?, ?, ?)', VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 1, 0, ?, ?, ?, ?, ?)',
$agent_id, $component->{'type'}, $component->{'description'}, $component->{'name'}, $component->{'max'}, $component->{'min'}, $component->{'interval'}, $component->{'tcp_port'}, $component->{'tcp_send'}, $component->{'tcp_rcv'}, $component->{'snmp_community'}, $agent_id, $component->{'type'}, $component->{'description'}, $component->{'name'}, $component->{'max'}, $component->{'min'}, $component->{'module_interval'}, $component->{'tcp_port'}, $component->{'tcp_send'}, $component->{'tcp_rcv'}, $component->{'snmp_community'},
$component->{'snmp_oid'}, $addr, $component->{'id_module_group'}, $component->{'plugin_user'}, $component->{'plugin_pass'}, $component->{'plugin_parameter'}, $component->{'max_timeout'}, $component->{'id_modulo'}); $component->{'snmp_oid'}, $addr, $component->{'id_module_group'}, $component->{'plugin_user'}, $component->{'plugin_pass'}, $component->{'plugin_parameter'}, $component->{'max_timeout'}, $component->{'id_modulo'});
logger($pa_config, 'Recon Server: Creating module ' . $component->{'name'} . " for agent $addr", 3); logger($pa_config, 'Recon Server: Creating module ' . $component->{'name'} . " for agent $addr", 3);

View File

@ -99,7 +99,7 @@ sub data_producer ($) {
} else { } else {
@rows = get_db_rows ($dbh, 'SELECT DISTINCT(tagente_modulo.id_agente_modulo), tagente_modulo.flag, UNIX_TIMESTAMP() - tagente_estado.current_interval - tagente_estado.last_execution_try AS time_left @rows = get_db_rows ($dbh, 'SELECT DISTINCT(tagente_modulo.id_agente_modulo), tagente_modulo.flag, UNIX_TIMESTAMP() - tagente_estado.current_interval - tagente_estado.last_execution_try AS time_left
FROM tagente, tagente_modulo, tagente_estado, tserver FROM tagente, tagente_modulo, tagente_estado, tserver
WHERE ((server_name = ?) OR (server_name = ANY(SELECT server_name FROM tserver WHERE status = 0))) WHERE ((server_name = ?) OR (server_name = ANY(SELECT name FROM tserver WHERE status = 0)))
AND tagente_modulo.id_agente = tagente.id_agente AND tagente_modulo.id_agente = tagente.id_agente
AND tagente.disabled = 0 AND tagente.disabled = 0
AND tagente_modulo.disabled = 0 AND tagente_modulo.disabled = 0