Merge branch 'develop' into ent-11830-reemplazar-sistema-de-websocket-gotty-actual

This commit is contained in:
rafael 2023-09-19 09:30:04 +02:00
commit 19e6673ff9
34 changed files with 149 additions and 59 deletions

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.773.3"
PI_BUILD="230918"
PI_BUILD="230919"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{230918}
{230919}
ViewReadme
{Yes}

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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) {

View File

@ -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&section=vis';
}
}
$this->notify(
[
'type' => 'NOTIF.VARIABLES.PERFORMANCE.'.$variable,
'title' => __('Incorrect config value'),
'message' => __(
$message,
$names[$variable],
$limit_value
),
'url' => $url,
]
);
}
}

View File

@ -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',

View File

@ -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.

View File

@ -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,

View File

@ -131,7 +131,7 @@
<div style='padding-bottom: 50px'>
<?php
$version = '7.0NG.773.3';
$build = '230918';
$build = '230919';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.773.3
%define release 230918
%define release 230919
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.773.3
%define release 230918
%define release 230919
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.773.3
%define release 230918
%define release 230919
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -2642,7 +2642,7 @@ SET @short_name = 'pandorafms.vmware';
SET @name = 'VMware';
SET @section = 'app';
SET @description = 'Monitor&#x20;ESXi&#x20;hosts,&#x20;datastores&#x20;and&#x20;VMs&#x20;from&#x20;a&#x20;specific&#x20;datacenter';
SET @version = '1.0';
SET @version = '1.1';
INSERT IGNORE INTO `tdiscovery_apps` (`id_app`, `short_name`, `name`, `section`, `description`, `version`) VALUES ('', @short_name, @name, @section, @description, @version);
SELECT @id_app := `id_app` FROM `tdiscovery_apps` WHERE `short_name` = @short_name;

View File

@ -8,6 +8,7 @@ use POSIX qw(strftime);
use PandoraFMS::DB;
use constant DATASERVER => 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 .=" <type>generic_data</type>\n";
$xml_output .=" <data>$queued_modules</data>\n";
$xml_output .=" </module>\n";
$xml_output .=" <module>\n";
$xml_output .=" <name>Queued_Alerts</name>\n";
$xml_output .=" <type>generic_data</type>\n";
$xml_output .=" <data>$queued_alerts</data>\n";
$xml_output .=" </module>\n";
$xml_output .=" <module>\n";
$xml_output .=" <name>Alert_Server_Status</name>\n";
$xml_output .=" <type>generic_proc</type>\n";
$xml_output .=" <data>$alert_server_status</data>\n";
$xml_output .=" </module>\n";
$xml_output .=" <module>\n";
$xml_output .=" <name>Agents_Unknown</name>\n";
$xml_output .=" <type>generic_data</type>\n";

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 .=" <type>generic_data</type>";
$xml_output .=" <data>$queued_modules</data>";
$xml_output .=" </module>";
$xml_output .=" <module>\n";
$xml_output .=" <name>Queued_Alerts</name>\n";
$xml_output .=" <type>generic_data</type>\n";
$xml_output .=" <data>$queued_alerts</data>\n";
$xml_output .=" </module>\n";
$xml_output .=" <module>\n";
$xml_output .=" <name>Alert_Server_Status</name>\n";
$xml_output .=" <type>generic_proc</type>\n";
$xml_output .=" <data>$alert_server_status</data>\n";
$xml_output .=" </module>\n";
$xml_output .=" <module>";
$xml_output .=" <name>Agents_Unknown</name>";

View File

@ -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() ] );

View File

@ -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}

View File

@ -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}

View File

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.773.3"
PI_BUILD="230918"
PI_BUILD="230919"
MODE=$1
if [ $# -gt 1 ]; then

View File

@ -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;

View File

@ -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);