Merge branch 'develop' into 'ent-6387-limitar-agentes-por-grupo'

# Conflicts:
#   pandora_console/extras/mr/46.sql
This commit is contained in:
José González 2021-04-13 07:52:48 +00:00
commit 4a028b2ee3
56 changed files with 348 additions and 125 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.753-210408 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-210408" 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 => '210408'; 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 210408 %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 210408 %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="210408" 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
{210408} {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 210408)") #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 210408))" 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-210408 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-210408" pandora_version="7.0NG.753-210413"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -61,7 +61,7 @@ if (isset($config['console_log_enabled']) === true
ini_set('error_log', $config['homedir'].'/log/console.log'); ini_set('error_log', $config['homedir'].'/log/console.log');
} else { } else {
ini_set('log_errors', 0); ini_set('log_errors', 0);
ini_set('error_log', 0); ini_set('error_log', null);
} }
// Sometimes input is badly retrieved from caller... // Sometimes input is badly retrieved from caller...

View File

@ -2,6 +2,9 @@ START TRANSACTION;
ALTER TABLE `tgrupo` ADD COLUMN `max_agents` int(10) NOT NULL DEFAULT 0; ALTER TABLE `tgrupo` ADD COLUMN `max_agents` int(10) NOT NULL DEFAULT 0;
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 name\",\"Event type\",\"Source\",\"Agent name or _agent_\",\"Event severity\",\"ID extra\",\"Tags separated by commas\",\"Comments\",\"\",\"\"]' WHERE `name` = "Monitoring Event"; UPDATE `talert_commands` SET `fields_descriptions` = '[\"Event name\",\"Event type\",\"Source\",\"Agent name or _agent_\",\"Event severity\",\"ID extra\",\"Tags separated by commas\",\"Comments\",\"\",\"\"]' WHERE `name` = "Monitoring Event";
COMMIT; COMMIT;

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');
@ -510,7 +504,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

@ -506,7 +506,7 @@ $id_os = 0;
$server_name = 0; $server_name = 0;
$description = ''; $description = '';
echo '<div id="form_agents" class="invisible">'; echo '<div id="form_agents" style="display:none">';
$table = new StdClass(); $table = new StdClass();
$table->width = '100%'; $table->width = '100%';

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 = 'PC210408'; $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

@ -2853,7 +2853,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

