resolved conflict

This commit is contained in:
Daniel Maya 2023-07-31 09:44:46 +02:00
commit 8bbaa11ce3
36 changed files with 460 additions and 47 deletions

View File

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

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

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.772
%define release 230727
%define release 230731
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -0,0 +1,168 @@
#
#Pandora FMS Linux Agent
#
%global __os_install_post %{nil}
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.772
%define release 230725
Summary: Pandora FMS Linux agent, binary version
Name: %{name}
Version: %{version}
Release: %{release}
License: GPL
Vendor: ArticaST <http://www.artica.es>
Source0: %{source_name}-%{version}.tar.gz
URL: http://pandorafms.org
Group: System/Monitoring
Packager: Sancho Lerena <slerena@artica.es>
Prefix: /usr/share
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
BuildArch: noarch
Requires(pre): shadow-utils
Requires(post): chkconfig /bin/ln
Requires(preun): chkconfig /bin/rm /usr/sbin/userdel
Requires: coreutils unzip
Requires: util-linux procps grep
Requires: /sbin/ip /bin/awk
Requires: perl(Sys::Syslog) perl(IO::Compress::Zip)
# Required by plugins
#Requires: sh-utils sed passwd net-tools rpm
AutoReq: 0
Provides: %{name}-%{version}
%description
Pandora FMS agent for unix. Pandora FMS is an OpenSource full-featured monitoring software.
%prep
rm -rf $RPM_BUILD_ROOT
%setup -q -n unix
%build
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_agent/
mkdir -p $RPM_BUILD_ROOT/usr/bin/
mkdir -p $RPM_BUILD_ROOT/usr/sbin/
mkdir -p $RPM_BUILD_ROOT/etc/pandora/
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d/
mkdir -p $RPM_BUILD_ROOT/var/log/pandora/
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1/
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/
cp -aRf * $RPM_BUILD_ROOT%{prefix}/pandora_agent/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/tentacle_client $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_exec $RPM_BUILD_ROOT/usr/bin/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_ROOT/etc/rc.d/init.d/pandora_agent_daemon
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/pandora_agent.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_client.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/Linux/pandora_agent.conf $RPM_BUILD_ROOT/usr/share/pandora_agent/pandora_agent.conf.rpmnew
install -m 0644 pandora_agent_logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/pandora_agent
if [ -f $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent.spec ] ; then
rm $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent.spec
fi
%clean
rm -Rf $RPM_BUILD_ROOT
%pre
getent passwd pandora >/dev/null || \
/usr/sbin/useradd -d %{prefix}/pandora -s /bin/false -M -g 0 pandora
exit 0
chown pandora:root /var/log/pandora
%post
if [ ! -d /etc/pandora ] ; then
mkdir -p /etc/pandora
fi
if [ ! -f /usr/share/pandora_agent/pandora_agent.conf ] ; then
cp /usr/share/pandora_agent/pandora_agent.conf.rpmnew /usr/share/pandora_agent/pandora_agent.conf
fi
if [ ! -f /etc/pandora/pandora_agent.conf ] ; then
ln -s /usr/share/pandora_agent/pandora_agent.conf /etc/pandora/pandora_agent.conf
else
[[ ! -f /etc/pandora/pandora_agent.conf.rpmnew ]] && ln -s /usr/share/pandora_agent/pandora_agent.conf.rpmnew /etc/pandora/pandora_agent.conf.rpmnew
fi
if [ ! -e /etc/pandora/plugins ]; then
ln -s /usr/share/pandora_agent/plugins /etc/pandora
fi
if [ ! -e /etc/pandora/collections ]; then
mkdir -p /usr/share/pandora_agent/collections
ln -s /usr/share/pandora_agent/collections /etc/pandora
fi
if [ ! -e /etc/pandora/commands ]; then
mkdir -p /usr/share/pandora_agent/commands
ln -s /usr/share/pandora_agent/commands /etc/pandora
fi
mkdir -p /var/spool/pandora/data_out
if [ ! -d /var/log/pandora ]; then
mkdir -p /var/log/pandora
fi
if [ `command -v systemctl` ];
then
echo "Copying new version of pandora_agent_daemon service"
cp -f /usr/share/pandora_agent/pandora_agent_daemon.service /usr/lib/systemd/system/
chmod -x /usr/lib/systemd/system/pandora_agent_daemon.service
# Enable the services on SystemD
systemctl enable pandora_agent_daemon.service
else
/sbin/chkconfig --add pandora_agent_daemon
/sbin/chkconfig pandora_agent_daemon on
fi
if [ "$1" -gt 1 ]
then
echo "If Pandora Agent daemon was running with init.d script,"
echo "please stop it manually and start the service with systemctl"
fi
%preun
# Upgrading
if [ "$1" = "1" ]; then
exit 0
fi
/sbin/chkconfig --del pandora_agent_daemon
/etc/rc.d/init.d/pandora_agent_daemon stop >/dev/null 2>&1 || :
# Remove symbolic links
pushd /etc/pandora
for f in pandora_agent.conf plugins collections
do
[ -L $f ] && rm -f $f
done
exit 0
%files
%defattr(750,root,root)
/usr/bin/pandora_agent
%defattr(755,pandora,root)
%{prefix}/pandora_agent
%defattr(755,root,root)
/usr/bin/pandora_agent_exec
/usr/bin/tentacle_client
/etc/rc.d/init.d/pandora_agent_daemon
%defattr(644,root,root)
/usr/share/man/man1/pandora_agent.1.gz
/usr/share/man/man1/tentacle_client.1.gz
%config(noreplace) %{_sysconfdir}/logrotate.d/pandora_agent

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.772
%define release 230727
%define release 230731
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.772"
PI_BUILD="230727"
PI_BUILD="230731"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{230727}
{230731}
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.772 Build 230727")
#define PANDORA_VERSION ("7.0NG.772 Build 230731")
string pandora_path;
string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Pandora FMS"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.772(Build 230727))"
VALUE "ProductVersion", "(7.0NG.772(Build 230731))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

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

