Merge branch 'develop' into 'ent-5187-modulos-remote_cmd-no-funcionan'

Conflicts:
   pandora_server/conf/pandora_server.conf.new
This commit is contained in:
Enrique Martin 2019-12-24 10:49:44 +01:00
commit ea86205b36
27 changed files with 59 additions and 26 deletions

View File

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

@ -55,7 +55,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.742';
use constant AGENT_BUILD => '191223';
use constant AGENT_BUILD => '191224';
# 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.742
%define release 191223
%define release 191224
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

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

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.742"
PI_BUILD="191223"
PI_BUILD="191224"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{191223}
{191224}
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.742(Build 191223)")
#define PANDORA_VERSION ("7.0NG.742(Build 191224)")
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.742(Build 191223))"
VALUE "ProductVersion", "(7.0NG.742(Build 191224))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

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

View File

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

View File

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

View File

@ -165,9 +165,13 @@ echo "<div style='width:100%'>".html_print_button(
check_users();
if (first_time) {
var date_first_message = unix_timestamp(data['log'][0]['timestamp']);
if(!date_first_message){
date_first_message = unix_timestamp(new Date()/1000);
}
print_messages({
0: {'type' : 'notification',
'text': '<?php echo __('Connection established...get last 24h messages...'); ?>'}
'text': '<?php echo __('Connection established - Retrieving messages since '); ?>'+date_first_message}
}, true);
first_time = false;
}
@ -308,4 +312,24 @@ echo "<div style='width:100%'>".html_print_button(
}
});
}
// Function to convert a timestamp to human date.
function unix_timestamp(timestamp){
var date = new Date(timestamp*1000);
const monthNames = [
"January", "February", "March", "April",
"May", "June", "July", "August",
"September", "October", "November", "December"
];
var month = monthNames[date.getMonth()];
var day = date.getDate();
var year = date.getFullYear();
var hour = date.getHours();
var min = date.getMinutes();
return month + ' ' + day + ', '+ year + ', ' + hour+ ':' + min;
}
</script>

View File

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

View File

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

View File

@ -170,6 +170,9 @@ rcmd_timeout 10
rcmd_timeout_bin /usr/bin/timeout
# Remote execution modules, ssh_launcher extra option (PANDORA FMS ENTERPRISE ONLY).
ssh_launcher /usr/share/pandora_server/util/ssh_launcher.sh
# Server keepalive (in seconds)
server_keepalive 45

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.742";
my $pandora_build = "191223";
my $pandora_build = "191224";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash
@ -361,6 +361,9 @@ sub pandora_load_config {
# Discovery SAP Artica environment
$pa_config->{"sap_artica_test"} = 0;
# Remote execution modules, option ssh_launcher
$pa_config->{"ssh_launcher"} = "/usr/bin/ssh_launcher";
# braa for enterprise snmp server
$pa_config->{"braa"} = "/usr/bin/braa";
@ -865,6 +868,9 @@ sub pandora_load_config {
elsif ($parametro =~ m/^sap_artica_test\s(.*)/i) {
$pa_config->{'sap_artica_test'}= clean_blank($1);
}
elsif ($parametro =~ m/^ssh_launcher\s(.*)/i) {
$pa_config->{'ssh_launcher'}= clean_blank($1);
}
elsif ($parametro =~ m/^nmap_timing_template\s+([0-9]*)/i) {
$pa_config->{'nmap_timing_template'}= clean_blank($1);
}

View File

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

View File

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

View File

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

View File

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

View File

@ -34,7 +34,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.742 PS191223";
my $version = "7.0NG.742 PS191224";
# 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.742 PS191223";
my $version = "7.0NG.742 PS191224";
# save program name for logging
my $progname = basename($0);