From f7f5798ee62420b265f3bee38569b2bb189ce080 Mon Sep 17 00:00:00 2001 From: Luis Date: Fri, 7 Aug 2020 11:33:42 +0200 Subject: [PATCH] Fixed modules per agent enterprise message --- pandora_console/general/alert_enterprise.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pandora_console/general/alert_enterprise.php b/pandora_console/general/alert_enterprise.php index 4cb4a29740..0335ef76be 100644 --- a/pandora_console/general/alert_enterprise.php +++ b/pandora_console/general/alert_enterprise.php @@ -165,7 +165,12 @@ if (check_login()) { break; case 'monitorcheckmodal': - echo __('This system has too many modules per agent. OpenSource version could manage thousands of modules, but is not recommended to have more than 40 modules per agent. This configuration has B/A modules per agent. Checkout the Enterprise Version for a professional supported system.'); + // Get agent/module average. + $agentCount = db_get_value_sql('SELECT count(*) FROM tagente'); + $modulesCount = db_get_value_sql('SELECT count(*) FROM tagente_modulo'); + $average = ($modulesCount / $agentCount); + + echo __('This system has too many modules per agent. OpenSource version could manage thousands of modules, but is not recommended to have more than 100 modules per agent. This configuration has %d modules per agent. Checkout the Enterprise Version for a professional supported system.', $average); break; case 'remotemodulesmodal':