View File

@ -300,7 +300,7 @@ if (enterprise_installed() === true) {
// Parent agents.
$paramsParentAgent = [];
$paramsParentAgent['return'] = true;
$paramsParentAgent['show_helptip'] = false;
$paramsParentAgent['show_helptip'] = true;
$paramsParentAgent['input_name'] = 'id_parent';
$paramsParentAgent['print_hidden_input_idagent'] = true;
$paramsParentAgent['hidden_input_idagent_name'] = 'id_agent_parent';
@ -646,7 +646,7 @@ if (enterprise_installed() === true) {
// Parent agent.
$tableAdvancedAgent->data['parent_agent'][] = html_print_label_input_block(
__('Parent'),
__('Agent parent'),
ui_print_agent_autocomplete_input($paramsParentAgent)
);
@ -1205,15 +1205,30 @@ ui_require_jquery_file('bgiframe');
$("#cascade_protection_module").attr("disabled", 'disabled');
}
$("#checkbox-cascade_protection").change(function () {
var checked = $("#checkbox-cascade_protection").is(":checked");
if (checked) {
$("#text-id_parent").change(function(){
const parent = $("#text-id_parent").val();
if (parent != '') {
$("#checkbox-cascade_protection").prop('checked', true);
$("#cascade_protection_module").removeAttr("disabled");
}
else {
$("#cascade_protection_module").val(0);
$("#cascade_protection_module").attr("disabled", 'disabled');
$("#text-id_parent").removeAttr("required");
$("#cascade_protection_module").empty();
$("#checkbox-cascade_protection").prop('checked', false);
}
});
$("#checkbox-cascade_protection").change(function () {
var checked = $("#checkbox-cascade_protection").is(":checked"); if (checked) {
$("#cascade_protection_module").removeAttr("disabled");
$("#text-id_parent").attr("required", "required");
}
else {
$("#cascade_protection_module").val(0);
$("#cascade_protection_module").attr("disabled", 'disabled');
$("#text-id_parent").removeAttr("required");
}
});

View File

@ -559,6 +559,18 @@ if (enterprise_installed()) {
);
}
$table->data[7][1] = html_print_label_input_block(
__('Max. days before disabled agents are deleted'),
html_print_input_text(
'delete_disabled_agents',
$config['delete_disabled_agents'],
'',
false,
0,
true
)
);
$table_other = new stdClass();
$table_other->width = '100%';
$table_other->class = 'filter-table-adv';

View File

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

View File

@ -978,6 +978,10 @@ function config_update_config()
}
}
if (config_update_value('delete_disabled_agents', get_parameter('delete_disabled_agents'), true) === false) {
$error_update[] = __('Max. days before disabled agents are deleted');
}
if (config_update_value('delete_old_messages', get_parameter('delete_old_messages'), true) === false) {
$error_update[] = __('Max. days before delete old messages');
}
@ -2235,6 +2239,10 @@ function config_process_config()
}
}
if (!isset($config['delete_disabled_agents'])) {
config_update_value('delete_disabled_agents', 0);
}
if (!isset($config['delete_old_messages'])) {
config_update_value('delete_old_messages', 21);
}

