2006-03-27 05:37:27 +02:00
< ? php
2008-04-03 17:43:34 +02:00
// Pandora FMS - the Free Monitoring System
// ========================================
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
// Copyright (c) 2004-2008 Sancho Lerena, slerena@gmail.com
2008-04-03 17:43:34 +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 16:20:10 +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-03 17:43:34 +02:00
// as published by the Free Software Foundation for version 2.
2006-07-09 16:20:10 +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.
2006-03-27 05:37:27 +02:00
// Load global vars
require ( " include/config.php " );
2007-04-19 20:50:07 +02:00
// Login check
$id_usuario = $_SESSION [ " id_usuario " ];
global $REMOTE_ADDR ;
if ( comprueba_login () != 0 ) {
audit_db ( $id_usuario , $REMOTE_ADDR , " ACL Violation " , " Trying to access alert view " );
include ( " general/noaccess.php " );
exit ;
}
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
if (( give_acl ( $config [ " id_user " ], 0 , " AR " ) != 1 ) AND ( ! give_acl ( $config [ " id_user " ], 0 , " AW " )) AND ( dame_admin ( $config [ " id_user " ]) != 1 )) {
2007-04-19 20:50:07 +02:00
audit_db ( $id_usuario , $REMOTE_ADDR , " ACL Violation " , " Trying to access alert view " );
include ( " general/noaccess.php " );
exit ;
}
// -------------------------------
// Show alerts for specific agent
// -------------------------------
if ( isset ( $_GET [ " id_agente " ])){
2007-10-03 14:41:29 +02:00
$id_agente = $_GET [ " id_agente " ];
2008-04-01 15:53:11 +02:00
$id_grupo_alerta = get_db_value ( " id_grupo " , " tagente " , " id_agente " , $id_agente );
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
if ( give_acl ( $config [ " id_user " ], $id_grupo_alerta , " AR " ) == 0 ) {
audit_db ( $config [ " id_user " ], $REMOTE_ADDR , " ACL Violation " , " Trying to access alert view " );
2007-10-03 14:41:29 +02:00
include ( " general/noaccess.php " );
exit ;
}
2007-05-28 21:15:44 +02:00
if ( isset ( $_GET [ " tab " ])){
2007-10-12 18:27:50 +02:00
echo " <h2> " . $lang_label [ " ag_title " ] . " > " . $lang_label [ " alert_listing " ] . " </h2> " ;
2007-05-28 21:15:44 +02:00
}
2007-10-03 14:41:29 +02:00
2008-04-03 17:43:34 +02:00
$query_gen = 'SELECT talerta_agente_modulo.* FROM talerta_agente_modulo, tagente_modulo WHERE talerta_agente_modulo.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.id_agente =' . $id_agente ;
2007-05-28 21:15:44 +02:00
$result_gen = mysql_query ( $query_gen );
if ( mysql_num_rows ( $result_gen )) {
if ( ! isset ( $_GET [ " tab " ])) {
2007-10-12 18:27:50 +02:00
echo " <h3> " . $lang_label [ " alert_listing " ] . " </h3> " ;
2007-05-28 21:15:44 +02:00
}
2007-05-21 15:24:17 +02:00
echo " <table cellpadding='4' cellspacing='4' width=750 border=0 class='databox'> " ;
2007-05-27 04:55:55 +02:00
echo " <tr>
< th > " . $lang_label["type"] . " < th > " . $lang_label["name"] . " </ th >
< th > " . $lang_label["description"] . " </ th >
2008-04-03 17:43:34 +02:00
< th > " .lang_string ( " info " ). " </ th >
2007-06-12 13:57:03 +02:00
< th > " . $lang_label["min."] . " </ th >
< th > " . $lang_label["max."] . " </ th >
2007-05-27 04:55:55 +02:00
< th > " . $lang_label["time_threshold"] . " </ th >
< th > " . $lang_label["last_fired"] . " </ th >
< th > " . $lang_label["times_fired"] . " </ th >
2007-10-03 14:41:29 +02:00
< th > " . $lang_label["status"] . " </ th >
< th > " . $lang_label["validate"] . " </ th > " ;
2007-04-19 20:50:07 +02:00
$color = 1 ;
while ( $data = mysql_fetch_array ( $result_gen )){
if ( $color == 1 ){
$tdcolor = " datos " ;
$color = 0 ;
}
else {
$tdcolor = " datos2 " ;
$color = 1 ;
}
echo " <tr> " ;
2008-04-03 17:43:34 +02:00
show_alert_show_view ( $data , $tdcolor , 0 );
2006-03-27 05:37:27 +02:00
}
2008-04-03 17:43:34 +02:00
// Show combined alerts for this agent
$result_com = mysql_query ( " SELECT * FROM talerta_agente_modulo WHERE id_agent = $id_agente " );
2008-04-07 00:18:33 +02:00
if ( mysql_num_rows ( $result_com )) {
echo " <tr><td colspan=11 class='datos3'><center> " . lang_string ( " Combined alerts " ) . " </center> " ;
}
2008-04-03 17:43:34 +02:00
while ( $data_com = mysql_fetch_array ( $result_com )){
if ( $color == 1 ){
$tdcolor = " datos " ;
$color = 0 ;
}
else {
$tdcolor = " datos2 " ;
$color = 1 ;
}
echo " <tr> " ;
show_alert_show_view ( $data_com , $tdcolor , 1 );
}
2007-05-21 15:24:17 +02:00
echo '</table>' ;
2007-05-28 21:15:44 +02:00
} else {
2008-02-21 16:16:54 +01:00
echo " <div class='nf'> " . $lang_label [ " no_alerts " ] . " </div> " ;
2006-03-27 05:37:27 +02:00
}
2007-04-19 20:50:07 +02:00
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
// Show alert for no defined agent
2007-04-19 20:50:07 +02:00
} else {
// -------------------------------
// SHOW ALL ALERTS (GENERAL PAGE)
// -------------------------------
2007-05-27 04:55:55 +02:00
echo " <h2> " . $lang_label [ " ag_title " ] . " > " ;
2007-10-12 18:27:50 +02:00
echo $lang_label [ " alert_listing " ] . " </h2> " ;
2007-04-19 20:50:07 +02:00
$iduser_temp = $_SESSION [ 'id_usuario' ];
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
$ag_group = get_parameter ( " ag_group " , - 1 );
if ( $ag_group != - 1 )
echo " <form method='post' action='index.php?sec=estado&sec2=operation/agentes/estado_alertas&refr=60&ag_group= " . $ag_group . " '> " ;
else
2007-04-19 20:50:07 +02:00
echo " <form method='post' action='index.php?sec=estado&sec2=operation/agentes/estado_alertas&refr=60'> " ;
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
echo " <table cellpadding='4' cellspacing='4' class='databox'> " ;
echo " <tr> " ;
2007-04-19 20:50:07 +02:00
echo " <td> " . $lang_label [ " group " ] . " </td> " ;
echo " <td valign='middle'> " ;
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
echo " <select name='ag_group' onChange='javascript:this.form.submit();' class='w150'> " ;
2007-04-19 20:50:07 +02:00
if ( $ag_group > 1 ){
2008-02-21 16:16:54 +01:00
echo " <option value=' " . $ag_group . " '> " . dame_nombre_grupo ( $ag_group ) .
" </option> " ;
2007-04-19 20:50:07 +02:00
}
echo " <option value=1> " . dame_nombre_grupo ( 1 ) . " </option> " ;
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
list_group ( $config [ " id_user " ]);
2007-04-19 20:50:07 +02:00
echo " </select></td> " ;
2008-02-21 16:16:54 +01:00
echo " <td valign='middle'>
< noscript >
< input name = 'uptbutton' type = 'submit' class = 'sub' value = '".$lang_label["show"]."' >
</ noscript ></ td ></ form > " ;
2007-04-19 20:50:07 +02:00
2008-04-03 17:43:34 +02:00
// Display single alerts
// =======================
2007-04-19 20:50:07 +02:00
if ( $ag_group > 1 )
$sql = 'SELECT id_agente, nombre, disabled FROM tagente WHERE id_grupo=' . $ag_group . ' ORDER BY nombre' ;
else
$sql = 'SELECT id_agente, nombre, disabled FROM tagente ORDER BY id_grupo, nombre' ;
2007-06-12 13:57:03 +02:00
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
$sql = " SELECT id_agente, nombre, disabled FROM tagente WHERE tagente.disabled = 0 " ;
// Agent group selector
if ( $ag_group > 1 )
$sql .= " AND tagente.id_grupo = " . $ag_group ;
else {
// User has explicit permission on group 1 ?
$all_group = get_db_sql ( " SELECT COUNT(id_grupo) FROM tusuario_perfil WHERE id_usuario=' " . $config [ " id_user " ] . " ' AND id_grupo = 1 " );
if ( $all_group == 0 )
$sql .= " AND tagente.id_grupo IN (SELECT id_grupo FROM tusuario_perfil WHERE id_usuario=' " . $config [ " id_user " ] . " ') " ;
2008-04-03 17:43:34 +02:00
}
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
$color = 1 ; $string = '' ;
$result = mysql_query ( $sql );
if ( $result )
while ( $row = mysql_fetch_array ( $result )){ //while there are agents
$id_agente = $row [ 'id_agente' ];
$nombre_agente = strtoupper ( $row [ " nombre " ]);
$query_gen = ' SELECT talerta_agente_modulo . id_alerta ,
talerta_agente_modulo . descripcion ,
talerta_agente_modulo . last_fired ,
talerta_agente_modulo . times_fired ,
talerta_agente_modulo . id_agente_modulo ,
tagente_modulo . id_agente_modulo
FROM tagente_modulo , talerta_agente_modulo
WHERE tagente_modulo . id_agente = '.$id_agente.'
AND tagente_modulo . id_agente_modulo = talerta_agente_modulo . id_agente_modulo
AND talerta_agente_modulo . disable = 0 ' ;
$result_gen = mysql_query ( $query_gen );
while ( $data = mysql_fetch_array ( $result_gen )){
if ( $color == 1 ){
$tdcolor = " datos " ;
$color = 0 ;
}
else {
$tdcolor = " datos2 " ;
$color = 1 ;
}
$string .= " <tr><td class=' " . $tdcolor . " '>
< a href = ' index . php ? sec = estado &
sec2 = operation / agentes / ver_agente &
id_agente = " . $id_agente . " ' >
< b > " . $nombre_agente . " </ b > " ;
$string .= " <td class=' $tdcolor ' align='center'> " ;
if ( $data [ " times_fired " ] <> 0 )
$string .= " <img src='images/pixel_red.png' width=40 height=18 title=' " . $lang_label [ " fired " ] . " '> " ;
else
$string .= " <img src='images/pixel_green.png' width=40 height=18 title=' " . $lang_label [ " not_fired " ] . " '> " ;
$string = $string . " <td class=' " . $tdcolor . " '> "
. dame_nombre_alerta ( $data [ " id_alerta " ]) . " </td> " ;
$string = $string . " <td class=' " . $tdcolor . " '> " .
$data [ " descripcion " ] . " </td> " ;
if ( $data [ " last_fired " ] == " 0000-00-00 00:00:00 " ) {
$string = $string . " <td class=' " . $tdcolor . " '> " .
$lang_label [ " never " ] . " </td> " ;
} else {
$string = $string . " <td class=' " . $tdcolor . " '> " .
human_time_comparation ( $data [ " last_fired " ]) . " </td> " ;
}
$string = $string . " <td class=' " . $tdcolor . " '> " .
$data [ " times_fired " ] . " </td> " ;
}
} //end while
2008-04-03 17:43:34 +02:00
// Display combined alerts
// =======================
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
$sql = " SELECT id_agente, nombre, disabled FROM tagente WHERE tagente.disabled = 0 " ;
// Agent group selector
2008-04-03 17:43:34 +02:00
if ( $ag_group > 1 )
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
$sql .= " AND tagente.id_grupo = " . $ag_group ;
else {
// User has explicit permission on group 1 ?
$all_group = get_db_sql ( " SELECT COUNT(id_grupo) FROM tusuario_perfil WHERE id_usuario=' " . $config [ " id_user " ] . " ' AND id_grupo = 1 " );
if ( $all_group == 0 )
$sql .= " AND tagente.id_grupo IN (SELECT id_grupo FROM tusuario_perfil WHERE id_usuario=' " . $config [ " id_user " ] . " ') " ;
}
2008-04-03 17:43:34 +02:00
$result = mysql_query ( $sql );
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
$color = 1 ;
if ( $result )
while ( $row = mysql_fetch_array ( $result )){ //while there are agents
$id_agente = $row [ 'id_agente' ];
$nombre_agente = strtoupper ( $row [ " nombre " ]);
$query_gen = ' SELECT talerta_agente_modulo . id_alerta ,
talerta_agente_modulo . descripcion ,
talerta_agente_modulo . last_fired ,
talerta_agente_modulo . times_fired ,
talerta_agente_modulo . id_agent
FROM talerta_agente_modulo
WHERE talerta_agente_modulo . id_agent = '.$id_agente.' AND talerta_agente_modulo . disable = 0 ' ;
$result_gen = mysql_query ( $query_gen );
if ( mysql_num_rows ( $result_gen )) {
while ( $data = mysql_fetch_array ( $result_gen )){
if ( $color == 1 ){
$tdcolor = " datos " ;
$color = 0 ;
}
else {
$tdcolor = " datos2 " ;
$color = 1 ;
}
if ( ! isset ( $string )) {
$string = '' ;
}
$string = $string . " <tr><td class=' " . $tdcolor . " '>
< a href = ' index . php ? sec = estado &
sec2 = operation / agentes / ver_agente &
id_agente = " . $id_agente . " ' >
< b > " . $nombre_agente . " </ b > ( * ) " ;
$string .= " <td class=' $tdcolor ' align='center'> " ;
if ( $data [ " times_fired " ] <> 0 )
$string .= " <img src='images/pixel_red.png' width=40 height=18 title=' " . $lang_label [ " fired " ] . " '> " ;
else
$string .= " <img src='images/pixel_green.png' width=40 height=18 title=' " . $lang_label [ " not_fired " ] . " '> " ;
$string = $string . " <td class=' " . $tdcolor . " '> "
. dame_nombre_alerta ( $data [ " id_alerta " ]) . " </td> " ;
$string = $string . " <td class=' " . $tdcolor . " '> " .
$data [ " descripcion " ] . " </td> " ;
if ( $data [ " last_fired " ] == " 0000-00-00 00:00:00 " ) {
$string = $string . " <td class=' " . $tdcolor . " '> " .
$lang_label [ " never " ] . " </td> " ;
} else {
$string = $string . " <td class=' " . $tdcolor . " '> " .
human_time_comparation ( $data [ " last_fired " ]) . " </td> " ;
2008-04-03 17:43:34 +02:00
}
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
$string = $string . " <td class=' " . $tdcolor . " '> " .
$data [ " times_fired " ] . " </td> " ;
}
}
} //end while
2008-04-03 17:43:34 +02:00
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
if ( $string != " " ) {
2008-04-03 17:43:34 +02:00
echo " <td class='f9' style='padding-left: 30px;'> " ;
echo " <img src='images/pixel_red.png' width=18 height=18> " . $lang_label [ " fired " ] . " </td> " ;
echo " <td class='f9' style='padding-left: 30px;'> " ;
echo " <img src='images/pixel_green.png' width=18 height=18> " . $lang_label [ " not_fired " ];
echo " </td><td class='f9' valign='bottom' style='padding-left: 10px;'>(*) " . lang_string ( " Combined alert " ) . " </tr></table> " ;
echo " <br> " ;
echo " <table cellpadding='4' cellspacing='4' width='700' class='databox'> " ;
echo " <tr>
< th > " . $lang_label["agent"] . " </ th >
< th > " . $lang_label["status"] . " </ th >
< th > " . $lang_label["type"] . " </ th >
< th > " . $lang_label["description"] . " </ th >
< th > " . $lang_label["last_fired"] . " </ th >
< th > " . $lang_label["times_fired"] . " </ th > " ;
echo $string ; //built table of alerts
echo " </table> " ;
}
else {
2008-02-21 16:16:54 +01:00
echo " </table><br><div class='nf'> " .
2008-04-03 17:43:34 +02:00
$lang_label [ " no_alert " ] . " </div> " ;
2008-02-21 16:16:54 +01:00
}
2008-04-03 17:43:34 +02:00
} // Main alert view
2007-05-21 15:24:17 +02:00
?>