2007-07-16 Sancho Lerena <slerena@gmail.com>
* include/functions_db.php: Bugfix; list_group and list_group2 funtions now include all group in result. All group recheck should be done inside code, not in this function. * operation/agentes/estado_grupo.php: Fixed bug with ALL group. * operation/agentes/estado_monitores.php: Bugfix, Now show only initialized modules. * operation/agentes/estado_agente.php: Bugfixed, "All" group problem, and agent names are truncated if > 18 chars. * operation/agentes/tactical.php: Bugfixed, now calculates LAG and module count properly. * operation/servers/view_server.php: Bugfixed, now calculates LAG and module count properly. * reporting/fgraph.php: Bugfix: Renamed static problem image. * godmode/agentes/configurar_agente.php: Bugfix, agent address management in manual creation. * godmode/agentes/agent_manager.php: Bugfix, #1744913 (show icon in creation) git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@563 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
0a960ed14e
commit
28cf81035e
|
@ -1,3 +1,29 @@
|
|||
2007-07-16 Sancho Lerena <slerena@gmail.com>
|
||||
|
||||
* include/functions_db.php: Bugfix; list_group and list_group2 funtions
|
||||
now include all group in result. All group recheck should be done inside code, not in
|
||||
this function.
|
||||
|
||||
* operation/agentes/estado_grupo.php: Fixed bug with ALL group.
|
||||
|
||||
* operation/agentes/estado_monitores.php: Bugfix, Now show only initialized modules.
|
||||
|
||||
* operation/agentes/estado_agente.php: Bugfixed, "All" group problem,
|
||||
and agent names are truncated if > 18 chars.
|
||||
|
||||
* operation/agentes/tactical.php: Bugfixed, now calculates LAG and module
|
||||
count properly.
|
||||
|
||||
* operation/servers/view_server.php: Bugfixed, now calculates LAG and module
|
||||
count properly.
|
||||
|
||||
* reporting/fgraph.php: Bugfix: Renamed static problem image.
|
||||
|
||||
* godmode/agentes/configurar_agente.php: Bugfix, agent address management
|
||||
in manual creation.
|
||||
|
||||
* godmode/agentes/agent_manager.php: Bugfix, #1744913 (show icon in creation)
|
||||
|
||||
2007-07-13 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* img/so_other.png: Fixed image.
|
||||
|
|
|
@ -63,9 +63,8 @@ echo "<tr>";
|
|||
echo '<td class="datos"><b>'.$lang_label["agent_name"].'</b></td>
|
||||
<td class="datos">
|
||||
<input type="text" name="agente" size=30 value="'.$nombre_agente.'">';
|
||||
if (isset($_GET["creacion"])){
|
||||
echo " ";
|
||||
} else {
|
||||
|
||||
if (!isset($_GET["create_agent"])){
|
||||
echo "
|
||||
<a href='index.php?sec=estado&
|
||||
sec2=operation/agentes/ver_agente&id_agente=".$id_agente."'>
|
||||
|
|
|
@ -772,7 +772,7 @@ function list_group ($id_user){
|
|||
$sql='SELECT id_grupo FROM tgrupo';
|
||||
$result=mysql_query($sql);
|
||||
while ($row=mysql_fetch_array($result)){
|
||||
if ($row["id_grupo"] != 1){
|
||||
if ($row["id_grupo"] != 0){
|
||||
if (give_acl($id_user,$row["id_grupo"], "AR") == 1){
|
||||
array_push ($mis_grupos, $row["id_grupo"]); //Put in an array all the groups the user belongs
|
||||
echo "<option value='".$row["id_grupo"]."'>".
|
||||
|
@ -793,12 +793,10 @@ function list_group2 ($id_user){
|
|||
$sql='SELECT id_grupo FROM tgrupo';
|
||||
$result=mysql_query($sql);
|
||||
while ($row=mysql_fetch_array($result)){
|
||||
if ($row["id_grupo"] != 1){
|
||||
if (give_acl($id_user,$row["id_grupo"], "AR") == 1){
|
||||
$mis_grupos[]=$row["id_grupo"]; //Put in an array all the groups the user belongs
|
||||
}
|
||||
}
|
||||
}
|
||||
return ($mis_grupos);
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,6 @@ if (comprueba_login() == 0) {
|
|||
echo "<option value='".$ag_group."'>".dame_nombre_grupo($ag_group).
|
||||
"</option>";
|
||||
}
|
||||
echo "<option value=1>".dame_nombre_grupo(1)."</option>"; // Group all is always active
|
||||
$mis_grupos=list_group ($id_user); //Print combo for groups and set an array with all groups
|
||||
|
||||
echo "</select>";
|
||||
|
@ -124,7 +123,7 @@ if (comprueba_login() == 0) {
|
|||
while ($row=mysql_fetch_array($result)){
|
||||
$intervalo = $row["intervalo"]; // Interval in seconds
|
||||
$id_agente = $row['id_agente'];
|
||||
$nombre_agente = strtoupper($row["nombre"]);
|
||||
$nombre_agente = substr(strtoupper($row["nombre"]),0,18);
|
||||
$direccion_agente =$row["direccion"];
|
||||
$id_grupo=$row["id_grupo"];
|
||||
$id_os = $row["id_os"];
|
||||
|
|
|
@ -174,7 +174,6 @@ if (comprueba_login() == 0) {
|
|||
$ultima = strtotime($ultima_act);
|
||||
$ahora = strtotime("now");
|
||||
$diferencia = $ahora - $ultima;
|
||||
|
||||
// Get higher interval set for the set of modules from this agent
|
||||
$sql_maxi ="SELECT MAX(module_interval) FROM tagente_modulo WHERE id_agente = ".$id_agente;
|
||||
$result_maxi=mysql_query($sql_maxi);
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
// Prepare data to show
|
||||
// For each valid group for this user, take data from agent and modules
|
||||
foreach ($mis_grupos as $migrupo) {
|
||||
if ($migrupo != "") {
|
||||
if (($migrupo != "") && ($migrupo != 1)) {
|
||||
$existen_agentes = 0;
|
||||
$grupo[$array_index]["agent"] = 0;
|
||||
$grupo[$array_index]["ok"] = 0;
|
||||
|
|
|
@ -24,7 +24,7 @@ if (comprueba_login() == 0) {
|
|||
$id_agente = $_GET["id_agente"];
|
||||
}
|
||||
// Get all module from agent
|
||||
$sql_t='SELECT * FROM tagente_estado, tagente_modulo WHERE tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_estado.utimestamp != 0 AND tagente_modulo.id_agente='.$id_agente.' AND tagente_estado.estado != 100 order by tagente_modulo.nombre';
|
||||
$sql_t='SELECT * FROM tagente_estado, tagente_modulo WHERE tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.id_agente='.$id_agente.' and tagente_estado.estado != 100 AND tagente_estado.utimestamp != 0 order by tagente_modulo.nombre';
|
||||
$result_t=mysql_query($sql_t);
|
||||
if (mysql_num_rows ($result_t)) {
|
||||
echo "<h3>".$lang_label["monitor_listing"]."<a href='help/".$help_code."/chap3.php#3323' target='_help' class='help'> <span>".$lang_label["help"]."</span></a></h3>";
|
||||
|
|
|
@ -264,17 +264,17 @@
|
|||
// and calculate difference in seconds
|
||||
// Get total modules defined for this server
|
||||
if (($network_server == 1) OR ($data_server == 1)){
|
||||
$sql1 = "SELECT utimestamp, current_interval FROM tagente_estado WHERE processed_by_server = '$name' AND estado < 100";
|
||||
|
||||
$sql1 = "SELECT MIN(utimestamp),current_interval FROM tagente_estado WHERE utimestamp > 0 AND running_by=$id_server GROUP BY current_interval ORDER BY 1";
|
||||
$nowtime = time();
|
||||
$maxlag=0;
|
||||
if ($result1=mysql_query($sql1))
|
||||
while ($row1=mysql_fetch_array($result1)){
|
||||
if (($row1["utimestamp"] + $row1["current_interval"]) < $nowtime)
|
||||
$maxlag2 = $nowtime - ($row1["utimestamp"] + $row1["current_interval"]);
|
||||
if (($row1[0] + $row1[1]) < $nowtime){
|
||||
$maxlag2 = $nowtime - ($row1[0] + $row1[1]);
|
||||
if ($maxlag2 > $maxlag)
|
||||
$maxlag = $maxlag2;
|
||||
}
|
||||
}
|
||||
if ($maxlag < 60)
|
||||
echo $maxlag." sec";
|
||||
elseif ($maxlag < 86400)
|
||||
|
@ -301,6 +301,7 @@
|
|||
echo "+1 ".$lang_label["day"];
|
||||
} else
|
||||
echo "--";
|
||||
|
||||
}
|
||||
}
|
||||
echo '</table>';
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
require("include/config.php");
|
||||
|
||||
$modules_server = 0;
|
||||
$total_modules = 0;
|
||||
$total_modules_network = 0;
|
||||
$total_modules_data = 0;
|
||||
|
||||
if (comprueba_login() == 0) {
|
||||
|
@ -36,10 +36,10 @@ if (comprueba_login() == 0) {
|
|||
$sql1='SELECT COUNT(id_agente_modulo) FROM tagente_modulo WHERE id_tipo_modulo > 4';
|
||||
$result1=mysql_query($sql1);
|
||||
$row1=mysql_fetch_array($result1);
|
||||
$total_modules = $row1[0];
|
||||
$total_modules_network = $row1[0];
|
||||
|
||||
// Get total modules defined (data)
|
||||
$sql1='SELECT COUNT(processed_by_server) FROM tagente_estado WHERE processed_by_server LIKE "%_Data" ';
|
||||
$sql1='SELECT COUNT(id_agente_modulo) FROM tagente_modulo WHERE id_tipo_modulo < 5 AND id_tipo_modulo != -1';
|
||||
if ($result1=mysql_query($sql1)){
|
||||
$row1=mysql_fetch_array($result1);
|
||||
$total_modules_data = $row1[0];
|
||||
|
@ -88,7 +88,7 @@ if (comprueba_login() == 0) {
|
|||
if (($network_server == 1) OR ($data_server == 1))
|
||||
if ($network_server == 1){
|
||||
// Get total modules defined for this server (network modules)
|
||||
$sql1='SELECT * FROM tagente where id_server = '.$row["id_server"];
|
||||
$sql1='SELECT * FROM tagente WHERE id_server = '.$row["id_server"];
|
||||
$result1=mysql_query($sql1);
|
||||
while ($row1=mysql_fetch_array($result1)){
|
||||
$sql2='SELECT COUNT(id_agente_modulo) FROM tagente_modulo WHERE id_tipo_modulo > 4 AND id_agente = '.$row1["id_agente"];
|
||||
|
@ -119,13 +119,13 @@ if (comprueba_login() == 0) {
|
|||
if (($network_server == 1) OR ($data_server == 1)){
|
||||
// Progress bar calculations
|
||||
if ($network_server == 1){
|
||||
if ($total_modules == 0)
|
||||
if ($total_modules_network == 0)
|
||||
$percentil = 0;
|
||||
if ($total_modules > 0)
|
||||
$percentil = $modules_server / ($total_modules / 100);
|
||||
if ($total_modules_network > 0)
|
||||
$percentil = $modules_server / ($total_modules_network / 100);
|
||||
else
|
||||
$percentil = 0;
|
||||
$total_modules_temp = $total_modules;
|
||||
$total_modules_temp = $total_modules_network;
|
||||
} else {
|
||||
if ($total_modules_data == 0)
|
||||
$percentil = 0;
|
||||
|
@ -170,17 +170,17 @@ if (comprueba_login() == 0) {
|
|||
// and calculate difference in seconds
|
||||
// Get total modules defined for this server
|
||||
if (($network_server == 1) OR ($data_server == 1)){
|
||||
$sql1 = "SELECT utimestamp, current_interval FROM tagente_estado WHERE processed_by_server = '$name' AND estado < 100";
|
||||
|
||||
$sql1 = "SELECT MIN(utimestamp),current_interval FROM tagente_estado WHERE utimestamp > 0 AND running_by=$id_server GROUP BY current_interval ORDER BY 1";
|
||||
$nowtime = time();
|
||||
$maxlag=0;
|
||||
if ($result1=mysql_query($sql1))
|
||||
while ($row1=mysql_fetch_array($result1)){
|
||||
if (($row1["utimestamp"] + $row1["current_interval"]) < $nowtime)
|
||||
$maxlag2 = $nowtime - ($row1["utimestamp"] + $row1["current_interval"]);
|
||||
if (($row1[0] + $row1[1]) < $nowtime){
|
||||
$maxlag2 = $nowtime - ($row1[0] + $row1[1]);
|
||||
if ($maxlag2 > $maxlag)
|
||||
$maxlag = $maxlag2;
|
||||
}
|
||||
}
|
||||
if ($maxlag < 60)
|
||||
echo $maxlag." sec";
|
||||
elseif ($maxlag < 86400)
|
||||
|
|
|
@ -1392,7 +1392,7 @@ function progress_bar($progress,$width,$height) {
|
|||
if ($progress > 100 || $progress < 0){
|
||||
// HACK: This report a static image... will increase render in about 200% :-) useful for
|
||||
// high number of realtime statusbar images creation (in main all agents view, for example
|
||||
$imgPng = imageCreateFromPng("../images/outlimits.png");
|
||||
$imgPng = imageCreateFromPng("../images/outof.png");
|
||||
imageAlphaBlending($imgPng, true);
|
||||
imageSaveAlpha($imgPng, true);
|
||||
imagePng($imgPng);
|
||||
|
|
Loading…
Reference in New Issue