2008-07-02 Esteban Sanchez <estebans@artica.es>
* operation/agentes/estado_grupo.php: Fixed missing variable on lag calculation. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@932 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
89c0602b58
commit
52ebf8ee50
|
@ -1,3 +1,8 @@
|
|||
2008-07-02 Esteban Sanchez <estebans@artica.es>
|
||||
|
||||
* operation/agentes/estado_grupo.php: Fixed missing variable on lag
|
||||
calculation.
|
||||
|
||||
2008-07-02 Esteban Sanchez <estebans@artica.es>
|
||||
|
||||
* include/functions_html.php: Fixed a typo in print_table() that was
|
||||
|
|
|
@ -49,8 +49,7 @@ if (isset ($_GET["update_netgroup"])) {
|
|||
$groups = get_user_groups ($id_user);
|
||||
$groups_info = array ();
|
||||
$total_agents = 0;
|
||||
$ahora = date("Y/m/d H:i:s");
|
||||
$ahora_sec = strtotime($ahora);
|
||||
$now = time ();
|
||||
// Prepare data to show
|
||||
// For each valid group for this user, take data from agent and modules
|
||||
foreach ($groups as $id_group => $group_name) {
|
||||
|
@ -73,7 +72,8 @@ foreach ($groups as $id_group => $group_name) {
|
|||
'name' => $group_name);
|
||||
|
||||
// SQL Join to get monitor status for agents belong this group
|
||||
$sql = sprintf ("SELECT tagente_estado.datos, tagente_estado.current_interval
|
||||
$sql = sprintf ("SELECT tagente_estado.datos, tagente_estado.current_interval,
|
||||
tagente_estado.utimestamp
|
||||
FROM tagente, tagente_estado, tagente_modulo
|
||||
WHERE tagente.disabled = 0 AND tagente.id_grupo = %d
|
||||
AND tagente.id_agente = tagente_estado.id_agente AND tagente_estado.estado != 100
|
||||
|
@ -83,7 +83,8 @@ foreach ($groups as $id_group => $group_name) {
|
|||
$id_group);
|
||||
$result = mysql_query ($sql);
|
||||
while ($module = mysql_fetch_array ($result)) {
|
||||
if ($config["show_unknown"] > 0){
|
||||
if ($config["show_unknown"] > 0) {
|
||||
$seconds = $now - $module['utimestamp'];
|
||||
if ($seconds >= ($module['current_interval'] * 2)) {
|
||||
$group_info["down"]++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue