Merge remote-tracking branch 'origin/develop' into 1827-Graficas_TIP_eje_x_no_mantiene_ratio

This commit is contained in:
daniel 2018-06-01 14:04:46 +02:00
commit 97aaad0b02
31 changed files with 67 additions and 58 deletions

View File

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

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.723"
PI_BUILD="180528"
PI_BUILD="180601"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{180528}
{180601}
ViewReadme
{Yes}
@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives
{No}
Windows,Executable
{<%AppName%>-Setup<%Ext%>}
{<%AppName%>-<%Version%>-Setup<%Ext%>}
Windows,FileDescription
{<%AppName%> <%Version%> Setup}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.723(Build 180528)")
#define PANDORA_VERSION ("7.0NG.723(Build 180601)")
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.723(Build 180528))"
VALUE "ProductVersion", "(7.0NG.723(Build 180601))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

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

View File

@ -1160,13 +1160,13 @@ ALTER TABLE titem MODIFY `source_data` int(10) unsigned;
INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 13);
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 16);
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '720');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '723');
-- ---------------------------------------------------------------------
-- Table `tconfig_os`

View File

@ -22,7 +22,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC180528';
$build_version = 'PC180601';
$pandora_version = 'v7.0NG.723';
// Do not overwrite default timezone set if defined.

View File

@ -3966,8 +3966,8 @@ function ui_get_custom_header_logo ($white_bg = false) {
}
$stored_logo = is_metaconsole()
? $config['meta_custom_logo']
: $white_bg ? $config['custom_logo_white_bg'] : $config['custom_logo'];
? ($white_bg ? $config['meta_custom_logo_white_bg'] : $config['meta_custom_logo'])
: ($white_bg ? $config['custom_logo_white_bg'] : $config['custom_logo']);
if (empty($stored_logo)) return 'images/pandora_tinylogo.png';
return 'enterprise/images/custom_logo/' . $stored_logo;
}

View File

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

View File

