".__('Pandora agents')." » ".__('Summary'). print_help_icon ("agent_status", true); echo ""; if ($group_id > 1) { echo '
'; if ($search != ""){ $filter = array ("string" => '%'.$search.'%'); } else { $filter = array (); } // Show only selected groups if ($group_id > 1) { $groups = $group_id; $agent_names = get_group_agents ($group_id, $filter, "upper"); // Not selected any specific group } else { $user_group = get_user_groups ($config["id_user"], "AR"); $groups = array_keys ($user_group); $agent_names = get_group_agents (array_keys ($user_group), $filter, "upper"); } $total_agents = 0; $agents = false; if (! empty ($agent_names)) { $total_agents = get_agents (array (//'id_agente' => array_keys ($agent_names), 'order' => 'nombre ASC', 'id_grupo' => $groups), array ('COUNT(*) as total')); $total_agents = isset ($total_agents[0]['total']) ? $total_agents[0]['total'] : 0; $agents = get_agents (array ('id_agente' => array_keys ($agent_names), 'order' => 'nombre ASC', 'id_grupo' => $groups, 'offset' => (int) get_parameter ('offset'), 'limit' => (int) $config['block_size']), array ('id_agente', 'id_grupo', 'id_os', 'intervalo'));} if (empty ($agents)) { $agents = array (); } // Prepare pagination pagination ($total_agents, get_url_refresh (array ('group_id' => $group_id, 'search' => $search))); // Show data. $table->cellpadding = 4; $table->cellspacing = 4; $table->width = "98%"; $table->class = "databox"; $table->head = array (); $table->head[0] = __('Agent'); $table->head[1] = __('OS'); $table->head[2] = __('Interval'); $table->head[3] = __('Group'); $table->head[4] = __('Modules'); $table->head[5] = __('Status'); $table->head[6] = __('Alerts'); $table->head[7] = __('Last contact'); $table->align = array (); $table->align[1] = "center"; $table->align[2] = "center"; $table->align[3] = "center"; $table->align[4] = "center"; $table->align[5] = "center"; $table->align[6] = "center"; $table->align[7] = "right"; $table->data = array (); $rowPair = true; $iterator = 0; foreach ($agents as $agent) { if ($rowPair) $table->rowclass[$iterator] = 'rowPair'; else $table->rowclass[$iterator] = 'rowOdd'; $rowPair = !$rowPair; $iterator++; $agent_info = get_agent_module_info ($agent["id_agente"]); $data = array (); $data[0] = ''; if (give_acl ($config['id_user'], $agent["id_grupo"], "AW")) { $data[0] .= ''; $data[0] .= print_image ("images/setup.png", true, array ("border" => 0, "width" => 16)); $data[0] .= ' '; } $data[0] .= print_agent_name ($agent["id_agente"], true, "none"); $data[1] = print_os_icon ($agent["id_os"], false, true); //The interval we are thinking that it must be the agent interval in this //cell and it'snt the interval of modules. // if ($agent_info["interval"] > $agent["intervalo"]) { // $data[2] = ''.$agent_info["interval"].''; // } else { // $data[2] = $agent["intervalo"]; // } $data[2] = $agent["intervalo"]; $data[3] = print_group_icon ($agent["id_grupo"], true); $data[4] = ''; $data[4] .= $agent_info["modules"]; if ($agent_info["monitor_critical"] > 0) $data[4] .= ' : '.$agent_info["monitor_critical"].''; if ($agent_info["monitor_warning"] > 0) $data[4] .= ' : '.$agent_info["monitor_warning"].''; if ($agent_info["monitor_normal"] > 0) $data[4] .= ' : '.$agent_info["monitor_normal"].''; if ($agent_info["monitor_down"] > 0) $data[4] .= ' : '.$agent_info["monitor_down"].''; $data[4] .= ''; $data[5] = $agent_info["status_img"]; $data[6] = $agent_info["alert_img"]; $data[7] = print_timestamp ($agent_info["last_contact"], true); array_push ($table->data, $data); } if (!empty ($table->data)) { print_table ($table); unset ($table); } else { echo '