View File

@ -88,8 +88,16 @@ function ui_bbcode_to_html($text, $allowed_tags=['[url]'])
*
* @return string Truncated text.
*/
function ui_print_truncate_text($text, $numChars=GENERIC_SIZE_TEXT, $showTextInAToopTip=true, $return=true, $showTextInTitle=true, $suffix='&hellip;', $style=false)
{
function ui_print_truncate_text(
$text,
$numChars=GENERIC_SIZE_TEXT,
$showTextInAToopTip=true,
$return=true,
$showTextInTitle=true,
$suffix='&hellip;',
$style=false,
$forced_title=false
) {
global $config;
if (is_string($numChars)) {
@ -190,6 +198,10 @@ function ui_print_truncate_text($text, $numChars=GENERIC_SIZE_TEXT, $showTextInA
}
}
if ($forced_title === true) {
$truncateText = '<span class="forced_title" style="'.$style.'" data-title="'.$text.'" data-use_title_for_force_title="1>'.$truncateText.'</span>';
}
if ($return == true) {
return $truncateText;
} else {
@ -7075,7 +7087,7 @@ function ui_print_breadcrums($tab_name)
*
* @return string HTML string with the last comment of the events.
*/
function ui_print_comments($comment)
function ui_print_comments($comments, $truncate_limit=255)
{
global $config;
@ -7094,7 +7106,7 @@ function ui_print_comments($comment)
if ($config['prominent_time'] == 'timestamp') {
$comentario = '<i>'.date($config['date_format'], $comment['utimestamp']).'&nbsp;('.$comment['id_user'].'):&nbsp;'.$comment['comment'].'';
if (strlen($comentario) > '200px') {
if (strlen($comentario) > '200px' && $truncate_limit >= 255) {
$comentario = '<i>'.date($config['date_format'], $comment['utimestamp']).'&nbsp;('.$comment['id_user'].'):&nbsp;'.$short_comment.'...';
}
} else {
@ -7103,13 +7115,27 @@ function ui_print_comments($comment)
$comentario = '<i>'.number_format($time_last, 0, $config['decimal_separator'], ($config['thousand_separator'] ?? ',')).'&nbsp; Hours &nbsp;('.$comment['id_user'].'):&nbsp;'.$comment['comment'].'';
if (strlen($comentario) > '200px') {
if (strlen($comentario) > '200px' && $truncate_limit >= 255) {
$comentario = '<i>'.number_format($time_last, 0, $config['decimal_separator'], ($config['thousand_separator'] ?? ',')).'&nbsp; Hours &nbsp;('.$comment['id_user'].'):&nbsp;'.$short_comment.'...';
}
}
return io_safe_output($comentario);
$comentario = io_safe_output($comentario);
if (strlen($comentario) >= $truncate_limit) {
$comentario = ui_print_truncate_text(
$comentario,
$truncate_limit,
false,
true,
false,
'&hellip;',
true,
true,
);
}
return $comentario;
}

View File

@ -893,6 +893,17 @@
var utcMillis = typeof dt === "number" ? dt : new Date(dt).getTime();
var t = tz;
var zoneList = _this.zones[t];
if (typeof zoneList === "undefined") {
zoneList = [
[-53.46666666666666, "-", "LMT", -2422051200000],
[-60, "C-Eur", "CE%sT", -776556000000],
[-60, "SovietZone", "CE%sT", -725932800000],
[-60, "Germany", "CE%sT", 347068800000],
[-60, "EU", "CE%sT", null]
];
}
// Follow links to get to an actual zone
while (typeof zoneList === "string") {
t = zoneList;

View File

@ -8,7 +8,7 @@
text-align: center;
font-size: 1.5em;
font-weight: bolder;
color: #000;
color: var(--text-color);
background: var(--secondary-color);
padding: 8px;
}
@ -47,16 +47,36 @@
font-size: 1.2em;
}
.title-self-monitoring {
border-top: 1px solid var(--border-color);
border-right: 1px solid var(--border-color);
border-left: 1px solid var(--border-color);
border-top-left-radius: 8px;
border-top-right-radius: 8px;
}
.container-self-monitoring {
display: flex;
flex-direction: row;
flex-wrap: wrap;
background-color: var(--secondary-color);
border-right: 1px solid var(--border-color);
border-bottom: 1px solid var(--border-color);
border-left: 1px solid var(--border-color);
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
padding-bottom: 15px;
}
.element-self-monitoring {
flex: 2 1 600px;
}
.element-self-monitoring > img[data-title="No data"] {
margin-top: 5%;
margin-left: 20%;
}
.footer-self-monitoring {
margin: 30px;
font-style: italic;

View File

@ -31,6 +31,8 @@
--primary-color: #14524f;
--secondary-color: #ffffff;
--input-border: #c0ccdc;
--border-color: #eee;
--text-color: #333;
}
/*

View File

@ -20,6 +20,13 @@ Description: The default Pandora FMS theme layout
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
:root {
/* --primary-color: #14524f; */
--secondary-color: #222;
--text-color: #fff;
/* --input-border: #c0ccdc; */
--border-color: #484848;
}
/* General styles */
body,

View File

@ -131,7 +131,7 @@
<div style='padding-bottom: 50px'>
<?php
$version = '7.0NG.772';
$build = '230727';
$build = '230731';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -263,8 +263,7 @@ if ($new_networkmap || $save_networkmap) {
'id_group_map' => $id_group_map,
],
);
hd('Entraaaa', true);
hd($exist, true);
if ($exist !== false) {
$result_txt = ui_print_error_message(__('Another network map already exists with this name and group.'));
} else {

View File

@ -486,19 +486,52 @@ if (is_ajax() === true) {
}
}
if (strlen($tmp->server_name) >= 10) {
$tmp->server_name = ui_print_truncate_text(
$tmp->server_name,
10,
false,
true,
false,
'&hellip;',
true,
true,
);
}
$tmp->evento = str_replace('"', '', io_safe_output($tmp->evento));
if (strlen($tmp->evento) >= 255) {
$event_text = $tmp->evento;
if (strlen($tmp->evento) >= 40) {
$tmp->evento = ui_print_truncate_text(
$tmp->evento,
255,
$tmp->evento,
40,
false,
true,
false,
'&hellip;',
true,
true,
false
);
}
if (empty($tmp->module_name) === false) {
$tmp->module_name = io_safe_output($tmp->module_name);
if (strlen($tmp->module_name) >= 20) {
$tmp->module_name = ui_print_truncate_text(
$tmp->module_name,
20,
false,
true,
false,
'&hellip;',
true,
true,
);
}
}
if (empty($tmp->comments) === false) {
$tmp->comments = ui_print_comments($tmp->comments, 20);
}
// Show last event.
@ -524,6 +557,32 @@ if (is_ajax() === true) {
}
$tmp->agent_name = io_safe_output($tmp->agent_name);
if (strlen($tmp->agent_name) >= 10) {
$tmp->agent_name = ui_print_truncate_text(
$tmp->agent_name,
10,
false,
true,
false,
'&hellip;',
true,
true,
);
}
$tmp->id_extra = io_safe_output($tmp->id_extra);
if (strlen($tmp->id_extra) >= 10) {
$tmp->id_extra = ui_print_truncate_text(
$tmp->id_extra,
10,
false,
true,
false,
'&hellip;',
true,
true,
);
}
$tmp->ack_utimestamp_raw = $tmp->ack_utimestamp;
@ -546,7 +605,7 @@ if (is_ajax() === true) {
$total_sec = strtotime($tmp->timestamp);
$total_sec += $dif;
$last_contact = date($config['date_format'], $total_sec);
$last_contact = date($confb64ig['date_format'], $total_sec);
$last_contact_value = ui_print_timestamp($last_contact, true);
} else {
$title = date($config['date_format'], strtotime($tmp->timestamp));
@ -572,8 +631,23 @@ if (is_ajax() === true) {
}
$tmp->instructions = events_get_instructions($item);
if (strlen($tmp->instructions) >= 20) {
$tmp->instructions = ui_print_truncate_text(
$tmp->instructions,
20,
false,
true,
false,
'&hellip;',
true,
true,
);
}
$aux_event = $tmp->evento;
$tmp->evento = $event_text;
$tmp->b64 = base64_encode(json_encode($tmp));
$tmp->evento = $aux_event;
$tmp->user_comment = ui_print_comments(
event_get_last_comment(
@ -827,6 +901,19 @@ if (is_ajax() === true) {
$tmp->owner_user = get_user_fullname($tmp->owner_user).' ('.$tmp->owner_user.')';
}
if (strlen($tmp->owner_user) >= 10) {
$tmp->owner_user = ui_print_truncate_text(
$tmp->owner_user,
10,
false,
true,
false,
'&hellip;',
true,
true,
);
}
// Group name.
if (empty($tmp->id_grupo) === true) {
$tmp->id_grupo = __('All');
@ -834,8 +921,33 @@ if (is_ajax() === true) {
$tmp->id_grupo = $tmp->group_name;
}
if (strlen($tmp->id_grupo) >= 10) {
$tmp->id_grupo = ui_print_truncate_text(
$tmp->id_grupo,
10,
false,
true,
false,
'&hellip;',
true,
true,
);
}
// Module name.
$tmp->id_agentmodule = $tmp->module_name;
if (strlen($tmp->id_agentmodule) >= 10) {
$tmp->id_agentmodule = ui_print_truncate_text(
$tmp->id_agentmodule,
10,
false,
true,
false,
'&hellip;',
true,
true,
);
}
// Options.
// Show more.
@ -1066,6 +1178,18 @@ if (is_ajax() === true) {
}
$tmp->custom_data = $custom_data_str;
if (strlen($tmp->custom_data) >= 20) {
$tmp->custom_data = ui_print_truncate_text(
$tmp->custom_data,
20,
false,
true,
false,
'&hellip;',
true,
true,
);
}
}
$carry[] = $tmp;
@ -2400,7 +2524,7 @@ try {
if (in_array('instructions', $fields) > 0) {
$fields[array_search('instructions', $fields)] = [
'text' => 'instructions',
'class' => 'column-instructions',
'class' => 'column-instructions mw60px',
];
}
@ -2417,6 +2541,16 @@ try {
$fields[$comment_id] = ['text' => 'user_comment'];
}
foreach ($fields as $key => $field) {
if (is_array($field) === false) {
$fields[$key] = [
'text' => $field,
'class' => 'mw100px',
];
}
}
// Always add options column.
$fields = array_merge(
$fields,
@ -2442,6 +2576,7 @@ try {
}
}
// mw60px
// Open current filter quick reference.
$active_filters_div = '<div class="filter_summary">';

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.772
%define release 230727
%define release 230731
# 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.772
%define release 230727
%define release 230731
# 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.772
%define release 230727
%define release 230731
%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.772-230727
Version: 7.0NG.772-230731
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.772-230727"
pandora_version="7.0NG.772-230731"
package_cpan=0
package_pandora=1

View File

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

View File

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

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_server
%define version 7.0NG.772
%define release 230727
%define release 230731
Summary: Pandora FMS Server
Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_server
%define version 7.0NG.772
%define release 230727
%define release 230731
Summary: Pandora FMS Server
Name: %{name}

View File

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.772"
PI_BUILD="230727"
PI_BUILD="230731"
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.772 Build 230727";
my $version = "7.0NG.772 Build 230731";
# Pandora server configuration
my %conf;
@ -135,7 +135,16 @@ sub pandora_purgedb ($$$) {
}
}
}
# Delete manually disabled agents after some period
if (defined ($conf->{'_delete_disabled_agents'}) && $conf->{'_delete_disabled_agents'} > 0) {
log_message('PURGE', "Deleting old disabled agents (More than " . $conf->{'_delete_disabled_agents'} . " days).");
db_do ($dbh, "DELETE FROM tagente
WHERE UNIX_TIMESTAMP(ultimo_contacto) + ? < UNIX_TIMESTAMP(NOW())
AND disabled = 1
AND modo != 2", $conf->{'_delete_disabled_agents'} * 8600);
}
# Delete old data
if ($conf->{'_days_purge'} > 0) {
@ -685,6 +694,7 @@ sub pandora_load_config_pdb ($) {
$conf->{'_days_delete_not_initialized'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'days_delete_not_initialized'");
$conf->{'_delete_notinit'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'delete_notinit'");
$conf->{'_inventory_purge'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'inventory_purge'");
$conf->{'_delete_disabled_agents'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'delete_disabled_agents'");
$conf->{'_delete_old_messages'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'delete_old_messages'");
$conf->{'_enterprise_installed'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'enterprise_installed'");
$conf->{'_metaconsole'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'metaconsole'");

View File

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