Merge remote-tracking branch 'origin/develop' into ent-3661-poder-elegir-dataserver-en-vmware-a-traves-de-discovery
This commit is contained in:
commit
f35ae98e78
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.751-210107
|
||||
Version: 7.0NG.751-210108
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.751-210107"
|
||||
pandora_version="7.0NG.751-210108"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -1016,7 +1016,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.751';
|
||||
use constant AGENT_BUILD => '210107';
|
||||
use constant AGENT_BUILD => '210108';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.751
|
||||
%define release 210107
|
||||
%define release 210108
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.751
|
||||
%define release 210107
|
||||
%define release 210108
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.751"
|
||||
PI_BUILD="210107"
|
||||
PI_BUILD="210108"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{210107}
|
||||
{210108}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.751(Build 210107)")
|
||||
#define PANDORA_VERSION ("7.0NG.751(Build 210108)")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.751(Build 210107))"
|
||||
VALUE "ProductVersion", "(7.0NG.751(Build 210108))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.751-210107
|
||||
Version: 7.0NG.751-210108
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.751-210107"
|
||||
pandora_version="7.0NG.751-210108"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -64,7 +64,7 @@ if ($update_config == 1 && $config['history_db_enabled'] == 1) {
|
|||
$historical_string_purge = get_parameter('historical_string_purge', 0);
|
||||
|
||||
$history_connect = @mysql_db_process_sql(
|
||||
'SELECT 1 FROM tconfig',
|
||||
'DESCRIBE tconfig',
|
||||
'affected_rows',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
|
@ -390,8 +390,8 @@ if ($config['history_db_enabled'] == 1) {
|
|||
|
||||
$config_history = false;
|
||||
if ($config['history_db_connection']) {
|
||||
$history_connect = @mysql_db_process_sql(
|
||||
'SELECT 1 FROM tconfig',
|
||||
$history_connect = mysql_db_process_sql(
|
||||
'DESCRIBE tconfig',
|
||||
'affected_rows',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
|
@ -408,6 +408,7 @@ if ($config['history_db_enabled'] == 1) {
|
|||
if (isset($config_history_array) && is_array($config_history_array)) {
|
||||
foreach ($config_history_array as $key => $value) {
|
||||
$config_history[$value['token']] = $value['value'];
|
||||
$config_history = true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC210107';
|
||||
$build_version = 'PC210108';
|
||||
$pandora_version = 'v7.0NG.751';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -12,7 +12,8 @@ function updateSmartValue(event) {
|
|||
var keyPressed = event.keyCode;
|
||||
if (
|
||||
(keyPressed <= 48 && keyPressed >= 57) ||
|
||||
(inputElement.val() < 0 || inputElement.val() > 100)
|
||||
inputElement.val() < 0 ||
|
||||
inputElement.val() > 100
|
||||
) {
|
||||
event.preventDefault();
|
||||
} else {
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '7.0NG.751';
|
||||
$build = '210107';
|
||||
$build = '210108';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.751
|
||||
%define release 210107
|
||||
%define release 210108
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.751
|
||||
%define release 210107
|
||||
%define release 210108
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.751
|
||||
%define release 210107
|
||||
%define release 210108
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 7.0NG.751-210107
|
||||
Version: 7.0NG.751-210108
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.751-210107"
|
||||
pandora_version="7.0NG.751-210108"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -45,7 +45,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.751";
|
||||
my $pandora_build = "210107";
|
||||
my $pandora_build = "210108";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
|
|
@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.751";
|
||||
my $pandora_build = "210107";
|
||||
my $pandora_build = "210108";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.751
|
||||
%define release 210107
|
||||
%define release 210108
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.751
|
||||
%define release 210107
|
||||
%define release 210108
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.751"
|
||||
PI_BUILD="210107"
|
||||
PI_BUILD="210108"
|
||||
|
||||
MODE=$1
|
||||
if [ $# -gt 1 ]; then
|
||||
|
|
|
@ -35,7 +35,7 @@ use PandoraFMS::Config;
|
|||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.751 PS210107";
|
||||
my $version = "7.0NG.751 PS210108";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
@ -581,6 +581,28 @@ sub pandora_init_pdb ($) {
|
|||
help_screen () if ($conf->{'_pandora_path'} eq '');
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# Prepares conf read from historical database settings.
|
||||
########################################################################
|
||||
sub pandoradb_load_history_conf($) {
|
||||
my $dbh = shift;
|
||||
|
||||
my @options = get_db_rows($dbh, 'SELECT * FROM `tconfig`');
|
||||
|
||||
my %options = map
|
||||
{
|
||||
'_' . $_->{'token'} => $_->{'value'}
|
||||
} @options;
|
||||
|
||||
$options{'_days_autodisable_deletion'} = 0 unless defined ($options{'_days_autodisable_deletion'});
|
||||
$options{'_num_past_special_days'} = 0 unless defined($options{'_num_past_special_days'});
|
||||
$options{'_delete_old_network_matrix'} = 0 unless defined($options{'_delete_old_network_matrix'});
|
||||
$options{'_delete_old_messages'} = 0 unless defined($options{'_delete_old_messages'});
|
||||
$options{'_netflow_max_lifetime'} = 0 unless defined($options{'_netflow_max_lifetime'});
|
||||
$options{'claim_back_snmp_modules'} = 0 unless defined($options{'claim_back_snmp_modules'});
|
||||
|
||||
return \%options;
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# Read external configuration file.
|
||||
|
@ -651,7 +673,7 @@ sub pandora_load_config_pdb ($) {
|
|||
$conf->{'_metaconsole_events_history'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'metaconsole_events_history'");
|
||||
$conf->{'_netflow_max_lifetime'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'netflow_max_lifetime'");
|
||||
$conf->{'_netflow_nfexpire'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'netflow_nfexpire'");
|
||||
$conf->{'_netflow_path'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'netflow_path'");
|
||||
$conf->{'_netflow_path'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'netflow_path'");
|
||||
$conf->{'_delete_notinit'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'delete_notinit'");
|
||||
$conf->{'_session_timeout'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'session_timeout'");
|
||||
|
||||
|
@ -726,7 +748,7 @@ sub pandora_checkdb_consistency {
|
|||
# 1. Check for modules that do not have tagente_estado but have
|
||||
# tagente_module
|
||||
#-------------------------------------------------------------------
|
||||
if (defined($conf->{'_delete_notinit'}) && $conf->{'_delete_notinit'} ne "" && $conf->{'_delete_notinit'} == 1) {
|
||||
if (defined($conf->{'_delete_notinit'}) && $conf->{'_delete_notinit'} ne "" && $conf->{'_delete_notinit'} eq "1") {
|
||||
log_message ('CHECKDB', "Deleting not-init data.");
|
||||
my @modules = get_db_rows ($dbh,
|
||||
'SELECT id_agente_modulo, id_agente
|
||||
|
@ -956,7 +978,7 @@ sub pandora_delete_old_module_data {
|
|||
sub pandora_delete_old_export_data {
|
||||
my ($dbh, $ulimit_timestamp) = @_;
|
||||
|
||||
log_message ('PURGE', "Deleting old export data from tserver_export_data\n");
|
||||
log_message ('PURGE', "Deleting old export data from tserver_export_data");
|
||||
while((my $rc = db_delete_limit ($dbh, 'tserver_export_data', 'UNIX_TIMESTAMP(timestamp) < ?', $SMALL_OPERATION_STEP, $ulimit_timestamp)) ne '0E0') {
|
||||
print "RC:$rc\n";
|
||||
usleep (10000);
|
||||
|
@ -1081,8 +1103,9 @@ if ($conf{'_force'} == 0 && pandora_is_master(\%conf) == 0) {
|
|||
exit 1;
|
||||
}
|
||||
|
||||
# Get a lock
|
||||
my $lock = db_get_lock ($dbh, 'pandora_db');
|
||||
# Get a lock on dbname.
|
||||
my $lock_name = $conf{'dbname'};
|
||||
my $lock = db_get_lock ($dbh, $lock_name);
|
||||
if ($lock == 0 && $conf{'_force'} == 0) {
|
||||
log_message ('', " [*] Another instance of DB Tool seems to be running.\n\n");
|
||||
exit 1;
|
||||
|
@ -1091,9 +1114,26 @@ if ($lock == 0 && $conf{'_force'} == 0) {
|
|||
# Main
|
||||
pandoradb_main(\%conf, $dbh, $history_dbh);
|
||||
|
||||
# history_dbh is unset in pandoradb_main if not in use.
|
||||
if (defined($history_dbh)) {
|
||||
log_message('', " [>] DB Tool running on historical database.\n");
|
||||
my $h_conf = pandoradb_load_history_conf($history_dbh);
|
||||
|
||||
# Keep base settings.
|
||||
$h_conf->{'_onlypurge'} = $conf{'_onlypurge'};
|
||||
|
||||
# Re-launch maintenance process for historical database.
|
||||
pandoradb_main(
|
||||
$h_conf,
|
||||
$history_dbh,
|
||||
undef
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
# Release the lock
|
||||
if ($lock == 1) {
|
||||
db_release_lock ($dbh, 'pandora_db');
|
||||
db_release_lock ($dbh, $lock_name);
|
||||
}
|
||||
|
||||
# Cleanup and exit
|
||||
|
|
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
|||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.751 PS210107";
|
||||
my $version = "7.0NG.751 PS210108";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
|
Loading…
Reference in New Issue