Merge branch 'develop' of https://github.com/pandorafms/pandorafms into develop
This commit is contained in:
commit
87dd7bfe88
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 5.1SP1-141006
|
||||
Version: 5.1SP1-141007
|
||||
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="5.1SP1-141006"
|
||||
pandora_version="5.1SP1-141007"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -41,7 +41,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '5.1SP1';
|
||||
use constant AGENT_BUILD => '141006';
|
||||
use constant AGENT_BUILD => '141007';
|
||||
|
||||
# Commands to retrieve total memory information in kB
|
||||
use constant TOTALMEMORY_CMDS => {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 5.1SP1
|
||||
%define release 141006
|
||||
%define release 141007
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 5.1SP1
|
||||
%define release 141006
|
||||
%define release 141007
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{141006}
|
||||
{141007}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("5.1SP1(Build 141006)")
|
||||
#define PANDORA_VERSION ("5.1SP1(Build 141007)")
|
||||
|
||||
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", "(5.1SP1(Build 141006))"
|
||||
VALUE "ProductVersion", "(5.1SP1(Build 141007))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 5.1SP1-141006
|
||||
Version: 5.1SP1-141007
|
||||
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="5.1SP1-141006"
|
||||
pandora_version="5.1SP1-141007"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC141006';
|
||||
$build_version = 'PC141007';
|
||||
$pandora_version = 'v5.1SP1';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -6584,7 +6584,7 @@ function api_set_add_event_comment($id, $thrash2, $other, $thrash3) {
|
|||
return;
|
||||
}
|
||||
else if ($other['type'] == 'array') {
|
||||
$comment = $other['data'][0];
|
||||
$comment = io_safe_input($other['data'][0]);
|
||||
$meta = $other['data'][1];
|
||||
$history = $other['data'][2];
|
||||
|
||||
|
|
|
@ -2270,7 +2270,7 @@ function events_page_comments ($event) {
|
|||
$table_comments->class = "alternate rounded_cells";
|
||||
|
||||
$event_comments = io_safe_output($event["user_comment"]);
|
||||
$event_comments = str_replace("\n", "<br>", $event_comments);
|
||||
$event_comments = str_replace( array("\n", '
'), "<br>", $event_comments);
|
||||
|
||||
// If comments are not stored in json, the format is old
|
||||
$event_comments_array = json_decode($event_comments, true);
|
||||
|
|
|
@ -349,8 +349,25 @@ function modules_delete_agent_module ($id_agent_module) {
|
|||
* @return True if the module was updated. False if not.
|
||||
*/
|
||||
function modules_update_agent_module ($id, $values, $onlyNoDeletePending = false, $tags = false) {
|
||||
|
||||
$update_tags = false;
|
||||
$return_tag = true;
|
||||
if ($tags !== false) {
|
||||
$update_tags = true;
|
||||
$return_tag = tags_update_module_tag ($id, $tags);
|
||||
}
|
||||
|
||||
if ($return_tag === false) {
|
||||
return ERR_DB;
|
||||
}
|
||||
|
||||
if (!is_array ($values) || empty ($values)) {
|
||||
return ERR_GENERIC;
|
||||
if ($update_tags) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return ERR_GENERIC;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset ($values['nombre'])) {
|
||||
|
@ -368,14 +385,7 @@ function modules_update_agent_module ($id, $values, $onlyNoDeletePending = false
|
|||
}
|
||||
}
|
||||
|
||||
$return_tag = true;
|
||||
if ($tags !== false) {
|
||||
$return_tag = tags_update_module_tag ($id, $tags);
|
||||
}
|
||||
|
||||
if ($return_tag === false) {
|
||||
return ERR_DB;
|
||||
}
|
||||
|
||||
$where = array();
|
||||
$where['id_agente_modulo'] = $id;
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '5.1SP1';
|
||||
$build = '141006';
|
||||
$build = '141007';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
|
|
@ -392,7 +392,10 @@ if ($result === false) {
|
|||
|
||||
foreach ($result as $profile) {
|
||||
$data[0] = '<b>'.profile_get_name ($profile["id_perfil"]).'</b>';
|
||||
$data[1] = ui_print_group_icon ($profile["id_grupo"], true).' <a href="index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id='.$profile['id_grupo'].'"></a>';
|
||||
$data[1] = ui_print_group_icon ($profile["id_grupo"], true) .
|
||||
'<a href="index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id=' . $profile['id_grupo'] . '">' .
|
||||
' ' . ui_print_truncate_text(groups_get_name ($profile['id_grupo'], True), GENERIC_SIZE_TEXT) .
|
||||
'</a>';
|
||||
|
||||
$tags_ids = explode(',',$profile["tags"]);
|
||||
$tags = tags_get_tags($tags_ids);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 5.1SP1
|
||||
%define release 141006
|
||||
%define release 141007
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 5.1SP1
|
||||
%define release 141006
|
||||
%define release 141007
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -38,7 +38,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||
('graph_res','5'),
|
||||
('step_compact','1'),
|
||||
('db_scheme_version','5.1SP1'),
|
||||
('db_scheme_build','PD141006'),
|
||||
('db_scheme_build','PD141007'),
|
||||
('show_unknown','0'),
|
||||
('show_lastalerts','1'),
|
||||
('style','pandora'),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 5.1SP1-141006
|
||||
Version: 5.1SP1-141007
|
||||
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="5.1SP1-141006"
|
||||
pandora_version="5.1SP1-141007"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -43,7 +43,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "5.1SP1";
|
||||
my $pandora_build = "141006";
|
||||
my $pandora_build = "141007";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 5.1SP1
|
||||
%define release 141006
|
||||
%define release 141007
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 5.1SP1
|
||||
%define release 141006
|
||||
%define release 141007
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -33,7 +33,7 @@ use PandoraFMS::Tools;
|
|||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "5.1SP1 PS141006";
|
||||
my $version = "5.1SP1 PS141007";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
@ -82,6 +82,9 @@ sub pandora_purgedb ($$) {
|
|||
|
||||
# Delete old numeric data
|
||||
pandora_delete_old_module_data ($dbh, 'tagente_datos', $ulimit_access_timestamp, $ulimit_timestamp);
|
||||
|
||||
# Delete old export data
|
||||
pandora_delete_old_export_data ($dbh, $ulimit_timestamp);
|
||||
|
||||
# Delete extended session data
|
||||
if (enterprise_load (\%conf) != 0) {
|
||||
|
@ -437,6 +440,7 @@ sub pandora_compactdb ($$) {
|
|||
my $id_module = $data->{'id_agente_modulo'};
|
||||
if (! defined($module_proc_hash{$id_module})) {
|
||||
my $module_type = get_db_value ($dbh, 'SELECT id_tipo_modulo FROM tagente_modulo WHERE id_agente_modulo = ?', $id_module);
|
||||
next unless defined ($module_type);
|
||||
|
||||
# Mark proc modules.
|
||||
if ($module_type == 2 || $module_type == 6 || $module_type == 9 || $module_type == 18 || $module_type == 21 || $module_type == 31) {
|
||||
|
@ -844,6 +848,18 @@ sub pandora_delete_old_module_data {
|
|||
}
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
# Delete old export data.
|
||||
##############################################################################
|
||||
sub pandora_delete_old_export_data {
|
||||
my ($dbh, $ulimit_timestamp) = @_;
|
||||
|
||||
log_message ('PURGE', "Deleting old export data from tserver_export_data\n");
|
||||
while(db_do ($dbh, "DELETE FROM tserver_export_data WHERE UNIX_TIMESTAMP(timestamp) < ? LIMIT $SMALL_OPERATION_STEP", $ulimit_timestamp) ne '0E0') {
|
||||
usleep (10000);
|
||||
};
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# Main
|
||||
###############################################################################
|
||||
|
|
|
@ -34,7 +34,7 @@ use Encode::Locale;
|
|||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "5.1SP1 PS141006";
|
||||
my $version = "5.1SP1 PS141007";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
|
Loading…
Reference in New Issue