Merge remote-tracking branch 'origin/develop' into ent-8590-indicar-a-que-satelite-pertenece-un-agente

This commit is contained in:
Calvo 2022-06-17 12:38:11 +02:00
commit 0c2823f23f
77 changed files with 101820 additions and 78338 deletions

View File

@ -256,6 +256,8 @@ console_dependencies=" \
poppler-data \
php-yaml \
mod_ssl \
libzstd \
openldap-clients \
http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"
execute_cmd "yum install -y $console_dependencies" "Installing Pandora FMS Console dependencies"

View File

@ -307,6 +307,8 @@ console_dependencies=" \
poppler-data \
php-yaml \
mod_ssl \
libzstd \
openldap-clients \
http://firefly.artica.es/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \
http://firefly.artica.es/centos7/wmic-1.4-1.el7.x86_64.rpm \
http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"

View File

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

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.762"
PI_BUILD="220609"
PI_BUILD="220617"
OS_NAME=`uname -s`
FORCE=0

View File

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

View File

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

View File

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

View File

@ -1665,3 +1665,4 @@ godmode/um_client/vendor/sebastian/object-enumerator/tests
godmode/um_client/vendor/sebastian/object-enumerator
godmode/um_client/vendor/sebastian
godmode/um_client/vendor
/update_manager_client/resources/styles/pandora.css

View File

