diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 49ede34d20..d4af8b0d05 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,7 @@ +2007-08-02 Sancho Lerena + + * Fixed bug #1757084 for Data Server lag check. + 2007-07-31 Sancho Lerena * operation/agentes/bulbs.php: Legend now shown updated image. diff --git a/pandora_console/index.php b/pandora_console/index.php index 61f2dc24e0..4bba613b92 100644 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -24,14 +24,14 @@ // Silk icon set 1.3 (cc) Mark James, http://www.famfamfam.com/lab/icons/silk/ // Pandora FMS 1.x uses Pear Image::Graph code -//Pandora Version, if not defined here it would take from config.php -$build_version="PC070718"; +//Pandora Version +$build_version="PC070802"; $pandora_version="v1.3-dev"; global $build_version; global $pandora_version; // Set to 1 to do not check for installer or config file (for development!). -$develop_bypass = 0; +$develop_bypass = 1; if ($develop_bypass != 1){ // If no config file, automatically try to install diff --git a/pandora_console/operation/agentes/tactical.php b/pandora_console/operation/agentes/tactical.php index f07f993f27..d5ae633dea 100644 --- a/pandora_console/operation/agentes/tactical.php +++ b/pandora_console/operation/agentes/tactical.php @@ -276,8 +276,10 @@ if ($network_server == 1) $sql1 = "SELECT MIN(last_execution_try),current_interval FROM tagente_estado WHERE last_execution_try > 0 AND running_by=$id_server GROUP BY current_interval ORDER BY 1"; if ($data_server == 1) - $sql1 = "SELECT MAX(last_execution_try), current_interval, id_agente FROM tagente_estado WHERE last_execution_try > 0 AND running_by=$id_server GROUP BY id_agente ORDER BY 1 ASC"; - + // This only checks for agent with a last_execution_try of at + // maximun: ten times it's interval.... if is bigger, it probably + // will be because an agent down + $sql1 = "SELECT MAX(last_execution_try), current_interval, id_agente FROM tagente_estado WHERE last_execution_try > 0 AND (tagente_estado.last_execution_try + (tagente_estado.current_interval *10) > UNIX_TIMESTAMP()) AND running_by=$id_server GROUP BY id_agente ORDER BY 1 ASC LIMIT 1"; $nowtime = time(); $maxlag=0; if ($result1=mysql_query($sql1)) diff --git a/pandora_console/operation/servers/view_server.php b/pandora_console/operation/servers/view_server.php index edfd1f9a7e..74f3fbb797 100644 --- a/pandora_console/operation/servers/view_server.php +++ b/pandora_console/operation/servers/view_server.php @@ -161,7 +161,10 @@ if (comprueba_login() == 0) { if ($network_server == 1) $sql1 = "SELECT MIN(last_execution_try),current_interval FROM tagente_estado WHERE last_execution_try > 0 AND running_by=$id_server GROUP BY current_interval ORDER BY 1"; if ($data_server == 1) - $sql1 = "SELECT MAX(last_execution_try), current_interval, id_agente FROM tagente_estado WHERE last_execution_try > 0 AND running_by=$id_server GROUP BY id_agente ORDER BY 1 ASC"; + // This only checks for agent with a last_execution_try of at + // maximun: ten times it's interval.... if is bigger, it probably + // will be because an agent down + $sql1 = "SELECT MAX(last_execution_try), current_interval, id_agente FROM tagente_estado WHERE last_execution_try > 0 AND (tagente_estado.last_execution_try + (tagente_estado.current_interval *10) > UNIX_TIMESTAMP()) AND running_by=$id_server GROUP BY id_agente ORDER BY 1 ASC LIMIT 1"; $nowtime = time(); $maxlag=0; if ($result1=mysql_query($sql1))