2007-08-02 Sancho Lerena <slerena@artica.es>

* Fixed bug #1757084 for Data Server lag check.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@583 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2007-08-02 12:24:26 +00:00
parent 66a875017e
commit d55e219c23
4 changed files with 15 additions and 6 deletions

View File

@ -1,3 +1,7 @@
2007-08-02 Sancho Lerena <slerena@artica.es>
* Fixed bug #1757084 for Data Server lag check.
2007-07-31 Sancho Lerena <slerena@artica.es> 2007-07-31 Sancho Lerena <slerena@artica.es>
* operation/agentes/bulbs.php: Legend now shown updated image. * operation/agentes/bulbs.php: Legend now shown updated image.

View File

@ -24,14 +24,14 @@
// Silk icon set 1.3 (cc) Mark James, http://www.famfamfam.com/lab/icons/silk/ // 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 FMS 1.x uses Pear Image::Graph code
//Pandora Version, if not defined here it would take from config.php //Pandora Version
$build_version="PC070718"; $build_version="PC070802";
$pandora_version="v1.3-dev"; $pandora_version="v1.3-dev";
global $build_version; global $build_version;
global $pandora_version; global $pandora_version;
// Set to 1 to do not check for installer or config file (for development!). // 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 ($develop_bypass != 1){
// If no config file, automatically try to install // If no config file, automatically try to install

View File

@ -276,8 +276,10 @@
if ($network_server == 1) 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"; $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) 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(); $nowtime = time();
$maxlag=0; $maxlag=0;
if ($result1=mysql_query($sql1)) if ($result1=mysql_query($sql1))

View File

@ -161,7 +161,10 @@ if (comprueba_login() == 0) {
if ($network_server == 1) 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"; $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) 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(); $nowtime = time();
$maxlag=0; $maxlag=0;
if ($result1=mysql_query($sql1)) if ($result1=mysql_query($sql1))