@ -1,11 +1,54 @@
START TRANSACTION;
ALTER TABLE `tservice` ADD COLUMN `enable_sunburst` tinyint(1) NOT NULL default 0;
ALTER TABLE `tuser_double_auth` DROP FOREIGN KEY `tuser_double_auth_ibfk_1`, MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL;
ALTER TABLE `tnotification_user` DROP FOREIGN KEY `tnotification_user_ibfk_2`, MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL;
ALTER TABLE `tnotification_source_user` DROP FOREIGN KEY `tnotification_source_user_ibfk_2`, MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL;
ALTER TABLE `tnotification_source_group_user` DROP FOREIGN KEY `tnotification_source_group_user_ibfk_2`, MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL;
ALTER TABLE `tvisual_console_elements_cache` DROP FOREIGN KEY `tvisual_console_elements_cache_ibfk_3`, MODIFY COLUMN `user_id` VARCHAR(255) DEFAULT NULL;
ALTER TABLE `tusuario` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL DEFAULT '0';
ALTER TABLE `tuser_double_auth` ADD CONSTRAINT `tuser_double_auth_ibfk_1` FOREIGN KEY (`id_user`) REFERENCES `tusuario` (`id_user`) ON DELETE CASCADE;
ALTER TABLE `tnotification_user` ADD CONSTRAINT `tnotification_user_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `tusuario` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `tnotification_source_user` ADD CONSTRAINT `tnotification_source_user_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `tusuario` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `tnotification_source_group_user` ADD CONSTRAINT `tnotification_source_group_user_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `tusuario` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `tvisual_console_elements_cache` ADD CONSTRAINT `tvisual_console_elements_cache_ibfk_3` FOREIGN KEY (`user_id`) REFERENCES `tusuario` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `tattachment` MODIFY COLUMN `id_usuario` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `tevento` MODIFY COLUMN `id_usuario` VARCHAR(255) NOT NULL DEFAULT '0';
ALTER TABLE `tincidencia` MODIFY COLUMN `id_usuario` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `tnota` MODIFY COLUMN `id_usuario` VARCHAR(255) NOT NULL DEFAULT '0';
ALTER TABLE `tsesion` MODIFY COLUMN `id_usuario` VARCHAR(255) NOT NULL DEFAULT '0';
ALTER TABLE `ttrap` MODIFY COLUMN `id_usuario` VARCHAR(255) DEFAULT '';
ALTER TABLE `tusuario_perfil` MODIFY COLUMN `id_usuario` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `treset_pass_history` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL;
ALTER TABLE `tmensajes` MODIFY COLUMN `id_usuario_origen` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `tgraph` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `treport` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `tplanned_downtime` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL DEFAULT '0';
ALTER TABLE `tnetwork_map` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL;
ALTER TABLE `tpassword_history` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL;
ALTER TABLE `tupdate_journal` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `tmap` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `tdashboard` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `treport_template` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `tmetaconsole_event` MODIFY COLUMN `id_usuario` VARCHAR(255) NOT NULL DEFAULT '0';
ALTER TABLE `tmetaconsole_event_history` MODIFY COLUMN `id_usuario` VARCHAR(255) NOT NULL DEFAULT '0';
ALTER TABLE `treset_pass` MODIFY COLUMN `id_user` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `tuser_task_scheduled` MODIFY COLUMN `id_usuario` VARCHAR(255) NOT NULL DEFAULT '0';
ALTER TABLE `tbackup` MODIFY COLUMN `id_user` VARCHAR(255) DEFAULT '';
ALTER TABLE `tservice` ADD COLUMN `enable_sunburst` tinyint(1) NOT NULL default 0;
ALTER TABLE `tdashboard` MODIFY `name` TEXT NOT NULL DEFAULT '';
ALTER TABLE `tagente` ADD COLUMN `satellite_server` INT NOT NULL default 0;
ALTER TABLE `tmetaconsole_agent` ADD COLUMN `satellite_server` INT NOT NULL default 0;
SET @st_oum763 = (SELECT IF(
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'tautoconfig' AND table_schema = DATABASE() AND column_name = 'disabled') > 0,
"SELECT 1",
"ALTER TABLE `tautoconfig` ADD COLUMN `disabled` TINYINT DEFAULT 0"
));
PREPARE pr_oum763 FROM @st_oum763;
EXECUTE pr_oum763;
DEALLOCATE PREPARE pr_oum763;
COMMIT;

View File

@ -26,6 +26,8 @@
* ============================================================================
*/
use function PHPSTORM_META\map;
// Begin.
if (isset($config['id_user']) === false) {
include 'general/login_page.php';
@ -57,52 +59,22 @@ if (isset($config['autohidden_menu']) === true && (bool) $config['autohidden_men
// Start of full lateral menu.
echo sprintf('<div id="menu_full" class="menu_full_%s">', $menuTypeClass);
$custom_logo = 'images/custom_logo/'.$config['custom_logo'];
$custom_logo_collapsed = 'images/custom_logo/'.$config['custom_logo_collapsed'];
if (defined('PANDORA_ENTERPRISE') === false) {
$logo_title = get_product_name().' Opensource';
$custom_logo = 'images/custom_logo/pandora_logo_head_3.png';
$custom_logo_collapsed = 'images/custom_logo/pandora_logo_green_collapsed.png';
} else {
if (file_exists(ENTERPRISE_DIR.'/'.$custom_logo) === true) {
$custom_logo = ENTERPRISE_DIR.'/'.$custom_logo;
}
$logo_title = get_product_name().' Enterprise';
}
echo '<div class="logo_green"><a href="index.php?sec=main">';
if (isset($config['custom_logo']) === true) {
echo html_print_image(
$custom_logo,
true,
[
'border' => '0',
'width' => '215',
'alt' => $logo_title,
'class' => 'logo_full',
'style' => ($menuCollapsed === true) ? 'display:none' : 'display:block',
]
);
}
if (isset($config['custom_logo_collapsed']) === true) {
echo html_print_image(
$custom_logo_collapsed,
true,
[
'border' => '0',
'width' => '60',
'alt' => $logo_title,
'class' => 'logo_icon',
'style' => ($menuCollapsed === true) ? 'display:block' : 'display:none',
]
);
}
echo '</a></div>';
// Header logo.
html_print_div(
[
'class' => 'logo_green',
'content' => html_print_anchor(
[
'href' => ui_get_full_url('index.php'),
'content' => html_print_header_logo_image(
$menuCollapsed,
true
),
],
true
),
]
);
require 'operation/menu.php';
require 'godmode/menu.php';

View File

@ -525,21 +525,21 @@ $menu_godmode['links']['sub'] = $sub;
// Update Manager
if (check_acl($config['id_user'], 0, 'PM') && $config['enable_update_manager']) {
$menu_godmode['messages']['text'] = __('Update manager');
$menu_godmode['messages']['text'] = __('Warp Update');
$menu_godmode['messages']['id'] = 'god-um_messages';
$menu_godmode['messages']['sec2'] = '';
$sub = [];
$sub['godmode/update_manager/update_manager&tab=offline']['text'] = __('Update Manager offline');
$sub['godmode/update_manager/update_manager&tab=offline']['text'] = __('Update offline');
$sub['godmode/update_manager/update_manager&tab=offline']['id'] = 'Offline';
$sub['godmode/update_manager/update_manager&tab=online']['text'] = __('Update Manager online');
$sub['godmode/update_manager/update_manager&tab=online']['text'] = __('Update online');
$sub['godmode/update_manager/update_manager&tab=online']['id'] = 'Online';
$sub['godmode/update_manager/update_manager&tab=setup']['text'] = __('Update Manager options');
$sub['godmode/update_manager/update_manager&tab=setup']['text'] = __('Options');
$sub['godmode/update_manager/update_manager&tab=setup']['id'] = 'Options';
$sub['godmode/update_manager/update_manager&tab=history']['text'] = __('Update Manager journal');
$sub['godmode/update_manager/update_manager&tab=history']['text'] = __('Warp journal');
$sub['godmode/update_manager/update_manager&tab=history']['id'] = 'Journal';
$menu_godmode['messages']['sub'] = $sub;

View File

@ -178,6 +178,7 @@ switch ($type) {
break;
}
$query_filter = [];
if (empty($query_filter) === false) {
$query_filter = json_decode($query_filter, true);
}

File diff suppressed because it is too large Load Diff

View File

@ -313,7 +313,7 @@ if (is_array($config) === true) {
if ($mode === Manager::MODE_ONLINE
&& ($puid === null || $puid === 'OFFLINE')
) {
ui_print_error_message(__('Update manager online requires registration.'));
ui_print_error_message(__('Update online requires registration.'));
}
if ($mode === Manager::MODE_OFFLINE) {

View File

@ -1,21 +1,36 @@
<?php
/**
* Update manager.
*
* @category Update Manager
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Begin.
global $config;
check_login();
// The ajax is in
// include/ajax/update_manager.php
// The ajax is in include/ajax/update_manager.php.
if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user'])) {
db_pandora_audit(
AUDIT_LOG_ACL_VIOLATION,
@ -36,59 +51,65 @@ if ($php_version_array[0] < 7) {
$tab = get_parameter('tab', 'online');
$buttons['setup'] = [
'active' => ($tab == 'setup') ? true : false,
'active' => ($tab === 'setup') ? true : false,
'text' => '<a href="'.ui_get_full_url(
'index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=setup'
).'">'.html_print_image('images/gm_setup.png', true, ['title' => __('Options'), 'class' => 'invert_filter']).'</a>',
).'">'.html_print_image('images/gm_setup.png', true, ['title' => __('Setup'), 'class' => 'invert_filter']).'</a>',
];
$buttons['history'] = [
'active' => ($tab == 'history') ? true : false,
'active' => ($tab === 'history') ? true : false,
'text' => '<a href="'.ui_get_full_url(
'index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=histo'
).'ry">'.html_print_image('images/gm_db.png', true, ['title' => __('Journal'), 'class' => 'invert_filter']).'</a>',
];
$buttons['offline'] = [
'active' => ($tab == 'offline') ? true : false,
'active' => ($tab === 'offline') ? true : false,
'text' => '<a href="'.ui_get_full_url(
'index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=offli'
).'ne">'.html_print_image('images/box.png', true, ['title' => __('Offline update manager'), 'class' => 'invert_filter']).'</a>',
).'ne">'.html_print_image('images/box.png', true, ['title' => __('Offline update'), 'class' => 'invert_filter']).'</a>',
];
$buttons['online'] = [
'active' => ($tab == 'online') ? true : false,
'active' => ($tab === 'online') ? true : false,
'text' => '<a href="'.ui_get_full_url(
'index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=onlin'
).'e">'.html_print_image('images/op_gis.png', true, ['title' => __('Online update manager'), 'class' => 'invert_filter']).'</a>',
).'e">'.html_print_image('images/op_gis.png', true, ['title' => __('Online update'), 'class' => 'invert_filter']).'</a>',
];
switch ($tab) {
case 'history':
$title = __('Update manager » Journal');
$title = __('Journal');
break;
case 'setup':
$title = __('Update manager » Setup');
$title = __('Setup');
break;
case 'offline':
$title = __('Update manager » Offline');
$title = __('Offline');
break;
case 'online':
default:
$title = __('Update manager » Online');
$title = __('Online');
break;
}
ui_print_page_header(
ui_print_standard_header(
$title,
'images/gm_setup.png',
false,
'',
true,
$buttons
$buttons,
[
[
'link' => '',
'label' => 'Warp Update',
],
]
);
switch ($tab) {
@ -107,6 +128,39 @@ switch ($tab) {
case 'online':
default:
if (is_metaconsole() === false && has_metaconsole() === true) {
$meta_puid = null;
$server_id = $config['metaconsole_node_id'];
$dbh = (object) $config['dbconnection'];
// Connect to metaconsole.
$result_code = metaconsole_load_external_db(
[
'dbhost' => $config['replication_dbhost'],
'dbuser' => $config['replication_dbuser'],
'dbpass' => io_output_password($config['replication_dbpass']),
'dbname' => $config['replication_dbname'],
]
);
if ($result_code < 0) {
break;
}
$value = db_get_value('value', 'tconfig', 'token', 'pandora_uid');
$meta_puid = $value;
// Return connection to node.
metaconsole_restore_db();
if ($meta_puid === false || $meta_puid === null) {
ui_print_warning_message(__('Please register on metaconsole first.'));
break;
}
}
$mode = \UpdateManager\UI\Manager::MODE_ONLINE;
include $config['homedir'].'/godmode/um_client/index.php';
break;

View File

@ -268,17 +268,18 @@ $table->style[$i] = 'font-weight: bolder;width:250px';
$url_update_manager = update_manager_get_url();
$table->data[$i][0] = __('URL update manager:');
$table->data[$i][0] = __('Warp Update URL');
$table->data[$i++][1] = html_print_input_text(
'url_update_manager',
$url_update_manager,
__('URL update manager'),
80,
255,
true,
true
);
$table->data[$i][0] = __('Use secured update manager:');
$table->data[$i][0] = __('Use secured Warp Update');
$table->data[$i++][1] = html_print_input(
[
'type' => 'switch',
@ -287,7 +288,7 @@ $table->data[$i++][1] = html_print_input(
]
);
$table->data[$i][0] = __('Proxy server:');
$table->data[$i][0] = __('Proxy server');
$table->data[$i++][1] = html_print_input_text(
'update_manager_proxy_server',
$update_manager_proxy_server,
@ -297,7 +298,7 @@ $table->data[$i++][1] = html_print_input_text(
true
);
$table->data[$i][0] = __('Proxy port:');
$table->data[$i][0] = __('Proxy port');
$table->data[$i++][1] = html_print_input_text(
'update_manager_proxy_port',
$update_manager_proxy_port,
@ -307,7 +308,7 @@ $table->data[$i++][1] = html_print_input_text(
true
);
$table->data[$i][0] = __('Proxy user:');
$table->data[$i][0] = __('Proxy user');
$table->data[$i++][1] = html_print_input_text(
'update_manager_proxy_user',
$update_manager_proxy_user,
@ -317,7 +318,7 @@ $table->data[$i++][1] = html_print_input_text(
true
);
$table->data[$i][0] = __('Proxy password:');
$table->data[$i][0] = __('Proxy password');
$table->data[$i++][1] = html_print_input_password(
'update_manager_proxy_password',
$update_manager_proxy_password,
@ -327,7 +328,7 @@ $table->data[$i++][1] = html_print_input_password(
true
);
$table->data[$i][0] = __('Allow no-consecutive patches:');
$table->data[$i][0] = __('Allow no-consecutive patches');
$table->data[$i++][1] = html_print_switch(
[
'name' => 'allow_offline_patches',
@ -336,7 +337,7 @@ $table->data[$i++][1] = html_print_switch(
]
);
$table->data[$i][0] = __('Limit to LTS updates:');
$table->data[$i][0] = __('Limit to LTS updates');
$table->data[$i++][1] = html_print_switch(
[
'name' => 'lts_updates',
@ -346,11 +347,11 @@ $table->data[$i++][1] = html_print_switch(
);
$table->data[$i][0] = __('Registration ID:');
$table->data[$i++][1] = '<i>'.$config['pandora_uid'].'</i>';
$table->data[$i][0] = __('Registration ID');
$table->data[$i++][1] = '<i>'.($config['pandora_uid'] ?? __('Not registred yet')).'</i>';
if (update_manager_verify_registration() === true && users_is_admin()) {
$table->data[$i][0] = __('Cancel registration:');
$table->data[$i][0] = __('Cancel registration');
$table->data[$i][1] = '<a href="';
if ((bool) is_metaconsole() === true) {
$table->data[$i][1] .= ui_get_full_url(
@ -367,7 +368,7 @@ if (update_manager_verify_registration() === true && users_is_admin()) {
if (license_free()) {
$config['identification_reminder'] = isset($config['identification_reminder']) ? $config['identification_reminder'] : 1;
$table->data[$i][0] = __('Pandora FMS community reminder').ui_print_help_tip(__('Every 8 days, a message is displayed to admin users to remember to register this Pandora instance'), true);
$table->data[$i][0] = __('%s community reminder', get_product_name()).ui_print_help_tip(__('Every 8 days, a message is displayed to admin users to remember to register this %s instance', get_product_name()), true);
$table->data[$i][1] = __('Yes').'&nbsp;&nbsp;&nbsp;'.html_print_radio_button('identification_reminder', 1, '', $config['identification_reminder'], true).'&nbsp;&nbsp;';
$table->data[$i++][1] .= __('No').'&nbsp;&nbsp;&nbsp;'.html_print_radio_button('identification_reminder', 0, '', $config['identification_reminder'], true);
}

View File

@ -860,7 +860,7 @@ if (!$new_user) {
'',
'',
20,
100,
255,
!$new_user || $view_mode,
'',
[

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -3559,7 +3559,8 @@ class AgentWizard extends HTML
$this->targetPort,
$this->server,
$this->extraArguments,
(($full_output === false) ? '-Oa -On' : '-Oa')
(($full_output === false) ? '-On' : '-Oa'),
''
);
if ($pure === true) {
@ -3572,7 +3573,12 @@ class AgentWizard extends HTML
if ($full_output === true) {
$output[] = $key.' = '.$oid_unit;
} else {
preg_match('/\.\d+$/', $key, $index);
$index = [];
$index[] = preg_replace('/^'.$oid.'/', '', $key);
if (empty($index) === true) {
preg_match('/\.\d+$/', $key, $index);
}
$tmp = explode(': ', $oid_unit);
$output[$index[0]] = str_replace('"', '', ($tmp[1] ?? ''));
}

View File

@ -336,7 +336,7 @@ class OrderInterpreter extends Wizard
),
],
[
'name' => __('Update Manager'),
'name' => __('Warp Update'),
'icon' => ui_get_full_url(
'images/menu/um_messages.menu_gray.png'
),
@ -404,10 +404,10 @@ class OrderInterpreter extends Wizard
'.$value['name'].'</a><br>';
}
$iterator ++;
$iterator++;
if ($iterator > 10) {
$more_results ++;
$more_results++;
}
}
}

View File

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

View File

@ -294,7 +294,11 @@ define('SERVICE_ELEMENT_DYNAMIC', 'dynamic');
define('SERVICE_MODE_MANUAL', 0);
define('SERVICE_MODE_SMART', 1);
// New installation Product Logo.
define('HEADER_LOGO_DEFAULT_CLASSIC', 'logo-default-pandorafms.png');
define('HEADER_LOGO_DEFAULT_COLLAPSED', 'logo-default-pandorafms-collapsed.png');
define('HEADER_LOGO_BLACK_CLASSIC', 'logo-black-pandorafms.png');
define('HEADER_LOGO_BLACK_COLLAPSED', 'logo-default-pandorafms-collapsed.png');
// Status images.
// For modules.
@ -802,7 +806,7 @@ define('AUDIT_LOG_SNMP_MANAGEMENT', 'SNMP management');
define('AUDIT_LOG_DASHBOARD_MANAGEMENT', 'Dashboard management');
define('AUDIT_LOG_SERVICE_MANAGEMENT', 'Service management');
define('AUDIT_LOG_INCIDENT_MANAGEMENT', 'Incident management');
define('AUDIT_LOG_UMC', 'Update Manager');
define('AUDIT_LOG_UMC', 'Warp Manager');
// MIMEs.
define(

View File

@ -1993,7 +1993,8 @@ function get_snmpwalk(
$snmp_port='',
$server_to_exec=0,
$extra_arguments='',
$format='-Oa'
$format='-Oa',
$load_mibs='-m ALL'
) {
global $config;
@ -2057,15 +2058,15 @@ function get_snmpwalk(
case '3':
switch ($snmp3_security_level) {
case 'authNoPriv':
$command_str = $snmpwalk_bin.' -m ALL '.$format.' '.$extra_arguments.' -v 3'.' -u '.escapeshellarg($snmp3_auth_user).' -A '.escapeshellarg($snmp3_auth_pass).' -l '.escapeshellarg($snmp3_security_level).' -a '.escapeshellarg($snmp3_auth_method).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir;
$command_str = $snmpwalk_bin.' '.$load_mibs.' '.$format.' '.$extra_arguments.' -v 3'.' -u '.escapeshellarg($snmp3_auth_user).' -A '.escapeshellarg($snmp3_auth_pass).' -l '.escapeshellarg($snmp3_security_level).' -a '.escapeshellarg($snmp3_auth_method).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir;
break;
case 'noAuthNoPriv':
$command_str = $snmpwalk_bin.' -m ALL '.$format.' '.$extra_arguments.' -v 3'.' -u '.escapeshellarg($snmp3_auth_user).' -l '.escapeshellarg($snmp3_security_level).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir;
$command_str = $snmpwalk_bin.' '.$load_mibs.' '.$format.' '.$extra_arguments.' -v 3'.' -u '.escapeshellarg($snmp3_auth_user).' -l '.escapeshellarg($snmp3_security_level).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir;
break;
default:
$command_str = $snmpwalk_bin.' -m ALL '.$format.' '.$extra_arguments.' -v 3'.' -u '.escapeshellarg($snmp3_auth_user).' -A '.escapeshellarg($snmp3_auth_pass).' -l '.escapeshellarg($snmp3_security_level).' -a '.escapeshellarg($snmp3_auth_method).' -x '.escapeshellarg($snmp3_privacy_method).' -X '.escapeshellarg($snmp3_privacy_pass).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir;
$command_str = $snmpwalk_bin.' '.$load_mibs.' '.$format.' '.$extra_arguments.' -v 3'.' -u '.escapeshellarg($snmp3_auth_user).' -A '.escapeshellarg($snmp3_auth_pass).' -l '.escapeshellarg($snmp3_security_level).' -a '.escapeshellarg($snmp3_auth_method).' -x '.escapeshellarg($snmp3_privacy_method).' -X '.escapeshellarg($snmp3_privacy_pass).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir;
break;
}
break;
@ -2074,7 +2075,7 @@ function get_snmpwalk(
case '2c':
case '1':
default:
$command_str = $snmpwalk_bin.' -m ALL '.$extra_arguments.' '.$format.' -v '.escapeshellarg($snmp_version).' -c '.escapeshellarg(io_safe_output($snmp_community)).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir;
$command_str = $snmpwalk_bin.' '.$load_mibs.' '.$extra_arguments.' '.$format.' -v '.escapeshellarg($snmp_version).' -c '.escapeshellarg(io_safe_output($snmp_community)).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir;
break;
}

View File

@ -5116,7 +5116,7 @@ function api_set_update_snmp_module($id_module, $thrash1, $other, $thrash3)
function api_set_new_network_component($id, $thrash1, $other, $thrash2)
{
global $config;
if (is_metaconsole() === true) {
if (defined('METACONSOLE')) {
return;
}
@ -5218,7 +5218,7 @@ function api_set_new_plugin_component($id, $thrash1, $other, $thrash2)
{
global $config;
if (is_metaconsole() === true) {
if (defined('METACONSOLE')) {
return;
}
@ -5498,7 +5498,7 @@ function api_set_new_local_component($id, $thrash1, $other, $thrash2)
{
global $config;
if (is_metaconsole() === true) {
if (defined('METACONSOLE')) {
return;
}

View File

@ -1607,7 +1607,7 @@ function config_update_config()
'port' => $config['history_db_port'],
'name' => $config['history_db_name'],
'user' => $config['history_db_user'],
'pass' => $config['history_db_pass'],
'pass' => io_output_password($config['history_db_pass']),
]
);
@ -1619,48 +1619,47 @@ function config_update_config()
$dbm->process();
} else if ($dbm->check() !== true) {
$errors[] = $dbm->getLastError();
config_update_value('history_db_enabled', false);
}
if ($dbm->check() === true) {
// Historical configuration tokens (stored in historical db).
if ($dbm->setConfigToken(
'days_purge',
get_parameter('history_dbh_purge')
) !== true
) {
$error_update[] = __('Historical database purge');
}
if ($dbm->setConfigToken(
'history_partitions_auto',
get_parameter_switch('history_partitions_auto', 0)
) !== true
) {
$error_update[] = __('Historical database partitions');
}
if ($dbm->setConfigToken(
'event_purge',
get_parameter('history_dbh_events_purge')
) !== true
) {
$error_update[] = __('Historical database events purge');
}
if ($dbm->setConfigToken(
'string_purge',
get_parameter('history_dbh_string_purge')
) !== true
) {
$error_update[] = __('Historical database string purge');
}
// Disable history db in history db.
$dbm->setConfigToken('history_db_enabled', 0);
}
}
// Historical configuration tokens (stored in historical db).
if (Config::set(
'days_purge',
get_parameter('history_dbh_purge'),
true
) !== true
) {
$error_update[] = __('Historical database purge');
}
if (Config::set(
'history_partitions_auto',
get_parameter_switch('history_partitions_auto', 0),
true
) !== true
) {
$error_update[] = __('Historical database partitions');
}
if (Config::set(
'event_purge',
get_parameter('history_dbh_events_purge'),
true
) !== true
) {
$error_update[] = __('Historical database events purge');
}
if (Config::set(
'string_purge',
get_parameter('history_dbh_string_purge'),
true
) !== true
) {
$error_update[] = __('Historical database string purge');
}
// Disable history db in history db.
Config::set('history_db_enabled', 0, true);
break;
case 'ehorus':
@ -2357,12 +2356,12 @@ function config_process_config()
config_update_value('custom_favicon', '');
}
if (!isset($config['custom_logo'])) {
config_update_value('custom_logo', 'pandora_logo_head_4.png');
if (isset($config['custom_logo']) === false) {
config_update_value('custom_logo', HEADER_LOGO_DEFAULT_CLASSIC);
}
if (!isset($config['custom_logo_collapsed'])) {
config_update_value('custom_logo_collapsed', 'pandora_logo_green_collapsed.png');
if (isset($config['custom_logo_collapsed']) === false) {
config_update_value('custom_logo_collapsed', HEADER_LOGO_DEFAULT_COLLAPSED);
}
if (is_metaconsole()) {

View File

@ -4237,6 +4237,82 @@ function html_print_image(
}
/**
* Function for print the logo in menu header.
*
* @param boolean $menuCollapsed If true, the menu is collapsed.
* @param boolean $return If true, the formed element is returned.
*
* @return mixed.
*/
function html_print_header_logo_image(bool $menuCollapsed, bool $return=false)
{
global $config;
if (defined('PANDORA_ENTERPRISE') === false) {
if ($config['style'] === 'pandora_black') {
$custom_logo = 'images/custom_logo/'.HEADER_LOGO_BLACK_CLASSIC;
$custom_logo_collapsed = 'images/custom_logo/'.HEADER_LOGO_DEFAULT_COLLAPSED;
} else if ($config['style'] === 'pandora') {
$custom_logo = 'images/custom_logo/'.HEADER_LOGO_DEFAULT_CLASSIC;
$custom_logo_collapsed = 'images/custom_logo/'.HEADER_LOGO_DEFAULT_COLLAPSED;
}
$logo_title = get_product_name().' Opensource';
} else {
// Handle default logos when change theme.
if ($config['style'] === 'pandora_black' && $config['custom_logo'] === HEADER_LOGO_DEFAULT_CLASSIC) {
$config['custom_logo'] = HEADER_LOGO_BLACK_CLASSIC;
} else if ($config['style'] === 'pandora' && $config['custom_logo'] === HEADER_LOGO_BLACK_CLASSIC) {
$config['custom_logo'] = HEADER_LOGO_DEFAULT_CLASSIC;
}
$logo_title = get_product_name().' Enterprise';
$custom_logo = 'images/custom_logo/'.$config['custom_logo'];
$custom_logo_collapsed = 'images/custom_logo/'.$config['custom_logo_collapsed'];
if (file_exists(ENTERPRISE_DIR.'/'.$custom_logo) === true) {
$custom_logo = ENTERPRISE_DIR.'/'.$custom_logo;
}
}
if (isset($config['custom_logo']) === true) {
$output = html_print_image(
$custom_logo,
true,
[
'border' => '0',
'width' => '215',
'alt' => $logo_title,
'class' => 'logo_full',
'style' => ($menuCollapsed === true) ? 'display:none' : 'display:block',
]
);
}
if (isset($config['custom_logo_collapsed']) === true) {
$output .= html_print_image(
$custom_logo_collapsed,
true,
[
'border' => '0',
'width' => '60',
'alt' => $logo_title,
'class' => 'logo_icon',
'style' => ($menuCollapsed === true) ? 'display:block' : 'display:none',
]
);
}
if ($return === false) {
echo $output;
} else {
return $output;
}
}
/**
* Render an input text element. Extended version, use html_print_input_text() to simplify.
*

View File

@ -1133,7 +1133,7 @@ function modules_get_table_data(?int $id_agent_module, ?int $id_type)
function modules_get_raw_data($id_agent_module, $date_init, $date_end)
{
$table = modules_get_table_data($id_agent_module);
$table = modules_get_table_data($id_agent_module, null);
$datelimit = ($date_init - $date_end);
$search_in_history_db = db_search_in_history_db($datelimit);
@ -4213,7 +4213,7 @@ function modules_get_min_max_data($id_agent_module, $time_init=0)
$data[0]['max'] = $min_max['max'];
} else {
// Search limits of the last two days.
$table = modules_get_table_data($id_agent_module);
$table = modules_get_table_data($id_agent_module, null);
$data = db_get_all_rows_sql(
'SELECT min(datos) as min, max(datos) as max
FROM '.$table.'

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -384,7 +384,7 @@ final class DBMaintainer
*
* @return boolean Success or not.
*/
private function setConfigToken(string $token, $value)
public function setConfigToken(string $token, $value)
{
$prev = $this->getValue('tconfig', 'value', ['token' => $token]);
// If failed or not found, then insert.

View File

@ -33,7 +33,6 @@ form.flex-row ul {
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
align-content: center;
justify-content: space-between;
flex: 1;
@ -116,6 +115,7 @@ table.dataTable tbody td {
padding-top: 7px;
padding-bottom: 7px;
border-bottom: 2px solid #dedede;
word-break: break-all;
}
.filter_input {
@ -316,3 +316,31 @@ div.multi-response-buttons {
.event_detail_tab_menu li {
max-width: 160px;
}
.select_tags {
width: 200px;
}
@media screen and (max-width: 1400px) {
.select_tags {
width: 165px;
}
}
@media screen and (max-width: 1250px) {
.select_tags {
width: 125px;
}
}
@media screen and (max-width: 1100px) {
.select_tags {
width: 100px;
}
form.flex-row div.filter_input.large {
flex: 1;
min-width: 600px;
max-width: 100%;
}
}

View File

@ -399,7 +399,8 @@ ul li {
}
.logo_green {
height: 60px;
background-color: #fff;
min-height: 60px;
display: flex;
justify-content: center;
align-items: center;

View File

@ -814,6 +814,13 @@ select:-internal-list-box {
.margin-left-2 {
margin-left: 2em;
}
.margin-right-05 {
margin-right: 0.5em;
}
.margin-left-05 {
margin-left: 0.5em;
}
.no-border {
border: none;
}

View File

@ -65,6 +65,9 @@ table.agent_info_table tr {
color: #fff !important;
}
.logo_green {
background-color: #000;
}
#um-next:hover,
#um-last:hover {
border: 1px solid #888 !important;
@ -1186,13 +1189,9 @@ a.pandora_pagination,
}
#box_online {
background-image: url("../../images/update_pandora_black.jpg") !important;
background-position: left, left !important;
background-repeat: no-repeat;
background-color: #000 !important;
padding: 40px 50px;
border: 1px solid #111 !important;
border-radius: 5px;
min-height: 600px;
background-size: contain;
box-shadow: 1px 1px 4px rgba(160, 160, 160, 0.514);
}

View File

@ -29,7 +29,7 @@ input[type="button"].submit-next {
background: #fff;
padding: 5px;
font-size: 1.3em;
margin: 0.5em 1em 0.5em 0;
margin: 0.5em 0em;
cursor: pointer;
text-align: center;
height: 30px;
@ -71,7 +71,7 @@ div.submit_buttons_container {
position: relative;
margin: 10px auto 0px;
bottom: 0px;
width: 90%;
width: 95%;
clear: both;
height: 4em;
}

View File

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

View File

@ -375,20 +375,17 @@ if (is_ajax() === true) {
}
$tmp->evento = str_replace('"', '', io_safe_output($tmp->evento));
if (strlen($tmp->evento) >= 255) {
$tmp->evento = ui_print_truncate_text($tmp->evento, 255, $tmp->evento, true, false);
}
if ($tmp->module_name) {
if (empty($tmp->module_name) === false) {
$tmp->module_name = io_safe_output($tmp->module_name);
}
if ($tmp->comments) {
if (empty($tmp->comments) === false) {
$tmp->comments = ui_print_comments($tmp->comments);
}
// Show last event.
if (isset($tmp->max_id_evento) && $tmp->max_id_evento !== $tmp->id_evento) {
if (isset($tmp->max_id_evento) === true && $tmp->max_id_evento !== $tmp->id_evento) {
$max_event = db_get_row_sql(
sprintf(
'SELECT criticity, timestamp FROM %s
@ -611,9 +608,8 @@ $data[0] = html_print_select(
true,
true,
true,
'',
false,
'width: 200px;'
'select_tags',
false
);
$data[1] = html_print_image(
@ -654,9 +650,8 @@ $data[2] = html_print_select(
true,
true,
true,
'',
false,
'width: 200px;'
'select_tags',
false
);
$tabletags_with->data[] = $data;
@ -688,9 +683,8 @@ $data[0] = html_print_select(
true,
true,
true,
'',
false,
'width: 200px;'
'select_tags',
false
);
$data[1] = html_print_image(
'images/darrowright.png',
@ -727,9 +721,8 @@ $data[2] = html_print_select(
true,
true,
true,
'',
false,
'width: 200px;'
'select_tags',
false
);
$tabletags_without->data[] = $data;
$tabletags_without->rowclass[] = '';
@ -1156,7 +1149,10 @@ $data = html_print_select(
true,
true,
'',
false
false,
false,
false,
3
);
$in = '<div class="filter_input"><label>'.__('Severity').'</label>';
$in .= $data.'</div>';

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.762
%define release 220609
%define release 220617
# User and Group under which Apache is running
%define httpd_name httpd
@ -31,6 +31,7 @@ Requires: php-gd, php-ldap, php-snmp, php-session, php-gettext
Requires: php-mysqlnd, php-mbstring, php-zip, php-zlib, php-curl
Requires: xorg-x11-fonts-75dpi, xorg-x11-fonts-misc, php-pecl-zip
Requires: graphviz
Requires: openldap-clients libzstd
Provides: %{name}-%{version}

View File

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

View File

@ -617,7 +617,7 @@ CREATE TABLE IF NOT EXISTS `talert_execution_queue` (
CREATE TABLE IF NOT EXISTS `tattachment` (
`id_attachment` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`id_incidencia` INT UNSIGNED NOT NULL DEFAULT 0,
`id_usuario` VARCHAR(60) NOT NULL DEFAULT '',
`id_usuario` VARCHAR(255) NOT NULL DEFAULT '',
`filename` VARCHAR(255) NOT NULL DEFAULT '',
`description` VARCHAR(150) DEFAULT '',
`size` BIGINT UNSIGNED NOT NULL DEFAULT 0,
@ -690,7 +690,7 @@ CREATE TABLE IF NOT EXISTS `tcontainer_item` (
CREATE TABLE IF NOT EXISTS `tevento` (
`id_evento` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`id_agente` INT NOT NULL DEFAULT 0,
`id_usuario` VARCHAR(100) NOT NULL DEFAULT '0',
`id_usuario` VARCHAR(255) NOT NULL DEFAULT '0',
`id_grupo` MEDIUMINT NOT NULL DEFAULT 0,
`estado` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`timestamp` DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00',
@ -780,7 +780,7 @@ CREATE TABLE IF NOT EXISTS `tincidencia` (
`cierre` DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00',
`titulo` TEXT,
`descripcion` TEXT,
`id_usuario` VARCHAR(60) NOT NULL DEFAULT '',
`id_usuario` VARCHAR(255) NOT NULL DEFAULT '',
`origen` VARCHAR(100) NOT NULL DEFAULT '',
`estado` INT NOT NULL DEFAULT 0,
`prioridad` INT NOT NULL DEFAULT 0,
@ -1060,7 +1060,7 @@ CREATE TABLE IF NOT EXISTS `tnetwork_profile_pen` (
CREATE TABLE IF NOT EXISTS `tnota` (
`id_nota` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`id_incident` BIGINT UNSIGNED NOT NULL,
`id_usuario` VARCHAR(100) NOT NULL DEFAULT '0',
`id_usuario` VARCHAR(255) NOT NULL DEFAULT '0',
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`nota` MEDIUMTEXT,
PRIMARY KEY (`id_nota`),
@ -1173,7 +1173,7 @@ CREATE TABLE IF NOT EXISTS `tserver` (
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tsesion` (
`id_sesion` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`id_usuario` VARCHAR(60) NOT NULL DEFAULT '0',
`id_usuario` VARCHAR(255) NOT NULL DEFAULT '0',
`ip_origen` VARCHAR(100) NOT NULL DEFAULT '',
`accion` VARCHAR(100) NOT NULL DEFAULT '',
`descripcion` TEXT,
@ -1209,7 +1209,7 @@ CREATE TABLE IF NOT EXISTS `ttrap` (
`value_custom` TEXT,
`alerted` SMALLINT NOT NULL DEFAULT 0,
`status` SMALLINT NOT NULL DEFAULT 0,
`id_usuario` VARCHAR(150) DEFAULT '',
`id_usuario` VARCHAR(255) DEFAULT '',
`timestamp` DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00',
`priority` TINYINT UNSIGNED NOT NULL DEFAULT 2,
`text` VARCHAR(255) DEFAULT '',
@ -1261,7 +1261,7 @@ CREATE TABLE IF NOT EXISTS `tevent_filter` (
-- Table `tusuario`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tusuario` (
`id_user` VARCHAR(60) NOT NULL DEFAULT '0',
`id_user` VARCHAR(255) NOT NULL DEFAULT '0',
`fullname` VARCHAR(255) NOT NULL,
`firstname` VARCHAR(255) NOT NULL,
`lastname` VARCHAR(255) NOT NULL,
@ -1314,7 +1314,7 @@ CREATE TABLE IF NOT EXISTS `tusuario` (
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tusuario_perfil` (
`id_up` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`id_usuario` VARCHAR(100) NOT NULL DEFAULT '',
`id_usuario` VARCHAR(255) NOT NULL DEFAULT '',
`id_perfil` INT UNSIGNED NOT NULL DEFAULT 0,
`id_grupo` INT NOT NULL DEFAULT 0,
`no_hierarchy` TINYINT NOT NULL DEFAULT 0,
@ -1329,7 +1329,7 @@ CREATE TABLE IF NOT EXISTS `tusuario_perfil` (
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tuser_double_auth` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`id_user` VARCHAR(60) NOT NULL,
`id_user` VARCHAR(255) NOT NULL,
`secret` VARCHAR(20) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE (`id_user`),
@ -1341,7 +1341,7 @@ CREATE TABLE IF NOT EXISTS `tuser_double_auth` (
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `treset_pass_history` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`id_user` VARCHAR(60) NOT NULL,
`id_user` VARCHAR(255) NOT NULL,
`reset_moment` DATETIME NOT NULL,
`success` TINYINT NOT NULL,
PRIMARY KEY (`id`)
@ -1367,7 +1367,7 @@ CREATE TABLE IF NOT EXISTS `tnotification_source` (
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `tmensajes` (
`id_mensaje` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`id_usuario_origen` VARCHAR(60) NOT NULL DEFAULT '',
`id_usuario_origen` VARCHAR(255) NOT NULL DEFAULT '',
`mensaje` TEXT,
`timestamp` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`subject` VARCHAR(255) NOT NULL DEFAULT '',
@ -1389,7 +1389,7 @@ CREATE TABLE IF NOT EXISTS `tmensajes` (
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tnotification_user` (
`id_mensaje` INT UNSIGNED NOT NULL,
`id_user` VARCHAR(60) NOT NULL,
`id_user` VARCHAR(255) NOT NULL,
`utimestamp_read` BIGINT,
`utimestamp_erased` BIGINT,
`postpone` INT,
@ -1416,7 +1416,7 @@ CREATE TABLE IF NOT EXISTS `tnotification_group` (
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tnotification_source_user` (
`id_source` BIGINT UNSIGNED NOT NULL,
`id_user` VARCHAR(60),
`id_user` VARCHAR(255),
`enabled` INT DEFAULT NULL,
`also_mail` INT DEFAULT NULL,
PRIMARY KEY (`id_source`,`id_user`),
@ -1444,7 +1444,7 @@ CREATE TABLE IF NOT EXISTS `tnotification_source_group` (
CREATE TABLE IF NOT EXISTS `tnotification_source_group_user` (
`id_source` BIGINT UNSIGNED NOT NULL,
`id_group` MEDIUMINT UNSIGNED NOT NULL,
`id_user` VARCHAR(60),
`id_user` VARCHAR(255),
`enabled` INT DEFAULT NULL,
`also_mail` INT DEFAULT NULL,
PRIMARY KEY (`id_source`,`id_user`),
@ -1477,7 +1477,7 @@ CREATE TABLE IF NOT EXISTS `tnews` (
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tgraph` (
`id_graph` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`id_user` VARCHAR(100) NOT NULL DEFAULT '',
`id_user` VARCHAR(255) NOT NULL DEFAULT '',
`name` VARCHAR(150) NOT NULL DEFAULT '',
`description` TEXT,
`period` INT NOT NULL DEFAULT 0,
@ -1515,7 +1515,7 @@ CREATE TABLE IF NOT EXISTS `tgraph_source` (
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `treport` (
`id_report` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`id_user` VARCHAR(100) NOT NULL DEFAULT '',
`id_user` VARCHAR(255) NOT NULL DEFAULT '',
`name` VARCHAR(150) NOT NULL DEFAULT '',
`description` TEXT,
`private` TINYINT UNSIGNED NOT NULL DEFAULT 0,
@ -1814,7 +1814,7 @@ CREATE TABLE IF NOT EXISTS `tplanned_downtime` (
`type_downtime` VARCHAR(100) NOT NULL DEFAULT 'disabled_agents_alerts',
`type_execution` VARCHAR(100) NOT NULL DEFAULT 'once',
`type_periodicity` VARCHAR(100) NOT NULL DEFAULT 'weekly',
`id_user` VARCHAR(100) NOT NULL DEFAULT '0',
`id_user` VARCHAR(255) NOT NULL DEFAULT '0',
PRIMARY KEY ( `id` )
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
@ -2037,7 +2037,7 @@ CREATE TABLE IF NOT EXISTS `tgroup_stat` (
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tnetwork_map` (
`id_networkmap` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`id_user` VARCHAR(60) NOT NULL,
`id_user` VARCHAR(255) NOT NULL,
`name` VARCHAR(100) NOT NULL,
`type` VARCHAR(20) NOT NULL,
`layout` VARCHAR(20) NOT NULL,
@ -2197,7 +2197,7 @@ CREATE TABLE IF NOT EXISTS `tnetflow_report_content` (
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tpassword_history` (
`id_pass` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`id_user` VARCHAR(60) NOT NULL,
`id_user` VARCHAR(255) NOT NULL,
`password` VARCHAR(45) DEFAULT NULL,
`date_begin` DATETIME,
`date_end` DATETIME,
@ -2250,7 +2250,7 @@ CREATE TABLE `tupdate_journal` (
`version` VARCHAR(25) DEFAULT '',
`type` VARCHAR(25) DEFAULT '',
`origin` VARCHAR(25) DEFAULT '',
`id_user` VARCHAR(250) NOT NULL DEFAULT ''
`id_user` VARCHAR(255) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
-- ---------------------------------------------------------------------
@ -2299,7 +2299,7 @@ CREATE TABLE IF NOT EXISTS `tsessions_php` (
CREATE TABLE IF NOT EXISTS `tmap` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`id_group` INT UNSIGNED NOT NULL DEFAULT 0,
`id_user` VARCHAR(250) NOT NULL DEFAULT '',
`id_user` VARCHAR(255) NOT NULL DEFAULT '',
`type` INT UNSIGNED NOT NULL DEFAULT 0,
`subtype` INT UNSIGNED NOT NULL DEFAULT 0,
`name` VARCHAR(250) DEFAULT '',
@ -2580,7 +2580,7 @@ CREATE TABLE IF NOT EXISTS `tpolicy_group_agents` (
CREATE TABLE IF NOT EXISTS `tdashboard` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`name` TEXT NOT NULL DEFAULT '',
`id_user` VARCHAR(60) NOT NULL DEFAULT '',
`id_user` VARCHAR(255) NOT NULL DEFAULT '',
`id_group` INT NOT NULL DEFAULT 0,
`active` TINYINT NOT NULL DEFAULT 0,
`cells` INT UNSIGNED DEFAULT 0,
@ -3129,7 +3129,7 @@ CREATE TABLE IF NOT EXISTS `tnetworkmap_ent_rel_nodes` (
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `treport_template` (
`id_report` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`id_user` VARCHAR(100) NOT NULL DEFAULT '',
`id_user` VARCHAR(255) NOT NULL DEFAULT '',
`name` VARCHAR(150) NOT NULL DEFAULT '',
`description` TEXT,
`private` TINYINT UNSIGNED NOT NULL DEFAULT 0,
@ -3298,7 +3298,7 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_event` (
`id_source_event` BIGINT UNSIGNED NOT NULL,
`id_agente` INT NOT NULL DEFAULT 0,
`agent_name` VARCHAR(600) NOT NULL DEFAULT '',
`id_usuario` VARCHAR(100) NOT NULL DEFAULT '0',
`id_usuario` VARCHAR(255) NOT NULL DEFAULT '0',
`id_grupo` MEDIUMINT NOT NULL DEFAULT 0,
`group_name` VARCHAR(100) NOT NULL DEFAULT '',
`estado` TINYINT UNSIGNED NOT NULL DEFAULT 0,
@ -3350,7 +3350,7 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_event_history` (
`id_source_event` BIGINT UNSIGNED NOT NULL,
`id_agente` INT NOT NULL DEFAULT 0,
`agent_name` VARCHAR(600) NOT NULL DEFAULT '',
`id_usuario` VARCHAR(100) NOT NULL DEFAULT '0',
`id_usuario` VARCHAR(255) NOT NULL DEFAULT '0',
`id_grupo` MEDIUMINT NOT NULL DEFAULT 0,
`group_name` VARCHAR(100) NOT NULL DEFAULT '',
`estado` TINYINT UNSIGNED NOT NULL DEFAULT 0,
@ -3515,7 +3515,7 @@ CREATE TABLE IF NOT EXISTS `tphase`(
CREATE TABLE IF NOT EXISTS `treset_pass` (
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`id_user` VARCHAR(100) NOT NULL DEFAULT '',
`id_user` VARCHAR(255) NOT NULL DEFAULT '',
`cod_hash` VARCHAR(100) NOT NULL DEFAULT '',
`reset_time` INT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
@ -3666,7 +3666,7 @@ CREATE TABLE IF NOT EXISTS `tautoconfig` (
`name` VARCHAR(100) NOT NULL,
`order` INT NOT NULL DEFAULT 0,
`description` TEXT,
`disabled` TINYINT DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
@ -3820,7 +3820,7 @@ CREATE TABLE IF NOT EXISTS `tuser_task` (
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tuser_task_scheduled` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`id_usuario` VARCHAR(60) NOT NULL DEFAULT '0',
`id_usuario` VARCHAR(255) NOT NULL DEFAULT '0',
`id_user_task` INT UNSIGNED NOT NULL DEFAULT 0,
`args` TEXT,
`scheduled` ENUM('no','hourly','daily','weekly','monthly','yearly','custom') DEFAULT 'no',
@ -3839,7 +3839,7 @@ CREATE TABLE IF NOT EXISTS `tvisual_console_elements_cache` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`vc_id` INT UNSIGNED NOT NULL,
`vc_item_id` INT UNSIGNED NOT NULL,
`user_id` VARCHAR(60) DEFAULT NULL,
`user_id` VARCHAR(255) DEFAULT NULL,
`data` TEXT,
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`expiration` INT UNSIGNED NOT NULL COMMENT 'Seconds to expire',
@ -4219,7 +4219,7 @@ CREATE TABLE IF NOT EXISTS `tbackup` (
`id` SERIAL,
`utimestamp` BIGINT DEFAULT 0,
`filename` VARCHAR(512) DEFAULT '',
`id_user` VARCHAR(60) DEFAULT '',
`id_user` VARCHAR(255) DEFAULT '',
`description` MEDIUMTEXT,
`pid` INT UNSIGNED DEFAULT 0,
`filepath` VARCHAR(512) DEFAULT '',

View File

@ -2229,7 +2229,7 @@ class Client
if (is_callable($this->postUpdateFN) === true) {
call_user_func(
$this->postUpdateFN,
$this->currentPackage,
(string) $version,
'server'
);
}

View File

@ -460,7 +460,9 @@ function umShowUpdateDetails(update) {
var um_update_details = document.getElementById("um-update-details");
var header = document.getElementById("um-update-details-header");
var content = document.getElementById("um-update-details-content");
var detailTitle = document
.getElementsByClassName("um-package-details")
.item(0).innerText;
header.innerText = texts.updateText + " " + updates[update].version;
content.innerText = updates[update].description;
@ -468,8 +470,8 @@ function umShowUpdateDetails(update) {
um_update_details.style.display = "block";
if (typeof $ == "function") {
$("#um-update-details").dialog({
title: update,
width: 650,
title: detailTitle,
width: 800,
height: 600
});
}

View File

@ -1,318 +0,0 @@
.update_text p {
font-size: 11pt;
}
.update_text a {
font-size: 11pt;
color: #82b92e;
}
.update_manager_warning p {
font-size: 10pt;
}
.ui-widget-content,
.ui-widget-content p {
font-size: 12pt;
}
.fileupload_form {
background-color: #373a3d;
background-image: -moz-linear-gradient(center, #373a3d, #313437);
border-radius: 3px;
margin: 0px;
padding: 30px;
}
#drop_file {
background-color: #e6e6e6;
border: 20px solid rgba(0, 0, 0, 0);
border-radius: 3px;
color: #707070;
font-size: 16px;
font-weight: bold;
margin-bottom: 30px;
padding: 40px 50px;
text-align: center;
text-transform: uppercase;
}
#drop_file table {
vertical-align: middle;
}
#drop_file table td,
#drop_file table label {
color: #707070;
font-size: 16px;
font-weight: bold;
margin-top: 0;
vertical-align: middle;
}
#drop_file table select {
float: none;
}
#drop_file a {
background-color: #82b92e;
border-radius: 2px;
color: #ffffff;
cursor: pointer;
display: inline-block;
font-size: 14px;
line-height: 1;
padding: 12px 26px;
}
#drop_file a:hover {
background-color: #a6ce67;
text-decoration: none;
}
#drop_file input {
display: none;
}
.fileupload_form ul {
border-bottom: 1px solid #3d4043;
border-top: 1px solid #2b2e31;
list-style: none outside none;
margin: 0 -30px;
padding: 0;
}
.fileupload_form ul li {
background-color: #333639;
background-image: -moz-linear-gradient(center, #333639, #303335);
border-bottom: 1px solid #2b2e31;
border-top: 1px solid #3d4043;
padding: 15px;
position: relative;
}
.fileupload_form ul li #input-progress {
left: 68px;
position: absolute;
}
.fileupload_form ul li p {
color: #eeeeee;
font-size: 12px;
font-weight: bold;
left: 95px;
overflow: hidden;
position: absolute;
top: 12px;
white-space: nowrap;
}
.fileupload_form ul li i {
color: #7f7f7f;
display: block;
font-style: normal;
font-weight: normal;
}
.fileupload_form ul li canvas {
left: 13px;
position: absolute;
top: 15px;
}
.fileupload_form ul li span {
background: url("../images/check-cross.png") no-repeat scroll 0 0
rgba(0, 0, 0, 0);
cursor: pointer;
height: 12px;
position: absolute;
right: 13px;
top: 34px;
width: 15px;
}
.fileupload_form ul li div {
display: block !important;
}
.fileupload_form ul li.working span {
background-position: 0 -12px;
height: 16px;
}
.fileupload_form ul li.loading span {
background: url("../images/spinner.gif") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
height: 16px;
}
.fileupload_form ul li.suc span {
background: url("../images/check-cross.png") no-repeat scroll 0 0
rgba(0, 0, 0, 0);
height: 12px;
}
.fileupload_form ul li.suc p {
color: #5a8629;
}
.fileupload_form ul li.error span {
background: url("../images/check-cross.png") no-repeat scroll 0 -12px rgba(0, 0, 0, 0);
height: 16px;
}
.fileupload_form ul li.error p {
color: #ff3333;
}
#log_zone {
background-color: #e6e6e6;
border: 20px solid rgba(0, 0, 0, 0);
border-radius: 3px;
color: #707070;
font-size: 12px;
margin-bottom: 30px;
padding: 10px;
text-align: left;
}
#box_online {
background-image: url("../images/update_manager_background.jpg");
background-position: center center;
background-repeat: no-repeat;
background-color: #fff;
padding: 40px 50px;
border: 1px solid #f3f3f3;
border-radius: 5px;
min-height: 600px;
background-size: contain;
}
div#box_online * {
font-size: 16pt;
margin-bottom: 50px;
}
#box_online .content {
max-width: 50%;
}
.update_popup {
display: flex;
justify-content: space-between;
align-items: center;
padding-left: 10px;
padding-right: 10px;
}
.update_icon {
padding-left: 20px;
}
.update_text h3 {
font-weight: bold;
font-size: 12pt;
}
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
float: left;
padding-left: 19px;
padding-bottom: 5px;
}
a.update_manager_button {
padding: 10px 12px;
margin-top: 10px;
display: inline-flex;
align-items: center;
font-size: 16px;
border-radius: 4px;
text-decoration: none;
}
a.update_manager_button:after {
content: url(../images/update_manager_button.png);
padding-left: 10px;
}
.progressbar {
margin-top: 15px;
}
.ui-draggable,
.ui-draggable .ui-dialog-titlebar {
cursor: default;
}
#box_online #pkg_version {
color: #82b92e;
font-size: 75pt;
font-weight: bold;
margin-bottom: 50px;
}
/* METACONSOLE */
.box_online_meta {
background: none;
min-height: 400px;
text-align: center;
border: none;
}
div#box_online.box_online_meta * {
font-size: 14pt;
}
#box_online.box_online_meta .content {
max-width: 100%;
}
#box_online.box_online_meta #pkg_version {
font-size: 60pt;
}
/* COMMUNITY */
.update_manager_open {
max-width: 50%;
font-size: 10pt;
margin-top: 40px;
padding: 20px;
border: 1px solid #eaeaea;
border-radius: 5px;
}
.update_manager_warning {
display: flex;
align-items: center;
margin-bottom: 10px;
}
.update_manager_warning img {
padding-right: 20px;
width: 90px;
}
a.update_manager_button_open {
padding: 5px 10px;
font-size: 16px;
text-decoration: none;
border: 1px solid #82b92e;
color: #82b92e;
border-radius: 2px;
}
a.update_manager_button_open:hover {
color: #fff;
background-color: #82b92e;
}
#um-update-details-header {
background-image: url(../images/pandora_logo.png);
}
.um-progress-bar {
background-color: #8bb92e !important;
}
.um-error {
color: #e63c52;
}
.um-success {
color: #8bb92e;
}
.dz-success-mark svg {
background: #8bb92e;
border-radius: 50%;
}
.newsletter_div {
font-size: 12pt;
margin: 5px 20px;
float: left;
padding-top: 23px;
}
.register_update_manager {
margin: 5px 0 10px;
float: left;
padding-left: 15px;
}

View File

@ -9,6 +9,58 @@
margin: 5% auto;
padding: 2em;
}
a.update_manager_button {
padding: 10px 12px;
margin-top: 10px;
display: inline-flex;
align-items: center;
font-size: 16px;
border-radius: 4px;
text-decoration: none;
}
a.update_manager_button:after {
content: url(../images/update_manager_button.png);
padding-left: 10px;
}
.progressbar {
margin-top: 15px;
}
#log_zone {
background-color: #e6e6e6;
border: 20px solid rgba(0, 0, 0, 0);
border-radius: 3px;
color: #707070;
font-size: 12px;
margin-bottom: 30px;
padding: 10px;
text-align: left;
}
#box_online {
background-image: url("../images/update_manager_background.jpg");
background-position: top right;
background-repeat: no-repeat;
background-color: #fff;
padding: 40px 50px;
border: 1px solid #f3f3f3;
border-radius: 5px;
min-height: 400px;
background-size: contain;
}
#box_online #pkg_version {
color: #82b92e;
font-size: 6em;
font-weight: bold;
margin: 30px 0 !important;
}
.update_manager_warning p {
font-size: 10pt;
}
#update-list {
max-height: 0;
overflow: hidden;
@ -16,6 +68,31 @@
flex-direction: column;
transition: max-height 0.15s ease-in-out;
}
.update_popup {
display: flex;
justify-content: space-between;
align-items: center;
padding-left: 10px;
padding-right: 10px;
}
.update_icon {
padding-left: 20px;
}
.update_text h3 {
font-weight: bold;
font-size: 12pt;
}
.update_text p {
font-size: 11pt;
}
.update_text a {
font-size: 11pt;
color: #82b92e;
}
.update {
display: flex;
@ -23,13 +100,161 @@
justify-content: space-around;
align-items: center;
}
#drop_file {
background-color: #e6e6e6;
border: 20px solid rgba(0, 0, 0, 0);
border-radius: 3px;
color: #707070;
font-size: 16px;
font-weight: bold;
margin-bottom: 30px;
padding: 40px 50px;
text-align: center;
text-transform: uppercase;
}
#drop_file table {
vertical-align: middle;
}
#drop_file table td,
#drop_file table label {
color: #707070;
font-size: 16px;
font-weight: bold;
margin-top: 0;
vertical-align: middle;
}
#drop_file table select {
float: none;
}
#drop_file a {
background-color: #82b92e;
border-radius: 2px;
color: #ffffff;
cursor: pointer;
display: inline-block;
font-size: 14px;
line-height: 1;
padding: 12px 26px;
}
#drop_file a:hover {
background-color: #a6ce67;
text-decoration: none;
}
#drop_file input {
display: none;
}
/* Offline form */
.fileupload_form {
background-color: #373a3d;
background-image: -moz-linear-gradient(center, #373a3d, #313437);
border-radius: 3px;
margin: 0px;
padding: 30px;
}
.fileupload_form ul {
border-bottom: 1px solid #3d4043;
border-top: 1px solid #2b2e31;
list-style: none outside none;
margin: 0 -30px;
padding: 0;
}
.fileupload_form ul li {
background-color: #333639;
background-image: -moz-linear-gradient(center, #333639, #303335);
border-bottom: 1px solid #2b2e31;
border-top: 1px solid #3d4043;
padding: 15px;
position: relative;
}
.fileupload_form ul li #input-progress {
left: 68px;
position: absolute;
}
.fileupload_form ul li p {
color: #eeeeee;
font-size: 12px;
font-weight: bold;
left: 95px;
overflow: hidden;
position: absolute;
top: 12px;
white-space: nowrap;
}
.fileupload_form ul li i {
color: #7f7f7f;
display: block;
font-style: normal;
font-weight: normal;
}
.fileupload_form ul li canvas {
left: 13px;
position: absolute;
top: 15px;
}
.fileupload_form ul li span {
background: url("../images/check-cross.png") no-repeat scroll 0 0
rgba(0, 0, 0, 0);
cursor: pointer;
height: 12px;
position: absolute;
right: 13px;
top: 34px;
width: 15px;
}
.fileupload_form ul li div {
display: block !important;
}
.fileupload_form ul li.working span {
background-position: 0 -12px;
height: 16px;
}
.fileupload_form ul li.loading span {
background: url("../images/spinner.gif") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
height: 16px;
}
.fileupload_form ul li.suc span {
background: url("../images/check-cross.png") no-repeat scroll 0 0
rgba(0, 0, 0, 0);
height: 12px;
}
.fileupload_form ul li.suc p {
color: #5a8629;
}
.fileupload_form ul li.error span {
background: url("../images/check-cross.png") no-repeat scroll 0 -12px rgba(0, 0, 0, 0);
height: 16px;
}
.fileupload_form ul li.error p {
top: 18px;
color: #ff3333;
}
#um-loading {
background-image: url(../images/spinner.gif);
height: 1.3em;
height: 1em;
background-repeat: no-repeat;
background-size: contain;
text-indent: 6em;
text-indent: 4.5em;
}
#um-buttons {
@ -64,7 +289,7 @@
}
#um-update-details * {
font-size: 16pt;
font-size: 10pt;
}
#um-update-details-header {
@ -72,10 +297,10 @@
background-color: #343434;
background-repeat: no-repeat;
background-position: 50% 20%;
height: 3em;
height: 1.8em;
text-align: center;
display: block;
padding-top: 5.7em;
padding-top: 5.3em;
width: 100%;
}
#um-update-details-content {
@ -115,11 +340,17 @@
background-color: #1f282b;
}
div#box_online * {
font-size: 14pt;
}
#box_online .content {
max-width: 50%;
}
#box_offline form {
background-color: #373a3d;
background-image: -moz-linear-gradient(top, #373a3d, #313437);
border-radius: 3px;
font-family: "PT Sans Narrow", sans-serif;
margin: 0px;
padding: 30px;
}
@ -180,7 +411,9 @@ span.warning {
justify-content: space-between;
}
.ui-dialog-content.ui-widget-content p {
font-size: 10pt;
word-break: keep-all;
text-align: justify;
}
.license_text {
@ -204,3 +437,91 @@ input.error {
textarea#signature {
margin-top: 1em;
}
a.update_manager_button_open:hover {
color: #fff;
background-color: #82b92e;
}
#um-update-details-header {
background-image: url(../images/pandora_logo.png);
font-size: 16pt;
}
.um-progress-bar {
background-color: #8bb92e !important;
}
.um-error {
color: #e63c52;
}
.um-success {
color: #8bb92e;
}
.dz-success-mark svg {
background: #8bb92e;
border-radius: 50%;
}
.newsletter_div {
margin: 5px 20px;
float: left;
padding-top: 23px;
}
.register_update_manager {
margin: 5px 0 10px;
float: left;
padding-left: 15px;
}
/* METACONSOLE */
.box_online_meta {
background: none;
min-height: 400px;
text-align: center;
border: none;
}
div#box_online.box_online_meta * {
font-size: 14pt;
}
#box_online.box_online_meta .content {
max-width: 100%;
}
#box_online.box_online_meta #pkg_version {
font-size: 60pt;
}
/* COMMUNITY */
.update_manager_open {
max-width: 50%;
font-size: 10pt;
margin-top: 40px;
padding: 20px;
border: 1px solid #eaeaea;
border-radius: 5px;
}
.update_manager_warning {
display: flex;
align-items: center;
margin-bottom: 10px;
}
.update_manager_warning img {
padding-right: 20px;
width: 90px;
}
a.update_manager_button_open {
padding: 5px 10px;
font-size: 16px;
text-decoration: none;
border: 1px solid #82b92e;
color: #82b92e;
border-radius: 2px;
}

View File

@ -45,7 +45,6 @@
<script src="<?php $asset('resources/javascript/jquery.iframe-transport.js'); ?>" type="text/javascript"></script>
<script src="<?php $asset('resources/javascript/jquery.knob.js'); ?>" type="text/javascript"></script>
<link rel="stylesheet" href="<?php $asset('resources/styles/um.css'); ?>">
<link rel="stylesheet" href="<?php $asset('resources/styles/pandora.css'); ?>">
</head>
<div id="box_offline">

View File

@ -31,7 +31,6 @@
?>
<head>
<link rel="stylesheet" href="<?php $asset('resources/styles/um.css'); ?>">
<link rel="stylesheet" href="<?php $asset('resources/styles/pandora.css'); ?>">
<script src="<?php $asset('resources/javascript/umc.js'); ?>" type="text/javascript"></script>
</head>
@ -40,10 +39,10 @@
<span class="loading" style="font-size: 18pt; display: none;">
<img src="images/wait.gif">
</span>
<p style="font-weight: 600;">The latest version of package installed is:</p>
<p style="font-weight: 600;"><?php echo __('The latest version of package installed is').':'; ?></p>
<div id="pkg_version"><?php echo $version; ?></div>
<div class="content">
<?php
if (empty($error) !== true) {

View File

@ -41,28 +41,27 @@ $product_name = get_product_name(); ?>
<script src="<?php $asset('resources/javascript/umc.js'); ?>" type="text/javascript"></script>
<link rel="stylesheet" href="<?php $asset('resources/styles/jquery-ui.min.css'); ?>">
<link rel="stylesheet" href="<?php $asset('resources/styles/um.css'); ?>">
<link rel="stylesheet" href="<?php $asset('resources/styles/pandora.css'); ?>">
</head>
<div id="registration_wizard" title="
<?php echo __('Register to Update Manager'); ?>
<?php echo __('Register to Warp Update'); ?>
" class="invisible">
<div class="register_update_manager">
<?php echo html_print_image('images/pandora_circle_big.png', true); ?>
</div>
<div class="newsletter_div">
<?php echo __('Keep this %s console up to date with latest updates.', $product_name); ?>
<div class="newsletter_div lato font_10pt">
<?php echo __('Keep this %s console up to date with latest updates.', $product_name); ?>
</div>
<div class="license_text both">
<p>
<p class="lato font_10pt">
<?php
echo __(
'When you subscribe to the %s Update Manager service, you accept that we
'When you subscribe to the Warp update service for %s, you accept that we
register your %s instance as an identifier on a database owned by %s. This data will solely be used to
provide you with information about %s and will not be conceded to third parties. You can unregister from
said database at any time from the Update Manager options.',
said database at any time from the Warp update options.',
$product_name,
$product_name,
$product_name,
@ -71,12 +70,12 @@ $product_name = get_product_name(); ?>
?>
</p>
<p>
<?php echo __('Visit our privacy policy for more information'); ?>:
<p class="lato font_10pt">
<?php echo __('Visit our privacy policy for more information'); ?>:
<a href="https://pandorafms.com/privacy-policy/" target="_blank">https://pandorafms.com/privacy-policy/</a>
</p>
<input id="registration-email" type="email" placeholder="<?php echo __('Your email'); ?>" />
<input id="registration-email" class="lato" type="email" placeholder="<?php echo __('Your email'); ?>" />
</div>
<div class="submit_buttons_container">
@ -86,7 +85,8 @@ $product_name = get_product_name(); ?>
__('Cancel'),
'cancel_registration',
false,
'class="ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel"',
'class="lato ui-widget
ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel"',
true
);
?>
@ -97,7 +97,7 @@ $product_name = get_product_name(); ?>
__('OK!'),
'register',
false,
'class="ui-widget
'class="lato ui-widget
ui-state-default ui-corner-all ui-button-text-only sub ok submit-next w100px"',
true
);
@ -108,8 +108,8 @@ $product_name = get_product_name(); ?>
<!-- Verification modal.. -->
<div id="reg_ensure_cancel" title="Confirmation Required" class="invisible">
<div class="font_12_20">
<?php echo __('Are you sure you don\'t want to use update manager?'); ?>
<div class="lato font_10pt">
<?php echo __('Are you sure you don\'t want to use Warp update?'); ?>
<p>
<?php
echo __(
@ -124,7 +124,7 @@ $product_name = get_product_name(); ?>
<!-- Results modal. -->
<div id="reg_result" title="Registration process result" class="invisible">
<div id="reg_result_content" class="font_12_20">
<div id="reg_result_content" class="lato font_10pt">
</div>
</div>

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.762-220609
Version: 7.0NG.762-220617
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.762-220609"
pandora_version="7.0NG.762-220617"
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.762";
my $pandora_build = "220609";
my $pandora_build = "220617";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash

View File

@ -593,6 +593,11 @@ sub process_xml_data ($$$$$) {
$module_data->{'data'} = $data->{'value'};
my $data_timestamp = get_tag_value ($data, 'timestamp', $timestamp);
if ($pa_config->{'use_xml_timestamp'} eq '0' && defined($timestamp)) {
$data_timestamp = $timestamp;
}
process_module_data ($pa_config, $module_data, $server_id, $agent, $module_name,
$module_type, $interval, $data_timestamp, $dbh, $new_agent);
}

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.762";
my $pandora_build = "220609";
my $pandora_build = "220617";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
@ -609,15 +609,14 @@ sub print_module {
$data->{critical_instructions} = $conf->{critical_instructions} unless (defined($data->{critical_instructions}) || (!defined($conf->{critical_instructions})));
# Translation compatibility
$data->{'min_warning'} = $data->{'wmin'} if empty($data->{'min_warning'});
$data->{'max_warning'} = $data->{'wmax'} if empty($data->{'max_warning'});
$data->{'min_critical'} = $data->{'cmin'} if empty($data->{'min_critical'});
$data->{'max_critical'} = $data->{'cmax'} if empty($data->{'max_critical'});
$data->{'warning_inverse'} = $data->{'winv'} if empty($data->{'warning_inverse'});
$data->{'critical_inverse'} = $data->{'cinv'} if empty($data->{'critical_inverse'});
$data->{'str_warning'} = $data->{'wstr'} if empty($data->{'str_warning'});
$data->{'str_critical'} = $data->{'cstr'} if empty($data->{'str_critical'});
$data->{min_warning} = $data->{'wmin'} if empty($data->{min_warning});
$data->{max_warning} = $data->{'wmax'} if empty($data->{max_warning});
$data->{min_critical} = $data->{'cmin'} if empty($data->{min_critical});
$data->{max_critical} = $data->{'cmax'} if empty($data->{max_critical});
$data->{warning_inverse} = $data->{'winv'} if empty($data->{warning_inverse});
$data->{critical_inverse} = $data->{'cinv'} if empty($data->{critical_inverse});
$data->{str_warning} = $data->{'wstr'} if empty($data->{str_warning});
$data->{str_critical} = $data->{'cstr'} if empty($data->{str_critical});
$xml_module .= "<module>\n";
$xml_module .= "\t<name><![CDATA[" . $data->{name} . "]]></name>\n";

View File

@ -1628,9 +1628,14 @@ sub database_scan($$$) {
$self->{'summary'}->{'discovered'} += 1;
$self->{'summary'}->{'alive'} += 1;
my $name = $type . ' connection';
if (defined $obj->{'prefix_module_name'} && $obj->{'prefix_module_name'} ne '') {
$name = $obj->{'prefix_module_name'} . $type . ' connection';
}
push @modules,
{
name => $type . ' connection',
name => $name,
type => 'generic_proc',
data => 1,
description => $type . ' availability'
@ -1778,8 +1783,14 @@ sub app_scan($) {
# Update progress
$self->call('update_progress', $global_percent + (90 / (scalar @targets)));
$self->{'summary'}->{'not_alive'} += 1;
my $name = $type . ' connection';
if (defined $obj->{'prefix_module_name'} && $obj->{'prefix_module_name'} ne '') {
$name = $obj->{'prefix_module_name'} . $type . ' connection';
}
push @modules, {
name => $type . ' connection',
name => $name,
type => 'generic_proc',
data => 0,
description => $type . ' availability'

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.762
%define release 220609
%define release 220617
Summary: Pandora FMS Server
Name: %{name}
@ -30,7 +30,7 @@ Requires: perl(NetAddr::IP) net-snmp net-tools
Requires: perl(IO::Socket::INET6) perl(IO::Socket::SSL) perl(Net::Telnet)
Requires: fping nmap sudo perl(JSON)
Requires: perl(Time::HiRes) perl(Encode::Locale)
Requires: perl perl(Sys::Syslog) perl(HTML::Entities) perl(Geo::IP)
Requires: perl perl(Sys::Syslog) perl(HTML::Entities) perl(Geo::IP) expect
%description
Pandora FMS is a monitoring system for big IT environments. It uses remote tests, or local agents to grab information. Pandora supports all standard OS (Linux, AIX, HP-UX, Solaris and Windows XP,2000/2003), and support multiple setups in HA enviroments.

View File

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

View File

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.762"
PI_BUILD="220609"
PI_BUILD="220617"
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.762 Build 220609";
my $version = "7.0NG.762 Build 220617";
# Pandora server configuration
my %conf;

View File

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

4
tentacle/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
dist/
blib/
Makefile
pm_to_blib

22
tentacle/Makefile.PL Normal file
View File

@ -0,0 +1,22 @@
use 5.000;
use ExtUtils::MakeMaker;
my %ARGV = map { my @r = split /=/,$_; defined $r[1] or $r[1]=1; @r } @ARGV;
my @exe_files = qw(tentacle_server);
WriteMakefile(
INSTALLSITELIB => '/usr/lib/perl5',
(($^O eq 'freebsd')
? (INSTALLSITELIB => '') : ()
),
($^O eq 'netbsd') ? (
INSTALLSITELIB => '',
INSTALLSITESCRIPT => '/usr/local/bin',
) :(),
NAME => 'PandoraFMS',
AUTHOR => 'Artica ST <info@artica.es>',
EXE_FILES => [ @exe_files ],
PMLIBDIRS => [ 'lib' ],
'dist' => { 'TAR' => 'tar', 'TARFLAGS' => 'cvfz', 'SUFFIX' => '.gz', 'COMPRESS' => 'gzip'}
);

1869
tentacle/NetBSD/tentacle_server Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,26 @@
#!/bin/bash
CODEHOME=$HOME/code/pandorafms
# Add build string for nightly builds
if [ "$1" == "nightly" ]; then
LOCAL_VERSION="$VERSION-$BUILD"
else
LOCAL_VERSION=$1
fi
if [ ! -d $CODEHOME/tentacle/dist ]; then
mkdir -p $CODEHOME/tentacle/dist || exit 1
fi
echo "Creating source tarballs in $(pwd)/dist"
# Server
cd $CODEHOME && tar zcvf $CODEHOME/tentacle/dist/tentacle_server-$LOCAL_VERSION.tar.gz \
--exclude \.svn \
--exclude \.exe \
--exclude dist \
--exclude build_tentacle_server.sh \
tentacle || exit 1
exit 0

View File

@ -0,0 +1,75 @@
##########################################################################
# Tentacle Server Parameters
# See https://pandorafms.com/manual/en/documentation/08_technical_reference/09_tentacle
# for protocol description.
# Tentacle have IANA assigned port tpc/41121 as official port.
##########################################################################
# [-a] IPv4 address to listen on. Several IPs cam be selected separating if by comma.
addresses 0.0.0.0
# [-p] Port to listen on
port 41121
# [-c] Maximum number of simultaneous connections
# max_connections 10
# [-d] Run as daemon. 1 true, 0 false
daemon 1
# [-i] Enable insecure mode
# insecure 0
# Filters (regexp:dir;regexp:dir...)
filters .*\.conf:conf;.*\.md5:md5;.*\.zip:collections;.*\.lock:trans;.*\.rcmd:commands
# [-m] Maximum file size allowed by the server in bytes
#max_size 2000000
# [-o] Accept files with a repeated name
# overwrite 0
# [-q] Do not output error messages.
# quiet 0
# [-r] Number of retries for socket read/write operations
# retries 3
# [-s] Storage directory
directory /var/spool/pandora/data_in
# [-b] Address to proxy client requests to
# proxy_ip 127.0.0.1
# [-g] Port to proxy client requests to
# proxy_port 41121
# [-t] Timeout for socket read/write operations in seconds
# timeout 1
# [-v and -V] Verbose level
# 0: Do not display any informative messages
# 1: Display only important messages [-v]
# 2: Display all messages [-V]
# verbose 0
# [-l] Log file
log_file /dev/null
# [-x] Server password
# password PASSWORD
# [-e] SSL certificate file full path
# ssl_cert /path/to/ssl/cert
# [-f] SSL CA file full path
# ssl_ca /path/to/ssl/ca
# [-k] SSL private key file
# ssl_key /path/to/private/key/file
# [-w] SSL password. Set to 1 to ask for password by command line
# ssl_password 0
# [-T] Use libwrap library (Authen::Libwrap perl module)
# use_libwrap 0

Binary file not shown.

View File

@ -0,0 +1,404 @@
#!/bin/sh
# Tentacle Server Installer
# Linux/FreeBSD Version (generic), for SuSe, Debian/Ubuntu and FreeBSD only
# other Linux distros could not work properly without modifications
# Please see http://www.pandorafms.org
# v1.0 Build 13062022
# This code is licensed under GPL 2.0 license.
# **********************************************************************
PI_VERSION="7.0NG.762"
PI_BUILD="220613"
MODE=$1
if [ $# -gt 1 ]; then
shift
fi
# Defaults
PREFIX=/usr
PANDORA_SPOOL=/var/spool/pandora
TENTACLE_SERVER=/etc/init.d/tentacle_serverd
TENTACLE_CFG_DIR=/etc/tentacle
TENTACLE_CFG_FILE=$TENTACLE_CFG_DIR/tentacle_server.conf
TENTACLE_CFG_FILE_DIST=conf/tentacle_server.conf.new
TENTACLE_INIT_SCRIPT=util/tentacle_serverd
PERL=perl
MANDIR=$PREFIX/share/man/man1
INITDIR=/etc/init.d
WITHOUT_TENTACLE=0
#
# set_global_vars
# Check platform and set DISTRO, OS_VERSION and LINUX.
# Also, define some platform sepcific variables (e.g. PANDORA_RC_VAR for (Free|Net)BSD)
# and override some of defaults defined above if needed.
#
set_global_vars () {
# Default
LINUX=NO
OS_VERSION=`uname -r`
DISTRO=`uname -s`
# set correct value for LINUX_DISTRO
case $DISTRO in
Linux)
# Default for Linux
LINUX=YES
DISTRO="GENERIC"
# Get Linux Distro type and version
# We assume we are on Linux unless told otherwise
if [ -f "/etc/SuSE-release" ]
then
OS_VERSION=`cat /etc/SuSE-release | grep VERSION | cut -f 3 -d " "`
DISTRO=SUSE
elif [ -f "/etc/lsb-release" ] && [ ! -f "/etc/redhat-release" ]
then
OS_VERSION=`cat /etc/lsb-release | grep DISTRIB_RELEASE | cut -f 2 -d "="`
DISTRO=UBUNTU
OS_VERSION="UBUNTU $OS_VERSION"
elif [ -f "/etc/debian_version" ]
then
OS_VERSION=`cat /etc/debian_version`
OS_VERSION="DEBIAN $OS_VERSION"
DISTRO=DEBIAN
elif [ -f "/etc/fedora-release" ]
then
OS_VERSION=`cat /etc/fedora-release | cut -f 4 -d " "`
OS_VERSION="FEDORA $OS_VERSION"
DISTRO=FEDORA
fi
;;
Darwin|AIX)
# For future reference, Darwin doesn't have /etc/init.d but uses LaunchDaemons.
# AIX doesn't have /etc/init.d
;;
SunOS)
# Some Solaris and other Unices don't have /etc/init.d, some have /usr/spool instead of /var/spool
DISTRO="Solaris"
;;
FreeBSD)
PREFIX=/usr/local
TENTACLE_SERVER=$PREFIX/etc/rc.d/tentacle_server
TENTACLE_CFG_DIR=$PREFIX/etc/tentacle
TENTACLE_CFG_FILE=$TENTACLE_CFG_DIR/tentacle_server.conf
TENTACLE_INIT_SCRIPT=$DISTRO/tentacle_server
MANDIR=$PREFIX/man/man1
INITDIR=$PREFIX/etc/rc.d
PERL=/usr/local/bin/perl
TENTACLE_RC_VAR="tentacle_server_enable"
;;
NetBSD)
PREFIX=/usr/local
TENTACLE_CFG_DIR=$PREFIX/etc/tentacle
TENTACLE_CFG_FILE=$TENTACLE_CFG_DIR/tentacle_server.conf
TENTACLE_SERVER=/etc/rc.d/tentacle_server
TENTACLE_INIT_SCRIPT=$DISTRO/tentacle_server
PERL=/usr/pkg/bin/perl
INITDIR=/etc/rc.d
PANDORA_RC_VAR="pandora_server"
TENTACLE_RC_VAR="tentacle_server"
;;
esac
}
#
# install_startup_script [options...] SRC
# copy SRC into the $INITDIR and do additional required operation according to $DISTRO
# if $INITDIR is not set or empty, do nothing.
# If $DESTDIR is set, skip enabling service
# OPTIONS:
# -s SPRIO specify startup priority for service
#
install_startup_script () {
[ "$INITDIR" ] || return 1
if [ "$1" = "-s" ]
then
SPRIO=$2
shift;shift
fi
SRC=$1
SCRIPT_NAME=`basename $SRC`
echo "Copying the daemon script into $DESTDIR$INITDIR"
[ -d $DESTDIR$INITDIR ] || mkdir -p $DESTDIR$INITDIR
cp $SRC $DESTDIR$INITDIR
[ "$DESTDIR" ] && return
case $DISTRO in
UBUNTU|DEBIAN)
echo "Linking startup script to /etc/rc2.d"
update-rc.d $SCRIPT_NAME defaults
;;
SUSE)
echo "Creating startup daemons"
insserv $SCRIPT_NAME
;;
FeeBSD|NetBSD)
chmod 555 $DESTDIR$INITDIR/$SCRIPT_NAME
;;
*)
if [ "$LINUX" = YES ]
then
# Pandora FMS Server install (Other Distros)
INITLV=`grep '[0-9]:initdefault' /etc/inittab | cut -f 2 -d ':'`
: ${INITLV:=2}
echo "Linking startup script to /etc/rc.d/rc$INITLV.d/S$SPRIO$SCRIPT_NAME"
ln -s $INITDIR/$SCRIPT_NAME /etc/rc.d/rc$INITLV.d/S$SPRIO$SCRIPT_NAME
fi
;;
esac
}
install () {
set_global_vars
FORCE=0
# parse options
while :
do
case $1 in
--force) FORCE=1;;
--destdir) DESTDIR=$2;shift;;
*) break;;
esac
shift
done
if [ "$LINUX" = YES ]
then
echo "$DISTRO distribution detected"
else
echo "$DISTRO detected"
fi
$PERL -v &> /dev/null
if [ $? != 0 ]; then
echo ' '
echo 'Error, no PERL Interpeter found, please install perl on your system'
exit 1
fi
#Check dependenciaes.
if [ $FORCE -eq 0 ]; then
# Execute tools check
execute_cmd "ps --version" 'Checking dependencies: ps' "Error ps not found, please install procps"
execute_cmd "sudo --version" 'Checking dependencies: sudo' "Error sudo not found, please install sudo"
execute_cmd "perl -MIO::Compress::Zip -le 'pass'" 'Checking dependencies: perl IO::Compress' "Error perl IO::Compress not found, please install perl IO::Compress"
fi
# install tentacle
[ -d $DESTDIR$PREFIX/bin/ ] || mkdir -p $DESTDIR$PREFIX/bin/
echo ">Installing the tentacle_server binary to $DESTDIR$PREFIX/bin/..."
cp -f tentacle_server "$DESTDIR$PREFIX/bin/"
echo ">Installing the tentacle_client binary to $DESTDIR$PREFIX/bin/..."
cp -f tentacle_client "$DESTDIR$PREFIX/bin/"
echo "Creating common Pandora FMS directories"
id pandora 2> /dev/null
if [ $? -eq 0 ]; then
echo " "
echo "User pandora does exist, make sure the SSH directories are correct"
else
echo "Are you sure we can create a standard 'pandora' user locally? [y/N]"
read AREYOUSURE
if [ "$AREYOUSURE" = "y" ]; then
if [ "$DISTRO" = "FreeBSD" ]
then
echo "pandora:41121:::::Pandora FMS:/home/pandora:/usr/sbin/nologin:" | adduser -f - -w no 2> /dev/null
else
useradd pandora
mkdir /home/pandora 2> /dev/null
mkdir /home/pandora/.ssh 2> /dev/null
chown -R pandora /home/pandora
fi
else
echo "Please create the 'pandora' user manually according to your authentication scheme, then start again the installation"
echo "Aborting..."
exit 1
fi
fi
mkdir -p $DESTDIR$PANDORA_SPOOL/data_in 2> /dev/null
chmod 2770 $DESTDIR$PANDORA_SPOOL/data_in
mkdir $DESTDIR$PANDORA_SPOOL/data_in/conf 2> /dev/null
chmod 2770 $DESTDIR$PANDORA_SPOOL/data_in/conf
mkdir $DESTDIR$PANDORA_SPOOL/data_in/md5 2> /dev/null
chmod 2770 $DESTDIR$PANDORA_SPOOL/data_in/md5
mkdir $DESTDIR$PANDORA_SPOOL/data_in/collections 2> /dev/null
chmod 2770 $DESTDIR$PANDORA_SPOOL/data_in/collections
mkdir $DESTDIR$PANDORA_SPOOL/data_in/netflow 2> /dev/null
chmod 2770 $DESTDIR$PANDORA_SPOOL/data_in/netflow
mkdir $DESTDIR$PANDORA_SPOOL/data_in/trans 2> /dev/null
chmod 2770 $DESTDIR$PANDORA_SPOOL/data_in/trans
mkdir $DESTDIR$PANDORA_SPOOL/data_in/commands 2> /dev/null
chmod 2770 $DESTDIR$PANDORA_SPOOL/data_in/commands
echo "Giving proper permission to $DESTDIR$PANDORA_SPOOL/"
for group in "www-data" wwwrun www apache
do
IDGROUP=`id -g "$group" 2> /dev/null`
if [ $? -eq 0 ]
then
GROUPNAME=`grep ":$IDGROUP:" /etc/group | awk -F":" '{print $1}'`
break
fi
done
if [ -z "$GROUPNAME" ]
then
echo "No web server user found, some functionality might not perform correctly"
GROUPNAME=0
fi
# when fakeroot installation, this can fail
chown -R pandora:$GROUPNAME $DESTDIR$PANDORA_SPOOL 2>/dev/null
chown apache:$GROUPNAME $DESTDIR$PANDORA_SPOOL/data_in/customer_key 2>/dev/null
# install tentacle_server
install_startup_script -s 80 $TENTACLE_INIT_SCRIPT
# Create the directory to locate the Tentacle configuration file
echo "Creating setup Tentacle directory in $DESTDIR$TENTACLE_CFG_DIR"
mkdir -p $DESTDIR$TENTACLE_CFG_DIR 2> /dev/null
if [ -f "$DESTDIR$TENTACLE_CFG_FILE" ]
then
echo cp $TENTACLE_CFG_FILE_DIST $DESTDIR$TENTACLE_CFG_DIR
cp $TENTACLE_CFG_FILE_DIST $DESTDIR$TENTACLE_CFG_DIR
else
echo cp $TENTACLE_CFG_FILE_DIST $DESTDIR$TENTACLE_CFG_FILE
cp $TENTACLE_CFG_FILE_DIST $DESTDIR$TENTACLE_CFG_FILE
chmod 774 $DESTDIR$TENTACLE_CFG_FILE
fi
echo "Installing Tentacle Server manual"
[ -d $DESTDIR$MANDIR ] || mkdir -p $DESTDIR$MANDIR
cp man/man1/tentacle_server.1.gz $DESTDIR$MANDIR
# Fix util paths
sed -i -e "s|directory.*|directory $DESTDIR$PANDORA_SPOOL/data_in|g" $DESTDIR$TENTACLE_CFG_FILE
sed -i -e "s|TENTACLE_PATH=\"/usr/bin\"|TENTACLE_PATH=$DESTDIR$PREFIX/bin|g" $DESTDIR$TENTACLE_SERVER
sed -i -e "s|^TENTACLE_CONFIG_FILE=.*|TENTACLE_CONFIG_FILE=$DESTDIR$TENTACLE_CFG_FILE|g" $DESTDIR$TENTACLE_SERVER
echo "Tentacle Server installed"
}
uninstall () {
set_global_vars
# parse options
while :
do
case $1 in
--destdir) DESTDIR=$2;shift;;
*) break;;
esac
shift
done
if [ "$LINUX" != "YES" ] && [ "$DISTRO" != "FreeBSD" ] && [ "$DISTRO" != "NetBSD" ]
then
echo "This is not a Linux-based distro. Uninstaller is currently not working for your OS"
exit 1
fi
echo "Removing Tentacle Server"
if [ -d $DESTDIR$PANDORA_SPOOL/data_out ]; then
rm -Rf $DESTDIR$PANDORA_SPOOL/data_in
else
rm -Rf $DESTDIR$PANDORA_SPOOL
fi
echo "If the user Pandora is not being used for any other operations, please delete using the following commands:"
if [ "$DISTRO" != "FreeBSD" ] || [ "$DISTRO" != "NetBSD" ]
then
echo " rmuser pandora"
else
echo " userdel pandora"
echo " rm -Rf /home/pandora/"
fi
## Just to clarify here. Some people (like me) are using the pandora user
## for other purposes and/or using an LDAP-based user management
## I would hate to have a script clear out this users' information without any notification
rm -f $DESTDIR$TENTACLE_CFG_FILE 2> /dev/null
rm -f "$DESTDIR$TENTACLE_CFG_FILE.new" 2> /dev/null
# Do not remove tentacle files if agent is still installed...
[ -e $DESTDIR$PREFIX/bin/pandora_agent ] || rm -f $DESTDIR$PREFIX/bin/tentacle_server 2> /dev/null
[ -e $DESTDIR$PREFIX/bin/pandora_agent ] || rm -f $DESTDIR$PREFIX/bin/tentacle_client 2> /dev/null
if [ "$DESTDIR" ]
then
rm -f $DESTDIR$TENTACLE_SERVER
elif [ "$DISTRO" = "UBUNTU" ] || [ "$DISTRO" = "DEBIAN" ]
then
update-rc.d -f tentacle_serverd remove
fi
rm -f $DESTDIR/etc/rc2.d/S80tentacle_serverd 2> /dev/null
rm -f $DESTDIR/etc/rc.d/rc3.d/S80tentacle_serverd 2> /dev/null
echo "Done"
echo $DESTDIR$TENTACLE_SERVER
}
help () {
echo " --install To install Pandora FMS Servers on this system (You have to be root)"
echo " --uninstall To uninstall and remove Pandora FMS Servers on this System"
echo " "
echo " Additional second parameter (after --install) "
echo " "
echo " --force Ignore dependency problems and do the install"
echo " --destdir DIR Specify root directory for \"fakeroot\" installation"
echo " "
}
execute_cmd () {
cmd="$1"
msg="$2"
echo "$msg"
$cmd &>> /dev/null
if [ $? -ne 0 ]; then
echo "Fail"
[ "$3" ] && echo "$3"
echo "Error installing Tentacle server"
exit 1
else
echo "Ok"
return 0
fi
}
##Main
# Script banner at start
echo " "
echo "Tentacle Server Installer $PI_VERSION $PI_BUILD (c) 2008-2022 Artica ST"
echo "This program is licensed under GPL2 Terms. http://pandorafms.com"
echo " "
case "$MODE" in
'--install')
install "$@"
exit 0
;;
'--uninstall')
uninstall "$@"
exit 0
;;
*)
help
esac

185
tentacle/util/tentacle_serverd Executable file
View File

@ -0,0 +1,185 @@
#!/bin/bash
# Copyright (c) 2005-2010 Artica ST
#
# Author: Sancho Lerena <slerena@artica.es> 2006-2010
#
# /etc/init.d/tentacle_server
#
# System startup script for Tentacle Server
#
# Comments to support chkconfig on RedHat Linux
# chkconfig: 2345 90 90
# description: Tentacle Server startup script
#
# Comments to support LSB init script conventions
### BEGIN INIT INFO
# Provides: tentacle_server
# Required-Start: $network
# Should-Start: $syslog
# Required-Stop: $network
# Should-Stop: $network
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Short-Description: Tentacle Server startup script
# Description: Tentacle Server startup script
### END INIT INFO
if [ -x /lib/lsb/init-functions ]; then
. /lib/lsb/init-functions
fi
# Uses a wait limit before sending a KILL signal, before trying to stop
# Pandora FMS server nicely. Some big systems need some time before close
# all pending tasks / threads.
export MAXWAIT=60
# Check for SUSE status scripts
if [ -f /etc/rc.status ]
then
. /etc/rc.status
rc_reset
else
# Define part of rc functions for non-suse systems
function rc_status () {
RETVAL=$?
case $1 in
-v) RETVAL=0;;
esac
}
function rc_exit () { exit $RETVAL; }
function rc_failed () { RETVAL=${1:-1}; }
RETVAL=0
fi
function get_pid {
# This sets COLUMNS to XXX chars, because if command is run
# in a "strech" term, ps aux don't report more than COLUMNS
# characters and this will not work.
COLUMNS=300
TENTACLE_PID=`ps -Af | grep "$TENTACLE_PATH$TENTACLE_DAEMON" | grep "$TENTACLE_CONFIG_FILE" | grep -v grep | tail -1 | awk '{ print $2 }'`
echo $TENTACLE_PID
}
function get_all_pid {
# This sets COLUMNS to XXX chars, because if command is run
# in a "strech" term, ps aux don't report more than COLUMNS
# characters and this will not work.
COLUMNS=300
TENTACLE_PIDS=`ps aux | grep "$TENTACLE_PATH$TENTACLE_DAEMON" | grep -v grep | awk '{ print $2 }'`
TENTACLE_PID="${TENTACLE_PIDS//\\n/' '}"
echo $TENTACLE_PID
}
# Tentacle server settings
TENTACLE_DAEMON="tentacle_server"
TENTACLE_PATH="/usr/bin"
TENTACLE_USER="pandora"
TENTACLE_CONFIG_FILE="/etc/tentacle/tentacle_server.conf"
TENTACLE_EXT_OPTS=""
# Set umask to 0002, because group MUST have access to write files to
# use remote file management on Pandora FMS Enterprise.
umask 0007
# Main script
TENTACLE_OPTS="-F $TENTACLE_CONFIG_FILE $TENTACLE_EXT_OPTS"
# Fix TENTACLE_PATH
case "$TENTACLE_PATH" in
*\/)
;;
*)
TENTACLE_PATH="${TENTACLE_PATH}/"
;;
esac
if [ ! -f "${TENTACLE_PATH}$TENTACLE_DAEMON" ]; then
echo "Tentacle Server not found in ${TENTACLE_PATH}$TENTACLE_DAEMON"
rc_failed 5 # program is not installed
rc_exit
fi
case "$1" in
start)
TENTACLE_PID=`get_pid`
if [ ! -z "$TENTACLE_PID" ]; then
echo "Tentacle Server is already running with PID $TENTACLE_PID"
rc_exit # running start on a service already running
fi
# Init the tentacle process
sudo -u $TENTACLE_USER ${TENTACLE_PATH}$TENTACLE_DAEMON $TENTACLE_OPTS
sleep 1
TENTACLE_PID=`get_pid`
if [ ! -z "$TENTACLE_PID" ]; then
echo "Tentacle Server is now running with PID $TENTACLE_PID"
rc_status -v
else
echo "Tentacle Server could not be started."
echo "Verify that Tentacle port is not used."
rc_failed 7 # program not running
fi
;;
stop)
TENTACLE_PID=`get_all_pid`
if [ -z "$TENTACLE_PID" ]; then
echo "Tentacle Server does not seem to be running"
rc_exit # running stop on a service already stopped or not running
else
kill $TENTACLE_PID
COUNTER=0
while [ $COUNTER -lt $MAXWAIT ]
do
_PID=`get_all_pid`
if [ "$_PID" != "$TENTACLE_PID" ]
# tentacle already stopped
then
COUNTER=$MAXWAIT
fi
COUNTER=`expr $COUNTER + 1`
sleep 1
done
if [ "$_PID" = "$TENTACLE_PID" ]
then
kill -9 $TENTACLE_PID > /dev/null 2>&1
fi
echo "Stopping Tentacle Server"
rc_status -v
fi
;;
force-reload|restart)
$0 stop
sleep 1
$0 start
rc_status
;;
status)
TENTACLE_PID=`get_pid`
if [ -z "$TENTACLE_PID" ]; then
echo "Tentacle Server is not running."
rc_failed 7 # program is not running
else
echo "Tentacle Server is running with PID $TENTACLE_PID."
rc_status
fi
;;
*)
echo "Usage: $0 {start | stop | restart | status}"
exit 1
;;
esac
rc_exit

View File

@ -0,0 +1,14 @@
[Unit]
Description=Tentacle server daemon
After=network-online.target
Requires=network.target
[Service]
Type=forking
ExecStart=/usr/bin/tentacle_server -F /etc/tentacle/tentacle_server.conf
User=pandora
Restart=on-failure
RestartPreventExitStatus=1
[Install]
WantedBy=multi-user.target