diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf index 245a30ef4c..dcfa365e6b 100644 --- a/pandora_agents/pc/AIX/pandora_agent.conf +++ b/pandora_agents/pc/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.725, AIX version +# Version 7.0NG.726, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/FreeBSD/pandora_agent.conf b/pandora_agents/pc/FreeBSD/pandora_agent.conf index 0fc2927c2f..f7d23ab200 100644 --- a/pandora_agents/pc/FreeBSD/pandora_agent.conf +++ b/pandora_agents/pc/FreeBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.725, FreeBSD Version +# Version 7.0NG.726, FreeBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/HP-UX/pandora_agent.conf b/pandora_agents/pc/HP-UX/pandora_agent.conf index c97115d409..532fbe65e4 100644 --- a/pandora_agents/pc/HP-UX/pandora_agent.conf +++ b/pandora_agents/pc/HP-UX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.725, HP-UX Version +# Version 7.0NG.726, HP-UX Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/Linux/pandora_agent.conf b/pandora_agents/pc/Linux/pandora_agent.conf index a0d7d5ea8d..8fd5498d51 100644 --- a/pandora_agents/pc/Linux/pandora_agent.conf +++ b/pandora_agents/pc/Linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.725, GNU/Linux +# Version 7.0NG.726, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/NT4/pandora_agent.conf b/pandora_agents/pc/NT4/pandora_agent.conf index 995d0d33d7..5bea10d1fa 100644 --- a/pandora_agents/pc/NT4/pandora_agent.conf +++ b/pandora_agents/pc/NT4/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.725, GNU/Linux +# Version 7.0NG.726, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/SunOS/pandora_agent.conf b/pandora_agents/pc/SunOS/pandora_agent.conf index fa86fe707d..d30b3459ac 100644 --- a/pandora_agents/pc/SunOS/pandora_agent.conf +++ b/pandora_agents/pc/SunOS/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.725, Solaris Version +# Version 7.0NG.726, Solaris Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/Win32/pandora_agent.conf b/pandora_agents/pc/Win32/pandora_agent.conf index d347375de2..ed451d9de0 100644 --- a/pandora_agents/pc/Win32/pandora_agent.conf +++ b/pandora_agents/pc/Win32/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2010 Artica Soluciones Tecnologicas -# Version 7.0NG.725 +# Version 7.0NG.726 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software diff --git a/pandora_agents/shellscript/aix/pandora_agent.conf b/pandora_agents/shellscript/aix/pandora_agent.conf index 965020560c..7f7e1d96f9 100644 --- a/pandora_agents/shellscript/aix/pandora_agent.conf +++ b/pandora_agents/shellscript/aix/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.725, AIX version +# Version 7.0NG.726, AIX version # General Parameters # ================== diff --git a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf index edca5a3c52..8fc6f4e1eb 100644 --- a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf +++ b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.725 +# Version 7.0NG.726 # FreeBSD/IPSO version # Licenced under GPL licence, 2003-2007 Sancho Lerena diff --git a/pandora_agents/shellscript/hp-ux/pandora_agent.conf b/pandora_agents/shellscript/hp-ux/pandora_agent.conf index edec1bb26c..0e80d51dd9 100644 --- a/pandora_agents/shellscript/hp-ux/pandora_agent.conf +++ b/pandora_agents/shellscript/hp-ux/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.725, HPUX Version +# Version 7.0NG.726, HPUX Version # General Parameters # ================== diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf index dfe908bae8..5dd411ecd3 100644 --- a/pandora_agents/shellscript/linux/pandora_agent.conf +++ b/pandora_agents/shellscript/linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.725 +# Version 7.0NG.726 # Licensed under GPL license v2, # (c) 2003-2010 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/mac_osx/pandora_agent.conf b/pandora_agents/shellscript/mac_osx/pandora_agent.conf index 9b1c31e469..e5dd6122af 100644 --- a/pandora_agents/shellscript/mac_osx/pandora_agent.conf +++ b/pandora_agents/shellscript/mac_osx/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.725 +# Version 7.0NG.726 # Licensed under GPL license v2, # (c) 2003-2009 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/openWRT/pandora_agent.conf b/pandora_agents/shellscript/openWRT/pandora_agent.conf index c7806abd5c..2eee374d68 100644 --- a/pandora_agents/shellscript/openWRT/pandora_agent.conf +++ b/pandora_agents/shellscript/openWRT/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.725 +# Version 7.0NG.726 # Licensed under GPL license v2, # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/solaris/pandora_agent.conf b/pandora_agents/shellscript/solaris/pandora_agent.conf index 17bd56f29d..138448fd17 100644 --- a/pandora_agents/shellscript/solaris/pandora_agent.conf +++ b/pandora_agents/shellscript/solaris/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.725, Solaris version +# Version 7.0NG.726, Solaris version # General Parameters # ================== diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf index 95cb035609..ce926a7cac 100644 --- a/pandora_agents/unix/AIX/pandora_agent.conf +++ b/pandora_agents/unix/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.725, AIX version +# Version 7.0NG.726, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index e312449ae5..fafc3d2c41 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.725-180813 +Version: 7.0NG.726-180817 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 4d40a82f1e..3984e903c2 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.725-180813" +pandora_version="7.0NG.726-180817" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/Darwin/pandora_agent.conf b/pandora_agents/unix/Darwin/pandora_agent.conf index c7f2a3547c..6e58735751 100644 --- a/pandora_agents/unix/Darwin/pandora_agent.conf +++ b/pandora_agents/unix/Darwin/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.725, GNU/Linux +# Version 7.0NG.726, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2012 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/FreeBSD/pandora_agent.conf b/pandora_agents/unix/FreeBSD/pandora_agent.conf index f0568cae8f..af429aa2b7 100644 --- a/pandora_agents/unix/FreeBSD/pandora_agent.conf +++ b/pandora_agents/unix/FreeBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.725, FreeBSD Version +# Version 7.0NG.726, FreeBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2016 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/HP-UX/pandora_agent.conf b/pandora_agents/unix/HP-UX/pandora_agent.conf index 77b678de67..6d4e113c16 100644 --- a/pandora_agents/unix/HP-UX/pandora_agent.conf +++ b/pandora_agents/unix/HP-UX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.725, HP-UX Version +# Version 7.0NG.726, HP-UX Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf index 754470aa4c..4b86143f9a 100644 --- a/pandora_agents/unix/Linux/pandora_agent.conf +++ b/pandora_agents/unix/Linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.725, GNU/Linux +# Version 7.0NG.726, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2014 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/NT4/pandora_agent.conf b/pandora_agents/unix/NT4/pandora_agent.conf index dde28ceef5..b15043bc67 100644 --- a/pandora_agents/unix/NT4/pandora_agent.conf +++ b/pandora_agents/unix/NT4/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.725, GNU/Linux +# Version 7.0NG.726, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/NetBSD/pandora_agent.conf b/pandora_agents/unix/NetBSD/pandora_agent.conf index 682fd6f270..e26488592f 100644 --- a/pandora_agents/unix/NetBSD/pandora_agent.conf +++ b/pandora_agents/unix/NetBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.725, NetBSD Version +# Version 7.0NG.726, NetBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/SunOS/pandora_agent.conf b/pandora_agents/unix/SunOS/pandora_agent.conf index 7bdcf6fbde..5764320b0a 100644 --- a/pandora_agents/unix/SunOS/pandora_agent.conf +++ b/pandora_agents/unix/SunOS/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.725, Solaris Version +# Version 7.0NG.726, Solaris Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 16488aec72..41ade7ed7a 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,8 +41,8 @@ my $Sem = undef; # Semaphore used to control the number of threads my $ThreadSem = undef; -use constant AGENT_VERSION => '7.0NG.725'; -use constant AGENT_BUILD => '180813'; +use constant AGENT_VERSION => '7.0NG.726'; +use constant AGENT_BUILD => '180817'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 676c623276..2573ad8ff6 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -2,8 +2,8 @@ #Pandora FMS Linux Agent # %define name pandorafms_agent_unix -%define version 7.0NG.725 -%define release 180813 +%define version 7.0NG.726 +%define release 180817 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 71b3c173b1..66e606cdf7 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -2,8 +2,8 @@ #Pandora FMS Linux Agent # %define name pandorafms_agent_unix -%define version 7.0NG.725 -%define release 180813 +%define version 7.0NG.726 +%define release 180817 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 69d1160d50..1d0d3d8428 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -9,8 +9,8 @@ # Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license. # ********************************************************************** -PI_VERSION="7.0NG.725" -PI_BUILD="180813" +PI_VERSION="7.0NG.726" +PI_BUILD="180817" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index e7a920d22c..4e9edf8157 100644 --- a/pandora_agents/win32/bin/pandora_agent.conf +++ b/pandora_agents/win32/bin/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2017 Artica Soluciones Tecnologicas -# Version 7.0NG.725 +# Version 7.0NG.726 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 58fadb34b2..ca80ec74de 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -3,7 +3,7 @@ AllowLanguageSelection {Yes} AppName -{Pandora FMS Windows Agent v7.0NG.725} +{Pandora FMS Windows Agent v7.0NG.726} ApplicationID {17E3D2CF-CA02-406B-8A80-9D31C17BD08F} @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{180813} +{180817} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index d5491d83bf..ee16b373ab 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.725(Build 180813)") +#define PANDORA_VERSION ("7.0NG.726(Build 180817)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 78ecf90883..16d62f2896 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.725(Build 180813))" + VALUE "ProductVersion", "(7.0NG.726(Build 180817))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 5db8213fa6..f8e37eb796 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.725-180813 +Version: 7.0NG.726-180817 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index a3b0d44261..d24e66e8a4 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.725-180813" +pandora_version="7.0NG.726-180817" package_pear=0 package_pandora=1 diff --git a/pandora_console/extras/mr/19.sql b/pandora_console/extras/mr/19.sql index 3fb87a3f19..ea08bd0f26 100644 --- a/pandora_console/extras/mr/19.sql +++ b/pandora_console/extras/mr/19.sql @@ -57,9 +57,11 @@ CREATE TABLE IF NOT EXISTS `tlayout_template_data` ( -- Rename column is_secondary to no_hierarchy in `tusuario _perfil` -- --------------------------------------------------------------------- ALTER TABLE `tusuario_perfil` ADD COLUMN `no_hierarchy` tinyint(1) NOT NULL DEFAULT 0; -UPDATE `tusuario_perfil` SET `is_secondary` = `no_hierarchy`; +UPDATE `tusuario_perfil` SET `no_hierarchy` = `is_secondary`; ALTER TABLE `tusuario_perfil` DROP COLUMN `is_secondary`; +UPDATE `talert_commands` SET name='Monitoring Event' WHERE name='Pandora FMS Event'; + -- ----------------------------------------------------- -- Table `tgis_map_layer_groups` -- ----------------------------------------------------- diff --git a/pandora_console/extras/pandora_diag.php b/pandora_console/extras/pandora_diag.php index 6a37a9c9b1..d83e211a82 100644 --- a/pandora_console/extras/pandora_diag.php +++ b/pandora_console/extras/pandora_diag.php @@ -138,6 +138,7 @@ function execution_time(){ return "Normal Status   The execution time is correct. For a more extensive information of this data consult the Execution Time graph"; } + function get_logs_size($file){ $file_name = '/var'. $file .''; $size_server_log = filesize($file_name); @@ -149,9 +150,9 @@ function get_status_logs($path){ $status_server_log = ""; $size_server_log = get_logs_size($path); if ($size_server_log <= 10240){ - $status_server_log = "Normal Status   You have less than 10 MB of logs"; + $status_server_log = "Normal Status   You have less than 10 MB of logs"; }else{ - $status_server_log = "Warning Status   You have more than 10 MB of logs"; + $status_server_log = "Warning Status   You have more than 10 MB of logs"; } return $status_server_log; } @@ -161,9 +162,9 @@ function percentage_modules_per_agent(){ $total_modules = db_get_value_sql ('SELECT count(*) FROM tagente_modulo'); $average_modules_per_agent = $total_modules / $total_agents; if($average_modules_per_agent <= 40){ - $status_average_modules = "Normal Status   The average of modules per agent is less than 40 percent"; + $status_average_modules = "Normal Status   The average of modules per agent is less than 40 percent"; }else{ - $status_average_modules = "Warning Status  The average of modules per agent is more than 40 percent. You can have performance problems"; + $status_average_modules = "Warning Status  The average of modules per agent is more than 40 percent. You can have performance problems"; } return $status_average_modules; } @@ -174,9 +175,9 @@ function license_capacity(){ $status_license_capacity = ""; $current_count = db_get_value_sql ('SELECT count(*) FROM tagente'); if ($current_count > $license_limit * 90 /100){ - $status_license_capacity = "Warning Status   The license capacity is more than 90 percent"; + $status_license_capacity = "Warning Status   The license capacity is more than 90 percent"; }else{ - $status_license_capacity = "Normal Status   The license capacity is less than 90 percent"; + $status_license_capacity = "Normal Status   The license capacity is less than 90 percent"; } return $status_license_capacity; } @@ -195,12 +196,12 @@ function interval_average_of_network_modules(){ $average_time= (int) $total_module_interval_time / $total_network_modules; if($average_time < 180 ){ - $status_average_modules = "Warning Status   The system has a lot of load and a very fine configuration is required"; + $status_average_modules = "Warning Status   The system has a lot of load and a very fine configuration is required"; }else{ - $status_average_modules = "Normal Status   The system has an acceptable charge"; + $status_average_modules = "Normal Status   The system has an acceptable charge"; } if ($average_time == 0) - $status_average_modules = "Normal Status   The system has no load"; + $status_average_modules = "Normal Status   The system has no load"; return $status_average_modules; } @@ -208,9 +209,9 @@ $attachment_total_files = count(glob($config['homedir']."/attachment/{*.*}",GLOB function files_attachment_folder($total_files){ if($total_files <= 700){ - $status_total_files = "Normal Status   The attachment folder has less than 700 files."; + $status_total_files = "Normal Status   The attachment folder has less than 700 files."; }else{ - $status_total_files = "Warning Status   The attachment folder has more than 700 files."; + $status_total_files = "Warning Status   The attachment folder has more than 700 files."; } return $status_total_files; } @@ -218,14 +219,21 @@ function files_attachment_folder($total_files){ $tagente_datos_size = db_get_value_sql('SELECT COUNT(*) FROM tagente_datos'); function status_tagente_datos($tagente_datos_size){ - if ($tagente_datos_size <=3000){ - $tagente_datos_size = "Normal Status   The tagente_datos table has less than 3000 data."; + if ($tagente_datos_size <=3000000){ + $tagente_datos_size = "Normal Status   The tagente_datos table has an acceptable amount of data."; }else{ - $tagente_datos_size = "Warning Status   The tagente_datos table has more than 3000 data. A historical database is recommended."; + $tagente_datos_size = "Warning Status   The tagente_datos table has too much data. A historical database is recommended."; } return $tagente_datos_size; } +function status_values($val_rec, $val){ + if ($val_rec <= $val) + return $val . " (current value) Normal Status"; + else + return $val . " (current value) Warning Status"; +} + $tables_fragmentation=db_get_sql ("SELECT (data_free/(index_length+data_length)) as frag_ratio from information_schema.tables where DATA_FREE > 0 and table_name='tagente_datos' and table_schema='pandora'"); $db_size=db_get_all_rows_sql("SELECT table_schema, @@ -245,28 +253,30 @@ $path_console_logs ="/www/html/pandora_console/pandora_console.log"; $innodb_log_file_size_min_rec_value = "64M"; $innodb_log_buffer_size_min_rec_value = "16M"; $innodb_flush_log_at_trx_commit_min_rec_value = 0; -$query_cache_limit_min_rec_value = "2M"; -$max_allowed_packet_min_rec_value = "32M"; -$sort_buffer_size_min_rec_value = "32K"; -$join_buffer_size_min_rec_value = "265K"; +$query_cache_limit_min_rec_value = 2; +$max_allowed_packet_min_rec_value = 32; +$innodb_buffer_pool_size_min_rec_value = shell_exec("cat /proc/meminfo | grep -i total | head -1 | awk '{print $(NF-1)*0.4/1024}'"); +$sort_buffer_size_min_rec_value = 32; +$join_buffer_size_min_rec_value = 265; $query_cache_type_min_rec_value = "ON"; -$query_cache_size_min_rec_value = "24M"; -$innodb_lock_wait_timeout_max_rec_value = "120 seconds"; +$query_cache_size_min_rec_value = 24; +$innodb_lock_wait_timeout_max_rec_value = 120; $tables_fragmentation_max_rec_value = 10; -$thread_cache_size_max_rec_value = "8M"; -$thread_stack_min_rec_value = "256K"; -$max_connections_max_rec_value = "150"; -$key_buffer_size_min_rec_value = "256K"; -$read_buffer_size_min_rec_value = "32K"; -$read_rnd_buffer_size_min_rec_value = "32K"; -$query_cache_min_res_unit_min_rec_value = "2K"; +$thread_cache_size_max_rec_value = 8; +$thread_stack_min_rec_value = 256; +$max_connections_max_rec_value = 150; +$key_buffer_size_min_rec_value = 256; +$read_buffer_size_min_rec_value = 32; +$read_rnd_buffer_size_min_rec_value = 32; +$query_cache_min_res_unit_min_rec_value = 2; +$innodb_file_per_table_min_rec_value = 0; function status_fragmentation_tables($tables_fragmentation_max_rec_value, $tables_fragmentation){ $status_tables_frag = ""; if($tables_fragmentation > $tables_fragmentation_max_rec_value) - $status_tables_frag = "Warning Status   The fragmentation tables is higher than recommended. You should defragment them."; + $status_tables_frag = "Warning Status   The fragmentation tables is higher than recommended. You should defragment them."; else - $status_tables_frag = "Normal Status   The fragmentation tables is correct."; + $status_tables_frag = "Normal Status   The fragmentation tables is correct."; return $status_tables_frag; } @@ -536,29 +546,46 @@ switch ($config["dbtype"]) { WHERE \"key\" = 'current_update'", "Current Update #"); break; } - +$innodb_log_file_size =db_get_value_sql ("SELECT @@innodb_log_file_size")/1048576; +$innodb_log_buffer_size =db_get_value_sql("SELECT @@innodb_log_buffer_size")/1048576; +$innodb_flush_log_at_trx_commit =db_get_value_sql("SELECT @@innodb_flush_log_at_trx_commit"); +$max_allowed_packet =db_get_value_sql("SELECT @@max_allowed_packet")/1048576; +$innodb_buffer_pool_size = db_get_value_sql("SELECT @@innodb_buffer_pool_size")/1024; +$sort_buffer_size =number_format(db_get_value_sql("SELECT @@sort_buffer_size")/1024, 2); +$join_buffer_size =db_get_value_sql("SELECT @@join_buffer_size")/1024; +$query_cache_type =db_get_value_sql("SELECT @@query_cache_type"); +$query_cache_size =db_get_value_sql("SELECT @@query_cache_size")/1048576; +$query_cache_limit =db_get_value_sql("SELECT @@query_cache_limit")/1048576; +$innodb_lock_wait_timeout =db_get_value_sql("SELECT @@innodb_lock_wait_timeout"); +$thread_cache_size =db_get_value_sql("SELECT @@thread_cache_size"); +$thread_stack =db_get_value_sql("SELECT @@thread_stack")/1024; +$max_connections =db_get_value_sql("SELECT @@max_connections"); +$key_buffer_size =db_get_value_sql("SELECT @@key_buffer_size")/1024; +$read_buffer_size =db_get_value_sql("SELECT @@read_buffer_size")/1024; +$read_rnd_buffer_size =db_get_value_sql("SELECT @@read_rnd_buffer_size")/1024; +$query_cache_min_res_unit =db_get_value_sql("SELECT @@query_cache_min_res_unit")/1024; +$innodb_file_per_table = db_get_value_sql("SELECT @@innodb_file_per_table"); echo "