@ -84,7 +84,7 @@ class Ui {
public function createPage($title = null, $page_name = null) {
if (!isset($title)) {
$this->title = __('Pandora FMS mobile');
$this->title = __('%s mobile', get_product_name());
}
else {
$this->title = $title;

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.723
%define release 1
%define release 180601
# 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.723
%define release 1
%define release 180601
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -109,7 +109,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('custom_report_front_logo', 'images/pandora_logo_white.jpg'),
('custom_report_front_header', ''),
('custom_report_front_footer', ''),
('MR', 14),
('MR', 16),
('identification_reminder', 1),
('identification_reminder_timestamp', 0),
('current_package_enterprise', '723'),

View File

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

View File

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

View File

@ -605,13 +605,13 @@ sub pandora_process_alert ($$$$$$$$;$) {
pandora_event ($pa_config, "Alert ceased (" .
safe_output($alert->{'name'}) . ")", 0, 0, $alert->{'priority'}, $id,
(defined ($alert->{'id_agent_module'}) ? $alert->{'id_agent_module'} : 0),
"alert_ceased", 0, $dbh, $pa_config->{'rb_product_name'}, '', '', '', '', $critical_instructions, $warning_instructions, $unknown_instructions);
"alert_ceased", 0, $dbh, 'monitoring_server', '', '', '', '', $critical_instructions, $warning_instructions, $unknown_instructions);
} else {
pandora_event ($pa_config, "Alert ceased (" .
safe_output($alert->{'name'}) . ")", $agent->{'id_grupo'},
$agent->{'id_agente'}, $alert->{'priority'}, $id,
(defined ($alert->{'id_agent_module'}) ? $alert->{'id_agent_module'} : 0),
"alert_ceased", 0, $dbh, $pa_config->{'rb_product_name'}, '', '', '', '', $critical_instructions, $warning_instructions, $unknown_instructions);
"alert_ceased", 0, $dbh, 'monitoring_server', '', '', '', '', $critical_instructions, $warning_instructions, $unknown_instructions);
}
return;
}
@ -844,7 +844,7 @@ sub pandora_execute_alert ($$$$$$$$$;$) {
pandora_event ($pa_config, "Alert $text (" . safe_output($alert->{'name'}) . ") " . (defined ($module) ? 'assigned to ('. safe_output($module->{'nombre'}) . ")" : ""),
(defined ($agent) ? $agent->{'id_grupo'} : 0), (defined ($agent) ? $agent->{'id_agente'} : 0), $severity, (defined ($alert->{'id_template_module'}) ? $alert->{'id_template_module'} : 0),
(defined ($alert->{'id_agent_module'}) ? $alert->{'id_agent_module'} : 0), $event, 0, $dbh, $pa_config->{'rb_product_name'}, '', '', '', '', $critical_instructions, $warning_instructions, $unknown_instructions);
(defined ($alert->{'id_agent_module'}) ? $alert->{'id_agent_module'} : 0), $event, 0, $dbh, 'monitoring_server', '', '', '', '', $critical_instructions, $warning_instructions, $unknown_instructions);
}
}
@ -3146,7 +3146,7 @@ sub pandora_event ($$$$$$$$$$;$$$$$$$$$) {
# Set default values for optional parameters
$source = $pa_config->{'rb_product_name'} unless defined ($source);
$source = 'monitoring_server' unless defined ($source);
$comment = '' unless defined ($comment);
$id_extra = '' unless defined ($id_extra);
$user_name = '' unless defined ($user_name);
@ -4160,11 +4160,11 @@ sub generate_status_event ($$$$$$$$) {
# Generate the event
if ($status != 0){
pandora_event ($pa_config, $description, $agent->{'id_grupo'}, $module->{'id_agente'},
$severity, 0, $module->{'id_agente_modulo'}, $event_type, 0, $dbh, $pa_config->{'rb_product_name'}, '', '', '', '', $module->{'critical_instructions'}, $module->{'warning_instructions'}, $module->{'unknown_instructions'});
$severity, 0, $module->{'id_agente_modulo'}, $event_type, 0, $dbh, 'monitoring_server', '', '', '', '', $module->{'critical_instructions'}, $module->{'warning_instructions'}, $module->{'unknown_instructions'});
} else {
# Self validate this event if has "normal" status
pandora_event ($pa_config, $description, $agent->{'id_grupo'}, $module->{'id_agente'},
$severity, 0, $module->{'id_agente_modulo'}, $event_type, 1, $dbh, $pa_config->{'rb_product_name'}, '', '', '', '', $module->{'critical_instructions'}, $module->{'warning_instructions'}, $module->{'unknown_instructions'});
$severity, 0, $module->{'id_agente_modulo'}, $event_type, 1, $dbh, 'monitoring_server', '', '', '', '', $module->{'critical_instructions'}, $module->{'warning_instructions'}, $module->{'unknown_instructions'});
}
}
@ -4919,7 +4919,7 @@ sub pandora_module_unknown ($$) {
# Are unknown events enabled?
if ($pa_config->{'unknown_events'} == 1) {
pandora_event ($pa_config, $description, $agent->{'id_grupo'}, $module->{'id_agente'},
$severity, 0, $module->{'id_agente_modulo'}, $event_type, 0, $dbh, $pa_config->{'rb_product_name'}, '', '', '', '', $module->{'critical_instructions'}, $module->{'warning_instructions'}, $module->{'unknown_instructions'});
$severity, 0, $module->{'id_agente_modulo'}, $event_type, 0, $dbh, 'monitoring_server', '', '', '', '', $module->{'critical_instructions'}, $module->{'warning_instructions'}, $module->{'unknown_instructions'});
}
}
# Regular module
@ -4985,7 +4985,7 @@ sub pandora_module_unknown ($$) {
$description = subst_alert_macros ($description, \%macros, $pa_config, $dbh, $agent, $module);
pandora_event ($pa_config, $description, $agent->{'id_grupo'}, $module->{'id_agente'},
$severity, 0, $module->{'id_agente_modulo'}, $event_type, 0, $dbh, $pa_config->{'rb_product_name'}, '', '', '', '', $module->{'critical_instructions'}, $module->{'warning_instructions'}, $module->{'unknown_instructions'});
$severity, 0, $module->{'id_agente_modulo'}, $event_type, 0, $dbh, 'monitoring_server', '', '', '', '', $module->{'critical_instructions'}, $module->{'warning_instructions'}, $module->{'unknown_instructions'});
}
}
}

View File

