Merge remote-tracking branch 'origin/develop' into ent-6012-servicios-dinamicos

This commit is contained in:
fbsanchez 2020-07-06 14:31:55 +02:00
commit 534aa8c7c5
54 changed files with 96 additions and 71 deletions

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.746, AIX version
# Version 7.0NG.747, AIX version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.746, FreeBSD Version
# Version 7.0NG.747, FreeBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.746, HP-UX Version
# Version 7.0NG.747, HP-UX Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.746, GNU/Linux
# Version 7.0NG.747, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.746, GNU/Linux
# Version 7.0NG.747, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.746, Solaris Version
# Version 7.0NG.747, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent
# (c) 2006-2010 Artica Soluciones Tecnologicas
# Version 7.0NG.746
# Version 7.0NG.747
# 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

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
# Version 7.0NG.746, AIX version
# Version 7.0NG.747, AIX version
# General Parameters
# ==================

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
# Version 7.0NG.746
# Version 7.0NG.747
# FreeBSD/IPSO version
# Licenced under GPL licence, 2003-2007 Sancho Lerena

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
# Version 7.0NG.746, HPUX Version
# Version 7.0NG.747, HPUX Version
# General Parameters
# ==================

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.746
# Version 7.0NG.747
# Licensed under GPL license v2,
# (c) 2003-2010 Artica Soluciones Tecnologicas
# please visit http://pandora.sourceforge.net

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.746
# Version 7.0NG.747
# Licensed under GPL license v2,
# (c) 2003-2009 Artica Soluciones Tecnologicas
# please visit http://pandora.sourceforge.net

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.746
# Version 7.0NG.747
# Licensed under GPL license v2,
# please visit http://pandora.sourceforge.net

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
# Version 7.0NG.746, Solaris version
# Version 7.0NG.747, Solaris version
# General Parameters
# ==================

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.746, AIX version
# Version 7.0NG.747, AIX version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.746-200630
Version: 7.0NG.747-200706
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.746-200630"
pandora_version="7.0NG.747-200706"
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

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.746, GNU/Linux
# Version 7.0NG.747, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2012 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.746, FreeBSD Version
# Version 7.0NG.747, FreeBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2016 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.746, HP-UX Version
# Version 7.0NG.747, HP-UX Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.746, GNU/Linux
# Version 7.0NG.747, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2014 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.746, GNU/Linux
# Version 7.0NG.747, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.746, NetBSD Version
# Version 7.0NG.747, NetBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.746, Solaris Version
# Version 7.0NG.747, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -54,8 +54,8 @@ my $Sem = undef;
# Semaphore used to control the number of threads
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.746';
use constant AGENT_BUILD => '200630';
use constant AGENT_VERSION => '7.0NG.747';
use constant AGENT_BUILD => '200706';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -2,8 +2,8 @@
#Pandora FMS Linux Agent
#
%define name pandorafms_agent_unix
%define version 7.0NG.746
%define release 200630
%define version 7.0NG.747
%define release 200706
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -2,8 +2,8 @@
#Pandora FMS Linux Agent
#
%define name pandorafms_agent_unix
%define version 7.0NG.746
%define release 200630
%define version 7.0NG.747
%define release 200706
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -9,8 +9,8 @@
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
# **********************************************************************
PI_VERSION="7.0NG.746"
PI_BUILD="200630"
PI_VERSION="7.0NG.747"
PI_BUILD="200706"
OS_NAME=`uname -s`
FORCE=0

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent
# (c) 2006-2017 Artica Soluciones Tecnologicas
# Version 7.0NG.746
# Version 7.0NG.747
# 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

View File

@ -3,7 +3,7 @@ AllowLanguageSelection
{Yes}
AppName
{Pandora FMS Windows Agent v7.0NG.746}
{Pandora FMS Windows Agent v7.0NG.747}
ApplicationID
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{200630}
{200706}
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.746(Build 200630)")
#define PANDORA_VERSION ("7.0NG.747(Build 200706)")
string pandora_path;
string pandora_dir;

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.746-200630
Version: 7.0NG.747-200706
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.746-200630"
pandora_version="7.0NG.747-200706"
package_pear=0
package_pandora=1

View File

