1)); } else { db_process_sql("UPDATE `tagente_modulo` SET `flag` = 1 WHERE `id_agente` = ANY(SELECT id_agente FROM tagente WHERE id_grupo = " . $group . ")"); } } else { db_pandora_audit("ACL Violation", "Trying to set flag for groups"); require ("general/noaccess.php"); exit; } } if ($config["realtimestats"] == 0) { $updated_time =""; $updated_time .= __('Last update'). " : ". ui_print_timestamp (db_get_sql ("SELECT min(utimestamp) FROM tgroup_stat"), true); $updated_time .= ""; } else { $updated_time = __("Updated at realtime"); } // Header ui_print_page_header (__("Group view"), "images/group.png", false, "", false, $updated_time); $strict_user = db_get_value('strict_acl', 'tusuario', 'id_user', $config['id_user']); //Groups and tags $result_groups = group_get_groups_list($config['id_user'], $strict_user, 'AR', true, true); $count = count($result_groups); if ($count == 1) { if ($result_groups[0]['_id_'] == 0) { unset($result_groups[0]); } } ui_pagination($count); if (!empty($result_groups)) { echo '
" . __("Force") . " | "; echo "" . __("Group") . " | "; echo "" . __("Agents") . " | "; echo "" . __("Agent unknown") . " | "; echo "" . __("Agents not init") . " | "; echo "" . __("Unknown") . " | "; echo "" . __("Not Init") . " | "; echo "" . __("Normal") . " | "; echo "" . __("Warning") . " | "; echo "" . __("Critical") . " | "; echo "" . __("Alert fired") . " | "; foreach ($result_groups as $data) { // Calculate entire row color if ($data["_monitors_alerts_fired_"] > 0){ $color_class = 'group_view_alrm'; $status_image = ui_print_status_image ('agent_alertsfired_ball.png', "", true); } elseif ($data["_monitors_critical_"] > 0) { $color_class = 'group_view_crit'; $status_image = ui_print_status_image ('agent_critical_ball.png', "", true); } elseif ($data["_monitors_warning_"] > 0) { $color_class = 'group_view_warn'; $status_image = ui_print_status_image ('agent_warning_ball.png', "", true); } elseif (($data["_monitors_unknown_"] > 0) || ($data["_agents_unknown_"] > 0)) { $color_class = 'group_view_unk'; $status_image = ui_print_status_image ('agent_no_monitors_ball.png', "", true); } elseif ($data["_monitors_ok_"] > 0) { $color_class = 'group_view_ok'; $status_image = ui_print_status_image ('agent_ok_ball.png', "", true); } else { $color_class = ''; $status_image = ui_print_status_image ('agent_no_data_ball.png', "", true); } echo "
---|---|---|---|---|---|---|---|---|---|---|
"; if (!isset($data['_is_tag_']) && check_acl ($config['id_user'], $data['_id_'], "AW")) { echo '' . html_print_image("images/target.png", true, array("border" => '0', "title" => __('Force'))) . ''; } echo " | "; $prefix = ""; if (!isset($data['_is_tag_'])) { if ($data['_id_'] != 0) { $prefix = ' '; } } // Groupname echo ""; if (isset($data['_is_tag_'])) { $deep = ""; $link = ""; } else { $deep = groups_get_group_deep ($data['_id_']); $link = ""; } $group_name = "" . ui_print_truncate_text($data['_name_'], 50) . ""; $item_icon = ''; if (isset($data['_iconImg_']) && !empty($data['_iconImg_'])) $item_icon = $data['_iconImg_']; if ($data['_name_'] != "All") echo $deep . $link . $group_name . ""; else echo $link . $group_name . ""; echo " | "; // Total agents echo ""; if (isset($data['_is_tag_'])) { $link = ""; } else { $link = ""; } if ($data["_total_agents_"] > 0) { echo $link . $data["_total_agents_"] . ""; } echo " | "; // Agents unknown echo ""; if (isset($data['_is_tag_'])) { $link = ""; } else { $link = ""; } if ($data["_agents_unknown_"] > 0) { echo $link . $data["_agents_unknown_"] . ""; } echo " | "; // Agents not init echo ""; if (isset($data['_is_tag_'])) { $link = ""; } else { $link = ""; } if ($data["_agents_not_init_"] > 0) { echo $link . $data["_agents_not_init_"] . ""; } echo " | "; // Monitors unknown echo ""; if (!isset($data['_is_tag_'])) { $link = ""; } else { $link = ""; } if ($data["_monitors_unknown_"] > 0) { echo $link . $data["_monitors_unknown_"] . ""; } echo " | "; // Monitors not init echo ""; if (!isset($data['_is_tag_'])) { $link = ""; } else { $link = ""; } if ($data["_monitors_not_init_"] > 0) { echo $link . $data["_monitors_not_init_"] . ""; } echo " | "; // Monitors OK echo ""; if (!isset($data['_is_tag_'])) { $link = ""; } else { $link = ""; } if ($data["_monitors_ok_"] > 0) { echo $link . $data["_monitors_ok_"] . ""; } echo " | "; // Monitors Warning echo ""; if (!isset($data['_is_tag_'])) { $link = ""; } else { $link = ""; } if ($data["_monitors_warning_"] > 0) { echo $link . $data["_monitors_warning_"] . ""; } echo " | "; // Monitors Critical echo ""; if (!isset($data['_is_tag_'])) { $link = ""; } else { $link = ""; } if ($data["_monitors_critical_"] > 0) { echo $link . $data["_monitors_critical_"] . ""; } echo " | "; // Alerts fired echo ""; if (!isset($data['_is_tag_'])) { $link = ""; } else { $link = ""; } if ($data["_monitors_alerts_fired_"] > 0){ echo $link . $data["_monitors_alerts_fired_"] . ""; } echo ' | '; echo "