Merge remote-tracking branch 'origin/develop' into ent-7074-Command-Center

This commit is contained in:
Daniel Barbero Martin 2021-04-13 08:34:05 +02:00
commit aa31ed8f58
38 changed files with 175 additions and 88 deletions

View File

@ -46,4 +46,3 @@ Pandora FMS is a monitoring tool that not only measures if a parameter is right
<br /> <br />
<br /> <br />
![screenshot 4](http://wolf359.artica.es/public_images/pandora6.0sp3-sample-visual-console.png) ![screenshot 4](http://wolf359.artica.es/public_images/pandora6.0sp3-sample-visual-console.png)

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.753-210412 Version: 7.0NG.753-210413
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.753-210412" pandora_version="7.0NG.753-210413"
echo "Test if you has the tools for to make the packages." echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.753" PI_VERSION="7.0NG.753"
PI_BUILD="210412" PI_BUILD="210413"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0
@ -166,7 +166,7 @@ uninstall () {
rm -f $DESTDIR/etc/newsyslog.d/pandora_agent.conf rm -f $DESTDIR/etc/newsyslog.d/pandora_agent.conf
# Remove systemd service if exists # Remove systemd service if exists
if [ `systemctl --v 2> /dev/null | grep systemd | wc -l` != 0 ] if [ `command -v systemctl` ]
then then
PANDORA_AGENT_SERVICE="/etc/systemd/system/pandora_agent_daemon.service" PANDORA_AGENT_SERVICE="/etc/systemd/system/pandora_agent_daemon.service"
rm -f $PANDORA_AGENT_SERVICE rm -f $PANDORA_AGENT_SERVICE
@ -482,7 +482,7 @@ install () {
fi fi
# Create systemd service # Create systemd service
if [ `systemctl --v 2> /dev/null | grep systemd | wc -l` != 0 ] if [ `command -v systemctl` ]
then then
echo "Creating systemd service for pandora_agent_daemon" echo "Creating systemd service for pandora_agent_daemon"

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{210412} {210413}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils; using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1 #define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.753(Build 210412)") #define PANDORA_VERSION ("7.0NG.753(Build 210413)")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST" VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent" VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.753(Build 210412))" VALUE "ProductVersion", "(7.0NG.753(Build 210413))"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
END END
END END

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.753-210412 Version: 7.0NG.753-210413
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.753-210412" pandora_version="7.0NG.753-210413"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -1,6 +1,8 @@
START TRANSACTION; START TRANSACTION;
ALTER TABLE `tagent_custom_fields` MODIFY COLUMN `combo_values` TEXT NOT NULL DEFAULT ''; ALTER TABLE `tagent_custom_fields` MODIFY COLUMN `combo_values` TEXT NOT NULL DEFAULT '';
ALTER TABLE `treport_content` MODIFY `external_source` MEDIUMTEXT;
ALTER TABLE `treport_content_template` MODIFY `external_source` MEDIUMTEXT;
UPDATE `talert_commands` SET `fields_descriptions` = '[\"Event&#x20;name\",\"Event&#x20;type\",\"Source\",\"Agent&#x20;name&#x20;or&#x20;_agent_\",\"Event&#x20;severity\",\"ID&#x20;extra\",\"Tags&#x20;separated&#x20;by&#x20;commas\",\"Comments\",\"\",\"\"]' WHERE `name` = "Monitoring&#x20;Event"; UPDATE `talert_commands` SET `fields_descriptions` = '[\"Event&#x20;name\",\"Event&#x20;type\",\"Source\",\"Agent&#x20;name&#x20;or&#x20;_agent_\",\"Event&#x20;severity\",\"ID&#x20;extra\",\"Tags&#x20;separated&#x20;by&#x20;commas\",\"Comments\",\"\",\"\"]' WHERE `name` = "Monitoring&#x20;Event";

View File

@ -811,7 +811,7 @@ CREATE TABLE IF NOT EXISTS `treport_content_template` (
`description` mediumtext, `description` mediumtext,
`text_agent` text, `text_agent` text,
`text` TEXT, `text` TEXT,
`external_source` Text, `external_source` mediumtext,
`treport_custom_sql_id` INTEGER UNSIGNED default 0, `treport_custom_sql_id` INTEGER UNSIGNED default 0,
`header_definition` TinyText default NULL, `header_definition` TinyText default NULL,
`column_separator` TinyText default NULL, `column_separator` TinyText default NULL,
@ -1741,6 +1741,7 @@ ALTER TABLE `treport_content` ADD COLUMN `landscape` tinyint(1) UNSIGNED NOT NUL
ALTER TABLE `treport_content` ADD COLUMN `pagebreak` tinyint(1) UNSIGNED NOT NULL default 0; ALTER TABLE `treport_content` ADD COLUMN `pagebreak` tinyint(1) UNSIGNED NOT NULL default 0;
ALTER TABLE `treport_content` ADD COLUMN `compare_work_time` tinyint(1) UNSIGNED NOT NULL default 0; ALTER TABLE `treport_content` ADD COLUMN `compare_work_time` tinyint(1) UNSIGNED NOT NULL default 0;
ALTER TABLE `treport_content` ADD COLUMN `graph_render` tinyint(1) UNSIGNED NOT NULL default 0; ALTER TABLE `treport_content` ADD COLUMN `graph_render` tinyint(1) UNSIGNED NOT NULL default 0;
ALTER TABLE `treport_content` MODIFY `external_source` MEDIUMTEXT;
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `tmodule_relationship` -- Table `tmodule_relationship`

View File

@ -46,7 +46,7 @@ if (is_metaconsole() === true) {
} }
if (is_ajax() === true) { if (is_ajax() === true) {
if (check_acl($config['id_user'], 0, 'AR') === false) { if ((bool) check_acl($config['id_user'], 0, 'AR') === false) {
db_pandora_audit('ACL Violation', 'Trying to access Group Management'); db_pandora_audit('ACL Violation', 'Trying to access Group Management');
include 'general/noaccess.php'; include 'general/noaccess.php';
return; return;
@ -72,7 +72,7 @@ if (is_ajax() === true) {
return; return;
} }
if (check_acl($config['id_user'], $id_group, 'AR') === false) { if ((bool) check_acl($config['id_user'], $id_group, 'AR') === false) {
db_pandora_audit( db_pandora_audit(
'ACL Violation', 'ACL Violation',
'Trying to access Alert Management' 'Trying to access Alert Management'
@ -114,7 +114,7 @@ if (is_ajax() === true) {
); );
$force_serialized = (bool) get_parameter('force_serialized', false); $force_serialized = (bool) get_parameter('force_serialized', false);
if (check_acl($config['id_user'], $id_group, 'AR') === false) { if ((bool) check_acl($config['id_user'], $id_group, 'AR') === false) {
db_pandora_audit( db_pandora_audit(
'ACL Violation', 'ACL Violation',
'Trying to access Alert Management' 'Trying to access Alert Management'
@ -265,15 +265,9 @@ if (is_ajax() === true) {
$tab = (string) get_parameter('tab', 'groups'); $tab = (string) get_parameter('tab', 'groups');
if ($tab != 'credbox' && ! check_acl( if ($tab !== 'credbox'
$config['id_user'], && (bool) check_acl($config['id_user'], 0, 'PM') === false
0, && (bool) check_acl($config['id_user'], 0, 'AW') === false
'PM'
) && ! check_acl(
$config['id_user'],
0,
'AW'
)
) { ) {
db_pandora_audit( db_pandora_audit(
'ACL Violation', 'ACL Violation',
@ -281,9 +275,9 @@ if ($tab != 'credbox' && ! check_acl(
); );
include 'general/noaccess.php'; include 'general/noaccess.php';
return; return;
} else if ($tab == 'credbox' } else if ($tab === 'credbox'
&& check_acl($config['id_user'], 0, 'UM') === false && (bool) check_acl($config['id_user'], 0, 'UM') === false
&& check_acl($config['id_user'], 0, 'PM') === false && (bool) check_acl($config['id_user'], 0, 'PM') === false
) { ) {
db_pandora_audit( db_pandora_audit(
'ACL Violation', 'ACL Violation',
@ -382,7 +376,7 @@ $delete_group = (bool) get_parameter('delete_group');
$pure = get_parameter('pure', 0); $pure = get_parameter('pure', 0);
// Create group. // Create group.
if (($create_group) && (check_acl($config['id_user'], 0, 'PM') === true)) { if (($create_group) && ((bool) check_acl($config['id_user'], 0, 'PM') === true)) {
$name = (string) get_parameter('name'); $name = (string) get_parameter('name');
$icon = (string) get_parameter('icon'); $icon = (string) get_parameter('icon');
$id_parent = (int) get_parameter('id_parent'); $id_parent = (int) get_parameter('id_parent');
@ -506,7 +500,7 @@ if ($update_group) {
} }
// Delete group. // Delete group.
if (($delete_group) && (check_acl($config['id_user'], 0, 'PM') === true)) { if (($delete_group) && ((bool) check_acl($config['id_user'], 0, 'PM') === true)) {
$id_group = (int) get_parameter('id_group'); $id_group = (int) get_parameter('id_group');
$usedGroup = groups_check_used($id_group); $usedGroup = groups_check_used($id_group);

View File

@ -66,6 +66,7 @@ if (is_ajax()) {
function ($counter, $server) use ($id_tag) { function ($counter, $server) use ($id_tag) {
if (metaconsole_connect($server) === NOERR) { if (metaconsole_connect($server) === NOERR) {
$counter += tags_get_local_modules_count($id_tag); $counter += tags_get_local_modules_count($id_tag);
metaconsole_restore_db();
} }
return $counter; return $counter;
@ -83,6 +84,7 @@ if (is_ajax()) {
function ($counter, $server) use ($id_tag) { function ($counter, $server) use ($id_tag) {
if (metaconsole_connect($server) === NOERR) { if (metaconsole_connect($server) === NOERR) {
$counter += tags_get_policy_modules_count($id_tag); $counter += tags_get_policy_modules_count($id_tag);
metaconsole_restore_db();
} }
return $counter; return $counter;
@ -272,6 +274,7 @@ if (!empty($result)) {
function ($counter, $server) use ($tag_id) { function ($counter, $server) use ($tag_id) {
if (metaconsole_connect($server) === NOERR) { if (metaconsole_connect($server) === NOERR) {
$counter += tags_get_modules_count($tag_id); $counter += tags_get_modules_count($tag_id);
metaconsole_restore_db();
} }
return $counter; return $counter;

View File

@ -260,21 +260,21 @@ if (isset($_GET['user_del'])) {
if (defined('METACONSOLE') && isset($_GET['delete_all'])) { if (defined('METACONSOLE') && isset($_GET['delete_all'])) {
$servers = metaconsole_get_servers(); $servers = metaconsole_get_servers();
foreach ($servers as $server) { foreach ($servers as $server) {
// Connect to the remote console // Connect to the remote console.
metaconsole_connect($server); if (metaconsole_connect($server) === NOERR) {
// Delete the user
$result = delete_user($id_user);
if ($result) {
db_pandora_audit(
'User management',
__('Deleted user %s from metaconsole', io_safe_input($id_user))
);
}
// Delete the user // Restore the db connection.
$result = delete_user($id_user); metaconsole_restore_db();
if ($result) {
db_pandora_audit(
'User management',
__('Deleted user %s from metaconsole', io_safe_input($id_user))
);
} }
// Restore the db connection
metaconsole_restore_db();
// Log to the metaconsole too // Log to the metaconsole too
if ($result) { if ($result) {
db_pandora_audit( db_pandora_audit(

View File

@ -1381,6 +1381,12 @@ if ($get_extended_event) {
'EW', 'EW',
$event['clean_tags'], $event['clean_tags'],
$childrens_ids $childrens_ids
)) || (tags_checks_event_acl(
$config['id_user'],
$event['id_grupo'],
'ER',
$event['clean_tags'],
$childrens_ids
))) )))
) { ) {
$tabs .= "<li><a href='#extended_event_responses_page' id='link_responses'>".html_print_image( $tabs .= "<li><a href='#extended_event_responses_page' id='link_responses'>".html_print_image(
@ -1444,6 +1450,12 @@ if ($get_extended_event) {
'EW', 'EW',
$event['clean_tags'], $event['clean_tags'],
$childrens_ids $childrens_ids
)) || (tags_checks_event_acl(
$config['id_user'],
$event['id_grupo'],
'ER',
$event['clean_tags'],
$childrens_ids
))) )))
) { ) {
$responses = events_page_responses($event); $responses = events_page_responses($event);
@ -1465,15 +1477,21 @@ if ($get_extended_event) {
$related = events_page_related($event, $server); $related = events_page_related($event, $server);
} }
$connected = true;
if ($meta) { if ($meta) {
metaconsole_connect($server); if (metaconsole_connect($server) === NOERR) {
$connected = true;
} else {
$connected = false;
}
} }
$custom_fields = events_page_custom_fields($event); if ($connected === true) {
$custom_fields = events_page_custom_fields($event);
$custom_data = events_page_custom_data($event);
}
$custom_data = events_page_custom_data($event); if ($meta && $connected === true) {
if ($meta) {
metaconsole_restore_db(); metaconsole_restore_db();
} }

View File

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

View File

@ -2858,7 +2858,11 @@ function can_user_access_node()
{ {
global $config; global $config;
$userinfo = get_user_info($config['id_user']); static $userinfo;
if ($userinfo === null) {
$userinfo = get_user_info($config['id_user']);
}
if (is_metaconsole()) { if (is_metaconsole()) {
return $userinfo['is_admin'] == 1 ? 1 : $userinfo['metaconsole_access_node']; return $userinfo['is_admin'] == 1 ? 1 : $userinfo['metaconsole_access_node'];

View File

@ -697,6 +697,33 @@ function cron_list_table()
$args = unserialize($task['args']); $args = unserialize($task['args']);
break; break;
case 'cron_task_generate_csv_log':
if ($manage_pandora) {
$data[0] = '<a href="'.$url;
$data[0] .= 'force_run=1&id_user_task='.$task['id'].'">';
$data[0] .= html_print_image(
'images/target.png',
true,
[
'title' => __('Force run'),
'class' => 'invert_filter',
]
);
$data[0] .= '</a>';
} else {
$data[0] = '';
}
$data[1] = $task['id_usuario'];
$data[2] = db_get_value(
'name',
'tuser_task',
'id',
$task['id_user_task']
);
$args = unserialize($task['args']);
break;
default: default:
// Ignore. // Ignore.
break; break;

View File

@ -3669,22 +3669,37 @@ function events_page_responses($event, $childrens_ids=[])
); );
} }
$table_responses->data[] = $data; if ((tags_checks_event_acl(
$config['id_user'],
$event['id_grupo'],
'EM',
$event['clean_tags'],
$childrens_ids
)) || (tags_checks_event_acl(
$config['id_user'],
$event['id_grupo'],
'EW',
$event['clean_tags'],
$childrens_ids
))
) {
$table_responses->data[] = $data;
// Comments. // Comments.
$data = []; $data = [];
$data[0] = __('Comment'); $data[0] = __('Comment');
$data[1] = ''; $data[1] = '';
$data[2] = html_print_button( $data[2] = html_print_button(
__('Add comment'), __('Add comment'),
'comment_button', 'comment_button',
false, false,
'$(\'#link_comments\').trigger(\'click\');', '$(\'#link_comments\').trigger(\'click\');',
'class="sub next w70p"', 'class="sub next w70p"',
true true
); );
$table_responses->data[] = $data; $table_responses->data[] = $data;
}
if (tags_checks_event_acl( if (tags_checks_event_acl(
$config['id_user'], $config['id_user'],

View File

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

View File

@ -211,7 +211,7 @@ if (is_ajax()) {
$agents = array_reduce( $agents = array_reduce(
$rows, $rows,
function ($carry, $item) { function ($carry, $item) {
if ($carry[$item['id_tmetaconsole_setup']] === null) { if ($carry[$item['id_tmetaconsole_setup']] === null) {
$carry[$item['id_tmetaconsole_setup']] = []; $carry[$item['id_tmetaconsole_setup']] = [];
} }

View File

@ -1608,8 +1608,20 @@ try {
} }
// Event responses. // Event responses.
$sql_event_resp = "SELECT id, name FROM tevent_response WHERE type LIKE 'command'"; if (is_user_admin($config['id_user'])) {
$event_responses = db_get_all_rows_sql($sql_event_resp); $sql_event_resp = "SELECT id, name FROM tevent_response WHERE type LIKE 'command'";
$event_responses = db_get_all_rows_sql($sql_event_resp);
} else {
$id_groups = array_keys(users_get_groups(false, 'EW'));
$event_responses = db_get_all_rows_filter(
'tevent_response',
[
'id_group' => $id_groups,
'type' => 'command',
]
);
}
if ($config['event_replication'] != 1) { if ($config['event_replication'] != 1) {
if ($event_w && !$readonly) { if ($event_w && !$readonly) {

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.753 %define version 7.0NG.753
%define release 210412 %define release 210413
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.753 %define version 7.0NG.753
%define release 210412 %define release 210413
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.753 %define version 7.0NG.753
%define release 210412 %define release 210413
%define httpd_name httpd %define httpd_name httpd
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name apache2 %define httpd_name apache2

View File

@ -1511,7 +1511,7 @@ CREATE TABLE IF NOT EXISTS `treport_content` (
`description` mediumtext, `description` mediumtext,
`id_agent` int(10) unsigned NOT NULL default 0, `id_agent` int(10) unsigned NOT NULL default 0,
`text` TEXT, `text` TEXT,
`external_source` Text, `external_source` mediumtext,
`treport_custom_sql_id` INTEGER UNSIGNED default 0, `treport_custom_sql_id` INTEGER UNSIGNED default 0,
`header_definition` TinyText, `header_definition` TinyText,
`column_separator` TinyText, `column_separator` TinyText,
@ -3114,7 +3114,7 @@ CREATE TABLE IF NOT EXISTS `treport_content_template` (
`description` mediumtext, `description` mediumtext,
`text_agent` text, `text_agent` text,
`text` TEXT, `text` TEXT,
`external_source` Text, `external_source` mediumtext,
`treport_custom_sql_id` INTEGER UNSIGNED default 0, `treport_custom_sql_id` INTEGER UNSIGNED default 0,
`header_definition` TinyText default NULL, `header_definition` TinyText default NULL,
`column_separator` TinyText default NULL, `column_separator` TinyText default NULL,

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.753-210412 Version: 7.0NG.753-210413
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.753-210412" pandora_version="7.0NG.753-210413"
package_cpan=0 package_cpan=0
package_pandora=1 package_pandora=1

View File

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

View File

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

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.753 %define version 7.0NG.753
%define release 210412 %define release 210413
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}
@ -82,7 +82,9 @@ install -m 0444 man/man1/tentacle_server.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/
rm -f $RPM_BUILD_ROOT%{prefix}/pandora_server/util/PandoraFMS rm -f $RPM_BUILD_ROOT%{prefix}/pandora_server/util/PandoraFMS
rm -f $RPM_BUILD_ROOT%{prefix}/pandora_server/util/recon_scripts/PandoraFMS rm -f $RPM_BUILD_ROOT%{prefix}/pandora_server/util/recon_scripts/PandoraFMS
install -m 0644 util/pandora_server_logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/pandora_server if [ ! -f $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/pandora_server ] ; then
install -m 0644 util/pandora_server_logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/pandora_server
fi
install -m 0640 conf/pandora_server.conf.new $RPM_BUILD_ROOT%{_sysconfdir}/pandora/pandora_server.conf.new install -m 0640 conf/pandora_server.conf.new $RPM_BUILD_ROOT%{_sysconfdir}/pandora/pandora_server.conf.new
install -m 0640 conf/tentacle_server.conf.new $RPM_BUILD_ROOT%{_sysconfdir}/tentacle/tentacle_server.conf.new install -m 0640 conf/tentacle_server.conf.new $RPM_BUILD_ROOT%{_sysconfdir}/tentacle/tentacle_server.conf.new

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.753 %define version 7.0NG.753
%define release 210412 %define release 210413
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}
@ -122,7 +122,12 @@ systemctl enable pandora_server.service
echo "/usr/share/pandora_server/util/pandora_db.pl /etc/pandora/pandora_server.conf" > /etc/cron.hourly/pandora_db echo "/usr/share/pandora_server/util/pandora_db.pl /etc/pandora/pandora_server.conf" > /etc/cron.hourly/pandora_db
chmod 750 /etc/cron.hourly/pandora_db chmod 750 /etc/cron.hourly/pandora_db
cp -aRf /usr/share/pandora_server/util/pandora_server_logrotate /etc/logrotate.d/pandora_server
if [ -d /etc/logrotate.d ] ; then
if [ ! -f /etc/logrotate.d/pandora_server ] ; then
cp -aRf /usr/share/pandora_server/util/pandora_server_logrotate /etc/logrotate.d/pandora_server
fi
fi
if [ ! -d /etc/pandora ] ; then if [ ! -d /etc/pandora ] ; then
mkdir -p /etc/pandora mkdir -p /etc/pandora

View File

@ -9,7 +9,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.753" PI_VERSION="7.0NG.753"
PI_BUILD="210412" PI_BUILD="210413"
MODE=$1 MODE=$1
if [ $# -gt 1 ]; then if [ $# -gt 1 ]; then
@ -354,9 +354,14 @@ install () {
if [ -d /etc/logrotate.d ] if [ -d /etc/logrotate.d ]
then then
[ -d $DESTDIR/etc/logrotate.d ] || mkdir -p $DESTDIR/etc/logrotate.d if [ -f $DESTDIR/etc/logrotate.d/pandora_server ]
echo "Creating logrotate.d entry for Pandora FMS log management" then
cp util/pandora_server_logrotate $DESTDIR/etc/logrotate.d/pandora_server echo "A logrotate.d entry for Pandora FMS log management already exists, skipping creation"
else
echo "Creating logrotate.d entry for Pandora FMS log management"
[ -d $DESTDIR/etc/logrotate.d ] || mkdir -p $DESTDIR/etc/logrotate.d
cp util/pandora_server_logrotate $DESTDIR/etc/logrotate.d/pandora_server
fi
else else
echo "Please add a log rotation schedule manually to your log rotation daemon (if any)" echo "Please add a log rotation schedule manually to your log rotation daemon (if any)"
fi fi

View File

@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB; use PandoraFMS::DB;
# version: define current version # version: define current version
my $version = "7.0NG.753 PS210412"; my $version = "7.0NG.753 PS210413";
# Pandora server configuration # Pandora server configuration
my %conf; my %conf;

View File

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