diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 9de07203db..49506fb7a0 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,15 @@ +2008-01-08 Sancho Lerena + + * pandoradb_data.sql: Added keep_alive as module id 100 for the new keepalive + management. Old way (from 1.2) is now deprecated and not used. + + * operation/agentes/estado_agente.php: Style changes, not code. + + * images/mod_keepalive.png: Added new icon for keepalive moduletype. + + * godmode/agentes/configurar_agente.php: Create an agent creates automatically + a keepalive module AND a tagente_estado record. + 2007-12-16 Sancho Lerena * pandoradb.sql: New field for tagente_modulo: disabled, to be diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 74398ea537..bd5e5ff488 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -118,8 +118,14 @@ if (isset($_POST["create_agent"])) { // Create a new and shining agent $agent_created_ok = 1; $id_agente = mysql_insert_id(); // Create special MODULE agent_keepalive - $sql_insert ="INSERT INTO tagente_modulo (nombre, id_agente, id_tipo_modulo, descripcion) VALUES ('agent_keepalive', ".$id_agente.",-1,'Agent Keepalive monitor')"; + $sql_insert ="INSERT INTO tagente_modulo (nombre, id_agente, id_tipo_modulo, descripcion) VALUES ('agent_keepalive', ".$id_agente.",100,'Agent Keepalive monitor')"; $result=mysql_query($sql_insert); + $id_agent_module = mysql_insert_id(); + + // And create MODULE agent_keepalive in tagente_estado table + $sql_insert2 ="INSERT INTO tagente_estado (id_agente_modulo, datos, timestamp, cambio, estado, id_agente, last_try, utimestamp, current_interval, running_by, last_execution_try) VALUES ($id_agent_module, 1, '', 0, 1, $id_agente, 0,0,0,0,0)"; + $result = mysql_query ($sql_insert2); + // Create address for this agent in taddress agent_add_address ($id_agente, $direccion_agente); } diff --git a/pandora_console/images/mod_keepalive.png b/pandora_console/images/mod_keepalive.png new file mode 100644 index 0000000000..56626132fc Binary files /dev/null and b/pandora_console/images/mod_keepalive.png differ diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index a7aad4ba0e..c0045ca1e0 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -177,11 +177,11 @@ if (comprueba_login() == 0) { $numero_monitor++; $monitor_down++; } - elseif ($est_modulo <> 100) { // estado=100 are data modules + elseif ($est_modulo != 100) { // estado=100 are data modules $estado_general = $estado_general + $est_modulo; $estado_cambio = $estado_cambio + $row_t["cambio"]; $numero_monitor ++; - if ($est_modulo <> 0) + if ($est_modulo != 0) $monitor_bad++; else $monitor_ok++; diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 21a6e8f59a..7353ac5a69 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -161,7 +161,7 @@ INSERT INTO `torigen` VALUES ('Operating System event'),('IDS events'),('Firewal -- Dumping data for table `ttipo_modulo` -- -INSERT INTO `ttipo_modulo` VALUES (1,'generic_data',0,'Generic module to adquire numeric data','mod_data.png'),(2,'generic_proc',1,'Generic module to adquire boolean data','mod_proc.png'),(3,'generic_data_string',0,'Generic module to adquire alphanumeric data','mod_string.png'),(4,'generic_data_inc',0,'Generic module to adquire numeric incremental data','mod_data_inc.png'),(6,'remote_icmp_proc',3,'Remote ICMP network agent, boolean data','mod_icmp_proc.png'),(7,'remote_icmp',2,'Remote ICMP network agent (latency)','mod_icmp_data.png'),(8,'remote_tcp',2,'Remote TCP network agent, numeric data','mod_tcp_data.png'),(9,'remote_tcp_proc',3,'Remote TCP network agent, boolean data','mod_tcp_proc.png'),(10,'remote_tcp_string',2,'Remote TCP network agent, alphanumeric data','mod_tcp_string.png'),(11,'remote_tcp_inc',2,'Remote TCP network agent, incremental data','mod_tcp_inc.png'),(15,'remote_snmp',2,'Remote SNMP network agent, numeric data','mod_snmp_data.png'),(16,'remote_snmp_inc',2,'Remote SNMP network agent, incremental data','mod_snmp_inc.png'),(17,'remote_snmp_string',2,'Remote SNMP network agent, alphanumeric data','mod_snmp_string.png'),(18,'remote_snmp_proc',1,'Remote SNMP network agent, boolean data','mod_snmp_proc.png'); +INSERT INTO `ttipo_modulo` VALUES (1,'generic_data',0,'Generic module to adquire numeric data','mod_data.png'),(2,'generic_proc',1,'Generic module to adquire boolean data','mod_proc.png'),(3,'generic_data_string',0,'Generic module to adquire alphanumeric data','mod_string.png'),(4,'generic_data_inc',0,'Generic module to adquire numeric incremental data','mod_data_inc.png'),(6,'remote_icmp_proc',3,'Remote ICMP network agent, boolean data','mod_icmp_proc.png'),(7,'remote_icmp',2,'Remote ICMP network agent (latency)','mod_icmp_data.png'),(8,'remote_tcp',2,'Remote TCP network agent, numeric data','mod_tcp_data.png'),(9,'remote_tcp_proc',3,'Remote TCP network agent, boolean data','mod_tcp_proc.png'),(10,'remote_tcp_string',2,'Remote TCP network agent, alphanumeric data','mod_tcp_string.png'),(11,'remote_tcp_inc',2,'Remote TCP network agent, incremental data','mod_tcp_inc.png'),(15,'remote_snmp',2,'Remote SNMP network agent, numeric data','mod_snmp_data.png'),(16,'remote_snmp_inc',2,'Remote SNMP network agent, incremental data','mod_snmp_inc.png'),(17,'remote_snmp_string',2,'Remote SNMP network agent, alphanumeric data','mod_snmp_string.png'),(18,'remote_snmp_proc',1,'Remote SNMP network agent, boolean data','mod_snmp_proc.png'), (100,'keep_alive',-1,'KeepAlive','mod_keepalive.png'); -- -- Dumping data for table `tusuario`