2006-03-27 05:37:27 +02:00
|
|
|
<?php
|
2008-04-01 15:53:11 +02:00
|
|
|
// Pandora FMS - the Free Monitoring System
|
2007-03-02 18:56:07 +01:00
|
|
|
// ========================================
|
2008-04-01 15:53:11 +02:00
|
|
|
// Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es
|
|
|
|
// Please see http://pandora.sourceforge.net for full contribution list
|
|
|
|
|
2006-07-09 02:33:33 +02:00
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
2008-04-01 15:53:11 +02:00
|
|
|
// as published by the Free Software Foundation for version 2.
|
2006-07-09 02:33:33 +02:00
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with this program; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2007-06-08 17:55:53 +02:00
|
|
|
|
2007-03-02 18:56:07 +01:00
|
|
|
// Load global vars
|
|
|
|
require("include/config.php");
|
2007-04-11 05:12:48 +02:00
|
|
|
|
2008-04-01 15:53:11 +02:00
|
|
|
if (! isset($config["show_lastalerts"]))
|
|
|
|
$config["show_lastalerts"]=1;
|
2007-03-02 18:56:07 +01:00
|
|
|
|
|
|
|
if (give_acl ($id_user, 0, "AR") != 1) {
|
|
|
|
audit_db ($id_user, $REMOTE_ADDR, "ACL Violation",
|
|
|
|
"Trying to access Agent view (Grouped)");
|
|
|
|
require ("general/noaccess.php");
|
|
|
|
exit;
|
|
|
|
}
|
2007-10-12 18:27:50 +02:00
|
|
|
echo "<h2>".$lang_label["ag_title"]." > ".$lang_label["group_view"]."</h2>";
|
2007-03-02 18:56:07 +01:00
|
|
|
|
2007-03-28 18:07:29 +02:00
|
|
|
// Get group list that user has access
|
2007-03-02 18:56:07 +01:00
|
|
|
$mis_grupos = list_group2 ($id_user);
|
|
|
|
|
|
|
|
// Update network modules for this group
|
|
|
|
// Check for Network FLAG change request
|
|
|
|
if (isset ($_GET["update_netgroup"])) {
|
|
|
|
if (give_acl ($id_user, $_GET["update_netgroup"], "AW") == 1) {
|
|
|
|
$sql = "SELECT * FROM tagente WHERE id_grupo = ".
|
|
|
|
$_GET["update_netgroup"];
|
|
|
|
$result = mysql_query ($sql);
|
|
|
|
while ($row = mysql_fetch_array ($result)) {
|
|
|
|
$id_agente = $row["id_agente"];
|
|
|
|
$query2 ="UPDATE tagente_modulo SET flag=1
|
|
|
|
WHERE id_agente = ".$id_agente;
|
|
|
|
$res = mysql_query ($query2);
|
|
|
|
}
|
2007-01-01 19:41:27 +01:00
|
|
|
}
|
2007-03-02 18:56:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
$contador_grupo = 0;
|
|
|
|
$contador_agente = 0;
|
|
|
|
$array_index = 0;
|
2007-06-08 17:55:53 +02:00
|
|
|
$ahora=date("Y/m/d H:i:s");
|
|
|
|
$ahora_sec = strtotime($ahora);
|
2007-03-12 18:58:52 +01:00
|
|
|
// Prepare data to show
|
2007-03-02 18:56:07 +01:00
|
|
|
// For each valid group for this user, take data from agent and modules
|
|
|
|
foreach ($mis_grupos as $migrupo) {
|
2007-07-16 20:47:39 +02:00
|
|
|
if (($migrupo != "") && ($migrupo != 1)) {
|
2007-03-28 18:07:29 +02:00
|
|
|
$existen_agentes = 0;
|
2007-03-02 18:56:07 +01:00
|
|
|
$grupo[$array_index]["agent"] = 0;
|
|
|
|
$grupo[$array_index]["ok"] = 0;
|
|
|
|
$grupo[$array_index]["bad"] = 0;
|
|
|
|
$grupo[$array_index]["alerts"] = 0;
|
2007-04-13 20:47:58 +02:00
|
|
|
$grupo[$array_index]["down"] = 0;
|
2007-03-02 18:56:07 +01:00
|
|
|
$grupo[$array_index]["icon"] = dame_grupo_icono ($migrupo);
|
|
|
|
$grupo[$array_index]["id_grupo"] = $migrupo;
|
2007-03-28 18:07:29 +02:00
|
|
|
$grupo[$array_index]["group"] = dame_nombre_grupo ($migrupo);
|
|
|
|
|
|
|
|
$sql0 = "SELECT COUNT(id_agente) FROM tagente WHERE id_grupo = $migrupo AND disabled = 0";
|
|
|
|
$result0 = mysql_query ($sql0);
|
|
|
|
$row0 = mysql_fetch_array ($result0);
|
|
|
|
$contador_agente = $contador_agente + $row0[0];
|
|
|
|
$grupo[$array_index]["agent"] = $row0[0];
|
|
|
|
if ($row0[0] > 0)
|
|
|
|
$existen_agentes = 1;
|
|
|
|
|
|
|
|
// SQL Join to get monitor status for agents belong this group
|
2007-08-06 13:44:49 +02:00
|
|
|
$sql1 = "SELECT
|
|
|
|
tagente.id_agente, tagente_estado.estado, tagente_estado.datos, tagente_estado.current_interval,
|
|
|
|
tagente_estado.utimestamp, tagente_estado.id_agente_modulo
|
2008-06-19 16:34:04 +02:00
|
|
|
FROM tagente, tagente_estado, tagente_modulo
|
2007-08-06 13:44:49 +02:00
|
|
|
WHERE tagente.disabled = 0 AND tagente.id_grupo = $migrupo AND
|
|
|
|
tagente.id_agente = tagente_estado.id_agente AND tagente_estado.estado != 100 AND
|
2008-06-19 16:34:04 +02:00
|
|
|
tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND
|
|
|
|
tagente_modulo.disabled = 0 AND
|
2007-08-06 13:44:49 +02:00
|
|
|
tagente_estado.utimestamp != 0";
|
|
|
|
|
2007-03-28 18:07:29 +02:00
|
|
|
if ($result1 = mysql_query ($sql1)){
|
2007-03-02 18:56:07 +01:00
|
|
|
while ($row1 = mysql_fetch_array ($result1)) {
|
2007-03-28 18:07:29 +02:00
|
|
|
$id_agente = $row1[0];
|
|
|
|
$estado = $row1[1];
|
|
|
|
$datos = $row1[2];
|
2007-06-08 17:55:53 +02:00
|
|
|
$module_interval = $row1[3];
|
|
|
|
$seconds = $ahora_sec - $row1[4];
|
|
|
|
$id_agente_modulo = $row1[5];
|
2007-08-06 13:44:49 +02:00
|
|
|
|
2008-04-01 15:53:11 +02:00
|
|
|
|
|
|
|
if ($config["show_unknown"] > 0){
|
|
|
|
if ($seconds >= ($module_interval*2)){
|
|
|
|
$grupo[$array_index]["down"]++;
|
|
|
|
}
|
|
|
|
} elseif ($datos != 0) {
|
2007-03-28 18:07:29 +02:00
|
|
|
$grupo[$array_index]["ok"]++;
|
|
|
|
} else {
|
|
|
|
$grupo[$array_index]["bad"]++;
|
2006-12-15 16:25:19 +01:00
|
|
|
}
|
2007-01-01 19:41:27 +01:00
|
|
|
}
|
2007-03-02 18:56:07 +01:00
|
|
|
}
|
2007-03-28 18:07:29 +02:00
|
|
|
|
2008-04-01 15:53:11 +02:00
|
|
|
if ($config["show_lastalerts"] == 1){
|
2007-03-28 18:07:29 +02:00
|
|
|
// How many alerts has been fired recently for this group:
|
|
|
|
// SQL Join to get alert status for agents belong this group
|
|
|
|
$sql1 = "SELECT SUM(talerta_agente_modulo.times_fired)
|
|
|
|
FROM tagente_modulo, talerta_agente_modulo, tagente WHERE tagente.disabled = 0 AND tagente.id_grupo = $migrupo AND tagente.id_agente = tagente_modulo.id_agente AND talerta_agente_modulo.id_agente_modulo = tagente_modulo.id_agente_modulo";
|
|
|
|
if ($result1 = mysql_query ($sql1)){
|
|
|
|
$row1 = mysql_fetch_array ($result1);
|
|
|
|
$grupo[$array_index]["alerts"] = $row1[0];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-03-02 18:56:07 +01:00
|
|
|
if ($existen_agentes == 1){
|
|
|
|
$array_index++;
|
2006-03-27 05:37:27 +02:00
|
|
|
}
|
2007-01-01 19:41:27 +01:00
|
|
|
}
|
2007-03-28 18:07:29 +02:00
|
|
|
|
2007-03-02 18:56:07 +01:00
|
|
|
}
|
2006-12-15 16:25:19 +01:00
|
|
|
|
2007-03-02 18:56:07 +01:00
|
|
|
// Draw data
|
|
|
|
if ($contador_agente != 0) {
|
|
|
|
$ancho = ceil(sqrt($array_index+1));
|
|
|
|
$real_count =0;
|
2007-03-12 18:58:52 +01:00
|
|
|
echo "<table cellpadding=10 cellspacing=10 border=0>";
|
2007-03-02 18:56:07 +01:00
|
|
|
for ($table=0; $table < $ancho; $table++) {
|
|
|
|
echo "<tr class='bot'>";
|
|
|
|
for ($table_row=0; $table_row < $ancho; $table_row++) {
|
|
|
|
if ($real_count < $array_index) {
|
|
|
|
$group_name = $grupo[$real_count]["group"];
|
|
|
|
$icono_grupo = $grupo[$real_count]["icon"];
|
|
|
|
$icono_type = "";
|
|
|
|
if ($grupo[$real_count]["bad"] > 0) {
|
|
|
|
$icono_type = $icono_type."
|
2007-06-27 19:45:42 +02:00
|
|
|
<img src='images/dot_red.png' alt=''>";
|
2007-03-02 18:56:07 +01:00
|
|
|
}
|
|
|
|
if ($grupo[$real_count]["ok"] > 0) {
|
|
|
|
$icono_type = $icono_type."
|
2007-06-27 19:45:42 +02:00
|
|
|
<img src='images/dot_green.png' alt=''>";
|
2007-03-02 18:56:07 +01:00
|
|
|
}
|
|
|
|
// Show yellow light if there are recent alerts fired for this group
|
|
|
|
if ($grupo[$real_count]["alerts"] > 0 ){
|
|
|
|
$icono_type=$icono_type."
|
2007-06-27 19:45:42 +02:00
|
|
|
<img src='images/dot_yellow.png' alt=''>";
|
2007-03-02 18:56:07 +01:00
|
|
|
}
|
2007-04-13 20:47:58 +02:00
|
|
|
|
|
|
|
// Show grey light if there are agent down for this group
|
|
|
|
if ($grupo[$real_count]["down"] > 0 ){
|
|
|
|
$icono_type=$icono_type."
|
2007-06-27 19:45:42 +02:00
|
|
|
<img src='images/dot_white.png' alt=''>";
|
2007-04-13 20:47:58 +02:00
|
|
|
}
|
2007-04-22 03:08:58 +02:00
|
|
|
|
|
|
|
// Show red flag is group has disabled alert system
|
|
|
|
if (give_disabled_group($grupo[$real_count]["id_grupo"]) == 1)
|
2007-05-01 15:28:33 +02:00
|
|
|
$icono_type = $icono_type."
|
|
|
|
<img src='images/flag_red.png' alt='".$lang_label["disabled"]."'>";
|
2007-03-02 18:56:07 +01:00
|
|
|
|
2007-04-13 20:47:58 +02:00
|
|
|
// By default green border
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
$celda = "<td class='top' style='border: 5px solid #aeff21;' width='100'>";
|
2007-04-13 20:47:58 +02:00
|
|
|
|
|
|
|
// Grey border if agent down
|
2008-04-01 15:53:11 +02:00
|
|
|
if ($config["show_unknown"] > 0){
|
2007-04-13 20:47:58 +02:00
|
|
|
if ($grupo[$real_count]["down"] > 0)
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
$celda = "<td class='top' style='border: 5px solid #aabbaa;' width='100'>";
|
2008-04-01 15:53:11 +02:00
|
|
|
}
|
|
|
|
|
2007-03-28 18:07:29 +02:00
|
|
|
// Yellow border if agents with alerts
|
|
|
|
if ($grupo[$real_count]["alerts"] > 0)
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
$celda = "<td class='top' style='border: 5px solid #ffea00;' width='100'>";
|
2007-03-12 18:58:52 +01:00
|
|
|
|
|
|
|
// Red border if agents bad
|
|
|
|
if ($grupo[$real_count]["bad"] > 0)
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
$celda = "<td class='top' style='border: 5px solid #ff0000;' width='100'>";
|
2007-03-28 18:07:29 +02:00
|
|
|
|
|
|
|
// Orange if alerts and down modules
|
|
|
|
if (($grupo[$real_count]["bad"] > 0) && ($grupo[$real_count]["alerts"] > 0))
|
2008-06-13 Sancho Lerena <slerena@gmail.com>
* index.php: Added pure (Fullscreen). HTML code cleanup and user session.
* pandoradb.sql: talert_snmp: Added priority field.
* pandoradb_data.sql: Changes default values in talerta. tconfig_os, tgrupo
and some links.
* header.php: Fixed some user session management.
* logon_ok.php: New design for welcome screen, odometer is over.
* menu.php, godmode/menu.php: Some ACL improvements.
* agent_disk_conf_editor.php: Minor fix in view link.
* configurar_agente.php, agent_manager.php: Added parent combo and better
ACL checks. New remote configuration control for get timestamp info of
config file.
* modify_alert.php: Changes to use new internal Mail alert.
* config.php: Some items moved to config_process. (font, attachment and
default style).
* functions.php: Added form_agent_combo(), form_event_type_combo(),
form_priority() and return_priority() functions.
* functions_db.php: Added smal_event_table() to render a variable table
with latest events (filtered).
* pandora.css. Added pure and priority colors.
* estado_alertas.php: Fixed ACL problems.
* stado_generalagente.php: Graph of modules now represents modules that
has generated events. Old graph is not used anymore. Also display parent.
* estado_grupo.php: Border of boxes is now thicker.
* tactical.php: New screen, almost all code changed. Odometer is not used
anymore, added some new items, like module LAG meter, module sanity, and
other general metrics.
* ver_agente.php: Now renders also event for each agent view. Alert manual
validation generate a new event.
* events.php: New event system. 90% new code. A LOT of new features,
including full screen, coloured (by priority) and filters by six fields.
* snmp_alert.php: Added support for alert priority.
* operation/users/user.php: No longer a user with UM privileges could
see any other user.
* render_view.php: Added fullscreen support for visual maps.
* fgraph.php: Added support for session checking in graphs (at least!).
New graphics for events (some changed it's function like events by group),
and feature added to progress GD implementation.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-06-13 18:59:54 +02:00
|
|
|
$celda = "<td class='top' style='border: 5px solid #ffbb00;' width='100'>";
|
2007-04-13 20:47:58 +02:00
|
|
|
|
2007-03-12 18:58:52 +01:00
|
|
|
|
|
|
|
$celda .= "<a href='index.php?sec=estado&
|
2007-03-02 18:56:07 +01:00
|
|
|
sec2=operation/agentes/estado_agente&
|
|
|
|
refr=60&
|
|
|
|
group_id=".$grupo[$real_count]["id_grupo"]."'
|
2007-03-12 18:58:52 +01:00
|
|
|
class='info'>";
|
|
|
|
|
|
|
|
// Add group icon
|
|
|
|
$celda .= "<img class='top'
|
|
|
|
src='images/groups_small/".$icono_grupo.".png' height='32' width='32' alt=''>";
|
|
|
|
|
|
|
|
// Add float info table
|
|
|
|
$celda .= "
|
|
|
|
<span>
|
|
|
|
<table cellspacing='2' cellpadding='0'
|
2007-03-28 18:07:29 +02:00
|
|
|
style='margin-left:2px;'>
|
2007-06-17 17:05:30 +02:00
|
|
|
<tr><th colspan='2' width='91'>".
|
|
|
|
$lang_label["agents"].": </th></tr>
|
2007-03-12 18:58:52 +01:00
|
|
|
<tr><td colspan='2' class='datos' align='center'><b>".
|
|
|
|
$grupo[$real_count]["agent"]."</b></td></tr>
|
|
|
|
</table>
|
|
|
|
<table cellspacing='2' cellpadding='0'
|
2007-03-28 18:07:29 +02:00
|
|
|
style='margin-left:2px'>
|
2007-03-12 18:58:52 +01:00
|
|
|
<tr>
|
2007-06-17 17:05:30 +02:00
|
|
|
<th colspan='2' width='90'>".
|
|
|
|
ucfirst($lang_label["monitors"]).":</th>
|
2007-03-12 18:58:52 +01:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class='datos'>
|
2007-06-27 19:45:42 +02:00
|
|
|
<img src='images/b_green.png' align='top' alt='' >
|
2007-03-12 18:58:52 +01:00
|
|
|
".$lang_label["ok"].": </td>
|
|
|
|
<td class='datos'>
|
|
|
|
<font class='greenb'>".$grupo[$real_count]["ok"]."</font>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class='datos'>
|
2007-06-27 19:45:42 +02:00
|
|
|
<img src='images/b_red.png' align='top' alt=''>
|
2007-03-12 18:58:52 +01:00
|
|
|
".$lang_label["fail"].": </td>
|
|
|
|
<td class='datos'><font class='redb'>".
|
|
|
|
$grupo[$real_count]["bad"]."</font></td>
|
2008-04-01 15:53:11 +02:00
|
|
|
</tr>";
|
|
|
|
if ($config["show_unknown"] > 0){
|
|
|
|
$celda .= "
|
|
|
|
<tr>
|
2007-04-13 20:47:58 +02:00
|
|
|
<td class='datos'>
|
2007-06-27 19:45:42 +02:00
|
|
|
<img src='images/b_white.png' align='top' alt=''>
|
2007-04-13 20:47:58 +02:00
|
|
|
".$lang_label["down"].": </td>
|
|
|
|
<td class='datos'><font class='redb'>".
|
2008-04-01 15:53:11 +02:00
|
|
|
$grupo[$real_count]["down"]."</font></td></tr>";
|
|
|
|
}
|
|
|
|
if ($config["show_lastalerts"] == 1)
|
2007-03-28 18:07:29 +02:00
|
|
|
$celda .= "<tr>
|
|
|
|
<td class='datos'>
|
2007-06-27 19:45:42 +02:00
|
|
|
<img src='images/b_yellow.png' align='top' alt=''>
|
2007-03-28 18:07:29 +02:00
|
|
|
".$lang_label["alerts"].": </td>
|
|
|
|
<td class='datos'><font class='grey'>".
|
|
|
|
$grupo[$real_count]["alerts"]."</font></td>
|
|
|
|
</tr>";
|
|
|
|
$celda .= "</table></span></a>";
|
|
|
|
|
2007-03-02 18:56:07 +01:00
|
|
|
// Render network exec module button, only when this group is writtable by user
|
|
|
|
if (give_acl ($id_user, $grupo[$real_count]["id_grupo"], "AW") == 1) {
|
|
|
|
$celda .= " <a href='index.php?
|
|
|
|
sec=estado&
|
|
|
|
sec2=operation/agentes/estado_grupo&
|
|
|
|
update_netgroup=".$grupo[$real_count]["id_grupo"]."'>
|
2007-06-27 19:45:42 +02:00
|
|
|
<img src='images/target.png'></a>";
|
2007-03-02 18:56:07 +01:00
|
|
|
}
|
|
|
|
$celda .= "<br><br>".
|
|
|
|
$icono_type."<br><br>
|
|
|
|
<span class='gr'>".$group_name."</span>";
|
|
|
|
echo $celda;
|
2006-06-29 21:29:20 +02:00
|
|
|
}
|
2007-03-02 18:56:07 +01:00
|
|
|
$real_count++;
|
2006-03-27 05:37:27 +02:00
|
|
|
}
|
2007-03-02 18:56:07 +01:00
|
|
|
echo "</tr>";
|
2006-12-08 17:57:43 +01:00
|
|
|
}
|
2007-03-02 18:56:07 +01:00
|
|
|
echo "</table>";
|
2006-12-08 17:57:43 +01:00
|
|
|
} else {
|
2007-03-02 18:56:07 +01:00
|
|
|
echo "<div class='nf'>".$lang_label["no_agent_def"]."</div>";
|
2008-02-21 16:16:54 +01:00
|
|
|
$id_user = $_SESSION["id_usuario"];
|
|
|
|
if ( (give_acl($id_user, 0, "LM")==1) OR (give_acl($id_user, 0, "AW")==1 ) OR (give_acl($id_user, 0, "PM")==1) OR (give_acl($id_user, 0, "DM")==1) OR (give_acl($id_user, 0, "UM")==1 )){
|
|
|
|
echo " <form method='post' action='index.php?sec=gagente&
|
|
|
|
sec2=godmode/agentes/configurar_agente&create_agent=1'><input type='submit' class='sub next' name='crt'
|
|
|
|
value='".$lang_label["create_agent"]."'></form>";
|
|
|
|
}
|
2006-07-05 15:33:13 +02:00
|
|
|
}
|
2007-03-02 18:56:07 +01:00
|
|
|
|
2007-07-16 20:47:39 +02:00
|
|
|
?>
|