'; echo ""; 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 ""; } 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 print_group_icon ($id_group, true); echo ""; echo ""; echo ""; echo $group_name; echo ""; echo ""; echo ""; if (give_acl ($config['id_user'], $id_group, "AW")) { echo ''; } 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 ""; echo " "; } echo ""; } else { echo "
".__('There are no defined agents')."
"; } ?>