2006-03-27 05:37:27 +02:00
< ? php
2008-08-22 20:07:32 +02:00
2009-06-08 20:15:58 +02:00
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
2008-04-17 17:27:25 +02:00
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-08-22 20:07:32 +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.
2006-03-27 05:37:27 +02:00
2008-08-22 20:07:32 +02:00
2006-03-27 05:37:27 +02:00
// Load global vars
2008-10-29 21:03:42 +01:00
require_once ( " include/config.php " );
2008-04-17 17:27:25 +02:00
2008-07-21 14:23:28 +02:00
check_login ();
2006-03-27 05:37:27 +02:00
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/extensions.php,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
if ( ! give_acl ( $config [ 'id_user' ], 0 , " AR " ) && ! give_acl ( $config [ 'id_user' ], 0 , " AW " )) {
audit_db ( $config [ 'id_user' ], $REMOTE_ADDR , " ACL Violation " ,
" Trying to access Agent Management " );
2009-05-19 15:33:27 +02:00
require ( 'general/noaccess.php' );
return ;
2008-01-10 17:40:00 +01:00
}
2006-03-27 05:37:27 +02:00
2009-06-25 Jorge Gonzalez <jorgegonz@artica.es>
* include/functions_db.php, operation/snmpconsole/snmp_view.php,
* operation/agentes/status_monitor.php,
* operation/agentes/estado_grupo.php,
* operation/agentes/estado_ultimopaquete.php,
* operation/agentes/alerts_status.php,
* operation/agentes/estado_generalagente.php,
* operation/agentes/estado_agente.php,
* operation/agentes/exportdata.php,
* operation/agentes/estado_monitores.php,
* operation/agentes/tactical.php, operation/agentes/networkmap.php,
* operation/reporting/reporting_viewer.php, reporting/fgraph.php,
* general/pandora_help.php, general/logoff.php,
* general/logon_failed.php, godmode/setup/setup.php,
* godmode/setup/links.php, godmode/snmpconsole/snmp_alert.php,
* godmode/profiles/profile_list.php, godmode/db/db_main.php,
* godmode/db/db_audit.php, godmode/db/db_refine.php,
* godmode/db/db_info.php, godmode/db/db_event.php,
* godmode/db/db_purge.php,
* godmode/agentes/massive_delete_agents.php,
* godmode/agentes/massive_config.php,
* godmode/agentes/massive_delete_alerts.php,
* godmode/agentes/massive_edit_modules.php,
* godmode/agentes/module_manager.php,
* godmode/agentes/massive_delete_modules.php,
* godmode/agentes/configurar_agente.php,
* godmode/agentes/planned_downtime.php,
* godmode/modules/manage_network_templates_form.php,
* godmode/modules/manage_network_components.php,
* godmode/reporting/map_builder.php,
* godmode/reporting/map_builder_wizard.php,
* godmode/servers/manage_export.php,
* godmode/servers/manage_export_form.php,
* godmode/servers/plugin.php, godmode/servers/modificar_server.php,
* godmode/servers/manage_recontask_form.php,
* godmode/alerts/alert_compounds.php, godmode/menu.php: Some
* translatable strings reused to simplify i18n work.
* include/languages/es.po, include/languages/es.mo: Updated Spanish
* translation.
* include/languages/index.pot: Updated po template.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1768 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-06-25 10:01:18 +02:00
echo '<h2>' . __ ( 'Pandora agents' ) . ' » ' . __ ( 'Full list of monitors' ) . '</h2>' ;
2008-01-10 17:40:00 +01:00
2009-05-19 15:33:27 +02:00
$ag_freestring = get_parameter ( 'ag_freestring' );
$ag_modulename = ( string ) get_parameter ( 'ag_modulename' );
2009-07-17 13:46:10 +02:00
$ag_group = ( int ) get_parameter ( 'ag_group' , 1 );
2009-05-19 15:33:27 +02:00
$offset = ( int ) get_parameter ( 'offset' );
$status = ( int ) get_parameter ( 'status' , 4 );
$modulegroup = ( int ) get_parameter ( 'modulegroup' );
2008-01-10 17:40:00 +01:00
2009-05-19 15:33:27 +02:00
echo '<form method="post" action="index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60">' ;
2008-04-17 17:27:25 +02:00
2009-01-21 15:47:39 +01:00
echo '<table cellspacing="4" cellpadding="4" width="750" class="databox">' ;
2008-10-29 21:03:42 +01:00
echo '<tr><td valign="middle">' . __ ( 'Group' ) . '</td>' ;
echo '<td valign="middle">' ;
2008-04-17 17:27:25 +02:00
2009-05-19 15:33:27 +02:00
print_select ( get_user_groups (), " ag_group " , $ag_group , 'this.form.submit();' ,
'' , '0' , false , false , false , 'w130' );
2008-06-19 02:24:05 +02:00
2008-10-29 21:03:42 +01:00
echo " </td> " ;
echo " <td> " . __ ( 'Monitor status' ) . " </td><td> " ;
2008-04-17 17:27:25 +02:00
2008-10-29 21:03:42 +01:00
$fields = array ();
2009-01-20 21:01:25 +01:00
$fields [ 0 ] = __ ( 'Normal' ); //default
$fields [ 1 ] = __ ( 'Warning' );
$fields [ 2 ] = __ ( 'Critical' );
$fields [ 3 ] = __ ( 'Unknown' );
$fields [ 4 ] = __ ( 'Not normal' );
2009-07-20 15:18:18 +02:00
$fields [ 5 ] = __ ( 'Not init' );
2008-01-10 17:40:00 +01:00
2008-10-29 21:03:42 +01:00
print_select ( $fields , " status " , $status , 'this.form.submit();' , __ ( 'All' ), - 1 );
2009-01-21 15:47:39 +01:00
echo '</td>' ;
echo '<td valign="middle">' . __ ( 'Module group' ) . '</td>' ;
echo '<td valign="middle">' ;
2009-05-19 15:33:27 +02:00
print_select_from_sql ( " SELECT * FROM tmodule_group ORDER BY name " ,
'modulegroup' , $modulegroup , '' , __ ( 'All' ), 0 );
2009-01-21 15:47:39 +01:00
echo '</tr><tr><td valign="middle">' . __ ( 'Module name' ) . '</td>' ;
2008-10-29 21:03:42 +01:00
echo '<td valign="middle">' ;
2008-06-19 02:24:05 +02:00
2009-05-19 15:33:27 +02:00
$modules = get_db_all_rows_filter ( 'tagente_modulo' , false , 'DISTINCT(nombre)' );
print_select ( index_array ( $modules , 'nombre' , 'nombre' ), " ag_modulename " ,
$ag_modulename , 'this.form.submit();' , __ ( 'All' ), '' );
2008-04-17 17:27:25 +02:00
2009-05-19 15:33:27 +02:00
echo '</td><td valign="middle">' . __ ( 'Search' ) . '</td>' ;
2008-04-17 17:27:25 +02:00
2008-10-29 21:03:42 +01:00
echo '<td valign="middle">' ;
2009-03-04 Sancho Lerena <slerena@artica.es>
* extras/: New directory with extra contents (scripts, tools, samples)
* index.php: Add new permission check for /attachment directory. Probably
could be extended and wrapped into a function. This should be only called
once, this is the reason why is placed here and not in config_process.
* pandora_console_upgrade: Force MYSQL run, even if SQL return error (useful
for applying over a older 3.0 version for example).
* pandoradb_data.sql: Was missing some tconfig variables.
* extras/*.sql: Missing somre tconfig variables and other minor issues fixed
* extensions/update_manager/main.php: Description of update manager patch
wider. Probably needs more formatting in the future.
* extras/sample_login.php: Sample on how to implement autologin feature.
* footer.php: I hope solve the frakkin image problem.
* godmode/agents/agent_manager.php: proper ACL check notice.
* godmode/alerts/alert_list.php: Fixed notice.
* godmode/reporting/map_builder.php: Added link to wizard and item count.
* godmode/reporting/map_builder_wizard.php: Added new feature, a wizard
to populate the visual map, using agents from a combo, depending on the
map selected. Could have a lot of improvements, it's a basic start. Allow
to choose agents and image maps and space between images. Puts in a reticle
automatically adjusting at 600px width.
* godmode/setup.php: Checkbox for trap_forward was bad, fixed.
* config_process.php: Fixed version to 3.0-dev
* functions_html.php: Default of 0 in text boxes makes them unusable on
default values, funny :-)
* include/functions_reporting.php: Fixed a notice on unknown variable
on function get_group_stat().
* operation/agentes/alerts_status.php: Filter on module status is made now
with combos, like the rest of the filters in the GUI.
* operation/events/events.php: a missing div makes graph float outside the
filter box. TODO: Hidder filter makes free-width style buggy here.
* operation/reporting/reporting_viewer.php: Fixed layout issue.
* operation/visual_console/render_view.php: Added ACL check.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1510 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-04 18:57:00 +01:00
print_input_text ( " ag_freestring " , $ag_freestring , '' , 15 , 30 , false );
2009-01-20 21:01:25 +01:00
2008-10-29 21:03:42 +01:00
echo '</td><td valign="middle">' ;
print_submit_button ( __ ( 'Show' ), " uptbutton " , false , 'class="sub"' );
2008-04-17 17:27:25 +02:00
2008-10-29 21:03:42 +01:00
echo " </form> " ;
echo " </table> " ;
// Begin Build SQL sentences
$sql = " FROM tagente, tagente_modulo, tagente_estado
WHERE tagente . id_agente = tagente_modulo . id_agente
AND tagente_modulo . disabled = 0
AND tagente . disabled = 0
2009-01-26 17:51:14 +01:00
AND tagente_modulo . delete_pending = 0
2008-10-29 21:03:42 +01:00
AND tagente_estado . id_agente_modulo = tagente_modulo . id_agente_modulo " ;
2008-04-17 17:27:25 +02:00
// Agent group selector
2008-10-29 21:03:42 +01:00
if ( $ag_group > 1 && give_acl ( $config [ " id_user " ], $ag_group , " AR " )) {
$sql .= sprintf ( " AND tagente.id_grupo = %d " , $ag_group );
} else {
2008-07-17 08:41:39 +02:00
// User has explicit permission on group 1 ?
2008-10-29 21:03:42 +01:00
$sql .= " AND tagente.id_grupo IN ( " . implode ( " , " , array_keys ( get_user_groups ())) . " ) " ;
2008-06-09 19:51:18 +02:00
}
2008-04-17 17:27:25 +02:00
2009-01-21 15:47:39 +01:00
// Module group
if ( $modulegroup > 0 ) {
$sql .= sprintf ( " AND tagente_modulo.id_module_group = '%d' " , $modulegroup );
}
2008-04-17 17:27:25 +02:00
// Module name selector
2008-10-29 21:03:42 +01:00
if ( $ag_modulename != " " ) {
$sql .= sprintf ( " AND tagente_modulo.nombre = '%s' " , $ag_modulename );
}
2008-04-17 17:27:25 +02:00
// Freestring selector
2008-10-29 21:03:42 +01:00
if ( $ag_freestring != " " ) {
$sql .= sprintf ( " AND (tagente.nombre LIKE '%%%s%%' OR tagente_modulo.nombre LIKE '%%%s%%' OR tagente_modulo.descripcion LIKE '%%%s%%') " , $ag_freestring , $ag_freestring , $ag_freestring );
}
2008-06-19 02:24:05 +02:00
// Status selector
2009-01-20 21:01:25 +01:00
if ( $status == 0 ) { //Up
2008-10-29 21:03:42 +01:00
$sql .= " AND tagente_estado.estado = 0 AND (UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) < (tagente_estado.current_interval * 2) " ;
2009-01-20 21:01:25 +01:00
} elseif ( $status == 2 ) { //Critical
$sql .= " AND tagente_estado.estado = 1 AND (UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) < (tagente_estado.current_interval * 2) " ;
} elseif ( $status == 1 ) { //warning
$sql .= " AND tagente_estado.estado = 2 AND (UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) < (tagente_estado.current_interval * 2) " ;
} elseif ( $status == 4 ) { //not normal
$sql .= " AND ((UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) >= (tagente_estado.current_interval * 2) OR tagente_estado.estado = 2 OR tagente_estado.estado = 1) " ;
} elseif ( $status == 3 ) { //Unknown
2009-01-21 11:02:47 +01:00
$sql .= " AND tagente_modulo.id_tipo_modulo < 21 AND (UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) >= (tagente_estado.current_interval * 2) " ;
2009-07-20 15:18:18 +02:00
} elseif ( $status == 5 ) {
$sql .= " AND tagente_estado.utimestamp = 0 " ;
2008-10-29 21:03:42 +01:00
}
2008-06-19 02:24:05 +02:00
2008-10-29 21:03:42 +01:00
$sql .= " ORDER BY tagente.id_grupo, tagente.nombre " ;
2008-04-17 17:27:25 +02:00
// Build final SQL sentences
2008-10-29 21:03:42 +01:00
$count = get_db_sql ( " SELECT COUNT(tagente_modulo.id_agente_modulo) " . $sql );
$sql = " SELECT tagente_modulo.id_agente_modulo,
tagente . intervalo AS agent_interval ,
tagente . nombre AS agent_name ,
tagente_modulo . nombre AS module_name ,
2009-09-14 03:02:44 +02:00
tagente_modulo . id_agente_modulo ,
tagente_modulo . history_data ,
2008-10-29 21:03:42 +01:00
tagente_modulo . flag AS flag ,
tagente . id_grupo AS id_group ,
tagente . id_agente AS id_agent ,
tagente_modulo . id_tipo_modulo AS module_type ,
tagente_modulo . module_interval ,
tagente_estado . datos ,
2009-01-20 21:01:25 +01:00
tagente_estado . estado ,
2008-10-29 21:03:42 +01:00
tagente_estado . utimestamp AS utimestamp " . $sql . " LIMIT " . $offset . " , " . $config["block_size"] ;
$result = get_db_all_rows_sql ( $sql );
if ( $count > $config [ " block_size " ]) {
2009-05-19 15:33:27 +02:00
pagination ( $count , false , $offset );
2008-10-29 21:03:42 +01:00
}
2008-04-17 17:27:25 +02:00
2008-10-29 21:03:42 +01:00
if ( $result === false ) {
$result = array ();
2008-07-17 08:41:39 +02:00
}
2008-10-29 21:03:42 +01:00
$table -> cellpadding = 4 ;
$table -> cellspacing = 4 ;
$table -> width = 750 ;
$table -> class = " databox " ;
$table -> head = array ();
$table -> data = array ();
$table -> size = array ();
$table -> align = array ();
$table -> head [ 1 ] = __ ( 'Agent' );
$table -> head [ 2 ] = __ ( 'Type' );
2009-09-14 03:02:44 +02:00
$table -> align [ 2 ] = " left " ;
2008-07-17 08:41:39 +02:00
2009-06-25 Jorge Gonzalez <jorgegonz@artica.es>
* include/functions_db.php, operation/snmpconsole/snmp_view.php,
* operation/agentes/status_monitor.php,
* operation/agentes/estado_grupo.php,
* operation/agentes/estado_ultimopaquete.php,
* operation/agentes/alerts_status.php,
* operation/agentes/estado_generalagente.php,
* operation/agentes/estado_agente.php,
* operation/agentes/exportdata.php,
* operation/agentes/estado_monitores.php,
* operation/agentes/tactical.php, operation/agentes/networkmap.php,
* operation/reporting/reporting_viewer.php, reporting/fgraph.php,
* general/pandora_help.php, general/logoff.php,
* general/logon_failed.php, godmode/setup/setup.php,
* godmode/setup/links.php, godmode/snmpconsole/snmp_alert.php,
* godmode/profiles/profile_list.php, godmode/db/db_main.php,
* godmode/db/db_audit.php, godmode/db/db_refine.php,
* godmode/db/db_info.php, godmode/db/db_event.php,
* godmode/db/db_purge.php,
* godmode/agentes/massive_delete_agents.php,
* godmode/agentes/massive_config.php,
* godmode/agentes/massive_delete_alerts.php,
* godmode/agentes/massive_edit_modules.php,
* godmode/agentes/module_manager.php,
* godmode/agentes/massive_delete_modules.php,
* godmode/agentes/configurar_agente.php,
* godmode/agentes/planned_downtime.php,
* godmode/modules/manage_network_templates_form.php,
* godmode/modules/manage_network_components.php,
* godmode/reporting/map_builder.php,
* godmode/reporting/map_builder_wizard.php,
* godmode/servers/manage_export.php,
* godmode/servers/manage_export_form.php,
* godmode/servers/plugin.php, godmode/servers/modificar_server.php,
* godmode/servers/manage_recontask_form.php,
* godmode/alerts/alert_compounds.php, godmode/menu.php: Some
* translatable strings reused to simplify i18n work.
* include/languages/es.po, include/languages/es.mo: Updated Spanish
* translation.
* include/languages/index.pot: Updated po template.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1768 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-06-25 10:01:18 +02:00
$table -> head [ 3 ] = __ ( 'Module name' );
2008-10-29 21:03:42 +01:00
$table -> head [ 4 ] = __ ( 'Interval' );
$table -> align [ 4 ] = " center " ;
$table -> head [ 5 ] = __ ( 'Status' );
$table -> align [ 5 ] = " center " ;
2009-09-14 03:02:44 +02:00
$table -> head [ 6 ] = __ ( 'Graph' );
$table -> align [ 6 ] = " left " ;
$table -> head [ 7 ] = __ ( 'Data' );
$table -> align [ 7 ] = " left " ;
$table -> head [ 8 ] = __ ( 'Timestamp' );
$table -> align [ 8 ] = " right " ;
2008-10-29 21:03:42 +01:00
2009-08-07 Miguel de Dios <miguel.dedios@artica.es>
* operation/visual_console/index.php,
pandora_console/operation/users/user.php, operation/incidents/incident.php,
operation/agentes/status_monitor.php, operation/agentes/estado_agente.php,
operation/agentes/alerts_status.php, include/styles/pandora.css,
include/styles/pandora_black.css,include/styles/pandora_blackmetal.css,
include/styles/pandora_width.css, include/styles/pandora_minimal.css,
include/styles/pandora_red.css: the table list now has rows with alternate
colours for easy see the data.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1833 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-10 11:55:53 +02:00
$rowPair = true ;
$iterator = 0 ;
2008-10-29 21:03:42 +01:00
foreach ( $result as $row ) {
2009-08-07 Miguel de Dios <miguel.dedios@artica.es>
* operation/visual_console/index.php,
pandora_console/operation/users/user.php, operation/incidents/incident.php,
operation/agentes/status_monitor.php, operation/agentes/estado_agente.php,
operation/agentes/alerts_status.php, include/styles/pandora.css,
include/styles/pandora_black.css,include/styles/pandora_blackmetal.css,
include/styles/pandora_width.css, include/styles/pandora_minimal.css,
include/styles/pandora_red.css: the table list now has rows with alternate
colours for easy see the data.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1833 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-10 11:55:53 +02:00
if ( $rowPair )
$table -> rowclass [ $iterator ] = 'rowPair' ;
else
$table -> rowclass [ $iterator ] = 'rowOdd' ;
$rowPair = ! $rowPair ;
$iterator ++ ;
2008-10-29 21:03:42 +01:00
$data = array ();
$data [ 1 ] = '<strong><a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=' . $row [ " id_agent " ] . '">' ;
$data [ 1 ] .= strtoupper ( substr ( $row [ " agent_name " ], 0 , 25 ));
$data [ 1 ] .= '</a></strong>' ;
$data [ 2 ] = '<img src="images/' . show_icon_type ( $row [ " module_type " ]) . '" border="0" />' ;
$data [ 3 ] = substr ( $row [ " module_name " ], 0 , 30 );
2009-04-24 11:19:35 +02:00
$data [ 4 ] = ( $row [ 'module_interval' ] == 0 ) ? $row [ 'agent_interval' ] : $row [ 'module_interval' ];
2009-01-20 21:01:25 +01:00
if ( $row [ " estado " ] == 0 ) {
2009-04-06 13:02:05 +02:00
$data [ 5 ] = print_status_image ( STATUS_MODULE_OK , $row [ " datos " ], true );
2009-01-20 21:01:25 +01:00
} elseif ( $row [ " estado " ] == 1 ) {
2009-04-06 13:02:05 +02:00
$data [ 5 ] = print_status_image ( STATUS_MODULE_CRITICAL , $row [ " datos " ], true );
2008-10-29 21:03:42 +01:00
} else {
2009-04-06 13:02:05 +02:00
$data [ 5 ] = print_status_image ( STATUS_MODULE_WARNING , $row [ " datos " ], true );
2008-07-17 08:41:39 +02:00
}
2008-10-29 21:03:42 +01:00
2009-09-14 03:02:44 +02:00
$data [ 6 ] = " " ;
if ( $row [ 'history_data' ] == 1 ){
$graph_type = return_graphtype ( $row [ " module_type " ]);
$nombre_tipo_modulo = get_moduletype_name ( $row [ " module_type " ]);
$handle = " stat " . $nombre_tipo_modulo . " _ " . $row [ " id_agente_modulo " ];
$url = 'include/procesos.php?agente=' . $row [ " id_agente_modulo " ];
$win_handle = dechex ( crc32 ( $row [ " id_agente_modulo " ] . $row [ " module_name " ]));
$link = " winopeng('operation/agentes/stat_win.php?type= $graph_type &period=86400&id= " . $row [ " id_agente_modulo " ] . " &label= " . $row [ " module_name " ] . " &refresh=600','day_ " . $win_handle . " ') " ;
$data [ 6 ] = '<a href="javascript:' . $link . '"><img src="images/chart_curve.png" border=0></a>' ;
$data [ 6 ] .= " <a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente= " . $row [ " id_agent " ] . " &tab=data_view&period=86400&id= " . $row [ " id_agente_modulo " ] . " '><img border=0 src='images/binary.png'></a> " ;
}
if ( is_numeric ( $row [ " datos " ]))
$data [ 7 ] = format_numeric ( $row [ " datos " ]);
else
$data [ 7 ] = " <span title=' " . $row [ 'datos' ] . " ' style='white-space: nowrap;'> " . substr ( salida_limpia ( $row [ " datos " ]), 0 , 12 ) . " </span> " ;
2008-12-24 Evi Vanoost <vanooste@rcbi.rochester.edu>
* include/functions_reporting.php, include/functions_db.php,
include/functions_html.php, operation/agentes/datos_agente.php,
operation/agentes/estado_agente.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_grupo.php, operation/agentes/estado_monitores.php,
operation/agentes/networkmap.php, operation/agentes/status_monitor.php,
operation/incidents/incident_detail.php,
operation/reporting/reporting_viewer.php,
operation/reporting/reporting_xml.php, reporting/fgraph.php,
godmode/db/db_audit.php, godmode/db/db_event.php, godmode/db/db_purge.php:
Added get_system_time in favor of time ();
* include/functions.php: Added get_system_time which gets the time from
a source based on user preference
* include/help/en/help_timesource.php: Explanation of timesource.
* godmode/setup/setup.php, include/config_process.php: Added timesource
selection and preference
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1310 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-24 17:53:00 +01:00
$seconds = get_system_time () - $row [ " utimestamp " ];
2009-05-02 01:41:09 +02:00
if ( $seconds >= ( $row [ " module_interval " ] * 2 )) {
2008-12-24 Evi Vanoost <vanooste@rcbi.rochester.edu>
* include/functions_reporting.php, include/functions_db.php,
include/functions_html.php, operation/agentes/datos_agente.php,
operation/agentes/estado_agente.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_grupo.php, operation/agentes/estado_monitores.php,
operation/agentes/networkmap.php, operation/agentes/status_monitor.php,
operation/incidents/incident_detail.php,
operation/reporting/reporting_viewer.php,
operation/reporting/reporting_xml.php, reporting/fgraph.php,
godmode/db/db_audit.php, godmode/db/db_event.php, godmode/db/db_purge.php:
Added get_system_time in favor of time ();
* include/functions.php: Added get_system_time which gets the time from
a source based on user preference
* include/help/en/help_timesource.php: Explanation of timesource.
* godmode/setup/setup.php, include/config_process.php: Added timesource
selection and preference
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1310 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-24 17:53:00 +01:00
$option = array ( " html_attr " => 'class="redb"' );
2008-10-29 21:03:42 +01:00
} else {
2008-12-24 Evi Vanoost <vanooste@rcbi.rochester.edu>
* include/functions_reporting.php, include/functions_db.php,
include/functions_html.php, operation/agentes/datos_agente.php,
operation/agentes/estado_agente.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_grupo.php, operation/agentes/estado_monitores.php,
operation/agentes/networkmap.php, operation/agentes/status_monitor.php,
operation/incidents/incident_detail.php,
operation/reporting/reporting_viewer.php,
operation/reporting/reporting_xml.php, reporting/fgraph.php,
godmode/db/db_audit.php, godmode/db/db_event.php, godmode/db/db_purge.php:
Added get_system_time in favor of time ();
* include/functions.php: Added get_system_time which gets the time from
a source based on user preference
* include/help/en/help_timesource.php: Explanation of timesource.
* godmode/setup/setup.php, include/config_process.php: Added timesource
selection and preference
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1310 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-24 17:53:00 +01:00
$option = array ();
2008-10-29 21:03:42 +01:00
}
2009-09-14 03:02:44 +02:00
$data [ 8 ] = print_timestamp ( $row [ " utimestamp " ], true , $option );
2008-10-29 21:03:42 +01:00
array_push ( $table -> data , $data );
}
if ( ! empty ( $table -> data )) {
print_table ( $table );
2008-01-10 17:40:00 +01:00
} else {
2008-10-29 21:03:42 +01:00
echo '<div class="nf">' . __ ( 'This group doesn\'t have any monitor' ) . '</div>' ;
2008-01-10 17:40:00 +01:00
}
2007-07-28 20:11:48 +02:00
?>