diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 15a3c8aa3a..11a313b32f 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.773.3-230918 +Version: 7.0NG.773.3-230919 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 19d297d948..7d00d115c0 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.773.3-230918" +pandora_version="7.0NG.773.3-230919" 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/pandora_agent b/pandora_agents/unix/pandora_agent index 5037570912..73f6c3aafd 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1031,7 +1031,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.773.3'; -use constant AGENT_BUILD => '230918'; +use constant AGENT_BUILD => '230919'; # 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 6677779661..4f08389b5b 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.773.3 -%define release 230918 +%define release 230919 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index a75d35cfb9..771d5bd3c3 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.773.3 -%define release 230918 +%define release 230919 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index e707ff8128..250127e822 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.773.3 -%define release 230918 +%define release 230919 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 b271ec08e6..791ab189d0 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.773.3" -PI_BUILD="230918" +PI_BUILD="230919" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index ab92079beb..d6e1cf4f85 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{230918} +{230919} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index ef38786179..2fc2b2e1c3 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.773.3 Build 230918") +#define PANDORA_VERSION ("7.0NG.773.3 Build 230919") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 4aef0d0f2a..696afe1baf 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.773.3(Build 230918))" + VALUE "ProductVersion", "(7.0NG.773.3(Build 230919))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 929a9d30a6..5976825390 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.773.3-230918 +Version: 7.0NG.773.3-230919 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 9326b45e98..5c0625e968 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.773.3-230918" +pandora_version="7.0NG.773.3-230919" package_pear=0 package_pandora=1 diff --git a/pandora_console/extras/mr/66.sql b/pandora_console/extras/mr/66.sql index 2e87a795dc..cb6db137be 100644 --- a/pandora_console/extras/mr/66.sql +++ b/pandora_console/extras/mr/66.sql @@ -45,4 +45,6 @@ ADD COLUMN `time_init` VARCHAR(45) NULL AFTER `date_init`, ADD COLUMN `date_end` VARCHAR(45) NULL AFTER `time_init`, ADD COLUMN `time_end` VARCHAR(45) NULL AFTER `date_end`; +UPDATE `tdiscovery_apps` SET `version` = '1.1' WHERE `short_name` = 'pandorafms.vmware'; + COMMIT; diff --git a/pandora_console/godmode/users/user_management.php b/pandora_console/godmode/users/user_management.php index 39995d52c2..0675c39be5 100644 --- a/pandora_console/godmode/users/user_management.php +++ b/pandora_console/godmode/users/user_management.php @@ -607,16 +607,20 @@ if (is_metaconsole() === true) { } } +$performance_variables_control = (array) json_decode(io_safe_output($config['performance_variables_control'])); + $userManagementTable->rowclass['captions_blocksize_eventfilter'] = 'field_half_width'; $userManagementTable->rowclass['fields_blocksize_eventfilter'] = 'field_half_width'; $userManagementTable->data['captions_blocksize_eventfilter'][0] = __('Block size for pagination'); -$userManagementTable->data['fields_blocksize_eventfilter'][0] = html_print_input_text( - 'block_size', - $user_info['block_size'], - '', - 5, - 5, - true +$userManagementTable->data['fields_blocksize_eventfilter'][0] = html_print_input( + [ + 'type' => 'number', + 'size' => 5, + 'max' => $performance_variables_control['block_size']->max, + 'name' => 'block_size', + 'value' => $user_info['block_size'], + 'return' => true, + ] ); if (is_metaconsole() === true && empty($user_info['metaconsole_default_event_filter']) !== true) { diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index 7e5e5de1bc..a434a30e7f 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -621,7 +621,8 @@ class ConsoleSupervisor 'small_operation_step_datos_purge' => 'Small Operation Step to purge old data', 'row_limit_csv' => 'Row limit in csv log', 'limit_parameters_massive' => 'Limit for bulk operations', - 'block_size' => 'Block size for pagination', + 'block_size' => 'User block size for pagination', + 'global_block_size' => 'Global block size for pagination', 'short_module_graph_data' => 'Data precision', 'graph_precision' => 'Data precision in graphs', ]; @@ -635,8 +636,14 @@ class ConsoleSupervisor $message = ''; $limit_value = ''; + $url = ''; if ($config[$variable] > $values->max) { $message = 'Check the setting of %s, a value greater than %s is not recommended'; + + if ($variable === 'block_size') { + $message .= '. (User: '.$config['id_user'].')'; + } + $limit_value = $values->max; } @@ -647,32 +654,39 @@ class ConsoleSupervisor if ($limit_value !== '' && $message !== '') { if (is_metaconsole() === true) { - $this->notify( - [ - 'type' => 'NOTIF.VARIABLES.PERFORMANCE.'.$variable, - 'title' => __('Incorrect config value'), - 'message' => __( - $message, - $names[$variable], - $limit_value - ), - 'url' => '__url__index.php?sec=advanced&sec2=advanced/metasetup', - ] - ); + $url = '__url__index.php?sec=advanced&sec2=advanced/metasetup'; } else { - $this->notify( - [ - 'type' => 'NOTIF.VARIABLES.PERFORMANCE.'.$variable, - 'title' => __('Incorrect config value'), - 'message' => __( - $message, - $names[$variable], - $limit_value - ), - 'url' => '__url__/index.php?sec=general&sec2=godmode/setup/setup', - ] - ); + $url = '__url__/index.php?sec=general&sec2=godmode/setup/setup'; } + + if ($variable === 'block_size') { + if (is_metaconsole() === true) { + $url = '__url__index.php?sec=gusuarios&sec2=godmode/users/configure_user&edit_user=1&pure=0&id_user='.$config['id_user']; + } else { + $url = '__url__/index.php?sec=gusuarios&sec2=godmode/users/configure_user&edit_user=1&pure=0&id_user='.$config['id_user']; + } + } + + if ($variable === 'global_block_size') { + if (is_metaconsole() === true) { + $url = '__url__index.php?sec=advanced&sec2=advanced/metasetup&pure=0&tab=visual'; + } else { + $url = '__url__/index.php?sec=gsetup&sec2=godmode/setup/setup§ion=vis'; + } + } + + $this->notify( + [ + 'type' => 'NOTIF.VARIABLES.PERFORMANCE.'.$variable, + 'title' => __('Incorrect config value'), + 'message' => __( + $message, + $names[$variable], + $limit_value + ), + 'url' => $url, + ] + ); } } diff --git a/pandora_console/include/class/Diagnostics.class.php b/pandora_console/include/class/Diagnostics.class.php index 2c00a6b328..9618e3e753 100644 --- a/pandora_console/include/class/Diagnostics.class.php +++ b/pandora_console/include/class/Diagnostics.class.php @@ -316,6 +316,8 @@ class Diagnostics extends Wizard * Graph of the Free Disk Spool Dir module. * Graph of the Free RAM module. * Graph of the Queued Modules module. + * Graph of the Queued_Alerts. + * Graph of the Alert_Server_Status. * Graph of the Status module. * Graph of the System Load AVG module. * Graph of the Execution Time module. @@ -366,6 +368,20 @@ class Diagnostics extends Wizard 'nameModule' => 'Queued_Modules', 'idAgent' => $agentIdMasterServer, ], + 'chartQueuedAlerts' => [ + 'title' => __( + 'Graph of the Queued Alerts total.' + ), + 'nameModule' => 'Queued_Alerts', + 'idAgent' => $agentIdMasterServer, + ], + 'chartAlertServerStatus' => [ + 'title' => __( + 'Graph of the Alert Server Status.' + ), + 'nameModule' => 'Alert_Server_Status', + 'idAgent' => $agentIdMasterServer, + ], 'chartStatus' => [ 'title' => __('Graph of the Status module.'), 'nameModule' => 'Status', diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index f8bbcad9ec..958654113b 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC230918'; +$build_version = 'PC230919'; $pandora_version = 'v7.0NG.773.3'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 1cc1b9d438..393c6a2610 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -2573,6 +2573,10 @@ function config_process_config() 'max' => 200, 'min' => 10, ], + 'global_block_size' => [ + 'max' => 200, + 'min' => 10, + ], 'short_module_graph_data' => [ 'max' => 20, 'min' => 1, diff --git a/pandora_console/install.php b/pandora_console/install.php index 19c37a7d7e..a5395109bb 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
0; +use constant ALERTSERVER => 21; use Scalar::Util qw(looks_like_number); @@ -159,6 +160,18 @@ sub pandora_self_monitoring ($$) { if (!defined($queued_modules)) { $queued_modules = 0; } + + my $queued_alerts = get_db_value ($dbh, "SELECT count(id) FROM talert_execution_queue"); + + if (!defined($queued_alerts)) { + $queued_alerts = 0; + } + + my $alert_server_status = get_db_value ($dbh, "SELECT status FROM tserver WHERE server_type = ?", ALERTSERVER); + + if (!defined($alert_server_status || $alert_server_status eq "") ) { + $alert_server_status = 0; + } my $dbmaintance; if ($RDBMS eq 'postgresql') { @@ -193,7 +206,19 @@ sub pandora_self_monitoring ($$) { $xml_output .=" generic_data\n"; $xml_output .=" $queued_modules\n"; $xml_output .=" \n"; + + $xml_output .=" \n"; + $xml_output .=" Queued_Alerts\n"; + $xml_output .=" generic_data\n"; + $xml_output .=" $queued_alerts\n"; + $xml_output .=" \n"; + $xml_output .=" \n"; + $xml_output .=" Alert_Server_Status\n"; + $xml_output .=" generic_proc\n"; + $xml_output .=" $alert_server_status\n"; + $xml_output .=" \n"; + $xml_output .=" \n"; $xml_output .=" Agents_Unknown\n"; $xml_output .=" generic_data\n"; diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index 19f2fbb59b..7bb1127a7a 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.773.3-230918 +Version: 7.0NG.773.3-230919 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 39ee7fd114..e55e96ebf3 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/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.773.3-230918" +pandora_version="7.0NG.773.3-230919" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 0dc572ebed..fc190d0076 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -46,7 +46,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.773.3"; -my $pandora_build = "230918"; +my $pandora_build = "230919"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index eac182781e..f2c7d46143 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -127,6 +127,7 @@ use JSON qw(decode_json encode_json); use MIME::Base64; use Text::ParseWords; use Math::Trig; # Math functions +use constant ALERTSERVER => 21; # Debugging #use Data::Dumper; @@ -6132,6 +6133,18 @@ sub pandora_self_monitoring ($$) { if (!defined($queued_modules)) { $queued_modules = 0; } + + my $queued_alerts = get_db_value ($dbh, "SELECT count(id) FROM talert_execution_queue"); + + if (!defined($queued_alerts)) { + $queued_alerts = 0; + } + + my $alert_server_status = get_db_value ($dbh, "SELECT status FROM tserver WHERE server_type = ?", ALERTSERVER); + + if (!defined($alert_server_status) || $alert_server_status eq "") { + $alert_server_status = 0; + } my $pandoradb = 0; my $pandoradb_tstamp = get_db_value ($dbh, "SELECT `value` FROM tconfig WHERE token = 'db_maintance'"); @@ -6158,6 +6171,18 @@ sub pandora_self_monitoring ($$) { $xml_output .=" generic_data"; $xml_output .=" $queued_modules"; $xml_output .=" "; + + $xml_output .=" \n"; + $xml_output .=" Queued_Alerts\n"; + $xml_output .=" generic_data\n"; + $xml_output .=" $queued_alerts\n"; + $xml_output .=" \n"; + + $xml_output .=" \n"; + $xml_output .=" Alert_Server_Status\n"; + $xml_output .=" generic_proc\n"; + $xml_output .=" $alert_server_status\n"; + $xml_output .=" \n"; $xml_output .=" "; $xml_output .=" Agents_Unknown"; diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 0fe5e566c8..45ec49af8d 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.773.3"; -my $pandora_build = "230918"; +my $pandora_build = "230919"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 4ae90a8296..6a26b534ce 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.773.3 -%define release 230918 +%define release 230919 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 5c1910854b..5e2ced5edd 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.773.3 -%define release 230918 +%define release 230919 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 21e1e1b47d..cb4871df03 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.773.3" -PI_BUILD="230918" +PI_BUILD="230919" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 4f087de961..08a0226706 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.773.3 Build 230918"; +my $version = "7.0NG.773.3 Build 230919"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index b841bc79ae..0793c5297f 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.773.3 Build 230918"; +my $version = "7.0NG.773.3 Build 230919"; # save program name for logging my $progname = basename($0);