2009-01-21 Sancho Lerena <slerena@artica.es>

* pandoradb_data.sql: Updated DB Schema version/build.
	
      * operation/agentes/status_monitor.php
      operation/agentes/estado_agente.php: 
      operation/agentes/estado_ultimopaquete.php, 
      operation/agentes/estado_monitores.php: Manage correctly async modules
      including keepalive. Show servertype with moduletype icon. 



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1379 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2009-01-21 10:02:47 +00:00
parent b1bd9513d4
commit 0c4a3f6047
6 changed files with 22 additions and 10 deletions

View File

@ -1,3 +1,13 @@
2009-01-21 Sancho Lerena <slerena@artica.es>
* pandoradb_data.sql: Updated DB Schema version/build.
* operation/agentes/status_monitor.php
operation/agentes/estado_agente.php:
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_monitores.php: Manage correctly async modules
including keepalive. Show servertype with moduletype icon.
2009-01-21 Esteban Sanchez <estebans@artica.es>
* pandoradb.sql, pandoradb_migrate_20_to_21.sql: Added id_agent field

View File

@ -207,13 +207,13 @@ if ($agents !== false) {
$seconds = $now - strtotime ($ultimo_contacto_modulo);
else
$seconds = -1;
if ($module_type < 21 || $module_type == 100) {
if ($module_type < 21 || $module_type != 100) {
$async = 0;
} else {
$async = 1;
}
// Defines if Agent is down (interval x 2 > time last contact
if ($seconds >= ($intervalo_comp * 2)) { // If (intervalx2) secs. ago we don't get anything, show alert
if (($seconds >= ($intervalo_comp * 2)) AND ($module_type < 21)) { // If (intervalx2) secs. ago we don't get anything, show alert
$agent_down = 1;
if ($async == 0)
$monitor_down++;

View File

@ -65,8 +65,8 @@ foreach ($modules as $module) {
} else {
$data[0] = '';
}
$data[1] = '<img src="images/'.show_icon_type ($module["id_tipo_modulo"]).'" border="0">';
$data[1] = show_server_type ($module['id_modulo']);
$data[1] .= ' <img src="images/'.show_icon_type ($module["id_tipo_modulo"]).'" border="0">';
if (give_acl ($config['id_user'], $id_grupo, "AW"))
$data[1] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&update_module='.$module["id_agente_modulo"].'&moduletype=2#modules"><img src="images/config.png"></a>';
$data[2] = substr ($module["nombre"], 0, 25);
@ -93,7 +93,7 @@ foreach ($modules as $module) {
}
$seconds = get_system_time () - $module["utimestamp"];
if ($module["current_interval"] > 0 && $module["utimestamp"] > 0 && $seconds >= ($module["current_interval"] * 2)) {
if ($module['id_tipo_modulo'] < 21 && $module["current_interval"] > 0 && $module["utimestamp"] > 0 && $seconds >= ($module["current_interval"] * 2)) {
$data[6] = '<span class="redb">';
} else {
$data[6] = '<span>';

View File

@ -109,6 +109,8 @@ if (mysql_num_rows ($result3)) {
echo "<td class='".$tdcolor."_id' title='".salida_limpia($row3["nombre"])."'>";
echo salida_limpia(substr($row3["nombre"],0,15));
echo "</td><td class='".$tdcolor."'>";
echo show_server_type ($row3['id_modulo']);
echo " <img src='images/".show_icon_type($row3["id_tipo_modulo"])."' border=0>";
if (give_acl ($config['id_user'], $id_grupo, "AW"))
echo '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&update_module='.$row3["id_agente_modulo"].'&moduletype=2#modules"><img src="images/config.png"></a>';

View File

@ -133,7 +133,7 @@ if ($status == 0) { //Up
} 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
$sql .= " AND (UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) >= (tagente_estado.current_interval * 2)";
$sql .= " AND tagente_modulo.id_tipo_modulo < 21 AND (UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) >= (tagente_estado.current_interval * 2)";
}
$sql .= " ORDER BY tagente.id_grupo, tagente.nombre";

View File

@ -50,8 +50,8 @@ INSERT INTO `tconfig` VALUES
(5,'days_compact','15'),
(6,'graph_res','5'),
(7,'step_compact','1'),
(8,'db_scheme_version','2.0'),
(9,'db_scheme_build','PD80901'),
(8,'db_scheme_version','2.1-dev'),
(9,'db_scheme_build','PD90121'),
(13,'show_unknown','0'),
(14,'show_lastalerts','1'),
(15,'style','pandora'),