diff --git a/pandora_console/godmode/reporting/cluster_builder.main.php b/pandora_console/godmode/reporting/cluster_builder.main.php
index fa894c9786..eb1a8e97db 100644
--- a/pandora_console/godmode/reporting/cluster_builder.main.php
+++ b/pandora_console/godmode/reporting/cluster_builder.main.php
@@ -285,7 +285,7 @@ elseif ($step == 3) {
echo "";
echo "
";
- echo "".__('Adding common modules')." ";
+ echo "".__('Adding common modules').ui_print_help_tip('Attention: the cluster is configured using module names, so that in order to add an agent to a cluster later on, you will not have to select its modules one by one, but instead, you only need to have a series of modules that are called the same, so do not rename the names of a module once you configure the cluster.', true)." ";
echo " ";
echo "";
@@ -362,8 +362,8 @@ elseif ($step == 4) {
echo " ";
echo "".__('Common modules')." ";
- echo "".__('Critical if')." ";
- echo "".__('Warning if')." ";
+ echo "".__('Critical if more than')." ";
+ echo "".__('Warning if more than')." ";
echo "".__('Actions')." ";
echo " ";
@@ -372,12 +372,11 @@ elseif ($step == 4) {
foreach ($cluster_items as $key => $value) {
echo "";
echo "".$value." ";
- echo " are down ";
- echo " are down ";
+ echo " % are down ";
+ echo " % are down ";
echo " ";
echo " ";
-
}
@@ -387,6 +386,12 @@ elseif ($step == 4) {
echo "";
+ echo "";
+
}
elseif ($step == 5) {
@@ -522,6 +527,12 @@ elseif ($step == 6) {
echo "
";
echo "";
+
+ echo "";
}
?>
diff --git a/pandora_console/godmode/reporting/cluster_builder.php b/pandora_console/godmode/reporting/cluster_builder.php
index 9044a0be37..d4ddef0a4d 100644
--- a/pandora_console/godmode/reporting/cluster_builder.php
+++ b/pandora_console/godmode/reporting/cluster_builder.php
@@ -159,7 +159,9 @@ elseif ($step == 3) {
continue;
}
- $tcluster_module = db_process_sql('insert into tcluster_item (name,id_cluster) values ("'.$value.'",'.$id_cluster.')');
+ // $tcluster_module = db_process_sql('insert into tcluster_item (name,id_cluster,critical_limit,warning_limit) values ("'.$value.'",'.$id_cluster.',100,0)');
+
+ $tcluster_module = db_process_sql_insert('tcluster_item',array('name'=>$value,'id_cluster'=>$id_cluster,'critical_limit'=>100,'warning_limit'=>0));
$id_agent = db_process_sql('select id_agent from tcluster where id = '.$id_cluster);
@@ -171,7 +173,8 @@ elseif ($step == 3) {
'prediction_module' => 6,
'id_agente' => $id_agent[0]['id_agent'],
'parent_module_id' => $id_parent_modulo[0]['id_agente_modulo'],
- 'custom_integer_1' =>$id_cluster
+ 'custom_integer_1' =>$id_cluster,
+ 'custom_integer_2' =>$tcluster_module
);
$id_module = db_process_sql_insert('tagente_modulo', $values_module);
@@ -271,19 +274,20 @@ elseif ($step == 3) {
$id_parent_modulo = db_process_sql('select id_agente_modulo from tagente_modulo where id_agente = '.$id_agent[0]['id_agent'].' and nombre = "Cluster status"');
+ $tcluster_balanced_module = db_process_sql_insert('tcluster_item',array('name'=>$value,'id_cluster'=>$id_cluster,'item_type'=>"AP"));
+
$values_module = array(
'nombre' => $value,
'id_modulo' => 5,
'prediction_module' => 7,
'id_agente' => $id_agent[0]['id_agent'],
'parent_module_id' => $id_parent_modulo[0]['id_agente_modulo'],
- 'custom_integer_1' =>$id_cluster
+ 'custom_integer_1' => $id_cluster,
+ 'custom_integer_2' => $tcluster_balanced_module
);
$id_module = db_process_sql_insert('tagente_modulo', $values_module);
- $tcluster_balanced_module = db_process_sql('insert into tcluster_item (name,id_cluster,item_type) values ("'.$value.'",'.$id_cluster.',"AP")');
-
if ($tcluster_balanced_module !== false){
db_pandora_audit("Report management", "Module #$value assigned to cluster #$id_cluster");
}
diff --git a/pandora_console/godmode/reporting/cluster_list.php b/pandora_console/godmode/reporting/cluster_list.php
index 1b53548168..12f7195d69 100644
--- a/pandora_console/godmode/reporting/cluster_list.php
+++ b/pandora_console/godmode/reporting/cluster_list.php
@@ -90,11 +90,41 @@ ui_pagination (count($clusters));
$cluster_agent = db_process_sql('select id_agente from tagente where id_agente = (select id_agent from tcluster where id = '.$cluster['id'].')');
- $cluster_agent_status = agents_get_status($cluster_agent[0]['id_agente']);
+ $cluster_agent_status = agents_get_status($cluster_agent[0]['id_agente']);
- $data[5] = $cluster_agent_status;
-
- $data[6] = "
+ switch ($cluster_agent_status) {
+ case 1:
+
+ $data[5] = '
';
+
+ break;
+ case 1:
+
+ $data[5] = '
';
+
+ break;
+ case 3:
+
+ $data[5] = '
';
+
+ break;
+ case 5:
+
+ $data[5] = '
';
+
+ break;
+ case 0:
+
+ $data[5] = '
';
+
+ break;
+
+ default:
+
+ break;
+ }
+
+ $data[6] = "
";
array_push ($table->data, $data);
diff --git a/pandora_console/include/functions_clusters.php b/pandora_console/include/functions_clusters.php
index 0a2bc13281..6f009dc553 100644
--- a/pandora_console/include/functions_clusters.php
+++ b/pandora_console/include/functions_clusters.php
@@ -145,7 +145,7 @@ function get_item_critical_limit_by_item_id ($id){
function get_item_warning_limit_by_item_id ($id){
- $warning_limit = (string) db_get_value ('critical_limit', 'tcluster_item', 'id', (int) $id);
+ $warning_limit = (string) db_get_value ('warning_limit', 'tcluster_item', 'id', (int) $id);
return $warning_limit;
}