2008-08-22 20:07:32 +02:00
|
|
|
<?php
|
|
|
|
|
2009-06-08 20:15:58 +02:00
|
|
|
// Pandora FMS - http://pandorafms.com
|
|
|
|
// ==================================================
|
2010-06-02 19:30:11 +02:00
|
|
|
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
|
2009-06-08 20:15:58 +02:00
|
|
|
// Please see http://pandorafms.org 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.
|
2009-06-08 20:15:58 +02:00
|
|
|
|
2010-03-02 20:25:51 +01:00
|
|
|
global $config;
|
2008-08-22 20:07:32 +02:00
|
|
|
|
2008-06-19 02:24:05 +02:00
|
|
|
check_login();
|
2006-03-27 05:37:27 +02:00
|
|
|
|
2008-06-19 02:24:05 +02:00
|
|
|
if (isset($_GET["id_agente"])){
|
|
|
|
$id_agente = $_GET["id_agente"];
|
|
|
|
}
|
2006-03-27 05:37:27 +02:00
|
|
|
|
2008-06-19 02:24:05 +02:00
|
|
|
// View last data packet
|
|
|
|
// Get timestamp of last packet
|
2009-03-26 16:55:30 +01:00
|
|
|
$agent = get_db_row ('tagente', 'id_agente', $id_agente,
|
|
|
|
array ('ultimo_contacto_remoto',
|
|
|
|
'ultimo_contacto',
|
|
|
|
'intervalo',
|
|
|
|
'id_grupo'));
|
|
|
|
$timestamp_ref = $agent["ultimo_contacto_remoto"];
|
|
|
|
$timestamp_lof = $agent["ultimo_contacto"];
|
|
|
|
$intervalo_agente = $agent["intervalo"];
|
2006-03-27 05:37:27 +02:00
|
|
|
|
2008-06-19 02:24:05 +02:00
|
|
|
// Get last packet
|
2009-03-26 16:55:30 +01:00
|
|
|
$sql3 = 'SELECT * FROM tagente_modulo, tagente_estado
|
|
|
|
WHERE tagente_modulo.disabled = 0
|
|
|
|
AND tagente_modulo.id_agente = ' . $id_agente.
|
|
|
|
' AND tagente_estado.utimestamp != 0
|
|
|
|
AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo
|
|
|
|
ORDER BY id_module_group, nombre';
|
2008-08-05 13:42:08 +02:00
|
|
|
$label_group = 0;
|
2008-06-19 02:24:05 +02:00
|
|
|
$last_label = "";
|
2008-08-05 13:42:08 +02:00
|
|
|
|
|
|
|
// Title
|
2010-06-02 19:30:11 +02:00
|
|
|
echo "<h3>".__('Display of last data modules received by agent');
|
2008-08-05 13:42:08 +02:00
|
|
|
echo " <a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agente&tab=data'><img src='images/refresh.png'></A>";
|
2010-06-02 19:30:11 +02:00
|
|
|
echo "</h3>";
|
2008-08-05 13:42:08 +02:00
|
|
|
|
2010-07-21 18:56:52 +02:00
|
|
|
$sortField = get_parameter('sort_field');
|
|
|
|
$sort = get_parameter('sort', 'none');
|
|
|
|
$selected = 'border: 1px solid black;';
|
|
|
|
$url = 'index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=data&id_agente=' . $id_agente;
|
|
|
|
$selectNameUp = '';
|
|
|
|
$selectNameDown = '';
|
|
|
|
$selectTypeUp = '';
|
|
|
|
$selectTypeDown = '';
|
|
|
|
$selectIntervalUp = '';
|
|
|
|
$selectIntervalDown = '';
|
|
|
|
$selectTimestampUp = '';
|
|
|
|
$selectTimestampDown = '';
|
|
|
|
|
|
|
|
$order[] = array('field' => 'id_module_group', 'order' => 'ASC');
|
|
|
|
|
|
|
|
switch ($sortField) {
|
|
|
|
case 'name':
|
|
|
|
switch ($sort) {
|
|
|
|
case 'up':
|
|
|
|
$selectNameUp = $selected;
|
|
|
|
$order[] = array('field' => 'tagente_modulo.nombre', 'order' => 'ASC');
|
|
|
|
break;
|
|
|
|
case 'down':
|
|
|
|
$selectNameDown = $selected;
|
|
|
|
$order[] = array('field' => 'tagente_modulo.nombre', 'order' => 'DESC');
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 'type':
|
|
|
|
switch ($sort) {
|
|
|
|
case 'up':
|
|
|
|
$selectTypeUp = $selected;
|
|
|
|
$order[] = array('field' => 'tagente_modulo.id_tipo_modulo', 'order' => 'ASC');
|
|
|
|
break;
|
|
|
|
case 'down':
|
|
|
|
$selectTypeDown = $selected;
|
|
|
|
$order[] = array('field' => 'tagente_modulo.id_tipo_modulo', 'order' => 'DESC');
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 'interval':
|
|
|
|
switch ($sort) {
|
|
|
|
case 'up':
|
|
|
|
$selectIntervalUp = $selected;
|
|
|
|
$order[] = array('field' => 'tagente_modulo.module_interval', 'order' => 'ASC');
|
|
|
|
break;
|
|
|
|
case 'down':
|
|
|
|
$selectIntervalDown = $selected;
|
|
|
|
$order[] = array('field' => 'tagente_modulo.module_interval', 'order' => 'DESC');
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 'timestamp':
|
|
|
|
switch ($sort) {
|
|
|
|
case 'up':
|
|
|
|
$selectTimestampUp = $selected;
|
|
|
|
$order[] = array('field' => 'tagente_estado.utimestamp', 'order' => 'ASC');
|
|
|
|
break;
|
|
|
|
case 'down':
|
|
|
|
$selectTimestampDown = $selected;
|
|
|
|
$order[] = array('field' => 'tagente_estado.utimestamp', 'order' => 'DESC');
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
$selectNameUp = $selected;
|
|
|
|
$selectNameDown = '';
|
|
|
|
$selectTypeUp = '';
|
|
|
|
$selectTypeDown = '';
|
|
|
|
$selectIntervalUp = '';
|
|
|
|
$selectIntervalDown = '';
|
|
|
|
$selectTimestampUp = '';
|
|
|
|
$selectTimestampDown = '';
|
|
|
|
$order[] = array('field' => 'tagente_modulo.nombre', 'order' => 'ASC');
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2009-03-26 16:55:30 +01:00
|
|
|
$modules = get_db_all_rows_filter ('tagente_modulo, tagente_estado',
|
|
|
|
array ('tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo',
|
|
|
|
'disabled' => 0,
|
|
|
|
'tagente_estado.utimestamp != 0',
|
|
|
|
'tagente_modulo.id_agente = '.$id_agente,
|
2010-07-21 18:56:52 +02:00
|
|
|
'order' => $order));
|
2008-08-05 13:42:08 +02:00
|
|
|
|
2009-03-26 16:55:30 +01:00
|
|
|
if ($modules === false) {
|
|
|
|
echo "<div class='nf'>".__('This agent doesn\'t have any module')."</div>";
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "<table width='95%' cellpadding='3' cellspacing='3' class='databox'>";
|
|
|
|
echo "<th></th>";
|
2010-07-21 18:56:52 +02:00
|
|
|
echo "<th>".__('Module name') . ' ' .
|
|
|
|
'<a href="' . $url . '&sort_field=name&sort=up"><img src="images/sort_up.png" style="' . $selectNameUp . '" /></a>' .
|
|
|
|
'<a href="' . $url . '&sort_field=name&sort=down"><img src="images/sort_down.png" style="' . $selectNameDown . '" /></a>';
|
|
|
|
echo "</th>";
|
|
|
|
echo "<th>".__('Type') . ' ' .
|
|
|
|
'<a href="' . $url . '&sort_field=type&sort=up"><img src="images/sort_up.png" style="' . $selectTypeUp . '" /></a>' .
|
|
|
|
'<a href="' . $url . '&sort_field=type&sort=down"><img src="images/sort_down.png" style="' . $selectTypeDown . '" /></a>';
|
|
|
|
echo "</th>";
|
|
|
|
echo "<th>".__('int') . ' ' .
|
|
|
|
'<a href="' . $url . '&sort_field=interval&sort=up"><img src="images/sort_up.png" style="' . $selectIntervalUp . '" /></a>' .
|
|
|
|
'<a href="' . $url . '&sort_field=interval&sort=down"><img src="images/sort_down.png" style="' . $selectIntervalDown . '" /></a>';
|
|
|
|
echo "</th>";
|
|
|
|
echo "<th>".__('Description') . "</th>";
|
|
|
|
echo "<th>".__('Data') . "</th>";
|
2009-03-26 16:55:30 +01:00
|
|
|
echo "<th>".__('Graph')."</th>";
|
|
|
|
echo "<th>".__('Raw Data')."</th>";
|
2010-07-21 18:56:52 +02:00
|
|
|
echo "<th>".__('Timestamp') . ' ' .
|
|
|
|
'<a href="' . $url . '&sort_field=timestamp&sort=up"><img src="images/sort_up.png" style="' . $selectTimestampUp . '" /></a>' .
|
|
|
|
'<a href="' . $url . '&sort_field=timestamp&sort=down"><img src="images/sort_down.png" style="' . $selectTimestampDown . '" /></a>';
|
|
|
|
echo "</th>";
|
2009-03-26 16:55:30 +01:00
|
|
|
$texto=''; $last_modulegroup = 0;
|
|
|
|
$color = 1;
|
|
|
|
$write = give_acl ($config['id_user'], $agent['id_grupo'], "AW");
|
|
|
|
foreach ($modules as $module) {
|
|
|
|
// Calculate table line color
|
|
|
|
if ($color == 1){
|
|
|
|
$tdcolor = "datos";
|
|
|
|
$color = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$tdcolor = "datos2";
|
|
|
|
$color = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($module["id_module_group"] != $last_modulegroup ){
|
2010-06-02 19:30:11 +02:00
|
|
|
// Render module group names (fixed code)
|
2009-03-26 16:55:30 +01:00
|
|
|
$nombre_grupomodulo = get_modulegroup_name ($module["id_module_group"]);
|
|
|
|
$last_modulegroup = $module["id_module_group"];
|
|
|
|
echo "<tr><td class='datos3' align='center' colspan='9'>
|
|
|
|
<b>".$nombre_grupomodulo."</b></td></tr>";
|
|
|
|
}
|
|
|
|
|
|
|
|
// Begin to render data ...
|
|
|
|
echo "<tr><td class='$tdcolor'>";
|
|
|
|
// Render network exec module button, only when
|
|
|
|
// Agent Write for this module and group, is given
|
|
|
|
// Is a network module
|
|
|
|
// Has flag = 0
|
|
|
|
if ($write && $module["id_modulo"] > 1 && $module["id_tipo_modulo"] < 100) {
|
|
|
|
if ($module["flag"] == 0) {
|
|
|
|
echo "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$id_agente."&id_agente_modulo=".$module["id_agente_modulo"]."&flag=1&tab=data&refr=60'><img src='images/target.png' border='0'></a>";
|
|
|
|
} else {
|
|
|
|
echo "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$id_agente."&id_agente_modulo=".$module["id_agente_modulo"]."&tab=data&refr=60'><img src='images/refresh.png' border='0'></a>";
|
2008-06-19 02:24:05 +02:00
|
|
|
}
|
2009-03-26 16:55:30 +01:00
|
|
|
}
|
|
|
|
echo "</td>";
|
|
|
|
$nombre_grupomodulo = get_modulegroup_name ($module["id_module_group"]);
|
|
|
|
if ($nombre_grupomodulo != ""){
|
|
|
|
if (($label_group == 0) || ($last_label != $nombre_grupomodulo)){ // Show label module group
|
|
|
|
$label_group = -1;
|
|
|
|
$last_label = $nombre_grupomodulo;
|
|
|
|
$texto = $texto. "
|
|
|
|
<td class='$tdcolor' align='center' colspan='7'>
|
|
|
|
<b>".$nombre_grupomodulo."</b></td>";
|
2008-06-19 02:24:05 +02:00
|
|
|
}
|
2009-03-26 16:55:30 +01:00
|
|
|
}
|
|
|
|
$nombre_tipo_modulo = get_moduletype_name ($module["id_tipo_modulo"]);
|
2009-11-25 10:12:42 +01:00
|
|
|
echo "<td class='".$tdcolor."_id' title='".safe_output($module["nombre"])."'>";
|
2009-03-26 16:55:30 +01:00
|
|
|
print_string_substr ($module["nombre"]);
|
|
|
|
echo "</td><td class='".$tdcolor."'> ";
|
2008-06-19 02:24:05 +02:00
|
|
|
|
2009-03-26 16:55:30 +01:00
|
|
|
print_moduletype_icon ($module["id_tipo_modulo"]);
|
|
|
|
echo "</td><td class='".$tdcolor."'>";
|
2010-03-18 21:01:48 +01:00
|
|
|
|
2009-03-26 16:55:30 +01:00
|
|
|
if ($module["module_interval"] != 0){
|
|
|
|
echo $module["module_interval"];
|
|
|
|
$real_interval = $module["module_interval"];
|
|
|
|
} else {
|
|
|
|
echo $intervalo_agente;
|
|
|
|
$real_interval = $intervalo_agente;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (($module["id_tipo_modulo"] != 3)
|
|
|
|
AND ($module["id_tipo_modulo"] != 10)
|
|
|
|
AND ($module["id_tipo_modulo"] != 17)
|
|
|
|
AND ($module["id_tipo_modulo"] != 23)){
|
2009-11-25 10:12:42 +01:00
|
|
|
echo "</td><td class='".$tdcolor."f9' title='".safe_output($module["descripcion"])."'>";
|
|
|
|
echo safe_output(substr($module["descripcion"],0,32));
|
2009-03-26 16:55:30 +01:00
|
|
|
if (strlen($module["descripcion"]) > 32){
|
|
|
|
echo "...";
|
2008-06-19 02:24:05 +02:00
|
|
|
}
|
|
|
|
echo "</td>";
|
2009-03-26 16:55:30 +01:00
|
|
|
}
|
2010-02-15 14:07:52 +01:00
|
|
|
|
2010-03-18 21:01:48 +01:00
|
|
|
if ($module["id_tipo_modulo"] == 30112) {
|
|
|
|
echo "<td class='".$tdcolor."f9' colspan='1'> </td>";
|
|
|
|
echo "<td class='".$tdcolor."f9' colspan='1'> x</td>";
|
2010-02-15 14:07:52 +01:00
|
|
|
|
|
|
|
} else if (($module["id_tipo_modulo"] == 100) OR ($module['history_data'] == 0)) {
|
2009-03-26 16:55:30 +01:00
|
|
|
echo "<td class='".$tdcolor."f9' colspan='2' title='".$module["datos"]."'>";
|
2009-11-25 10:12:42 +01:00
|
|
|
echo substr(safe_output($module["datos"]),0,12);
|
2009-03-26 16:55:30 +01:00
|
|
|
} else {
|
2008-06-19 02:24:05 +02:00
|
|
|
|
2009-09-14 03:02:44 +02:00
|
|
|
$graph_type = return_graphtype ($module["id_tipo_modulo"]);
|
2010-03-18 21:01:48 +01:00
|
|
|
|
|
|
|
if ($module["id_tipo_modulo"] == 30) { // log4x
|
|
|
|
switch($module["datos"]){
|
|
|
|
case 10: echo "<td class=$tdcolor style='color:darkgreen; font-weight:bold;'>TRACE</td>"; break;
|
|
|
|
case 20: echo "<td class=$tdcolor style='color:darkgreen; font-weight:bold;'>DEBUG</td>"; break;
|
|
|
|
case 30: echo "<td class=$tdcolor style='color:darkgreen; font-weight:bold;'>INFO</td>"; break;
|
2010-03-19 15:06:49 +01:00
|
|
|
case 40: echo "<td class=$tdcolor style='color:darkorange; font-weight:bold;'>WARN</td>"; break;
|
2010-03-18 21:01:48 +01:00
|
|
|
case 50: echo "<td class=$tdcolor style='color:red; font-weight:bold;'>ERROR</td>"; break;
|
|
|
|
case 60: echo "<td class=$tdcolor style='color:red; font-weight:bold;'>FATAL</td>"; break;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if (is_numeric($module["datos"])){
|
|
|
|
echo "<td class=".$tdcolor.">";
|
|
|
|
echo format_for_graph($module["datos"] );
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (strlen($module["datos"]) > 0 ) $colspan = 2;
|
|
|
|
else $colspan= 1;
|
|
|
|
echo "<td class='".$tdcolor."f9' colspan='" . $colspan . "' title='".safe_output($module["datos"])."'>";
|
|
|
|
echo substr(safe_output($module["datos"]),0,42);
|
|
|
|
}
|
2010-06-02 19:30:11 +02:00
|
|
|
echo "</td>";
|
2009-09-14 03:02:44 +02:00
|
|
|
}
|
2008-06-19 02:24:05 +02:00
|
|
|
|
2009-03-26 16:55:30 +01:00
|
|
|
$handle = "stat".$nombre_tipo_modulo."_".$module["id_agente_modulo"];
|
2009-06-30 Ramon Novoa <rnovoa@artica.es>
* nclude/FusionCharts,
include/FusionCharts/FCF_Column3D.swf,
include/FusionCharts/FCF_Pie3D.swf,
include/FusionCharts/FusionCharts.js,
include/FusionCharts/FCF_MSLine.swf,
include/FusionCharts/FusionCharts_Gen.php,
include/FusionCharts/FCF_StackedArea2D.swf,
include/FusionCharts/FCF_Area2D.swf,
include/FusionCharts/FCF_MSArea2D.swf,
include/FusionCharts/FusionCharts.php: Added to repository. Fusion
Charts Free.
* include/functions_fsgraph.php: Added to repository. Fusion Charts
chart generation functions for Pandora FMS.
* include/pchart_graph.php, include/pandora_graph.php,
include/fgraph2.php, include/pChart, include/Image,
include/fgraph.php: Moved from reporting to include.
* operation/agentes/stat_win.php: Moved from reporting to
operation/agentes.
* reporting: Deleted from repository.
* general/logon_ok.php, godmode/setup/setup.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.php,
operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php,
operation/incidents/incident_statistics.php
operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/tactical.php, include/functions_config.php,
include/functions_custom_graphs.php,
include/functions_visual_map.php,
include/functions_reporting.php: Added flash charts.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1779 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-06-30 17:08:14 +02:00
|
|
|
$url = 'include/procesos.php?agente='.$module["id_agente_modulo"];
|
2009-03-26 16:55:30 +01:00
|
|
|
$win_handle=dechex(crc32($module["id_agente_modulo"].$module["nombre"]));
|
|
|
|
echo "<td class=".$tdcolor." width='78'>";
|
|
|
|
$graph_label = output_clean_strict ($module["nombre"]);
|
2008-06-19 02:24:05 +02:00
|
|
|
|
2009-07-08 15:12:44 +02:00
|
|
|
echo "<a href='javascript:winopeng(\"operation/agentes/stat_win.php?type=$graph_type&period=2419200&id=".$module["id_agente_modulo"]."&label=".$graph_label."&refresh=180000\", \"month_".$win_handle."\")'><img src='images/grafica_m.png' border=0></a> ";
|
2009-01-12 Sancho Lerena <slerena@artica.es>
* pandoradb.sql: Removed fields "timestamp" and "id_agente" (and altered
some indexes) on tagente_datos, tagente_datos_string and
tagente_datos_inc.
tagente_estado table: removed cambio, added status_changes, last_status.
tagente_modulo: added five new fields (warning,critical mgmt., flipflop
detection, history module and delete_pending bit.
* agent_manager.php: Group ALL not shown anymore.
* configurar_agente.php: Support for new options. Delete a module now
mark for deletion the module, not delete data (It's VERY slow!).
* modificar_agente.php: Delete agent now uses the global function,
minor fixes.
* module_manager_editor.php: New fields initializacion.
* module_manager_editor_network.php: At this time, the first module
editor who implements the new fields and improve old ones (tcp data).
* setup.php: Added support for new token: event_view_hr (Filter of max
old (in hr) for the event viewer. Removed old tokens show_unknown and
show_lastalert.
* functions.php: format_for_graph() has an important BUG that makes
all units rendered without the "K" !!!!. Fixed.
* delete_agent.php: Delete remote config (if present). Also mark
for deletion modules instead delete them (and let the data without
being deleted, because it's a HUGE consuming time, and it's left
for the daily db maintance process).
* estado_agente.php: Updated code for view new status.
* estado_generalagente.php: Total packets are removed from this view,
this was a huge time consuming SQL operation that don't give important
infomation. Groupname is now visualized.
* estado_ultimopaquete.php,
* estado_monitores.php,
* estado_grupo.php: Rewritten much code to view new status and other
minor changes.
* ver_agente.php: Data view now works under the tabs and other minor
changes.
* events.php: Support for the new events and status. Added filter for
username and for a max. hours old events. Some boxes are now hidden
by default.
* fgraph.php: Some graphs are now fixed and uses tagente_datos and
tagent_access with utimestamp and without id_agent index. Works faster
* images/*: Updated icons (module types) and two new bulb colors.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 04:53:33 +01:00
|
|
|
|
2009-06-30 Ramon Novoa <rnovoa@artica.es>
* nclude/FusionCharts,
include/FusionCharts/FCF_Column3D.swf,
include/FusionCharts/FCF_Pie3D.swf,
include/FusionCharts/FusionCharts.js,
include/FusionCharts/FCF_MSLine.swf,
include/FusionCharts/FusionCharts_Gen.php,
include/FusionCharts/FCF_StackedArea2D.swf,
include/FusionCharts/FCF_Area2D.swf,
include/FusionCharts/FCF_MSArea2D.swf,
include/FusionCharts/FusionCharts.php: Added to repository. Fusion
Charts Free.
* include/functions_fsgraph.php: Added to repository. Fusion Charts
chart generation functions for Pandora FMS.
* include/pchart_graph.php, include/pandora_graph.php,
include/fgraph2.php, include/pChart, include/Image,
include/fgraph.php: Moved from reporting to include.
* operation/agentes/stat_win.php: Moved from reporting to
operation/agentes.
* reporting: Deleted from repository.
* general/logon_ok.php, godmode/setup/setup.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.php,
operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php,
operation/incidents/incident_statistics.php
operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/tactical.php, include/functions_config.php,
include/functions_custom_graphs.php,
include/functions_visual_map.php,
include/functions_reporting.php: Added flash charts.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1779 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-06-30 17:08:14 +02:00
|
|
|
$link ="winopeng('operation/agentes/stat_win.php?type=$graph_type&period=604800&id=".$module["id_agente_modulo"]."&label=".$graph_label."&refresh=6000','week_".$win_handle."')";
|
2009-03-26 16:55:30 +01:00
|
|
|
echo '<a href="javascript:'.$link.'"><img src="images/grafica_w.png" border=0></a> ';
|
|
|
|
|
2009-06-30 Ramon Novoa <rnovoa@artica.es>
* nclude/FusionCharts,
include/FusionCharts/FCF_Column3D.swf,
include/FusionCharts/FCF_Pie3D.swf,
include/FusionCharts/FusionCharts.js,
include/FusionCharts/FCF_MSLine.swf,
include/FusionCharts/FusionCharts_Gen.php,
include/FusionCharts/FCF_StackedArea2D.swf,
include/FusionCharts/FCF_Area2D.swf,
include/FusionCharts/FCF_MSArea2D.swf,
include/FusionCharts/FusionCharts.php: Added to repository. Fusion
Charts Free.
* include/functions_fsgraph.php: Added to repository. Fusion Charts
chart generation functions for Pandora FMS.
* include/pchart_graph.php, include/pandora_graph.php,
include/fgraph2.php, include/pChart, include/Image,
include/fgraph.php: Moved from reporting to include.
* operation/agentes/stat_win.php: Moved from reporting to
operation/agentes.
* reporting: Deleted from repository.
* general/logon_ok.php, godmode/setup/setup.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.php,
operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php,
operation/incidents/incident_statistics.php
operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/tactical.php, include/functions_config.php,
include/functions_custom_graphs.php,
include/functions_visual_map.php,
include/functions_reporting.php: Added flash charts.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1779 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-06-30 17:08:14 +02:00
|
|
|
$link ="winopeng('operation/agentes/stat_win.php?type=$graph_type&period=86400&id=".$module["id_agente_modulo"]."&label=".$graph_label."&refresh=600','day_".$win_handle."')";
|
2009-03-26 16:55:30 +01:00
|
|
|
echo '<a href="javascript:'.$link.'"><img src="images/grafica_d.png" border=0></a> ';
|
|
|
|
|
2009-06-30 Ramon Novoa <rnovoa@artica.es>
* nclude/FusionCharts,
include/FusionCharts/FCF_Column3D.swf,
include/FusionCharts/FCF_Pie3D.swf,
include/FusionCharts/FusionCharts.js,
include/FusionCharts/FCF_MSLine.swf,
include/FusionCharts/FusionCharts_Gen.php,
include/FusionCharts/FCF_StackedArea2D.swf,
include/FusionCharts/FCF_Area2D.swf,
include/FusionCharts/FCF_MSArea2D.swf,
include/FusionCharts/FusionCharts.php: Added to repository. Fusion
Charts Free.
* include/functions_fsgraph.php: Added to repository. Fusion Charts
chart generation functions for Pandora FMS.
* include/pchart_graph.php, include/pandora_graph.php,
include/fgraph2.php, include/pChart, include/Image,
include/fgraph.php: Moved from reporting to include.
* operation/agentes/stat_win.php: Moved from reporting to
operation/agentes.
* reporting: Deleted from repository.
* general/logon_ok.php, godmode/setup/setup.php,
godmode/admin_access_logs.php, godmode/db/db_main.php,
godmode/db/db_info.php, godmode/db/db_purge.php,
godmode/reporting/graph_builder.php,
operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php,
operation/incidents/incident_statistics.php
operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/tactical.php, include/functions_config.php,
include/functions_custom_graphs.php,
include/functions_visual_map.php,
include/functions_reporting.php: Added flash charts.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1779 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-06-30 17:08:14 +02:00
|
|
|
$link ="winopeng('operation/agentes/stat_win.php?type=$graph_type&period=3600&id=".$module["id_agente_modulo"]."&label=".$graph_label."&refresh=60','hour_".$win_handle."')";
|
2009-03-26 16:55:30 +01:00
|
|
|
echo '<a href="javascript:'.$link.'"><img src="images/grafica_h.png" border=0></a>';
|
2010-03-18 21:01:48 +01:00
|
|
|
|
2009-03-26 16:55:30 +01:00
|
|
|
}
|
|
|
|
|
2008-06-19 02:24:05 +02:00
|
|
|
|
2009-03-26 16:55:30 +01:00
|
|
|
if ($module['history_data'] == 1){
|
2010-06-02 19:30:11 +02:00
|
|
|
// RAW Table data
|
|
|
|
echo "<td class=".$tdcolor." width=70>";
|
|
|
|
echo "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agente&tab=data_view&period=2592000&id=".$module["id_agente_modulo"]."'><img border=0 src='images/data_m.png'></a> ";
|
|
|
|
echo "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agente&tab=data_view&period=604800&id=".$module["id_agente_modulo"]."'><img border=0 src='images/data_w.png'></a> ";
|
|
|
|
echo "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agente&tab=data_view&period=86400&id=".$module["id_agente_modulo"]."'><img border=0 src='images/data_d.png'></a>";
|
2009-03-26 16:55:30 +01:00
|
|
|
} else {
|
|
|
|
echo "<td class=".$tdcolor."></td>";
|
|
|
|
}
|
2010-06-02 19:30:11 +02:00
|
|
|
|
2009-03-26 16:55:30 +01:00
|
|
|
echo "<td class='".$tdcolor."f9'>";
|
2009-09-14 03:02:44 +02:00
|
|
|
if ($module["utimestamp"] == 0){
|
2009-03-26 16:55:30 +01:00
|
|
|
echo __('Never');
|
|
|
|
} else {
|
2009-09-14 03:02:44 +02:00
|
|
|
$seconds = get_system_time () - $module["utimestamp"];
|
|
|
|
if ($module['id_tipo_modulo'] < 21 && $module["module_interval"] > 0 && $module["utimestamp"] > 0 && $seconds >= ($module["module_interval"] * 2)) {
|
|
|
|
echo '<span class="redb">';
|
2008-06-19 02:24:05 +02:00
|
|
|
} else {
|
2009-09-14 03:02:44 +02:00
|
|
|
echo '<span>';
|
2008-06-19 02:24:05 +02:00
|
|
|
}
|
2009-01-20 17:43:49 +01:00
|
|
|
}
|
2009-09-14 03:02:44 +02:00
|
|
|
print_timestamp ($module["utimestamp"], false);
|
|
|
|
echo '</span>';
|
2009-03-26 16:55:30 +01:00
|
|
|
echo "</td></tr>";
|
2006-03-27 05:37:27 +02:00
|
|
|
}
|
2009-03-26 16:55:30 +01:00
|
|
|
echo '</table>';
|
2008-06-19 02:24:05 +02:00
|
|
|
|
2006-07-09 01:32:38 +02:00
|
|
|
?>
|