mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
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
f51c41e3fa
commit
c070934a54
@ -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>
|
2008-07-02 Esteban Sanchez <estebans@artica.es>
|
||||||
|
|
||||||
* include/functions_html.php: Fixed a typo in print_table() that was
|
* 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 = get_user_groups ($id_user);
|
||||||
$groups_info = array ();
|
$groups_info = array ();
|
||||||
$total_agents = 0;
|
$total_agents = 0;
|
||||||
$ahora = date("Y/m/d H:i:s");
|
$now = time ();
|
||||||
$ahora_sec = strtotime($ahora);
|
|
||||||
// Prepare data to show
|
// Prepare data to show
|
||||||
// For each valid group for this user, take data from agent and modules
|
// For each valid group for this user, take data from agent and modules
|
||||||
foreach ($groups as $id_group => $group_name) {
|
foreach ($groups as $id_group => $group_name) {
|
||||||
@ -73,7 +72,8 @@ foreach ($groups as $id_group => $group_name) {
|
|||||||
'name' => $group_name);
|
'name' => $group_name);
|
||||||
|
|
||||||
// SQL Join to get monitor status for agents belong this group
|
// 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
|
FROM tagente, tagente_estado, tagente_modulo
|
||||||
WHERE tagente.disabled = 0 AND tagente.id_grupo = %d
|
WHERE tagente.disabled = 0 AND tagente.id_grupo = %d
|
||||||
AND tagente.id_agente = tagente_estado.id_agente AND tagente_estado.estado != 100
|
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);
|
$id_group);
|
||||||
$result = mysql_query ($sql);
|
$result = mysql_query ($sql);
|
||||||
while ($module = mysql_fetch_array ($result)) {
|
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)) {
|
if ($seconds >= ($module['current_interval'] * 2)) {
|
||||||
$group_info["down"]++;
|
$group_info["down"]++;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user