@ -49,7 +49,6 @@ require_once $config['homedir'].'/include/functions_component_groups.php';
// Header.
if (defined('METACONSOLE')) {
components_meta_print_header();
$sec = 'advanced';
$id_modulo = (int) get_parameter('id_component_type');

View File

@ -276,6 +276,9 @@ $table->data[$i++][1] = html_print_checkbox_switch('event_storm_protection', 1,
$table->data[$i][0] = __('Command Snapshot');
$table->data[$i++][1] = html_print_checkbox_switch('command_snapshot', 1, $config['command_snapshot'], true);
$table->data[$i][0] = __('Change remote config encoding');
$table->data[$i++][1] = html_print_checkbox_switch('use_custom_encoding', 1, $config['use_custom_encoding'], true);
$table->data[$i][0] = __('Server logs directory');
$table->data[$i++][1] = html_print_input_text(
'server_log_dir',

View File

@ -20,8 +20,8 @@
/**
* Pandora build version and version
*/
$build_version = 'PC200630';
$pandora_version = 'v7.0NG.746';
$build_version = 'PC200706';
$pandora_version = 'v7.0NG.747';
// Do not overwrite default timezone set if defined.
$script_tz = @date_default_timezone_get();

View File

@ -287,6 +287,10 @@ function config_update_config()
$error_update[] = __('Command Snapshot');
}
if (!config_update_value('use_custom_encoding', get_parameter('use_custom_encoding', 0))) {
$error_update[] = __('Use custom encoding');
}
if (!config_update_value('server_log_dir', io_safe_input(strip_tags(io_safe_output(get_parameter('server_log_dir')))))) {
$error_update[] = __('Server logs directory');
}
@ -2799,6 +2803,10 @@ function config_process_config()
config_update_value('event_storm_protection', 0);
}
if (!isset($config['use_custom_encoding'])) {
config_update_value('use_custom_encoding', 0);
}
if (!isset($config['server_log_dir'])) {
config_update_value('server_log_dir', '');
}

View File

@ -128,8 +128,8 @@
</div>
<div style='height: 10px'>
<?php
$version = '7.0NG.746';
$build = '200630';
$version = '7.0NG.747';
$build = '200706';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -2,8 +2,8 @@
# Pandora FMS Console
#
%define name pandorafms_console
%define version 7.0NG.746
%define release 200630
%define version 7.0NG.747
%define release 200706
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -2,8 +2,8 @@
# Pandora FMS Console
#
%define name pandorafms_console
%define version 7.0NG.746
%define release 200630
%define version 7.0NG.747
%define release 200706
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -2,8 +2,8 @@
# Pandora FMS Console
#
%define name pandorafms_console
%define version 7.0NG.746
%define release 200630
%define version 7.0NG.747
%define release 200706
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -9,7 +9,7 @@
# This code is licensed under GPL 2.0 license.
# **********************************************************************
PI_VERSION="7.0NG.746"
PI_VERSION="7.0NG.747"
FORCE=0
DESTDIR=""
LOG_TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.746-200630
Version: 7.0NG.747-200706
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.746-200630"
pandora_version="7.0NG.747-200706"
package_cpan=0
package_pandora=1

View File

@ -1,7 +1,7 @@
#############################################################################
# Pandora FMS Server Parameters
# Pandora FMS, the Flexible Monitoring System.
# Version 7.0NG.746
# Version 7.0NG.747
# Licensed under GPL license v2,
# (c) 2003-2017 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -44,8 +44,8 @@ our @EXPORT = qw(
);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.746";
my $pandora_build = "200630";
my $pandora_version = "7.0NG.747";
my $pandora_build = "200706";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash
@ -177,6 +177,8 @@ sub pandora_get_sharedconfig ($$) {
$pa_config->{"event_storm_protection"} = pandora_get_tconfig_token ($dbh, 'event_storm_protection', 0);
$pa_config->{"use_custom_encoding"} = pandora_get_tconfig_token ($dbh, 'use_custom_encoding', 0);
if ($pa_config->{'include_agents'} eq '') {
$pa_config->{'include_agents'} = 0;
}
@ -472,6 +474,7 @@ sub pandora_load_config {
$pa_config->{"stats_interval"} = 300;
$pa_config->{"agentaccess"} = 1;
$pa_config->{"event_storm_protection"} = 0;
$pa_config->{"use_custom_encoding"} = 0;
$pa_config->{"node_metaconsole"} = 0; # > 7.0NG
# -------------------------------------------------------------------------

View File

@ -32,8 +32,8 @@ use base 'Exporter';
our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.746";
my $pandora_build = "200630";
my $pandora_version = "7.0NG.747";
my $pandora_build = "200706";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -375,13 +375,25 @@ our $THRRUN :shared = 1;
################################################################################
## Reads a file and returns entire content or undef if error.
################################################################################
sub read_file {
my $path = shift;
sub read_file($;$) {
my ($path, $enc) = @_;
my $_FILE;
if( !open($_FILE, "<", $path) ) {
# failed to open, return undef
return undef;
if (!defined($enc)) {
if( !open($_FILE, "<", $path) ) {
# failed to open, return undef
return undef;
}
} else {
if ( $enc eq '' ) {
$enc = 'utf8';
}
if( !open($_FILE, "<:encoding($enc)", $path) ) {
# failed to open, return undef
return undef;
}
}
# Slurp configuration file content.

View File

@ -2,8 +2,8 @@
# Pandora FMS Server
#
%define name pandorafms_server
%define version 7.0NG.746
%define release 200630
%define version 7.0NG.747
%define release 200706
Summary: Pandora FMS Server
Name: %{name}

View File

@ -2,8 +2,8 @@
# Pandora FMS Server
#
%define name pandorafms_server
%define version 7.0NG.746
%define release 200630
%define version 7.0NG.747
%define release 200706
Summary: Pandora FMS Server
Name: %{name}

View File

@ -8,8 +8,8 @@
# This code is licensed under GPL 2.0 license.
# **********************************************************************
PI_VERSION="7.0NG.746"
PI_BUILD="200630"
PI_VERSION="7.0NG.747"
PI_BUILD="200706"
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.746 PS200630";
my $version = "7.0NG.747 PS200706";
# 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.746 PS200630";
my $version = "7.0NG.747 PS200706";
# save program name for logging
my $progname = basename($0);