'ANY(SELECT id_agente FROM tagente WHERE id_grupo = ' . $group . ')'); process_sql_update('tagente_modulo', array('flag' => 1), $where); } else { pandora_audit("ACL Violation", "Trying to set flag for groups"); require ("general/noaccess.php"); exit; } } // Get group list that user has access $groups = get_user_groups ($config['id_user']); if ($config["realtimestats"] == 0){ $updated_time = __('Last update'). " : ". print_timestamp (get_db_sql ("SELECT min(utimestamp) FROM tgroup_stat"), true); } else { $updated_time = __("Updated at realtime"); } // Header print_page_header (__("Group view"), "images/bricks.png", false, "", false, $updated_time ); // Init vars $groups_info = array (); $counter = 1; $agents = get_group_agents(array_keys($groups)); if (count($agents) > 0) { echo ''; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; // For each valid group for this user, take data from agent and modules foreach ($groups as $id_group => $group_name) { if ($id_group < 1) continue; // Skip group 0 // Get stats for this group $data = get_group_stats($id_group); if ($data["total_agents"] == 0) continue; // Skip empty groups // Calculate entire row color if ($data["monitor_alerts_fired"] > 0){ echo ""; } elseif ($data["monitor_critical"] > 0) { echo ""; } elseif ($data["monitor_warning"] > 0) { echo ""; } elseif (($data["monitor_unknown"] > 0) || ($data["agents_unknown"] > 0)) { echo ""; } elseif ($data["monitor_ok"] > 0) { echo ""; } else { echo ""; } // Group name echo ""; echo ""; echo ""; // Total agents echo ""; } else { echo ""; } // Monitors Unknown if ($data["monitor_unknown"] > 0){ echo ""; } else { echo ""; } // Monitors Not Init if ($data["monitor_not_init"] > 0){ echo ""; } else { echo ""; } // Monitors OK echo ""; // Monitors Warning if ($data["monitor_warning"] > 0){ echo ""; } else { echo ""; } // Monitors Critical if ($data["monitor_critical"] > 0){ echo ""; } else { echo ""; } // Alerts fired if ($data["monitor_alerts_fired"] > 0){ echo ""; } else { echo ""; } echo ""; echo ""; } echo "
"; echo "".__("Group").""; echo "".__("Agents")."".__("Agent unknown")."".__("Unknown")."".__("Not Init")."".__("Normal")."".__("Warning")."".__("Critical")."".__("Alert fired")."
"; echo print_group_icon ($id_group, true); echo ""; echo ""; echo printTruncateText($group_name, 35); echo ""; echo ""; if (check_acl ($config['id_user'], $id_group, "AW")) { echo '' . print_image("images/target.png", true, array("border" => '0')) . ''; } echo ""; if ($data["total_agents"] > 0) echo $data["total_agents"]; // Agents unknown if ($data["agents_unknown"] > 0) { echo ""; echo $data["agents_unknown"]; echo ""; echo $data["monitor_unknown"]; echo ""; echo $data["monitor_not_init"]; echo ""; if ($data["monitor_ok"] > 0) { echo $data["monitor_ok"]; } else { echo " "; } echo ""; echo $data["monitor_warning"]; echo ""; echo $data["monitor_critical"]; echo ""; echo $data["monitor_alerts_fired"]; echo "
"; } else { echo "
".__('There are no defined agents')."
"; } ?>