diff --git a/pandora_console/include/functions_groupview.php b/pandora_console/include/functions_groupview.php
index 15b4d577bf..e9b7ca7c1d 100644
--- a/pandora_console/include/functions_groupview.php
+++ b/pandora_console/include/functions_groupview.php
@@ -95,16 +95,18 @@ function groupview_get_all_counters($tree_group) {
? 'tmetaconsole_agent_secondary_group'
: 'tagent_secondary_group';
$sql =
- "SELECT SUM(ta.normal_count) AS _monitors_ok_,
- SUM(ta.critical_count) AS _monitors_critical_,
+ "SELECT SUM(ta.critical_count) AS _monitors_critical_,
SUM(ta.warning_count) AS _monitors_warning_,
SUM(ta.unknown_count) AS _monitors_unknown_,
SUM(ta.notinit_count) AS _monitors_not_init_,
- SUM(ta.fired_count) AS _monitors_alerts_fired_,
+ SUM(ta.normal_count) AS _monitors_ok_,
SUM(ta.total_count) AS _monitor_checks_,
+ SUM(ta.fired_count) AS _monitors_alerts_fired_,
SUM(IF(ta.critical_count > 0, 1, 0)) AS _agents_critical_,
+ SUM(IF(ta.critical_count = 0 AND ta.warning_count > 0, 1, 0)) AS _agents_warning_,
SUM(IF(ta.critical_count = 0 AND ta.warning_count = 0 AND ta.unknown_count > 0, 1, 0)) AS _agents_unknown_,
SUM(IF(ta.total_count = ta.notinit_count, 1, 0)) AS _agents_not_init_,
+ SUM(IF(ta.total_count = ta.normal_count AND ta.total_count <> ta.notinit_count, 1, 0)) AS _agents_ok_,
COUNT(ta.id_agente) AS _total_agents_,
'$all_name' AS _name_,
0 AS _id_,
@@ -169,9 +171,11 @@ function groupview_get_groups_list($id_user = false, $access = 'AR', $is_not_pag
$list[$id_group]['_id_'] = $agent_counter['id'];
$list[$id_group]['_iconImg_'] = $agent_counter['icon'];
- $list[$id_group]['_agents_not_init_'] = $agent_counter['counters']['not_init'];
- $list[$id_group]['_agents_unknown_'] = $agent_counter['counters']['unknown'];
$list[$id_group]['_agents_critical_'] = $agent_counter['counters']['critical'];
+ $list[$id_group]['_agents_warning_'] = $agent_counter['counters']['warning'];
+ $list[$id_group]['_agents_unknown_'] = $agent_counter['counters']['unknown'];
+ $list[$id_group]['_agents_not_init_'] = $agent_counter['counters']['not_init'];
+ $list[$id_group]['_agents_ok_'] = $agent_counter['counters']['ok'];
$list[$id_group]['_total_agents_'] = $agent_counter['counters']['total'];
$list[$id_group]['_monitors_critical_'] = (int)$modules_counters[$id_group]['total_module_critical'];
diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css
index 9b8c37ccda..2d0737999e 100644
--- a/pandora_console/include/styles/pandora.css
+++ b/pandora_console/include/styles/pandora.css
@@ -3041,9 +3041,9 @@ table#policy_modules td * {
#sumary{
color: #FFF;
- margin: 15px;
+ margin: 2px;
padding: 10px 30px;
- font-size: 20px;
+ font-size: 15px;
font-weight: bold;
border-radius: 2px;
}
diff --git a/pandora_console/operation/agentes/group_view.php b/pandora_console/operation/agentes/group_view.php
index d80870f334..0406fe2e56 100644
--- a/pandora_console/operation/agentes/group_view.php
+++ b/pandora_console/operation/agentes/group_view.php
@@ -77,6 +77,8 @@ $monitor_not_init = 0;
$agents_unknown = 0;
$agents_critical = 0;
$agents_notinit = 0;
+$agents_ok = 0;
+$agents_warning = 0;
$all_alerts_fired = 0;
//Groups and tags
@@ -98,6 +100,8 @@ if ($result_groups[0]["_id_"] == 0) {
$agents_unknown = $result_groups[0]["_agents_unknown_"];
$agents_notinit = $result_groups[0]["_agents_not_init_"];
$agents_critical = $result_groups[0]["_agents_critical_"];
+ $agents_warning = $result_groups[0]["_agents_warning_"];
+ $agents_ok = $result_groups[0]["_agents_ok_"];
$all_alerts_fired = $result_groups[0]["_monitors_alerts_fired_"];
}
@@ -114,6 +118,8 @@ $total_monitor_not_init =0;
$total_agent_unknown = 0;
$total_agent_critical = 0;
$total_not_init = 0;
+$total_agent_warning = 0;
+$total_agent_ok = 0;
if ($total > 0) {
//Modules
@@ -127,6 +133,8 @@ if ($total_agentes > 0) {
//Agents
$total_agent_unknown = format_numeric (($agents_unknown*100)/$total_agentes,2);
$total_agent_critical = format_numeric (($agents_critical*100)/$total_agentes,2);
+ $total_agent_warning = format_numeric (($agents_warning*100)/$total_agentes,2);
+ $total_agent_ok = format_numeric (($agents_ok*100)/$total_agentes,2);
$total_not_init = format_numeric (($agents_notinit*100)/$total_agentes,2);
}
@@ -135,14 +143,16 @@ echo '
" . __("Summary of the status groups") . "";
echo "";
echo "";
- echo "" . __("Agents") . " | ";
- echo "" . __("Modules") . " | ";
+ echo "" . __("Agents") . " | ";
+ echo "" . __("Modules") . " | ";
echo "
";
echo "";
echo "";
+ echo "". $total_agent_critical ."%";
+ echo "". $total_agent_warning ."%";
+ echo "". $total_agent_ok ."%";
echo "". $total_agent_unknown ."%";
echo "". $total_not_init ."%";
- echo "". $total_agent_critical ."%";
echo " | ";
echo "";
echo "". $total_critical ."%";
@@ -167,7 +177,7 @@ if (!empty($result_groups)) {
echo '';
echo "";
echo " | ";
- echo "" . __("Agents") . " | ";
+ echo "" . __("Agents") . " | ";
echo "" . __("Modules") . " | ";
echo " ";
@@ -177,9 +187,11 @@ if (!empty($result_groups)) {
echo "" . __("Total") . " | ";
echo "" . __("Unknown") . " | ";
echo "" . __("Not init") . " | ";
+ echo "" . __("Normal") . " | ";
+ echo "" . __("Warning") . " | ";
echo "" . __("Critical") . " | ";
echo "" . __("Unknown") . " | ";
- echo "" . __("Not Init") . " | ";
+ echo "" . __("Not init") . " | ";
echo "" . __("Normal") . " | ";
echo "" . __("Warning") . " | ";
echo "" . __("Critical") . " | ";
@@ -324,6 +336,42 @@ if (!empty($result_groups)) {
}
echo "";
+ // Agents Normal
+ echo "";
+ if (isset($data['_is_tag_'])) {
+ $link = "";
+ } else {
+ $link = "";
+ }
+ if (($data["_id_"] == 0) && ($agents_ok != 0)) {
+ echo $link . $agents_ok . "";
+ }
+
+ if ($data["_agents_ok_"] > 0 && ($data["_id_"] != 0)) {
+ echo $link . $data["_agents_ok_"] . "";
+ }
+ echo " | ";
+
+ // Agents warning
+ echo "";
+ if (isset($data['_is_tag_'])) {
+ $link = "";
+ } else {
+ $link = "";
+ }
+ if (($data["_id_"] == 0) && ($agents_warning != 0)) {
+ echo $link . $agents_warning . "";
+ }
+
+ if ($data["_agents_warning_"] > 0 && ($data["_id_"] != 0)) {
+ echo $link . $data["_agents_warning_"] . "";
+ }
+ echo " | ";
+
// Agents critical
echo "";
if (isset($data['_is_tag_'])) {
| |