Merge branch 'develop' into 'ent-8912-Problemas-en-recuperación-alertas-de-evento---Necesaria-refactorizacion'

# Conflicts:
#   pandora_console/install.php
This commit is contained in:
José González 2022-06-17 07:37:01 +00:00
commit 7f2182d52a
31 changed files with 510 additions and 383 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.762-220616 Version: 7.0NG.762-220617
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.762-220616" pandora_version="7.0NG.762-220617"
echo "Test if you has the tools for to make the packages." echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -1015,7 +1015,7 @@ my $Sem = undef;
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.762'; use constant AGENT_VERSION => '7.0NG.762';
use constant AGENT_BUILD => '220616'; use constant AGENT_BUILD => '220617';
# Agent log default file size maximum and instances # Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000; use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.762 %define version 7.0NG.762
%define release 220616 %define release 220617
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.762 %define version 7.0NG.762
%define release 220616 %define release 220617
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -10,7 +10,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.762" PI_VERSION="7.0NG.762"
PI_BUILD="220616" PI_BUILD="220617"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{220616} {220617}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils; using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1 #define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.762 Build 220616") #define PANDORA_VERSION ("7.0NG.762 Build 220617")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST" VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent" VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.762(Build 220616))" VALUE "ProductVersion", "(7.0NG.762(Build 220617))"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
END END
END END

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.762-220616 Version: 7.0NG.762-220617
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.762-220616" pandora_version="7.0NG.762-220617"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -178,6 +178,7 @@ switch ($type) {
break; break;
} }
$query_filter = [];
if (empty($query_filter) === false) { if (empty($query_filter) === false) {
$query_filter = json_decode($query_filter, true); $query_filter = json_decode($query_filter, true);
} }

File diff suppressed because it is too large Load Diff

View File

