'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 " | ".__("Group")." | "; echo ""; echo " | ".__("Agents")." | "; echo "".__("Agent unknown")." | "; echo "".__("Unknown")." | "; echo "".__("Not Init")." | "; echo "".__("Normal")." | "; echo "".__("Warning")." | "; echo "".__("Critical")." | "; echo "".__("Alert fired")." | "; // 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 "||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
"; echo print_group_icon ($id_group, true); echo " | "; echo ""; echo ""; echo printTruncateText($group_name, 35); echo ""; echo " | "; echo ""; if (check_acl ($config['id_user'], $id_group, "AW")) { echo '' . print_image("images/target.png", true, array("border" => '0')) . ''; } echo " | "; // Total agents echo ""; if ($data["total_agents"] > 0) echo $data["total_agents"]; // Agents unknown if ($data["agents_unknown"] > 0) { echo " | "; echo $data["agents_unknown"]; echo " | "; } else { echo ""; } // Monitors Unknown if ($data["monitor_unknown"] > 0){ echo " | "; echo $data["monitor_unknown"]; echo " | "; } else { echo ""; } // Monitors Not Init if ($data["monitor_not_init"] > 0){ echo " | "; echo $data["monitor_not_init"]; echo " | "; } else { echo ""; } // Monitors OK echo " | "; if ($data["monitor_ok"] > 0) { echo $data["monitor_ok"]; } else { echo " "; } echo " | "; // Monitors Warning if ($data["monitor_warning"] > 0){ echo ""; echo $data["monitor_warning"]; echo " | "; } else { echo ""; } // Monitors Critical if ($data["monitor_critical"] > 0){ echo " | "; echo $data["monitor_critical"]; echo " | "; } else { echo ""; } // Alerts fired if ($data["monitor_alerts_fired"] > 0){ echo " | "; echo $data["monitor_alerts_fired"]; echo " | "; } else { echo ""; } echo " |