diff --git a/pandora_console/general/logon_ok.php b/pandora_console/general/logon_ok.php index 2dbc1ff50c..4d18e0e79d 100644 --- a/pandora_console/general/logon_ok.php +++ b/pandora_console/general/logon_ok.php @@ -64,6 +64,8 @@ $data['monitor_critical'] = (int) $all_data['_monitors_critical_']; $data['monitor_not_normal'] = (int) $all_data['_monitor_not_normal_']; $data['monitor_alerts'] = (int) $all_data['_monitors_alerts_']; $data['monitor_alerts_fired'] = (int) $all_data['_monitors_alerts_fired_']; +$data['monitor_total'] = (int) $all_data['_monitor_total_']; + $data['total_agents'] = (int) $all_data['_total_agents_']; diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index c79b2275bc..a7df5ed687 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -10813,11 +10813,11 @@ function reporting_get_stats_agents_monitors($data) if ($mobile) { $urls = []; $urls['total_agents'] = 'index.php?page=agents'; - $urls['monitor_checks'] = 'index.php?page=modules'; + $urls['monitor_total'] = 'index.php?page=modules'; } else { $urls = []; $urls['total_agents'] = $config['homeurl'].'index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60'; - $urls['monitor_checks'] = $config['homeurl'].'index.php?sec=view&sec2=operation/agentes/status_monitor&refr=60&status=-1'; + $urls['monitor_total'] = $config['homeurl'].'index.php?sec=view&sec2=operation/agentes/status_monitor&refr=60&status=-1'; } // Agents and modules table @@ -10839,8 +10839,8 @@ function reporting_get_stats_agents_monitors($data) } $tdata[3] = html_print_image('images/module.png', true, ['title' => __('Monitor checks'), 'class' => 'invert_filter'], false, false, false, true); - $tdata[4] = $data['monitor_checks'] <= 0 ? '-' : $data['monitor_checks']; - $tdata[4] = ''.$tdata[4].''; + $tdata[4] = $data['monitor_total'] <= 0 ? '-' : $data['monitor_total']; + $tdata[4] = ''.$tdata[4].''; /* Hello there! :) @@ -10848,7 +10848,7 @@ function reporting_get_stats_agents_monitors($data) You can of course remove the warnings, that's why we include the source and do not use any kind of trick. And that's why we added here this comment, to let you know this does not reflect any change in our opensource mentality of does the last 14 years. */ if ($data['total_agents']) { - if (($data['monitor_checks'] / $data['total_agents'] > 100) && !enterprise_installed()) { + if (($data['monitor_total'] / $data['total_agents'] > 100) && !enterprise_installed()) { $tdata[5] = "
"; } } diff --git a/pandora_console/include/functions_tactical.php b/pandora_console/include/functions_tactical.php index b82899797b..26568829e0 100644 --- a/pandora_console/include/functions_tactical.php +++ b/pandora_console/include/functions_tactical.php @@ -415,7 +415,7 @@ function tactical_get_data($id_user=false, $user_strict=false, $acltags, $return $total_agentes = agents_get_agents(false, ['count(DISTINCT id_agente) as total_agents'], 'AR', false, false, 1); $list['_total_agents_'] = $total_agentes[0]['total_agents']; - + $list['_monitor_total_'] = ($list['_monitors_not_init_'] + $list['_monitors_unknown_'] + $list['_monitors_warning_'] + $list['_monitors_critical_'] + $list['_monitors_ok_']); $list['_monitor_checks_'] = ($list['_monitors_unknown_'] + $list['_monitors_warning_'] + $list['_monitors_critical_'] + $list['_monitors_ok_']); // Calculate not_normal monitors diff --git a/pandora_console/include/lib/Dashboard/Widgets/tactical.php b/pandora_console/include/lib/Dashboard/Widgets/tactical.php index 06f14cf557..74d72d0c5c 100755 --- a/pandora_console/include/lib/Dashboard/Widgets/tactical.php +++ b/pandora_console/include/lib/Dashboard/Widgets/tactical.php @@ -339,6 +339,7 @@ class TacticalWidget extends Widget $data['monitor_not_normal'] = (int) $all_data['_monitor_not_normal_']; $data['monitor_alerts'] = (int) $all_data['_monitors_alerts_']; $data['monitor_alerts_fired'] = (int) $all_data['_monitors_alerts_fired_']; + $data['monitor_total'] = (int) $all_data['_monitor_total_']; $data['total_agents'] = (int) $all_data['_total_agents_']; diff --git a/pandora_console/mobile/operation/tactical.php b/pandora_console/mobile/operation/tactical.php index eed45507ed..e88287da6c 100755 --- a/pandora_console/mobile/operation/tactical.php +++ b/pandora_console/mobile/operation/tactical.php @@ -120,6 +120,7 @@ class Tactical $data['monitor_not_normal'] = (int) $all_data['_monitor_not_normal_']; $data['monitor_alerts'] = (int) $all_data['_monitors_alerts_']; $data['monitor_alerts_fired'] = (int) $all_data['_monitors_alerts_fired_']; + $data['monitor_total'] = (int) $all_data['_monitor_total_']; $data['total_agents'] = (int) $all_data['_total_agents_']; diff --git a/pandora_console/operation/agentes/tactical.php b/pandora_console/operation/agentes/tactical.php index d82a749a85..b4430ef128 100755 --- a/pandora_console/operation/agentes/tactical.php +++ b/pandora_console/operation/agentes/tactical.php @@ -98,6 +98,7 @@ $data['monitor_critical'] = (int) $all_data['_monitors_critical_']; $data['monitor_not_normal'] = (int) $all_data['_monitor_not_normal_']; $data['monitor_alerts'] = (int) $all_data['_monitors_alerts_']; $data['monitor_alerts_fired'] = (int) $all_data['_monitors_alerts_fired_']; +$data['monitor_total'] = (int) $all_data['_monitor_total_']; $data['total_agents'] = (int) $all_data['_total_agents_'];