@ -1530,6 +1530,11 @@ function graphic_combined_module(
} }
$long_index = ''; $long_index = '';
if ($config['style'] === 'pandora_black') {
$background_color = '#222';
$params['legend_color'] = '#fff';
}
switch ($params_combined['stacked']) { switch ($params_combined['stacked']) {
default: default:
case CUSTOM_GRAPH_STACKED_LINE: case CUSTOM_GRAPH_STACKED_LINE:

View File

@ -905,7 +905,12 @@ function html_print_select(
); );
$output .= '"/>'; $output .= '"/>';
} else { } else {
ui_require_css_file('select2.min'); $select2 = 'select2.min';
if ($config['style'] === 'pandora_black') {
$select2 = 'select2_dark.min';
}
ui_require_css_file($select2);
ui_require_javascript_file('select2.min'); ui_require_javascript_file('select2.min');
} }
@ -5089,9 +5094,14 @@ function html_print_autocomplete_users_from_integria(
) { ) {
global $config; global $config;
$user_icon = 'images/user_green.png';
if ($config['style'] === 'pandora_black') {
$user_icon = 'images/header_user.png';
}
ob_start(); ob_start();
$attrs = ['style' => 'background: url(images/user_green.png) no-repeat right;']; $attrs = ['style' => 'background: url('.$user_icon.') no-repeat right;'];
if ($required) { if ($required) {
$attrs['required'] = 'required'; $attrs['required'] = 'required';
@ -5284,9 +5294,17 @@ function html_print_select_search(
$required=false, $required=false,
$dropdownAutoWidth=false $dropdownAutoWidth=false
) { ) {
global $config;
$output = ''; $output = '';
ui_require_css_file('select2.min'); $select2_css = 'select2.min';
if ($config['style'] === 'pandora_black') {
$select2_css = 'select2_dark.min';
}
ui_require_css_file($select2_css);
ui_require_javascript_file('select2.min'); ui_require_javascript_file('select2.min');
if ($name === null) { if ($name === null) {

View File

@ -69,8 +69,8 @@ function integriaims_tabs($active_tab, $view=false)
} }
if ($view) { if ($view) {
$create_tab['text'] = '<a href="'.$url_tabs.'configure_integriaims_incident&incident_id='.$view.'">'.html_print_image('images/pencil.png', true, ['title' => __('Edit ticket')]).'</a>'; $create_tab['text'] = '<a href="'.$url_tabs.'configure_integriaims_incident&incident_id='.$view.'">'.html_print_image('images/pencil.png', true, ['title' => __('Edit ticket'), 'class' => 'invert_filter']).'</a>';
$view_tab['text'] = '<a href="'.$url_tabs.'dashboard_detail_integriaims_incident&incident_id='.$view.'">'.html_print_image('images/operation.png', true, ['title' => __('View ticket')]).'</a>'; $view_tab['text'] = '<a href="'.$url_tabs.'dashboard_detail_integriaims_incident&incident_id='.$view.'">'.html_print_image('images/operation.png', true, ['title' => __('View ticket'), 'class' => 'invert_filter']).'</a>';
// When the current page is the View page. // When the current page is the View page.
if (!$active_tab) { if (!$active_tab) {
$view_tab['active'] = true; $view_tab['active'] = true;

View File

@ -5644,7 +5644,7 @@ function reporting_value($report, $content, $type, $pdf=false)
); );
} }
$label = (isset($content['name'])) ? $content['name'] : ''; $label = (isset($content['style']['label'])) ? $content['style']['label'] : '';
if ($label != '') { if ($label != '') {
$label = reporting_label_macro( $label = reporting_label_macro(
$items_label, $items_label,
@ -9170,6 +9170,7 @@ function reporting_simple_graph(
$return['agent_name'] = $agent_alias; $return['agent_name'] = $agent_alias;
$return['module_name'] = $module_name; $return['module_name'] = $module_name;
$return['description'] = $description; $return['description'] = $description;
$return['label'] = $label;
$return['date'] = reporting_get_date_text( $return['date'] = reporting_get_date_text(
$report, $report,
$content $content
@ -9211,7 +9212,8 @@ function reporting_simple_graph(
$params = [ $params = [
'agent_module_id' => $content['id_agent_module'], 'agent_module_id' => $content['id_agent_module'],
'period' => $content['period'], 'period' => $content['period'],
'title' => $label, 'title' => $title,
'label' => $label,
'pure' => false, 'pure' => false,
'date' => $report['datetime'], 'date' => $report['datetime'],
'only_image' => $only_image, 'only_image' => $only_image,

View File

@ -333,7 +333,7 @@ function ui_print_message($message, $class='', $attributes='', $return=false, $t
$output .= '</td> $output .= '</td>
</tr> </tr>
<tr> <tr>
<td class="black pdd_t_10px" style="color: #000">'.$text_message.'</td> <td class="black pdd_t_10px invert_filter" style="color: #000">'.$text_message.'</td>
<td></td> <td></td>
</tr> </tr>
</table>'; </table>';

View File

@ -218,6 +218,9 @@ function vbar_graph(
if (isset($options['x']['font']['color']) === false) { if (isset($options['x']['font']['color']) === false) {
$options['x']['font']['color'] = '#545454'; $options['x']['font']['color'] = '#545454';
if ($config['style'] === 'pandora_black') {
$options['x']['font']['color'] = '#fff';
}
} }
// Show ticks. // Show ticks.
@ -295,6 +298,10 @@ function vbar_graph(
if (isset($options['y']['font']['color']) === false) { if (isset($options['y']['font']['color']) === false) {
$options['y']['font']['color'] = '#545454'; $options['y']['font']['color'] = '#545454';
if ($config['style'] === 'pandora_black') {
$options['y']['font']['color'] = '#fff';
}
} }
// Show ticks. // Show ticks.
@ -692,6 +699,7 @@ function hbar_graph(
$val_max=null, $val_max=null,
$base64=false $base64=false
) { ) {
global $config;
if ($water_mark !== false) { if ($water_mark !== false) {
setup_watermark($water_mark, $water_mark_file, $water_mark_url); setup_watermark($water_mark, $water_mark_file, $water_mark_url);
} }
@ -717,6 +725,10 @@ function hbar_graph(
return generator_chart_to_pdf('hbar', $params); return generator_chart_to_pdf('hbar', $params);
} }
if ($config['style'] === 'pandora_black') {
$tick_color = '#fff';
}
return flot_hcolumn_chart( return flot_hcolumn_chart(
$chart_data, $chart_data,
$width, $width,

File diff suppressed because one or more lines are too long

View File

@ -114,7 +114,7 @@ function pandoraFlotPie(
// Reset styles // Reset styles
function resetInteractivity() { function resetInteractivity() {
legends.css("color", "#3F3F3D"); legends.css("color", "#fff");
} }
if (water_mark) { if (water_mark) {
@ -241,6 +241,10 @@ function pandoraFlotPieCustom(
} else if (background_color == "black") { } else if (background_color == "black") {
$(".legend>table").css("background-color", "black"); $(".legend>table").css("background-color", "black");
$(".legend>table").css("color", "#aaa"); $(".legend>table").css("color", "#aaa");
} else if (background_color == "black_theme") {
$(".legend>table").css("background-color", "#222");
$(".legend>div").css("background-color", "#222");
$(".legend>table").css("color", "#fff !important");
} }
$(".legend").hover(function() { $(".legend").hover(function() {
@ -258,7 +262,11 @@ function pandoraFlotPieCustom(
if (!obj) return; if (!obj) return;
var index = obj.seriesIndex; var index = obj.seriesIndex;
legends.css("color", "#3F3F3D"); if (background_color == "black_theme") {
legends.css("color", "#fff");
} else {
legends.css("color", "#3F3F3D");
}
legends.eq(index).css("color", ""); legends.eq(index).css("color", "");
} }
@ -285,6 +293,7 @@ function pandoraFlotPieCustom(
function resetInteractivity() { function resetInteractivity() {
legends.each(function() { legends.each(function() {
// fix the widths so they don't jump around // fix the widths so they don't jump around
console.log($(this));
$(this).css("color", "#3F3F3D"); $(this).css("color", "#3F3F3D");
}); });
} }
@ -349,6 +358,11 @@ function pandoraFlotHBars(
labels_total.push([i, labels[i]]); labels_total.push([i, labels[i]]);
} }
var ycolor = "rgb(84, 84, 84)";
if (background_color == "#222") {
var ycolor = "#fff";
}
var options = { var options = {
series: { series: {
bars: { bars: {
@ -377,7 +391,7 @@ function pandoraFlotHBars(
yaxis: { yaxis: {
font: { font: {
size: font_size + 2, size: font_size + 2,
color: "rgb(84, 84, 84)", color: ycolor,
family: font + "Font" family: font + "Font"
}, },
ticks: yFormatter ticks: yFormatter
@ -563,6 +577,7 @@ function showTooltip(x, y, color, contents) {
"font-size": "9px", "font-size": "9px",
"border-radius": "5px", "border-radius": "5px",
"background-color": "#fff", "background-color": "#fff",
color: "#111",
"font-family": "Verdana, Arial, Helvetica, Tahoma, sans-serif", "font-family": "Verdana, Arial, Helvetica, Tahoma, sans-serif",
opacity: 0.9 opacity: 0.9
}) })
@ -2363,7 +2378,7 @@ function pandoraFlotArea(
$("#legend_" + graph_id).height() $("#legend_" + graph_id).height()
); );
$("#timestamp_" + graph_id).css("color", legend_color); $("#timestamp_" + graph_id).css("color", "#000");
$("#timestamp_" + graph_id).css("font-size", font_size + 2 + "px"); $("#timestamp_" + graph_id).css("font-size", font_size + 2 + "px");
$("#timestamp_" + graph_id).css("font-family", font + "Font"); $("#timestamp_" + graph_id).css("font-family", font + "Font");

View File

@ -201,6 +201,11 @@ function d3_bullet_chart(
$id_bullet = uniqid(); $id_bullet = uniqid();
$font = array_shift(explode('.', array_pop(explode('/', $font)))); $font = array_shift(explode('.', array_pop(explode('/', $font))));
$invert_color = '';
if ($config['style'] === 'pandora_black') {
$invert_color = 'filter: invert(100%);';
}
$output .= '<div id="bullet_graph_'.$id_bullet.'" class="bullet" style="overflow: hidden; width: '.$width.'px; margin-left: auto; margin-right: auto;"></div> $output .= '<div id="bullet_graph_'.$id_bullet.'" class="bullet" style="overflow: hidden; width: '.$width.'px; margin-left: auto; margin-right: auto;"></div>
<style> <style>
.bullet_graph { .bullet_graph {
@ -216,14 +221,14 @@ function d3_bullet_chart(
.bullet .marker.s1 { stroke: #f3b200; stroke-width: 2px; } .bullet .marker.s1 { stroke: #f3b200; stroke-width: 2px; }
.bullet .marker.s2 { stroke: steelblue; stroke-width: 2px; } .bullet .marker.s2 { stroke: steelblue; stroke-width: 2px; }
.bullet .tick line { stroke: #666; stroke-width: .5px; } .bullet .tick line { stroke: #666; stroke-width: .5px; }
.bullet .range.s0 { fill: #ddd; } .bullet .range.s0 { fill: #fff; }
.bullet .range.s1 { fill: #ddd; } .bullet .range.s1 { fill: #ddd; }
.bullet .range.s2 { fill: #ccc; } .bullet .range.s2 { fill: #ccc; }
.bullet .measure.s0 { fill: steelblue; } .bullet .measure.s0 { fill: steelblue; }
.bullet .measure.s1 { fill: steelblue; } .bullet .measure.s1 { fill: steelblue; }
.bullet .title { font-size: 7pt; font-weight: bold; text-align:left; } .bullet .title { font-size: 7pt; font-weight: bold; text-align:left; }
.bullet .subtitle { fill: #999; font-size: 7pt;} .bullet .subtitle { fill: #999; font-size: 7pt;}
.bullet g text { font-size:'.$font_size.'pt;} .bullet g text { font-size:'.$font_size.'pt; '.$invert_color.' }
</style> </style>
<script language="javascript" type="text/javascript"> <script language="javascript" type="text/javascript">
@ -276,7 +281,7 @@ function d3_bullet_chart(
.attr("transform", "translate(-10, 15)"); .attr("transform", "translate(-10, 15)");
title.append("text") title.append("text")
.attr("class", "'.$font.'") .attr("class", "'.$font.' invert_filter")
.text(function(d) { return d.title; }); .text(function(d) { return d.title; });
title.append("text") title.append("text")
@ -293,9 +298,9 @@ function d3_bullet_chart(
else if (label >= 100000) else if (label >= 100000)
text = text.substring(0,3) + "K"; text = text.substring(0,3) + "K";
else if (label >= 1000) else if (label >= 1000)
text = text.substring(0,2) + "K"; text = text.substring(0,2) + "K";
$(this).text(text); $(this).text(text);
}); });
</script>'; </script>';
return $output; return $output;

View File

@ -145,6 +145,13 @@ function flot_area_graph(
break; break;
} }
if ($config['style'] === 'pandora_black') {
$background_style = '#222';
$params['grid_color'] = '#fff';
$params['backgroundColor'] = '#222';
$params['legend_color'] = '#fff';
}
// Parent layer. // Parent layer.
if (strpos($params['width'], '%') === false) { if (strpos($params['width'], '%') === false) {
$width = 'width: '.$params['width'].'px;'; $width = 'width: '.$params['width'].'px;';
@ -244,7 +251,7 @@ function flot_area_graph(
style='font-size:".$params['font_size']."pt; style='font-size:".$params['font_size']."pt;
display:none; position:absolute; display:none; position:absolute;
background:#fff; border: solid 1px #aaa; background:#fff; border: solid 1px #aaa;
padding: 2px; z-index:1000; padding: 2px; z-index:1000; color: #000;
'></div>"; '></div>";
$return .= "<div id='$graph_id' class='"; $return .= "<div id='$graph_id' class='";
@ -478,6 +485,10 @@ function flot_custom_pie_chart(
$legend_position $legend_position
) { ) {
global $config; global $config;
if ($config['style'] === 'pandora_black') {
$background_color = 'black_theme';
}
// TODO // TODO
// include_javascript_dependencies_flot_graph(); // include_javascript_dependencies_flot_graph();
$total_modules = $graph_values['total_modules']; $total_modules = $graph_values['total_modules'];
@ -670,6 +681,15 @@ function flot_vcolumn_chart(array $options)
// Add id to options. // Add id to options.
$options['graphId'] = $graphId; $options['graphId'] = $graphId;
// If pandora_black theme its enabled then change grid colors.
if ($config['style'] === 'pandora_black') {
$options['grid']['backgroundColor']['colors'][0] = 'transparent';
$options['grid']['backgroundColor']['colors'][1] = 'transparent';
$options['y']['color'] = 'transparent';
$options['x']['color'] = 'transparent';
}
$settings = base64_encode(json_encode($options)); $settings = base64_encode(json_encode($options));
// Javascript code. // Javascript code.

View File

@ -53,6 +53,7 @@ div.integria_details_description textarea {
width: 100%; width: 100%;
background-color: #fbfbfb; background-color: #fbfbfb;
resize: vertical; resize: vertical;
color: #000;
} }
.integriaims_details_box { .integriaims_details_box {

View File

@ -3352,6 +3352,7 @@ div#stat-win-module-graph div.nodata_container {
.menu_graph, .menu_graph,
.timestamp_graph { .timestamp_graph {
position: absolute; position: absolute;
color: #000;
} }
.menu_graph { .menu_graph {
@ -8492,3 +8493,6 @@ div.stat-win-spinner img {
.lign_right { .lign_right {
text-align: right; text-align: right;
} }
.font_11pt {
font-size: 11pt;
}

View File

@ -231,7 +231,7 @@ div#foot {
} }
/* Overwrite inline styles */ /* Overwrite inline styles */
.textodialogo td { .textodialogo td .white_important {
color: #fff !important; color: #fff !important;
} }
@ -659,13 +659,14 @@ form ul.form_flex {
padding: 10px 0px 10px 0px; padding: 10px 0px 10px 0px;
} }
.bullet { .bullet .range.s0 {
background-color: #ddd; background-color: #222;
fill: #222 !important;
border-radius: 4px; border-radius: 4px;
} }
.legendLabel { .legendLabel {
color: black; color: #fff;
} }
.incident_table { .incident_table {
@ -755,14 +756,14 @@ form ul.form_flex {
#container_servicemap_legend { #container_servicemap_legend {
position: absolute; position: absolute;
background: #fff; background: #222;
margin-top: 10px; margin-top: 10px;
right: 2px; right: 2px;
border: 1px solid #e2e2e2; border: 1px solid #e2e2e2;
border-radius: 5px; border-radius: 5px;
padding: 10px; padding: 10px;
opacity: 0.9; opacity: 0.9;
color: #111; color: #fff;
} }
.notification-subtitle_black { .notification-subtitle_black {
@ -856,3 +857,38 @@ div#dashboard-controls {
border-radius: 15px; border-radius: 15px;
padding: 10px; padding: 10px;
} }
.serviceap_show_bg {
overflow: hidden;
border: 1px solid #e2e2e2;
background-color: #111;
}
.title_service_unstack,
.title,
.title_service_stack {
font-size: 11px;
text-align: center;
text-anchor: middle;
fill: #fff;
font-family: Verdana;
}
.tickLabel {
color: #fff;
}
.integria_details_shadow {
background-color: #222;
border-bottom: 1px solid #e2e2e2;
border-left: 1px solid #e2e2e2;
border-top-left-radius: 5px;
border-right: 1px solid #e2e2e2;
border-top-right-radius: 5px;
}
div.integria_details_description textarea {
width: 100%;
background-color: #111;
color: #fff;
resize: vertical;
}

View File

@ -148,7 +148,7 @@ if (isset($config['console_log_enabled']) && $config['console_log_enabled'] == 1
ini_set('error_log', $config['homedir'].'/log/console.log'); ini_set('error_log', $config['homedir'].'/log/console.log');
} else { } else {
ini_set('log_errors', 0); ini_set('log_errors', 0);
ini_set('error_log', 0); ini_set('error_log', null);
} }
if (isset($config['error'])) { if (isset($config['error'])) {

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 = '210408'; $build = '210413';
$banner = "v$version Build $build"; $banner = "v$version Build $build";
error_reporting(0); error_reporting(0);

View File

@ -54,7 +54,7 @@ foreach ($logs as $log) {
ob_start(); ob_start();
if (!empty($table->data)) { if (!empty($table->data)) {
echo '<div id="log_sources_status w100p">'; echo '<div id="log_sources_status" class="w100p">';
html_print_table($table); html_print_table($table);
echo '</div>'; echo '</div>';
} else { } else {

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

@ -205,7 +205,12 @@ $table->data[0][0] .= '<div class="label_select_parent">'.html_print_input_text(
'w100p' 'w100p'
).'</div>'; ).'</div>';
$table->data[0][2] = html_print_image('images/integria_logo_gray.png', true, ['style' => 'width: 70%; float: right;'], false); $integria_logo = 'images/integria_logo_gray.png';
if ($config['style'] === 'pandora_black') {
$integria_logo = 'images/integria_logo.png';
}
$table->data[0][2] = html_print_image($integria_logo, true, ['style' => 'width: 70%; float: right;'], false);
$table->data[1][0] = '<div class="label_select"><p class="input_label">'.__('Type').': </p>'; $table->data[1][0] = '<div class="label_select"><p class="input_label">'.__('Type').': </p>';
$table->data[1][0] .= '<div class="label_select_parent">'.html_print_select( $table->data[1][0] .= '<div class="label_select_parent">'.html_print_select(

View File

@ -376,11 +376,11 @@ $details_box .= '
<div class="integriaims_details_titles">'.__('Priority').'</div> <div class="integriaims_details_titles">'.__('Priority').'</div>
<div class="integriaims_details_titles">'.__('Type').'</div>'; <div class="integriaims_details_titles">'.__('Type').'</div>';
$details_box .= ' $details_box .= '
<div>'.html_print_image('images/heart.png', true).'</div> <div>'.html_print_image('images/heart.png', true, ['class' => 'invert_filter']).'</div>
<div>'.html_print_image('images/builder.png', true).'</div> <div>'.html_print_image('images/builder.png', true, ['class' => 'invert_filter']).'</div>
<div>'.html_print_image('images/user_green.png', true).'</div> <div>'.html_print_image('images/user_green.png', true, ['class' => 'invert_filter']).'</div>
<div>'.ui_print_integria_incident_priority($priority, $priority_text).'</div> <div>'.ui_print_integria_incident_priority($priority, $priority_text).'</div>
<div>'.html_print_image('images/incidents.png', true).'</div>'; <div>'.html_print_image('images/incidents.png', true, ['class' => 'invert_filter']).'</div>';
$details_box .= ' $details_box .= '
<div>'.$status_text.'</div> <div>'.$status_text.'</div>
<div>'.$resolution_text.'</div> <div>'.$resolution_text.'</div>
@ -410,9 +410,9 @@ $people_box .= '</div>';
// Dates box. // Dates box.
$dates_box = '<div class="integriaims_details_box integriaims_details_box_three">'; $dates_box = '<div class="integriaims_details_box integriaims_details_box_three">';
$dates_box .= ' $dates_box .= '
<div>'.html_print_image('images/tick.png', true).'</div> <div>'.html_print_image('images/tick.png', true, ['class' => 'invert_filter']).'</div>
<div>'.html_print_image('images/update.png', true, ['width' => '21']).'</div> <div>'.html_print_image('images/update.png', true, ['width' => '21', 'class' => 'invert_filter']).'</div>
<div>'.html_print_image('images/mul.png', true).'</div>'; <div>'.html_print_image('images/mul.png', true, ['class' => 'invert_filter']).'</div>';
$dates_box .= ' $dates_box .= '
<div class="integriaims_details_titles">'.__('Created at').':</div> <div class="integriaims_details_titles">'.__('Created at').':</div>
<div class="integriaims_details_titles">'.__('Updated at').':</div> <div class="integriaims_details_titles">'.__('Updated at').':</div>

View File

@ -59,6 +59,7 @@ if (!$users || !$searchUsers) {
[ [
'alt' => __('User'), 'alt' => __('User'),
'title' => __('Standard User'), 'title' => __('Standard User'),
'class' => 'invert_filter',
] ]
).'&nbsp;'; ).'&nbsp;';
} }

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 210408 %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 210408 %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 210408 %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

@ -1512,7 +1512,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,
@ -3115,7 +3115,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-210408 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-210408" 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 = "210408"; 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 = "210408"; 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 210408 %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 210408 %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="210408" 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 PS210408"; 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 PS210408"; my $version = "7.0NG.753 PS210413";
# save program name for logging # save program name for logging
my $progname = basename($0); my $progname = basename($0);