@ -31,7 +31,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.723";
my $pandora_build = "180528";
my $pandora_build = "180601";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -676,12 +676,6 @@ sub enterprise_load ($) {
# Ops
if ($@) {
# Remove the rebranding if open version
if ($^O ne 'MSWin32') {
`unset PANDORA_RB_PRODUCT_NAME`;
`unset PANDORA_RB_COPYRIGHT_NOTICE`;
}
# Enterprise.pm not found.
return 0 if ($@ =~ m/PandoraFMS\/Enterprise\.pm.*\@INC/);

View File

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

View File

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

View File

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

View File

@ -30,10 +30,11 @@ use Time::HiRes qw(usleep);
use lib '/usr/lib/perl5';
use PandoraFMS::Tools;
use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.723 PS180528";
my $version = "7.0NG.723 PS180601";
# Pandora server configuration
my %conf;
@ -552,7 +553,7 @@ sub pandora_compactdb ($$) {
########################################################################
# Check command line parameters.
########################################################################
sub pandora_init ($) {
sub pandora_init_pdb ($) {
my $conf = shift;
log_message ('', "\nDB Tool $version Copyright (c) 2004-2018 " . pandora_get_initial_copyright_notice() . "\n");
@ -594,7 +595,7 @@ sub pandora_init ($) {
########################################################################
# Read external configuration file.
########################################################################
sub pandora_load_config ($) {
sub pandora_load_config_pdb ($) {
my $conf = shift;
# Read conf file
@ -1024,10 +1025,10 @@ sub pandoradb_main ($$$) {
}
# Init
pandora_init(\%conf);
pandora_init_pdb(\%conf);
# Read config file
pandora_load_config (\%conf);
pandora_load_config_pdb (\%conf);
# Load enterprise module
if (enterprise_load (\%conf) == 0) {

View File

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

View File

@ -34,6 +34,20 @@ fi
export PANDORA_HOME="/etc/pandora/pandora_server.conf"
export PANDORA_DAEMON=/usr/bin/pandora_server
# Environment variables
if [ -f /etc/pandora/pandora_server.env ]; then
source /etc/pandora/pandora_server.env
fi
if [[ -z ${PANDORA_RB_PRODUCT_NAME} ]]; then
PANDORA_RB_PRODUCT_NAME="Pandora FMS"
fi
if [[ -z ${PANDORA_RB_COPYRIGHT_NOTICE} ]]; then
PANDORA_RB_COPYRIGHT_NOTICE="Artica ST"
fi
export PANDORA_RB_PRODUCT_NAME=$PANDORA_RB_PRODUCT_NAME
export PANDORA_RB_COPYRIGHT_NOTICE=$PANDORA_RB_COPYRIGHT_NOTICE
# Uses a wait limit before sending a KILL signal, before trying to stop
# Pandora FMS server nicely. Some big systems need some time before close
# all pending tasks / threads.
@ -73,7 +87,7 @@ function pidof_pandora () {
if [ ! -f $PANDORA_DAEMON ]
then
echo "Pandora FMS Server not found, please check setup and read manual"
echo "$PANDORA_RB_PRODUCT_NAME Server not found, please check setup and read manual"
rc_failed 5 # program is not installed
rc_exit
fi
@ -83,7 +97,7 @@ case "$1" in
PANDORA_PID=`pidof_pandora`
if [ ! -z "$PANDORA_PID" ]
then
echo "Pandora FMS Server is currently running on this machine with PID ($PANDORA_PID)."
echo "$PANDORA_RB_PRODUCT_NAME Server is currently running on this machine with PID ($PANDORA_PID)."
rc_exit # running start on a service already running
fi
@ -94,11 +108,11 @@ case "$1" in
if [ ! -z "$PANDORA_PID" ]
then
echo "Pandora Server is now running with PID $PANDORA_PID"
echo "$PANDORA_RB_PRODUCT_NAME Server is now running with PID $PANDORA_PID"
rc_status -v
else
echo "Cannot start Pandora FMS Server. Aborted."
echo "Check Pandora FMS log files at '/var/log/pandora/pandora_server.error & pandora_server.log'"
echo "Cannot start $PANDORA_RB_PRODUCT_NAME Server. Aborted."
echo "Check $PANDORA_RB_PRODUCT_NAME log files at '/var/log/pandora/pandora_server.error & pandora_server.log'"
rc_failed 7 # program is not running
fi
;;
@ -107,10 +121,10 @@ case "$1" in
PANDORA_PID=`pidof_pandora`
if [ -z "$PANDORA_PID" ]
then
echo "Pandora FMS Server is not running, cannot stop it."
echo "$PANDORA_RB_PRODUCT_NAME Server is not running, cannot stop it."
rc_exit # running stop on a service already stopped or not running
else
echo "Stopping Pandora FMS Server"
echo "Stopping $PANDORA_RB_PRODUCT_NAME Server"
kill $PANDORA_PID > /dev/null 2>&1
COUNTER=0
@ -138,10 +152,10 @@ case "$1" in
PANDORA_PID=`pidof_pandora`
if [ -z "$PANDORA_PID" ]
then
echo "Pandora FMS Server is not running."
echo "$PANDORA_RB_PRODUCT_NAME Server is not running."
rc_failed 7 # program is not running
else
echo "Pandora FMS Server is running with PID $PANDORA_PID."
echo "$PANDORA_RB_PRODUCT_NAME Server is running with PID $PANDORA_PID."
rc_status
fi
;;