@ -3559,7 +3559,8 @@ class AgentWizard extends HTML
$this->targetPort, $this->targetPort,
$this->server, $this->server,
$this->extraArguments, $this->extraArguments,
(($full_output === false) ? '-Oa -On' : '-Oa') (($full_output === false) ? '-On' : '-Oa'),
''
); );
if ($pure === true) { if ($pure === true) {
@ -3572,7 +3573,12 @@ class AgentWizard extends HTML
if ($full_output === true) { if ($full_output === true) {
$output[] = $key.' = '.$oid_unit; $output[] = $key.' = '.$oid_unit;
} else { } else {
preg_match('/\.\d+$/', $key, $index); $index = [];
$index[] = preg_replace('/^'.$oid.'/', '', $key);
if (empty($index) === true) {
preg_match('/\.\d+$/', $key, $index);
}
$tmp = explode(': ', $oid_unit); $tmp = explode(': ', $oid_unit);
$output[$index[0]] = str_replace('"', '', ($tmp[1] ?? '')); $output[$index[0]] = str_replace('"', '', ($tmp[1] ?? ''));
} }

View File

@ -20,7 +20,7 @@
/** /**
* Pandora build version and version * Pandora build version and version
*/ */
$build_version = 'PC220616'; $build_version = 'PC220617';
$pandora_version = 'v7.0NG.762'; $pandora_version = 'v7.0NG.762';
// Do not overwrite default timezone set if defined. // Do not overwrite default timezone set if defined.

View File

@ -1993,7 +1993,8 @@ function get_snmpwalk(
$snmp_port='', $snmp_port='',
$server_to_exec=0, $server_to_exec=0,
$extra_arguments='', $extra_arguments='',
$format='-Oa' $format='-Oa',
$load_mibs='-m ALL'
) { ) {
global $config; global $config;
@ -2057,15 +2058,15 @@ function get_snmpwalk(
case '3': case '3':
switch ($snmp3_security_level) { switch ($snmp3_security_level) {
case 'authNoPriv': case 'authNoPriv':
$command_str = $snmpwalk_bin.' -m ALL '.$format.' '.$extra_arguments.' -v 3'.' -u '.escapeshellarg($snmp3_auth_user).' -A '.escapeshellarg($snmp3_auth_pass).' -l '.escapeshellarg($snmp3_security_level).' -a '.escapeshellarg($snmp3_auth_method).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir; $command_str = $snmpwalk_bin.' '.$load_mibs.' '.$format.' '.$extra_arguments.' -v 3'.' -u '.escapeshellarg($snmp3_auth_user).' -A '.escapeshellarg($snmp3_auth_pass).' -l '.escapeshellarg($snmp3_security_level).' -a '.escapeshellarg($snmp3_auth_method).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir;
break; break;
case 'noAuthNoPriv': case 'noAuthNoPriv':
$command_str = $snmpwalk_bin.' -m ALL '.$format.' '.$extra_arguments.' -v 3'.' -u '.escapeshellarg($snmp3_auth_user).' -l '.escapeshellarg($snmp3_security_level).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir; $command_str = $snmpwalk_bin.' '.$load_mibs.' '.$format.' '.$extra_arguments.' -v 3'.' -u '.escapeshellarg($snmp3_auth_user).' -l '.escapeshellarg($snmp3_security_level).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir;
break; break;
default: default:
$command_str = $snmpwalk_bin.' -m ALL '.$format.' '.$extra_arguments.' -v 3'.' -u '.escapeshellarg($snmp3_auth_user).' -A '.escapeshellarg($snmp3_auth_pass).' -l '.escapeshellarg($snmp3_security_level).' -a '.escapeshellarg($snmp3_auth_method).' -x '.escapeshellarg($snmp3_privacy_method).' -X '.escapeshellarg($snmp3_privacy_pass).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir; $command_str = $snmpwalk_bin.' '.$load_mibs.' '.$format.' '.$extra_arguments.' -v 3'.' -u '.escapeshellarg($snmp3_auth_user).' -A '.escapeshellarg($snmp3_auth_pass).' -l '.escapeshellarg($snmp3_security_level).' -a '.escapeshellarg($snmp3_auth_method).' -x '.escapeshellarg($snmp3_privacy_method).' -X '.escapeshellarg($snmp3_privacy_pass).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir;
break; break;
} }
break; break;
@ -2074,7 +2075,7 @@ function get_snmpwalk(
case '2c': case '2c':
case '1': case '1':
default: default:
$command_str = $snmpwalk_bin.' -m ALL '.$extra_arguments.' '.$format.' -v '.escapeshellarg($snmp_version).' -c '.escapeshellarg(io_safe_output($snmp_community)).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir; $command_str = $snmpwalk_bin.' '.$load_mibs.' '.$extra_arguments.' '.$format.' -v '.escapeshellarg($snmp_version).' -c '.escapeshellarg(io_safe_output($snmp_community)).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir;
break; break;
} }

View File

@ -814,6 +814,13 @@ select:-internal-list-box {
.margin-left-2 { .margin-left-2 {
margin-left: 2em; margin-left: 2em;
} }
.margin-right-05 {
margin-right: 0.5em;
}
.margin-left-05 {
margin-left: 0.5em;
}
.no-border { .no-border {
border: none; border: none;
} }

View File

@ -129,7 +129,7 @@
<div style='height: 10px'> <div style='height: 10px'>
<?php <?php
$version = '7.0NG.762'; $version = '7.0NG.762';
$build = '220613'; $build = '220617';
$banner = "v$version Build $build"; $banner = "v$version Build $build";
error_reporting(0); error_reporting(0);

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.762-220616 Version: 7.0NG.762-220617
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.762-220616" pandora_version="7.0NG.762-220617"
package_cpan=0 package_cpan=0
package_pandora=1 package_pandora=1

View File

@ -46,7 +46,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only # version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.762"; my $pandora_version = "7.0NG.762";
my $pandora_build = "220616"; my $pandora_build = "220617";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash # Setup hash

View File

@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only # version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.762"; my $pandora_version = "7.0NG.762";
my $pandora_build = "220616"; my $pandora_build = "220617";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] ); our %EXPORT_TAGS = ( 'all' => [ qw() ] );
@ -609,15 +609,14 @@ sub print_module {
$data->{critical_instructions} = $conf->{critical_instructions} unless (defined($data->{critical_instructions}) || (!defined($conf->{critical_instructions}))); $data->{critical_instructions} = $conf->{critical_instructions} unless (defined($data->{critical_instructions}) || (!defined($conf->{critical_instructions})));
# Translation compatibility # Translation compatibility
$data->{'min_warning'} = $data->{'wmin'} if empty($data->{'min_warning'}); $data->{min_warning} = $data->{'wmin'} if empty($data->{min_warning});
$data->{'max_warning'} = $data->{'wmax'} if empty($data->{'max_warning'}); $data->{max_warning} = $data->{'wmax'} if empty($data->{max_warning});
$data->{'min_critical'} = $data->{'cmin'} if empty($data->{'min_critical'}); $data->{min_critical} = $data->{'cmin'} if empty($data->{min_critical});
$data->{'max_critical'} = $data->{'cmax'} if empty($data->{'max_critical'}); $data->{max_critical} = $data->{'cmax'} if empty($data->{max_critical});
$data->{'warning_inverse'} = $data->{'winv'} if empty($data->{'warning_inverse'}); $data->{warning_inverse} = $data->{'winv'} if empty($data->{warning_inverse});
$data->{'critical_inverse'} = $data->{'cinv'} if empty($data->{'critical_inverse'}); $data->{critical_inverse} = $data->{'cinv'} if empty($data->{critical_inverse});
$data->{'str_warning'} = $data->{'wstr'} if empty($data->{'str_warning'}); $data->{str_warning} = $data->{'wstr'} if empty($data->{str_warning});
$data->{'str_critical'} = $data->{'cstr'} if empty($data->{'str_critical'}); $data->{str_critical} = $data->{'cstr'} if empty($data->{str_critical});
$xml_module .= "<module>\n"; $xml_module .= "<module>\n";
$xml_module .= "\t<name><![CDATA[" . $data->{name} . "]]></name>\n"; $xml_module .= "\t<name><![CDATA[" . $data->{name} . "]]></name>\n";

View File

@ -1628,9 +1628,14 @@ sub database_scan($$$) {
$self->{'summary'}->{'discovered'} += 1; $self->{'summary'}->{'discovered'} += 1;
$self->{'summary'}->{'alive'} += 1; $self->{'summary'}->{'alive'} += 1;
my $name = $type . ' connection';
if (defined $obj->{'prefix_module_name'} && $obj->{'prefix_module_name'} ne '') {
$name = $obj->{'prefix_module_name'} . $type . ' connection';
}
push @modules, push @modules,
{ {
name => $type . ' connection', name => $name,
type => 'generic_proc', type => 'generic_proc',
data => 1, data => 1,
description => $type . ' availability' description => $type . ' availability'
@ -1778,8 +1783,14 @@ sub app_scan($) {
# Update progress # Update progress
$self->call('update_progress', $global_percent + (90 / (scalar @targets))); $self->call('update_progress', $global_percent + (90 / (scalar @targets)));
$self->{'summary'}->{'not_alive'} += 1; $self->{'summary'}->{'not_alive'} += 1;
my $name = $type . ' connection';
if (defined $obj->{'prefix_module_name'} && $obj->{'prefix_module_name'} ne '') {
$name = $obj->{'prefix_module_name'} . $type . ' connection';
}
push @modules, { push @modules, {
name => $type . ' connection', name => $name,
type => 'generic_proc', type => 'generic_proc',
data => 0, data => 0,
description => $type . ' availability' description => $type . ' availability'

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.762 %define version 7.0NG.762
%define release 220616 %define release 220617
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.762 %define version 7.0NG.762
%define release 220616 %define release 220617
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

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

View File

@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB; use PandoraFMS::DB;
# version: define current version # version: define current version
my $version = "7.0NG.762 Build 220616"; my $version = "7.0NG.762 Build 220617";
# Pandora server configuration # Pandora server configuration
my %conf; my %conf;

View File

@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv; Encode::Locale::decode_argv;
# version: define current version # version: define current version
my $version = "7.0NG.762 Build 220616"; my $version = "7.0NG.762 Build 220617";
# save program name for logging # save program name for logging
my $progname = basename($0); my $progname = basename($0);