2006-03-27 05:37:27 +02:00
< ? php
2008-01-10 17:40:00 +01: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
2008-01-10 17:40:00 +01:00
// Please see http://pandora.sourceforge.net for full contribution list
2006-03-27 05:37:27 +02:00
2008-04-01 15:53:11 +02:00
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// 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 " );
2006-07-11 10:49:21 +02:00
2006-03-27 05:37:27 +02:00
if ( comprueba_login () == 0 ) {
2007-03-02 18:56:07 +01:00
if ( give_acl ( $id_user , 0 , " AR " ) == 0 ) {
audit_db ( $id_user , $REMOTE_ADDR , " ACL Violation " , " Trying to access agent main list view " );
require ( " general/noaccess.php " );
exit ;
}
2008-01-10 17:40:00 +01:00
// Take some parameters (GET)
$offset = get_parameter ( " offset " , 0 );
$group_id = get_parameter ( " group_id " , 0 );
$ag_group = get_parameter ( " ag_group " , - 1 );
if (( $ag_group == - 1 ) && ( $group_id != 0 ))
$ag_group = $group_id ;
2006-03-27 05:37:27 +02:00
if ( isset ( $_GET [ " ag_group_refresh " ])){
$ag_group = $_GET [ " ag_group_refresh " ];
}
2008-01-10 17:40:00 +01:00
$search = get_parameter ( " search " , " " );
2007-03-02 18:56:07 +01:00
2007-10-12 18:27:50 +02:00
echo " <h2> " . $lang_label [ " ag_title " ] . " > " . $lang_label [ " summary " ] . " </h2> " ;
2008-01-10 17:40:00 +01:00
// Show group selector (POST)
2006-03-27 05:37:27 +02:00
if ( isset ( $_POST [ " ag_group " ])){
$ag_group = $_POST [ " ag_group " ];
2006-12-25 19:15:57 +01:00
echo " <form method='post'
action = ' index . php ? sec = estado & sec2 = operation / agentes / estado_agente
& refr = 60 & ag_group_refresh = " . $ag_group . " ' > " ;
2006-03-27 05:37:27 +02:00
} else {
2006-12-25 19:15:57 +01:00
echo " <form method='post'
action = ' index . php ? sec = estado & sec2 = operation / agentes / estado_agente
& refr = 60 ' > " ;
2006-03-27 05:37:27 +02:00
}
2007-05-20 19:12:31 +02:00
echo " <table cellpadding='4' cellspacing='4' class='databox'><tr> " ;
2008-01-10 17:40:00 +01:00
echo " <td valign='top'> " . $lang_label [ " group " ] . " </td> " ;
echo " <td valign='top'> " ;
2006-12-25 19:15:57 +01:00
echo " <select name='ag_group' onChange='javascript:this.form.submit();'
class = 'w130' > " ;
2006-03-27 05:37:27 +02:00
if ( $ag_group > 1 ){
2006-12-25 19:15:57 +01:00
echo " <option value=' " . $ag_group . " '> " . dame_nombre_grupo ( $ag_group ) .
" </option> " ;
2006-03-27 05:37:27 +02:00
}
2006-12-31 01:29:40 +01:00
$mis_grupos = list_group ( $id_user ); //Print combo for groups and set an array with all groups
2007-02-22 17:45:10 +01:00
2006-03-27 05:37:27 +02:00
echo " </select> " ;
2008-01-10 17:40:00 +01:00
echo " <td valign='top'>
2006-12-25 19:15:57 +01:00
< noscript >
< input name = 'uptbutton' type = 'submit' class = 'sub'
value = '".$lang_label["show"]."' >
</ noscript >
2008-01-10 17:40:00 +01:00
</ td ></ form >< td valign = 'top' > " ;
echo $lang_label [ " free_text_search " ];
2008-02-21 16:16:54 +01:00
echo " </td><td valign='top'> " ;
2008-01-10 17:40:00 +01:00
echo " <form method='post'
action = ' index . php ? sec = estado & sec2 = operation / agentes / estado_agente
& refr = 60 ' > " ;
2008-02-21 16:16:54 +01:00
echo " <input type=text name='search' size='15'> " ;
2008-01-10 17:40:00 +01:00
echo " </td><td valign='top'> " ;
echo " <input name='srcbutton' type='submit' class='sub'
value = '".$lang_label["search"]."' > " ;
echo " </form> " ;
echo " </td></table> " ;
2007-03-02 18:56:07 +01:00
2008-01-10 17:40:00 +01:00
if ( $search != " " ){
$search_sql = " AND nombre LIKE '% $search %' " ;
} else {
$search_sql = " " ;
}
2006-03-27 05:37:27 +02:00
// Show only selected groups
2007-03-02 18:56:07 +01:00
if ( $ag_group > 1 ){
$sql = " SELECT * FROM tagente WHERE id_grupo= $ag_group
2008-06-09 19:51:18 +02:00
AND disabled = 0 $search_sql ORDER BY nombre LIMIT $offset , " . $config["block_size"] ;
2007-03-02 18:56:07 +01:00
$sql2 = " SELECT COUNT(id_agente) FROM tagente WHERE id_grupo= $ag_group
2008-01-10 17:40:00 +01:00
AND disabled = 0 $search_sql ORDER BY nombre " ;
2008-06-09 19:51:18 +02:00
// Not selected any specific group
2008-01-10 17:40:00 +01:00
} else {
2008-06-09 19:51:18 +02:00
// Is admin user ??
if ( get_db_sql ( " SELECT * FROM tusuario WHERE id_usuario =' $id_user ' " , " nivel " ) == 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 = " SELECT * FROM tagente WHERE disabled = 0 $search_sql ORDER BY nombre, id_grupo LIMIT $offset , " . $config [ " block_size " ];
2008-06-09 19:51:18 +02:00
$sql2 = " SELECT COUNT(id_agente) FROM tagente WHERE disabled = 0 $search_sql ORDER BY nombre, id_grupo " ;
// standard user
} else {
// User has explicit permission on group 1 ?
$all_group = get_db_sql ( " SELECT COUNT(id_grupo) FROM tusuario_perfil WHERE id_usuario=' $id_user ' AND id_grupo = 1 " );
if ( $all_group > 0 ){
$sql = " SELECT * FROM tagente WHERE disabled = 0 $search_sql
ORDER BY nombre , id_grupo LIMIT $offset , " . $config["block_size"] ;
$sql2 = " SELECT COUNT(id_agente) FROM tagente WHERE disabled = 0 $search_sql
ORDER BY nombre , id_grupo " ;
} else {
$sql = " SELECT * FROM tagente WHERE disabled = 0 $search_sql AND id_grupo IN (SELECT id_grupo FROM tusuario_perfil WHERE id_usuario=' $id_user ')
ORDER BY nombre , id_grupo LIMIT $offset , " . $config["block_size"] ;
$sql2 = " SELECT COUNT(id_agente) FROM tagente WHERE disabled = 0 $search_sql AND id_grupo IN (SELECT id_grupo FROM tusuario_perfil WHERE id_usuario=' $id_user ') ORDER BY nombre, id_grupo " ;
}
}
2007-03-02 18:56:07 +01:00
}
2006-03-27 05:37:27 +02:00
2007-03-02 18:56:07 +01:00
$result2 = mysql_query ( $sql2 );
$row2 = mysql_fetch_array ( $result2 );
$total_events = $row2 [ 0 ];
// Prepare pagination
2007-09-26 13:17:37 +02:00
pagination ( $total_events ,
" index.php?sec=estado&sec2=operation/agentes/estado_agente&group_id= $ag_group &refr=60 " , $offset );
2007-03-02 18:56:07 +01:00
// Show data.
2006-03-27 05:37:27 +02:00
$result = mysql_query ( $sql );
if ( mysql_num_rows ( $result )){
2007-05-20 19:12:31 +02:00
echo " <table cellpadding='4' cellspacing='4' width='700' class='databox' style='margin-top: 10px'> " ;
2006-03-27 05:37:27 +02:00
echo " <th> " . $lang_label [ " agent " ] . " </th> " ;
echo " <th> " . $lang_label [ " os " ] . " </th> " ;
echo " <th> " . $lang_label [ " interval " ] . " </th> " ;
echo " <th> " . $lang_label [ " group " ] . " </th> " ;
echo " <th> " . $lang_label [ " modules " ] . " </th> " ;
echo " <th> " . $lang_label [ " status " ] . " </th> " ;
echo " <th> " . $lang_label [ " alerts " ] . " </th> " ;
echo " <th> " . $lang_label [ " last_contact " ] . " </th> " ;
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
// For every agent defined in the agent table
2006-07-04 12:09:39 +02:00
$color = 1 ;
2006-03-27 05:37:27 +02:00
while ( $row = mysql_fetch_array ( $result )){
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
$intervalo = $row [ " intervalo " ]; // Interval in seconds
$id_agente = $row [ 'id_agente' ];
2007-07-16 20:47:39 +02:00
$nombre_agente = substr ( strtoupper ( $row [ " nombre " ]), 0 , 18 );
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
$direccion_agente = $row [ " direccion " ];
$id_grupo = $row [ " id_grupo " ];
$id_os = $row [ " id_os " ];
$ultimo_contacto = $row [ " ultimo_contacto " ];
$biginterval = $intervalo ;
2007-03-02 18:56:07 +01:00
foreach ( $mis_grupos as $migrupo ){ //Verifiy if the group this agent begins is one of the user groups
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
if (( $migrupo == 1 ) || ( $id_grupo == $migrupo )){
$pertenece = 1 ;
break ;
2006-03-27 05:37:27 +02:00
}
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
else
$pertenece = 0 ;
}
if ( $pertenece == 1 ) { // Si el agente pertenece a uno de los grupos que el usuario puede visualizar
// Obtenemos la lista de todos los modulos de cada agente
2006-12-25 19:15:57 +01:00
$sql_t = " SELECT * FROM tagente_estado, tagente_modulo
2008-06-19 16:34:04 +02:00
WHERE tagente_estado . id_agente_modulo = tagente_modulo . id_agente_modulo AND
tagente_modulo . disabled = 0
2006-12-25 19:15:57 +01:00
AND tagente_modulo . id_agente = " . $id_agente ;
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
$result_t = mysql_query ( $sql_t );
2006-12-25 19:15:57 +01:00
$estado_general = 0 ;
$numero_modulos = 0 ;
$numero_monitor = 0 ;
$est_timestamp = " " ;
$monitor_bad = 0 ;
$monitor_ok = 0 ;
$monitor_down = 0 ;
$numero_datamodules = 0 ;
2007-02-22 17:45:10 +01:00
$estado_cambio = 0 ;
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
$ahora = date ( " Y/m/d H:i:s " );
// Calculate module/monitor totals for this agent
while ( $row_t = mysql_fetch_array ( $result_t )){
$est_modulo = $row_t [ " estado " ];
$ultimo_contacto_modulo = $row_t [ " timestamp " ];
$module_interval = $row_t [ " module_interval " ];
if ( $module_interval > $biginterval )
$biginterval = $module_interval ;
if ( $module_interval != 0 )
$intervalo_comp = $module_interval ;
else
$intervalo_comp = $intervalo ;
2006-03-27 05:37:27 +02:00
if ( $ultimo_contacto <> " " )
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
$seconds = strtotime ( $ahora ) - strtotime ( $ultimo_contacto_modulo );
2006-03-27 05:37:27 +02:00
else
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
$seconds = - 1 ;
2006-03-27 05:37:27 +02:00
# Defines if Agent is down (interval x 2 > time last contact
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
if ( $seconds >= ( $intervalo_comp * 2 )){ // If (intervalx2) secs. ago we don't get anything, show alert
if ( $est_modulo != 100 )
$numero_monitor ++ ;
$monitor_down ++ ;
2006-07-01 03:48:56 +02:00
}
2008-01-08 19:49:39 +01:00
elseif ( $est_modulo != 100 ) { // estado=100 are data modules
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
$estado_general = $estado_general + $est_modulo ;
$estado_cambio = $estado_cambio + $row_t [ " cambio " ];
$numero_monitor ++ ;
2008-01-08 19:49:39 +01:00
if ( $est_modulo != 0 )
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
$monitor_bad ++ ;
else
$monitor_ok ++ ;
} elseif ( $est_modulo == 100 ){ // Data modules
$numero_datamodules ++ ;
2006-03-27 05:37:27 +02:00
}
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
$numero_modulos ++ ;
}
// Color change for each line (1.2 beta2)
if ( $color == 1 ){
$tdcolor = " datos " ;
$color = 0 ;
}
else {
$tdcolor = " datos2 " ;
$color = 1 ;
}
echo " <tr> " ;
echo " <td class=' $tdcolor '> " ;
if ( give_acl ( $id_user , $id_grupo , " AW " ) == 1 ){
2006-12-26 16:49:14 +01:00
echo " <a href='index.php?sec=gagente&
sec2 = godmode / agentes / configurar_agente & amp ;
id_agente = " . $id_agente . " ' >
2007-05-27 04:55:55 +02:00
< img src = 'images/setup.png' border = 0 width = 16 ></ a > " ;
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
}
2007-01-21 01:12:44 +01:00
echo " <a href='index.php?sec=estado&
2006-12-26 16:49:14 +01:00
sec2 = operation / agentes / ver_agente & amp ; id_agente = " . $id_agente . " ' >
< b > " . $nombre_agente . " </ b ></ a ></ td > " ;
2007-04-22 03:08:58 +02:00
2007-04-21 18:14:11 +02:00
// Show SO icon :)
echo " <td class=' $tdcolor ' align='center'>
< img border = 0 src = 'images/".dame_so_icon($id_os)."'
alt = '".dame_so_name($id_os)."' ></ td > " ;
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
// If there are a module interval bigger than agent interval
2006-12-26 16:49:14 +01:00
if ( $biginterval > $intervalo ) {
echo " <td class=' $tdcolor '>
< span class = 'green' > " . $biginterval . " </ span ></ td > " ;
} else {
echo " <td class=' $tdcolor '> " . $intervalo . " </td> " ;
}
2007-04-22 03:08:58 +02:00
// Show GROUP icon
2007-03-02 18:56:07 +01:00
echo '<td class="' . $tdcolor . ' " align= " center " >
2007-04-22 03:08:58 +02:00
< img src = " images/groups_small/'.show_icon_group( $id_grupo ).'.png " title = " '.dame_grupo( $id_grupo ).' " > ' ;
echo '</td>' ;
2006-12-26 16:49:14 +01:00
echo " <td class=' $tdcolor '> " .
$numero_modulos . " <b>/</b> " . $numero_monitor ;
if ( $monitor_bad <> 0 ) {
2006-12-14 23:47:45 +01:00
echo " <b>/</b> <span class='red'> " . $monitor_bad . " </span> " ;
2006-12-26 16:49:14 +01:00
}
if ( $monitor_down <> 0 ){
echo " <b>/</b> <span class='grey'> " . $monitor_down . " </span> " ;
}
2007-07-28 20:11:48 +02:00
echo " </td> " ;
/*
if ( $numero_monitor <> 0 ){
if ( $estado_general <> 0 ){
if ( $estado_cambio == 0 ){
// RED
echo " <td class=' $tdcolor ' align='center' style='background: #ff1d21'> " ;
} else {
// Yellow
echo " <td class=' $tdcolor ' align='center' style='background: #ffe100'> " ;
}
} elseif ( $monitor_ok > 0 ) {
// Green
echo " <td class=' $tdcolor ' align='center' style='background: #5fff1b'> " ;
}
elseif ( $numero_datamodules > 0 ) {
// Grey #1
echo " <td class=' $tdcolor ' align='center' style='background: #d5d5d5'> " ;
}
elseif ( $monitor_down > 0 ) {
// Grey - Red
echo " <td class=' $tdcolor ' align='center' style='background: #d5b3b3'> " ;
}
} else {
// Blue
echo " <td class=' $tdcolor ' align='center' style='background: #4485d5'> " ;
}
*/
echo " <td class=' $tdcolor ' align='center'> " ;
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
if ( $numero_monitor <> 0 ){
if ( $estado_general <> 0 ){
if ( $estado_cambio == 0 ){
2008-02-21 16:16:54 +01:00
echo " <img src='images/pixel_red.png' width=40 height=18 title=' " . $lang_label [ " red_light " ] . " '> " ;
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
} else {
2008-02-21 16:16:54 +01:00
echo " <img src='images/pixel_yellow.png' width=40 height=18 title=' " . $lang_label [ " yellow_light " ] . " '> " ;
2006-07-01 03:48:56 +02:00
}
2006-12-26 16:49:14 +01:00
} elseif ( $monitor_ok > 0 ) {
2008-02-21 16:16:54 +01:00
echo " <img src='images/pixel_green.png' width=40 height=18 title=' " . $lang_label [ " green_light " ] . " '> " ;
2006-12-26 16:49:14 +01:00
}
elseif ( $numero_datamodules > 0 ) {
2008-02-21 16:16:54 +01:00
echo " <img src='images/pixel_gray.png' width=40 height=18 title=' " . $lang_label [ " no_light " ] . " '> " ;
2006-12-26 16:49:14 +01:00
}
elseif ( $monitor_down > 0 ) {
2008-02-21 16:16:54 +01:00
echo " <img src='images/pixel_fucsia.png' width=40 height=18 title=' " . $lang_label [ " broken_light " ] . " '> " ;
2006-12-26 16:49:14 +01:00
}
2007-03-02 18:56:07 +01:00
} else
2008-02-21 16:16:54 +01:00
echo " <img src='images/pixel_blue.png' width=40 height=18 title=' " . $lang_label [ " blue_light " ] . " '> " ;
2007-07-28 20:11:48 +02:00
2007-03-02 18:56:07 +01:00
// checks if an alert was fired recently
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
echo " <td class=' $tdcolor ' align='center'> " ;
2007-04-22 03:08:58 +02:00
if ( give_disabled_group ( $id_grupo ) == 1 )
2007-07-28 20:11:48 +02:00
echo " <img src='images/pixel_gray.png' width=20 height=9> " ;
2007-04-22 03:08:58 +02:00
else {
if ( check_alert_fired ( $id_agente ) == 1 )
2008-02-21 16:16:54 +01:00
echo " <img src='images/pixel_red.png' width=20 height=9 title=' " . $lang_label [ " fired " ] . " '> " ;
2007-04-22 03:08:58 +02:00
else
2008-02-21 16:16:54 +01:00
echo " <img src='images/pixel_green.png' width=20 height=9 title=' " . $lang_label [ " not_fired " ] . " '> " ;
2007-04-22 03:08:58 +02:00
}
2006-12-26 16:49:14 +01:00
echo " </td> " ;
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
echo " <td class=' $tdcolor '> " ;
2006-12-26 16:49:14 +01:00
if ( $ultimo_contacto == " 0000-00-00 00:00:00 " ){
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
echo $lang_label [ " never " ];
2006-12-26 16:49:14 +01:00
} else {
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
$ultima = strtotime ( $ultimo_contacto );
$ahora = strtotime ( " now " );
$diferencia = $ahora - $ultima ;
2008-06-19 02:24:05 +02:00
echo human_time_comparation ( $ultimo_contacto );
/*
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
if ( $biginterval > 0 ){
$percentil = round ( $diferencia / (( $biginterval * 2 ) / 100 ));
} else {
2007-03-19 20:39:40 +01:00
$percentil = - 1 ;
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
}
2006-12-26 16:49:14 +01:00
echo " <a href='#' class='info2'>
< img src = ' reporting / fgraph . php ? tipo = progress & amp ; percent = " .
2007-07-28 20:11:48 +02:00
$percentil . " &height=18&width=80' border='0'>
2008-06-19 02:24:05 +02:00
& nbsp ; < span > $ultimo_contacto </ span ></ a > " ;*/
* ChangeLog: Create this file, prior to launch final 1.2 version. For the next
versions, will use it for every branch and subproject.
* configurar_agente.php : Fixed Undefined index: combo_snmp_oid notice error.
* estado_grupo.php: Detect old "OK" monitors, but doesnt check if they are down
in time, so for example, a old monitor with OK signal but from a week old, it is
shown as GREEN (good) value, not as a DOWN (white with ? symbol). FIXED.
Now counts data modules for DOWN total account, and show grey button if ANY
type of module is down, not only monitors. Improved SQL searches.
* estado_agente.php, estado_ultimopaquete.php: Same as estado_grupo with data_modules,
included in total account, more accurate accounting. A new value shown in grey for
DOWN modules, being monitors or single data modules, no matter type. Improved SQL
searches. Individual module intervals are used to determine if a module is down,
if there is no individual module interval, global agent interval is used.
Now it's possible to have a module with higher interval than Agent interval, so
we take now the more higest interval in modules to calculate if an agent is DOWN.
* fgraph.php: updated progressbar function to show N/A when data is above 100 or below 0.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-09 22:29:44 +02:00
}
} // If pertenece/belongs to group
2006-03-27 05:37:27 +02:00
}
2007-05-20 19:12:31 +02:00
echo " <tr> " ;
2006-03-27 05:37:27 +02:00
echo " </table><br> " ;
2006-12-26 16:49:14 +01:00
require " bulbs.php " ;
2006-03-27 05:37:27 +02:00
}
else {
2006-12-03 03:07:36 +01:00
echo '</table><br><div class="nf">' . $lang_label [ " no_agent " ] . '</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-03-27 05:37:27 +02:00
}
} else {
audit_db ( $id_user , $REMOTE_ADDR , " ACL Violation " , " Trying to access Agent view " );
require ( " general/noaccess.php " );
}
2007-03-02 18:56:07 +01:00
2007-02-22 17:45:10 +01:00
?>