mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge branch 'develop'
This commit is contained in:
commit
dda180886e
@ -14,7 +14,7 @@ PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf
|
|||||||
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
|
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
|
||||||
|
|
||||||
|
|
||||||
S_VERSION='202302201'
|
S_VERSION='202304111'
|
||||||
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
|
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
|
||||||
|
|
||||||
# define default variables
|
# define default variables
|
||||||
@ -149,8 +149,8 @@ check_root_permissions
|
|||||||
|
|
||||||
#advicing BETA PROGRAM
|
#advicing BETA PROGRAM
|
||||||
INSTALLING_VER="${green}RRR version enable using RRR PandoraFMS packages${reset}"
|
INSTALLING_VER="${green}RRR version enable using RRR PandoraFMS packages${reset}"
|
||||||
[ "$PANDORA_BETA" -ne '0' ] && INSTALLING_VER="${red}BETA version enable using nightly PandoraFMS packages${reset}"
|
|
||||||
[ "$PANDORA_LTS" -ne '0' ] && INSTALLING_VER="${green}LTS version enable using LTS PandoraFMS packages${reset}"
|
[ "$PANDORA_LTS" -ne '0' ] && INSTALLING_VER="${green}LTS version enable using LTS PandoraFMS packages${reset}"
|
||||||
|
[ "$PANDORA_BETA" -ne '0' ] && INSTALLING_VER="${red}BETA version enable using nightly PandoraFMS packages${reset}"
|
||||||
echo -e $INSTALLING_VER
|
echo -e $INSTALLING_VER
|
||||||
|
|
||||||
# Connectivity
|
# Connectivity
|
||||||
@ -327,12 +327,15 @@ console_dependencies=" \
|
|||||||
mod_ssl \
|
mod_ssl \
|
||||||
libzstd \
|
libzstd \
|
||||||
openldap-clients \
|
openldap-clients \
|
||||||
chromium \
|
http://firefly.artica.es/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \
|
||||||
|
http://firefly.artica.es/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \
|
||||||
http://firefly.artica.es/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \
|
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/centos7/wmic-1.4-1.el7.x86_64.rpm \
|
||||||
http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"
|
http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"
|
||||||
execute_cmd "dnf install -y $console_dependencies" "Installing Pandora FMS Console dependencies"
|
execute_cmd "dnf install -y $console_dependencies" "Installing Pandora FMS Console dependencies"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Server dependencies
|
# Server dependencies
|
||||||
server_dependencies=" \
|
server_dependencies=" \
|
||||||
perl \
|
perl \
|
||||||
@ -516,9 +519,9 @@ fi
|
|||||||
|
|
||||||
# if beta is enable
|
# if beta is enable
|
||||||
if [ "$PANDORA_BETA" -eq '1' ] ; then
|
if [ "$PANDORA_BETA" -eq '1' ] ; then
|
||||||
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm"
|
PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm"
|
||||||
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://pandorafms.com/community/community-console-rpm-beta/"
|
PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_console-latest.noarch.rpm"
|
||||||
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
|
PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Downloading Pandora Packages
|
# Downloading Pandora Packages
|
||||||
|
@ -17,7 +17,7 @@ PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
|
|||||||
WORKDIR=/opt/pandora/deploy
|
WORKDIR=/opt/pandora/deploy
|
||||||
|
|
||||||
|
|
||||||
S_VERSION='202302201'
|
S_VERSION='202304111'
|
||||||
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
|
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
|
||||||
rm -f $LOGFILE &> /dev/null # remove last log before start
|
rm -f $LOGFILE &> /dev/null # remove last log before start
|
||||||
|
|
||||||
@ -153,8 +153,8 @@ check_root_permissions
|
|||||||
|
|
||||||
#advicing BETA PROGRAM
|
#advicing BETA PROGRAM
|
||||||
INSTALLING_VER="${green}RRR version enable using RRR PandoraFMS packages${reset}"
|
INSTALLING_VER="${green}RRR version enable using RRR PandoraFMS packages${reset}"
|
||||||
[ "$PANDORA_BETA" -ne '0' ] && INSTALLING_VER="${red}BETA version enable using nightly PandoraFMS packages${reset}"
|
|
||||||
[ "$PANDORA_LTS" -ne '0' ] && INSTALLING_VER="${green}LTS version enable using LTS PandoraFMS packages${reset}"
|
[ "$PANDORA_LTS" -ne '0' ] && INSTALLING_VER="${green}LTS version enable using LTS PandoraFMS packages${reset}"
|
||||||
|
[ "$PANDORA_BETA" -ne '0' ] && INSTALLING_VER="${red}BETA version enable using nightly PandoraFMS packages${reset}"
|
||||||
echo -e $INSTALLING_VER
|
echo -e $INSTALLING_VER
|
||||||
|
|
||||||
# Connectivity
|
# Connectivity
|
||||||
@ -304,8 +304,9 @@ ln -s /usr/bin/fping /usr/sbin/fping &>> "$LOGFILE"
|
|||||||
|
|
||||||
# Chrome
|
# Chrome
|
||||||
rm -f /usr/bin/chromium-browser &>> "$LOGFILE"
|
rm -f /usr/bin/chromium-browser &>> "$LOGFILE"
|
||||||
execute_cmd "wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" "Downloading google chrome"
|
CHROME_VERSION=google-chrome-stable_110.0.5481.177-1_amd64.deb
|
||||||
execute_cmd "apt install -y ./google-chrome-stable_current_amd64.deb" "Intalling google chrome"
|
execute_cmd "wget https://dl.google.com/linux/deb/pool/main/g/google-chrome-stable/${CHROME_VERSION}" "Downloading google chrome"
|
||||||
|
execute_cmd "apt install -y ./${CHROME_VERSION}" "Intalling google chrome"
|
||||||
execute_cmd "ln -s /usr/bin/google-chrome /usr/bin/chromium-browser" "Creating /usr/bin/chromium-browser Symlink"
|
execute_cmd "ln -s /usr/bin/google-chrome /usr/bin/chromium-browser" "Creating /usr/bin/chromium-browser Symlink"
|
||||||
|
|
||||||
# SDK VMware perl dependencies
|
# SDK VMware perl dependencies
|
||||||
@ -466,9 +467,9 @@ elif [ "$PANDORA_LTS" -ne '1' ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$PANDORA_BETA" -eq '1' ] ; then
|
if [ "$PANDORA_BETA" -eq '1' ] ; then
|
||||||
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_server-latest_x86_64.tar.gz"
|
PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_server-latest_x86_64.tar.gz"
|
||||||
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_console-latest.tar.gz"
|
PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_console-latest.tar.gz"
|
||||||
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz"
|
PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Downloading Pandora Packages
|
# Downloading Pandora Packages
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-agent-unix
|
package: pandorafms-agent-unix
|
||||||
Version: 7.0NG.770-230403
|
Version: 7.0NG.770-230411
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -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.770-230403"
|
pandora_version="7.0NG.770-230411"
|
||||||
|
|
||||||
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
|
||||||
|
@ -1023,7 +1023,7 @@ my $Sem = undef;
|
|||||||
my $ThreadSem = undef;
|
my $ThreadSem = undef;
|
||||||
|
|
||||||
use constant AGENT_VERSION => '7.0NG.770';
|
use constant AGENT_VERSION => '7.0NG.770';
|
||||||
use constant AGENT_BUILD => '230403';
|
use constant AGENT_BUILD => '230411';
|
||||||
|
|
||||||
# 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;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_agent_linux
|
%define name pandorafms_agent_linux
|
||||||
%define version 7.0NG.770
|
%define version 7.0NG.770
|
||||||
%define release 230403
|
%define release 230411
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_agent_linux
|
%define name pandorafms_agent_linux
|
||||||
%define version 7.0NG.770
|
%define version 7.0NG.770
|
||||||
%define release 230403
|
%define release 230411
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.770"
|
PI_VERSION="7.0NG.770"
|
||||||
PI_BUILD="230403"
|
PI_BUILD="230411"
|
||||||
OS_NAME=`uname -s`
|
OS_NAME=`uname -s`
|
||||||
|
|
||||||
FORCE=0
|
FORCE=0
|
||||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
Version
|
Version
|
||||||
{230403}
|
{230411}
|
||||||
|
|
||||||
ViewReadme
|
ViewReadme
|
||||||
{Yes}
|
{Yes}
|
||||||
|
@ -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.770 Build 230403")
|
#define PANDORA_VERSION ("7.0NG.770 Build 230411")
|
||||||
|
|
||||||
string pandora_path;
|
string pandora_path;
|
||||||
string pandora_dir;
|
string pandora_dir;
|
||||||
|
@ -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.770(Build 230403))"
|
VALUE "ProductVersion", "(7.0NG.770(Build 230411))"
|
||||||
VALUE "FileVersion", "1.0.0.0"
|
VALUE "FileVersion", "1.0.0.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-console
|
package: pandorafms-console
|
||||||
Version: 7.0NG.770-230403
|
Version: 7.0NG.770-230411
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -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.770-230403"
|
pandora_version="7.0NG.770-230411"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -224,7 +224,7 @@ function pandora_realtime_graphs()
|
|||||||
false,
|
false,
|
||||||
'',
|
'',
|
||||||
'white-box-content',
|
'white-box-content',
|
||||||
'box-flat white_table_graph fixed_filter_bar'
|
'box-flat white_table_graph'
|
||||||
);
|
);
|
||||||
|
|
||||||
$chart[time()]['graph'] = '0';
|
$chart[time()]['graph'] = '0';
|
||||||
|
@ -189,6 +189,12 @@ CREATE TABLE IF NOT EXISTS `tfavmenu_user` (
|
|||||||
`section` VARCHAR(255) NOT NULL,
|
`section` VARCHAR(255) NOT NULL,
|
||||||
PRIMARY KEY (`id`));
|
PRIMARY KEY (`id`));
|
||||||
|
|
||||||
|
ALTER TABLE `tnetflow_filter` ADD COLUMN `netflow_monitoring` TINYINT UNSIGNED NOT NULL default 0;
|
||||||
|
ALTER TABLE `tnetflow_filter` ADD COLUMN `traffic_max` INTEGER NOT NULL default 0;
|
||||||
|
ALTER TABLE `tnetflow_filter` ADD COLUMN `traffic_critical` float(20,2) NOT NULL default 0;
|
||||||
|
ALTER TABLE `tnetflow_filter` ADD COLUMN `traffic_warning` float(20,2) NOT NULL default 0;
|
||||||
|
ALTER TABLE `tnetflow_filter` ADD COLUMN `utimestamp` INT UNSIGNED NOT NULL DEFAULT 0;
|
||||||
|
ALTER TABLE `tnetflow_filter` ADD COLUMN `netflow_monitoring_interval` INT UNSIGNED NOT NULL DEFAULT 300;
|
||||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('legacy_database_ha', 1);
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('legacy_database_ha', 1);
|
||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
@ -1195,6 +1195,8 @@ if ($update_agent) {
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ui_update_name_fav_element($id_agente, 'Agents', $alias);
|
||||||
|
|
||||||
ui_print_success_message(__('Successfully updated'));
|
ui_print_success_message(__('Successfully updated'));
|
||||||
db_pandora_audit(
|
db_pandora_audit(
|
||||||
AUDIT_LOG_AGENT_MANAGEMENT,
|
AUDIT_LOG_AGENT_MANAGEMENT,
|
||||||
|
@ -237,8 +237,9 @@ if (db_get_num_rows($sql) == 0) {
|
|||||||
$table->head[5] = __('Actions');
|
$table->head[5] = __('Actions');
|
||||||
$table->align = [];
|
$table->align = [];
|
||||||
$table->align[5] = 'left';
|
$table->align[5] = 'left';
|
||||||
|
$i = 0;
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
|
$table->cellclass[$i++][5] = 'table_action_buttons';
|
||||||
$data = [];
|
$data = [];
|
||||||
|
|
||||||
$sql = sprintf('SELECT id_policy FROM tpolicy_modules_inventory WHERE id = %d', $row['id_policy_module_inventory']);
|
$sql = sprintf('SELECT id_policy FROM tpolicy_modules_inventory WHERE id = %d', $row['id_policy_module_inventory']);
|
||||||
|
@ -563,7 +563,14 @@ if ($search != '') {
|
|||||||
if ($id != '') {
|
if ($id != '') {
|
||||||
$aux = $id[0]['id_agent'];
|
$aux = $id[0]['id_agent'];
|
||||||
$search_sql = sprintf(
|
$search_sql = sprintf(
|
||||||
' AND ( `nombre` LIKE "%%%s%%" OR tagente.id_agente = %d',
|
' AND ( nombre LIKE "%%%s%%"
|
||||||
|
OR alias LIKE "%%%s%%"
|
||||||
|
OR comentarios LIKE "%%%s%%"
|
||||||
|
OR EXISTS (SELECT * FROM tagent_custom_data WHERE id_agent = id_agente AND description LIKE "%%%s%%")
|
||||||
|
OR tagente.id_agente = %d',
|
||||||
|
$search,
|
||||||
|
$search,
|
||||||
|
$search,
|
||||||
$search,
|
$search,
|
||||||
$aux
|
$aux
|
||||||
);
|
);
|
||||||
|
@ -237,6 +237,8 @@ if ($update) {
|
|||||||
['id_filter' => $id]
|
['id_filter' => $id]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ui_update_name_fav_element($id, 'Events', $id_name);
|
||||||
|
|
||||||
ui_print_result_message(
|
ui_print_result_message(
|
||||||
$result,
|
$result,
|
||||||
__('Successfully updated'),
|
__('Successfully updated'),
|
||||||
|
@ -534,6 +534,7 @@ if ($is_management_allowed === true && $update_group === true) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
|
ui_update_name_fav_element($id_group, 'Groups', $name);
|
||||||
ui_print_success_message(__('Group successfully updated'));
|
ui_print_success_message(__('Group successfully updated'));
|
||||||
} else {
|
} else {
|
||||||
ui_print_error_message(__('There was a problem modifying group'));
|
ui_print_error_message(__('There was a problem modifying group'));
|
||||||
|
@ -177,9 +177,8 @@ if ($access_console_node === true) {
|
|||||||
$sub2['godmode/modules/manage_module_templates']['text'] = __('Module templates');
|
$sub2['godmode/modules/manage_module_templates']['text'] = __('Module templates');
|
||||||
$sub2['godmode/modules/manage_module_templates']['id'] = 'module_templates';
|
$sub2['godmode/modules/manage_module_templates']['id'] = 'module_templates';
|
||||||
$sub2['godmode/modules/private_enterprise_numbers']['text'] = __('Private Enterprise Numbers');
|
$sub2['godmode/modules/private_enterprise_numbers']['text'] = __('Private Enterprise Numbers');
|
||||||
|
enterprise_hook('local_components_menu');
|
||||||
$sub2['godmode/modules/private_enterprise_numbers']['id'] = 'private_Enterprise_Numbers';
|
$sub2['godmode/modules/private_enterprise_numbers']['id'] = 'private_Enterprise_Numbers';
|
||||||
$sub2['enterprise/godmode/modules/local_components']['text'] = __('Local components');
|
|
||||||
$sub2['enterprise/godmode/modules/local_components']['id'] = 'local_components';
|
|
||||||
$sub2['godmode/modules/manage_network_components']['text'] = __('Remote components');
|
$sub2['godmode/modules/manage_network_components']['text'] = __('Remote components');
|
||||||
$sub2['godmode/modules/manage_network_components']['id'] = 'network_components';
|
$sub2['godmode/modules/manage_network_components']['id'] = 'network_components';
|
||||||
$sub['templates']['sub2'] = $sub2;
|
$sub['templates']['sub2'] = $sub2;
|
||||||
|
@ -26,6 +26,17 @@
|
|||||||
* ============================================================================
|
* ============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// 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.
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
require_once $config['homedir'].'/include/functions_ui.php';
|
require_once $config['homedir'].'/include/functions_ui.php';
|
||||||
@ -94,6 +105,11 @@ if ($id) {
|
|||||||
$src_port = $filter['src_port'];
|
$src_port = $filter['src_port'];
|
||||||
$aggregate = $filter['aggregate'];
|
$aggregate = $filter['aggregate'];
|
||||||
$advanced_filter = $filter['advanced_filter'];
|
$advanced_filter = $filter['advanced_filter'];
|
||||||
|
$netflow_monitoring = $filter['netflow_monitoring'];
|
||||||
|
$traffic_max = $filter['traffic_max'];
|
||||||
|
$traffic_critical = $filter['traffic_critical'];
|
||||||
|
$traffic_warning = $filter['traffic_warning'];
|
||||||
|
$netflow_monitoring_interval = $filter['netflow_monitoring_interval'];
|
||||||
} else {
|
} else {
|
||||||
$name = '';
|
$name = '';
|
||||||
$assign_group = '';
|
$assign_group = '';
|
||||||
@ -103,6 +119,11 @@ if ($id) {
|
|||||||
$src_port = '';
|
$src_port = '';
|
||||||
$aggregate = 'dstip';
|
$aggregate = 'dstip';
|
||||||
$advanced_filter = '';
|
$advanced_filter = '';
|
||||||
|
$netflow_monitoring = false;
|
||||||
|
$traffic_max = 0;
|
||||||
|
$traffic_critical = 0;
|
||||||
|
$traffic_warning = 0;
|
||||||
|
$netflow_monitoring_interval = 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($update) {
|
if ($update) {
|
||||||
@ -114,20 +135,31 @@ if ($update) {
|
|||||||
$dst_port = get_parameter('dst_port', '');
|
$dst_port = get_parameter('dst_port', '');
|
||||||
$src_port = get_parameter('src_port', '');
|
$src_port = get_parameter('src_port', '');
|
||||||
$advanced_filter = get_parameter('advanced_filter', '');
|
$advanced_filter = get_parameter('advanced_filter', '');
|
||||||
|
$netflow_monitoring = (bool) get_parameter('netflow_monitoring', false);
|
||||||
|
$traffic_max = get_parameter('traffic_max', 0);
|
||||||
|
$traffic_critical = get_parameter('traffic_critical', 0);
|
||||||
|
$traffic_warning = get_parameter('traffic_warning', 0);
|
||||||
|
$netflow_monitoring_interval = get_parameter('netflow_monitoring_interval', 300);
|
||||||
|
|
||||||
|
|
||||||
if ($name == '') {
|
if ($name == '') {
|
||||||
ui_print_error_message(__('Not updated. Blank name'));
|
ui_print_error_message(__('Not updated. Blank name'));
|
||||||
} else {
|
} else {
|
||||||
$values = [
|
$values = [
|
||||||
'id_sg' => $id,
|
'id_sg' => $id,
|
||||||
'id_name' => $name,
|
'id_name' => $name,
|
||||||
'id_group' => $assign_group,
|
'id_group' => $assign_group,
|
||||||
'aggregate' => $aggregate,
|
'aggregate' => $aggregate,
|
||||||
'ip_dst' => $ip_dst,
|
'ip_dst' => $ip_dst,
|
||||||
'ip_src' => $ip_src,
|
'ip_src' => $ip_src,
|
||||||
'dst_port' => $dst_port,
|
'dst_port' => $dst_port,
|
||||||
'src_port' => $src_port,
|
'src_port' => $src_port,
|
||||||
'advanced_filter' => $advanced_filter,
|
'advanced_filter' => $advanced_filter,
|
||||||
|
'netflow_monitoring' => $netflow_monitoring,
|
||||||
|
'traffic_max' => $traffic_max,
|
||||||
|
'traffic_critical' => $traffic_critical,
|
||||||
|
'traffic_warning' => $traffic_warning,
|
||||||
|
'netflow_monitoring_interval' => $netflow_monitoring_interval,
|
||||||
];
|
];
|
||||||
|
|
||||||
// Save filter args.
|
// Save filter args.
|
||||||
@ -152,16 +184,27 @@ if ($create) {
|
|||||||
$dst_port = get_parameter('dst_port', '');
|
$dst_port = get_parameter('dst_port', '');
|
||||||
$src_port = get_parameter('src_port', '');
|
$src_port = get_parameter('src_port', '');
|
||||||
$advanced_filter = (string) get_parameter('advanced_filter', '');
|
$advanced_filter = (string) get_parameter('advanced_filter', '');
|
||||||
|
$netflow_monitoring = (bool) get_parameter('netflow_monitoring', false);
|
||||||
|
$traffic_max = get_parameter('traffic_max', 0);
|
||||||
|
$traffic_critical = get_parameter('traffic_critical', 0);
|
||||||
|
$traffic_warning = get_parameter('traffic_warning', 0);
|
||||||
|
$netflow_monitoring_interval = get_parameter('netflow_monitoring_interval', 300);
|
||||||
|
|
||||||
$values = [
|
$values = [
|
||||||
'id_name' => $name,
|
'id_name' => $name,
|
||||||
'id_group' => $assign_group,
|
'id_group' => $assign_group,
|
||||||
'ip_dst' => $ip_dst,
|
'ip_dst' => $ip_dst,
|
||||||
'ip_src' => $ip_src,
|
'ip_src' => $ip_src,
|
||||||
'dst_port' => $dst_port,
|
'dst_port' => $dst_port,
|
||||||
'src_port' => $src_port,
|
'src_port' => $src_port,
|
||||||
'aggregate' => $aggregate,
|
'aggregate' => $aggregate,
|
||||||
'advanced_filter' => $advanced_filter,
|
'advanced_filter' => $advanced_filter,
|
||||||
|
'netflow_monitoring' => $netflow_monitoring,
|
||||||
|
'traffic_max' => $traffic_max,
|
||||||
|
'traffic_critical' => $traffic_critical,
|
||||||
|
'traffic_warning' => $traffic_warning,
|
||||||
|
'netflow_monitoring_interval' => $netflow_monitoring_interval,
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
// Save filter args
|
// Save filter args
|
||||||
@ -203,6 +246,8 @@ $table->data['first_line'][] = html_print_label_input_block(
|
|||||||
false,
|
false,
|
||||||
20,
|
20,
|
||||||
80,
|
80,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -329,6 +374,77 @@ $table->data['advanced_filters'][] = html_print_label_input_block(
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Netflow server options.
|
||||||
|
$table->colspan['netflow_monitoring'][] = 2;
|
||||||
|
$table->data['netflow_monitoring'][] = html_print_label_input_block(
|
||||||
|
__('Enable Netflow monitoring'),
|
||||||
|
html_print_checkbox_switch(
|
||||||
|
'netflow_monitoring',
|
||||||
|
1,
|
||||||
|
(bool) $netflow_monitoring,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
'displayMonitoringFilter()'
|
||||||
|
).ui_print_input_placeholder(
|
||||||
|
__('Allows you to create an agent that monitors the traffic volume of this filter. It also creates a module that measures if the traffic of any IP of this filter exceeds a certain threshold. A text type module will be created with the traffic rate for each IP within this filter every five minutes (the 10 IP\'s with the most traffic). Only available for Enterprise version.'),
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->data['netflow_server_filters'][] = html_print_label_input_block(
|
||||||
|
__('Netflow monitoring interval'),
|
||||||
|
html_print_input_number(
|
||||||
|
[
|
||||||
|
'step' => 1,
|
||||||
|
'name' => 'netflow_monitoring_interval',
|
||||||
|
'id' => 'netflow_monitoring_interval',
|
||||||
|
'value' => $netflow_monitoring_interval,
|
||||||
|
]
|
||||||
|
).ui_print_input_placeholder(__('Netflow monitoring interval in secs.'), true)
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->data['netflow_server_filters'][] = html_print_label_input_block(
|
||||||
|
__('Maximum traffic value of the filter'),
|
||||||
|
html_print_input_number(
|
||||||
|
[
|
||||||
|
'step' => 1,
|
||||||
|
'name' => 'traffic_max',
|
||||||
|
'id' => 'traffic_max',
|
||||||
|
'value' => $traffic_max,
|
||||||
|
]
|
||||||
|
).ui_print_input_placeholder(__('Specifies the maximum rate (in bytes/sec) of traffic in the filter. It is then used to calculate the % of maximum traffic per IP.'), true)
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->colspan['netflow_thresholds'][] = 1;
|
||||||
|
|
||||||
|
$table->data['netflow_thresholds'][] = html_print_label_input_block(
|
||||||
|
__('CRITICAL threshold for the maximum % of traffic for an IP.'),
|
||||||
|
html_print_input_number(
|
||||||
|
[
|
||||||
|
'step' => 0.01,
|
||||||
|
'name' => 'traffic_critical',
|
||||||
|
'id' => 'traffic_critical',
|
||||||
|
'value' => $traffic_critical,
|
||||||
|
'size' => 40,
|
||||||
|
'maxlength' => 80,
|
||||||
|
]
|
||||||
|
).ui_print_input_placeholder(__('If this % is exceeded by any IP within the filter, a CRITICAL status will be generated.'), true)
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->data['netflow_thresholds'][] = html_print_label_input_block(
|
||||||
|
__('WARNING threshold for the maximum % of traffic for an IP.'),
|
||||||
|
html_print_input_number(
|
||||||
|
[
|
||||||
|
'step' => 0.01,
|
||||||
|
'name' => 'traffic_warning',
|
||||||
|
'id' => 'traffic_warning',
|
||||||
|
'value' => $traffic_warning,
|
||||||
|
'size' => 40,
|
||||||
|
'maxlength' => 80,
|
||||||
|
]
|
||||||
|
).ui_print_input_placeholder(__('If this % is exceeded by any IP within the filter, a WARNING status will be generated.'), true)
|
||||||
|
);
|
||||||
|
|
||||||
$hiddens = '';
|
$hiddens = '';
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$buttonTitle = __('Update');
|
$buttonTitle = __('Update');
|
||||||
@ -368,10 +484,10 @@ html_print_action_buttons(
|
|||||||
else {
|
else {
|
||||||
displayAdvancedFilter ();
|
displayAdvancedFilter ();
|
||||||
}
|
}
|
||||||
|
displayMonitoringFilter();
|
||||||
});
|
});
|
||||||
|
|
||||||
function displayAdvancedFilter () {
|
function displayAdvancedFilter () {
|
||||||
console.log('papapa advanced filter');
|
|
||||||
// Erase the normal filter
|
// Erase the normal filter
|
||||||
document.getElementById("text-ip_dst").value = '';
|
document.getElementById("text-ip_dst").value = '';
|
||||||
document.getElementById("text-ip_src").value = '';
|
document.getElementById("text-ip_src").value = '';
|
||||||
@ -391,9 +507,9 @@ html_print_action_buttons(
|
|||||||
};
|
};
|
||||||
|
|
||||||
function displayNormalFilter () {
|
function displayNormalFilter () {
|
||||||
console.log('papapa normal filter');
|
|
||||||
// Erase the advanced filter
|
// Erase the advanced filter
|
||||||
document.getElementById("textarea_advanced_filter").value = '';
|
document.getElementById("textarea_advanced_filter").value = '';
|
||||||
|
|
||||||
// Hide the advanced filter
|
// Hide the advanced filter
|
||||||
//document.getElementById("table1-7").style.display = 'none';
|
//document.getElementById("table1-7").style.display = 'none';
|
||||||
$("#table1-advanced_filters").css("display", "none");
|
$("#table1-advanced_filters").css("display", "none");
|
||||||
@ -407,4 +523,24 @@ html_print_action_buttons(
|
|||||||
document.getElementById("table1-6").style.display = '';
|
document.getElementById("table1-6").style.display = '';
|
||||||
*/
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function displayMonitoringFilter () {
|
||||||
|
var checked = $('#checkbox-netflow_monitoring').prop('checked');
|
||||||
|
|
||||||
|
if(checked == false) {
|
||||||
|
// Reset values.
|
||||||
|
$("#netflow_monitoring_interval").val(300);
|
||||||
|
$("#traffic_max").val(0);
|
||||||
|
$("#traffic_critical").val(0);
|
||||||
|
$("#traffic_warning").val(0);
|
||||||
|
|
||||||
|
// Hide filters.
|
||||||
|
$("#table1-netflow_server_filters").hide();
|
||||||
|
$("#table1-netflow_thresholds").hide();
|
||||||
|
} else {
|
||||||
|
// Show filters.
|
||||||
|
$("#table1-netflow_server_filters").show();
|
||||||
|
$("#table1-netflow_thresholds").show();
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1231,8 +1231,8 @@ $class = 'databox filters';
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$servers_all_opt = array_merge(['all' => 'All nodes'], $servers);
|
if (is_metaconsole() === true) {
|
||||||
if ($meta) {
|
$servers_all_opt = array_merge(['all' => 'All nodes'], $servers);
|
||||||
?>
|
?>
|
||||||
<tr id="row_servers_all_opt" class="datos">
|
<tr id="row_servers_all_opt" class="datos">
|
||||||
<td class="bolder"><?php echo __('Server'); ?></td>
|
<td class="bolder"><?php echo __('Server'); ?></td>
|
||||||
|
@ -1429,6 +1429,8 @@ switch ($action) {
|
|||||||
['id_report' => $idReport]
|
['id_report' => $idReport]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ui_update_name_fav_element($idReport, 'Reporting', $new_values['name']);
|
||||||
|
|
||||||
$auditMessage = ($resultOperationDB === true) ? 'Update report' : 'Fail try to update report';
|
$auditMessage = ($resultOperationDB === true) ? 'Update report' : 'Fail try to update report';
|
||||||
db_pandora_audit(
|
db_pandora_audit(
|
||||||
AUDIT_LOG_REPORT_MANAGEMENT,
|
AUDIT_LOG_REPORT_MANAGEMENT,
|
||||||
|
@ -293,6 +293,7 @@ switch ($activeTab) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($result !== false) {
|
if ($result !== false) {
|
||||||
|
ui_update_name_fav_element($idVisualConsole, 'Visual_Console', $values['name']);
|
||||||
db_pandora_audit(
|
db_pandora_audit(
|
||||||
AUDIT_LOG_VISUAL_CONSOLE_MANAGEMENT,
|
AUDIT_LOG_VISUAL_CONSOLE_MANAGEMENT,
|
||||||
sprintf('Update visual console #%s', $idVisualConsole)
|
sprintf('Update visual console #%s', $idVisualConsole)
|
||||||
|
@ -1045,6 +1045,22 @@ if (!$new_user) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
$user_id .= $apiTokenContent;
|
$user_id .= $apiTokenContent;
|
||||||
|
|
||||||
|
$CodeQRContent .= html_print_div(['id' => 'qr_container_image', 'class' => 'scale-0-8'], true);
|
||||||
|
$CodeQRContent .= html_print_anchor(
|
||||||
|
['id' => 'qr_code_agent_view'],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
$CodeQRContent .= '<br/>'.$custom_id_div;
|
||||||
|
|
||||||
|
// QR code div.
|
||||||
|
$CodeQRTable = html_print_div(
|
||||||
|
[
|
||||||
|
'class' => 'agent_qr',
|
||||||
|
'content' => $CodeQRContent,
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
$user_id = '<div class="label_select_simple">'.html_print_input_text_extended(
|
$user_id = '<div class="label_select_simple">'.html_print_input_text_extended(
|
||||||
'id_user',
|
'id_user',
|
||||||
|
@ -258,7 +258,7 @@ if (users_is_admin() === true) {
|
|||||||
|
|
||||||
// Password management.
|
// Password management.
|
||||||
$passwordManageTable = new stdClass();
|
$passwordManageTable = new stdClass();
|
||||||
$passwordManageTable->class = 'table_section full_section';
|
$passwordManageTable->class = 'full_section';
|
||||||
$passwordManageTable->id = 'password_manage';
|
$passwordManageTable->id = 'password_manage';
|
||||||
$passwordManageTable->style = [];
|
$passwordManageTable->style = [];
|
||||||
$passwordManageTable->rowclass = [];
|
$passwordManageTable->rowclass = [];
|
||||||
@ -605,7 +605,7 @@ $userManagementTable->data['fields_blocksize_eventfilter'][1] = html_print_selec
|
|||||||
if (is_metaconsole() === false) {
|
if (is_metaconsole() === false) {
|
||||||
// Home screen table.
|
// Home screen table.
|
||||||
$homeScreenTable = new stdClass();
|
$homeScreenTable = new stdClass();
|
||||||
$homeScreenTable->class = 'w100p table_section full_section';
|
$homeScreenTable->class = 'w100p full_section';
|
||||||
$homeScreenTable->id = 'home_screen_table';
|
$homeScreenTable->id = 'home_screen_table';
|
||||||
$homeScreenTable->style = [];
|
$homeScreenTable->style = [];
|
||||||
$homeScreenTable->rowclass = [];
|
$homeScreenTable->rowclass = [];
|
||||||
@ -736,22 +736,6 @@ $userManagementTable->data['fields_addSettings'][1] .= html_print_div(
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
$CodeQRContent .= html_print_div(['id' => 'qr_container_image', 'class' => 'scale-0-8'], true);
|
|
||||||
$CodeQRContent .= html_print_anchor(
|
|
||||||
['id' => 'qr_code_agent_view'],
|
|
||||||
true
|
|
||||||
);
|
|
||||||
$CodeQRContent .= '<br/>'.$custom_id_div;
|
|
||||||
|
|
||||||
// QR code div.
|
|
||||||
$CodeQRTable = html_print_div(
|
|
||||||
[
|
|
||||||
'class' => 'agent_qr',
|
|
||||||
'content' => $CodeQRContent,
|
|
||||||
],
|
|
||||||
true
|
|
||||||
);
|
|
||||||
|
|
||||||
// QR Code and API Token advice.
|
// QR Code and API Token advice.
|
||||||
html_print_div(
|
html_print_div(
|
||||||
[
|
[
|
||||||
|
5
pandora_console/images/netflow@svg.svg
Normal file
5
pandora_console/images/netflow@svg.svg
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="512px" height="512px" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<g><path style="opacity:0.991" fill="#000000" d="M 233.5,-0.5 C 248.167,-0.5 262.833,-0.5 277.5,-0.5C 366.072,10.0146 433.238,53.3479 479,129.5C 496.968,162.07 507.802,196.737 511.5,233.5C 511.5,248.167 511.5,262.833 511.5,277.5C 500.985,366.072 457.652,433.238 381.5,479C 348.93,496.968 314.263,507.802 277.5,511.5C 262.833,511.5 248.167,511.5 233.5,511.5C 144.928,500.985 77.7616,457.652 32,381.5C 14.0316,348.93 3.19825,314.263 -0.5,277.5C -0.5,262.833 -0.5,248.167 -0.5,233.5C 10.0146,144.928 53.3479,77.7616 129.5,32C 162.07,14.0316 196.737,3.19825 233.5,-0.5 Z M 254.5,39.5 C 256.193,40.4749 257.693,41.8082 259,43.5C 278.833,71.3333 298.667,99.1667 318.5,127C 304.504,127.5 290.504,127.667 276.5,127.5C 276.5,148.833 276.5,170.167 276.5,191.5C 262.5,191.5 248.5,191.5 234.5,191.5C 234.5,170.167 234.5,148.833 234.5,127.5C 220.496,127.667 206.496,127.5 192.5,127C 213.8,98.2136 234.466,69.0469 254.5,39.5 Z M 127.5,192.5 C 156.815,213.475 186.148,234.475 215.5,255.5C 186.245,276.377 157.078,297.377 128,318.5C 127.5,304.504 127.333,290.504 127.5,276.5C 106.167,276.5 84.8333,276.5 63.5,276.5C 63.5,262.5 63.5,248.5 63.5,234.5C 84.8333,234.5 106.167,234.5 127.5,234.5C 127.5,220.5 127.5,206.5 127.5,192.5 Z M 382.5,192.5 C 383.496,206.323 383.829,220.323 383.5,234.5C 404.833,234.5 426.167,234.5 447.5,234.5C 447.5,248.5 447.5,262.5 447.5,276.5C 426.167,276.5 404.833,276.5 383.5,276.5C 383.667,290.504 383.5,304.504 383,318.5C 353.922,297.377 324.755,276.377 295.5,255.5C 324.744,234.723 353.744,213.723 382.5,192.5 Z M 234.5,319.5 C 248.5,319.5 262.5,319.5 276.5,319.5C 276.5,340.833 276.5,362.167 276.5,383.5C 290.504,383.333 304.504,383.5 318.5,384C 297.377,413.078 276.377,442.245 255.5,471.5C 234.623,442.245 213.623,413.078 192.5,384C 206.496,383.5 220.496,383.333 234.5,383.5C 234.5,362.167 234.5,340.833 234.5,319.5 Z"/></g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.2 KiB |
@ -37,6 +37,7 @@ require_once 'include/functions_ui.php';
|
|||||||
require_once 'include/functions_db.php';
|
require_once 'include/functions_db.php';
|
||||||
require_once 'include/functions_io.php';
|
require_once 'include/functions_io.php';
|
||||||
require_once 'include/functions.php';
|
require_once 'include/functions.php';
|
||||||
|
require_once $config['homedir'].'/include/class/HTML.class.php';
|
||||||
enterprise_include_once('meta/include/functions_events_meta.php');
|
enterprise_include_once('meta/include/functions_events_meta.php');
|
||||||
enterprise_include_once('include/functions_metaconsole.php');
|
enterprise_include_once('include/functions_metaconsole.php');
|
||||||
|
|
||||||
|
@ -2065,6 +2065,7 @@ if (check_login()) {
|
|||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
echo 'error';
|
echo 'error';
|
||||||
} else {
|
} else {
|
||||||
|
ui_update_name_fav_element($id, 'Modules', $values['ag_modulename']);
|
||||||
echo 'ok';
|
echo 'ok';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,7 @@ class AuditLog extends HTML
|
|||||||
|
|
||||||
ui_print_standard_header(
|
ui_print_standard_header(
|
||||||
__('%s audit', get_product_name()).' » '.__('Review Logs'),
|
__('%s audit', get_product_name()).' » '.__('Review Logs'),
|
||||||
'images/gm_log.png',
|
'images/gm_log@svg.svg',
|
||||||
false,
|
false,
|
||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
|
@ -3245,7 +3245,7 @@ class NetworkMap
|
|||||||
$table->data['template_row']['node_target'] = '';
|
$table->data['template_row']['node_target'] = '';
|
||||||
$table->data['template_row']['edit'] = '';
|
$table->data['template_row']['edit'] = '';
|
||||||
|
|
||||||
$table->data['template_row']['edit'] .= '<span class="edit_icon_correct" style="display: none">'.html_print_image('images/pixel_green.png', true, ['class' => 'main_menu_icon']).'</span><span class="edit_icon_fail" style="display: none" >'.html_print_image('images/dot_red.png', true).'</span><span class="edit_icon_progress" style="display: none">'.html_print_image('images/spinner.gif', true).'</span>';
|
$table->data['template_row']['edit'] .= '<span class="edit_icon_correct" style="display: none">'.html_print_image('images/pixel_green.png', true, ['class' => 'circle-relations']).'</span><span class="edit_icon_fail" style="display: none" >'.html_print_image('images/dot_red.png', true, ['class' => 'circle-relations']).'</span><span class="edit_icon_progress" style="display: none">'.html_print_image('images/spinner.gif', true, ['class' => 'circle-relations']).'</span>';
|
||||||
// <span class="edit_icon"><a class="edit_icon_link" title="'.__('Update').'" href="#">'.html_print_image('images/edit.svg', true, ['class' => 'invert_filter']).'</a></span>';
|
// <span class="edit_icon"><a class="edit_icon_link" title="'.__('Update').'" href="#">'.html_print_image('images/edit.svg', true, ['class' => 'invert_filter']).'</a></span>';
|
||||||
$table->data['template_row']['edit'] .= '<a class="delete_icon" href="#">'.html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter', 'style' => 'padding: 10px']).'</a>';
|
$table->data['template_row']['edit'] .= '<a class="delete_icon" href="#">'.html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter', 'style' => 'padding: 10px']).'</a>';
|
||||||
|
|
||||||
|
@ -1443,7 +1443,7 @@ class SnmpConsole extends HTML
|
|||||||
binding_vars.forEach(function(oid) {
|
binding_vars.forEach(function(oid) {
|
||||||
string += oid+'<br/>';
|
string += oid+'<br/>';
|
||||||
});
|
});
|
||||||
variableBindings = `<td align="left" colspan="8">${string}</td>`;
|
variableBindings = `<td align="left" colspan="8" class="break-word w200px">${string}</td>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.after(`<tr id="show_" role="row">${labelBindings}${variableBindings}</tr>`);
|
tr.after(`<tr id="show_" role="row">${labelBindings}${variableBindings}</tr>`);
|
||||||
|
@ -301,17 +301,6 @@ class TipsWindow
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get number of tips in database
|
|
||||||
*
|
|
||||||
* @return integer
|
|
||||||
*/
|
|
||||||
public function getTotalTips()
|
|
||||||
{
|
|
||||||
return db_get_sql('SELECT count(*) FROM twelcome_tip');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get totals tips that user can show
|
* Get totals tips that user can show
|
||||||
*
|
*
|
||||||
@ -581,7 +570,7 @@ class TipsWindow
|
|||||||
$sql = sprintf(
|
$sql = sprintf(
|
||||||
'SELECT id, name AS language, title, text, url, enable
|
'SELECT id, name AS language, title, text, url, enable
|
||||||
FROM twelcome_tip t
|
FROM twelcome_tip t
|
||||||
LEFT JOIN tlanguage l ON t.id_lang = l.id_language
|
LEFT JOIN tlanguage l ON t.id_lang = l.id_language COLLATE utf8mb4_unicode_ci
|
||||||
%s %s %s',
|
%s %s %s',
|
||||||
$filter,
|
$filter,
|
||||||
$order,
|
$order,
|
||||||
@ -590,6 +579,16 @@ class TipsWindow
|
|||||||
|
|
||||||
$data = db_get_all_rows_sql($sql);
|
$data = db_get_all_rows_sql($sql);
|
||||||
|
|
||||||
|
$sqlCount = sprintf(
|
||||||
|
'SELECT count(*)
|
||||||
|
FROM twelcome_tip t
|
||||||
|
LEFT JOIN tlanguage l ON t.id_lang = l.id_language COLLATE utf8mb4_unicode_ci
|
||||||
|
%s',
|
||||||
|
$filter
|
||||||
|
);
|
||||||
|
|
||||||
|
$total = db_get_sql($sqlCount);
|
||||||
|
|
||||||
foreach ($data as $key => $row) {
|
foreach ($data as $key => $row) {
|
||||||
if ($row['enable'] === '1') {
|
if ($row['enable'] === '1') {
|
||||||
$data[$key]['enable'] = '<span class="enable"></span>';
|
$data[$key]['enable'] = '<span class="enable"></span>';
|
||||||
@ -626,8 +625,6 @@ class TipsWindow
|
|||||||
if (empty($data) === true) {
|
if (empty($data) === true) {
|
||||||
$total = 0;
|
$total = 0;
|
||||||
$data = [];
|
$data = [];
|
||||||
} else {
|
|
||||||
$total = $this->getTotalTips();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo json_encode(
|
echo json_encode(
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
/**
|
/**
|
||||||
* Pandora build version and version
|
* Pandora build version and version
|
||||||
*/
|
*/
|
||||||
$build_version = 'PC230403';
|
$build_version = 'PC230411';
|
||||||
$pandora_version = 'v7.0NG.770';
|
$pandora_version = 'v7.0NG.770';
|
||||||
|
|
||||||
// Do not overwrite default timezone set if defined.
|
// Do not overwrite default timezone set if defined.
|
||||||
|
@ -440,6 +440,7 @@ define('SERVER_TYPE_MIGRATION', 20);
|
|||||||
define('SERVER_TYPE_ALERT', 21);
|
define('SERVER_TYPE_ALERT', 21);
|
||||||
define('SERVER_TYPE_CORRELATION', 22);
|
define('SERVER_TYPE_CORRELATION', 22);
|
||||||
define('SERVER_TYPE_NCM', 23);
|
define('SERVER_TYPE_NCM', 23);
|
||||||
|
define('SERVER_TYPE_NETFLOW', 24);
|
||||||
|
|
||||||
// REPORTS.
|
// REPORTS.
|
||||||
define('REPORT_TOP_N_MAX', 1);
|
define('REPORT_TOP_N_MAX', 1);
|
||||||
|
@ -4934,7 +4934,7 @@ function iterate_group_array($groups, &$data_agents)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tooltip_content = html_print_image('images/groups_small/'.$group['icon'].'.png', true).' '.__('Group').': <b>'.$group_aux['name'].'</b>';
|
$tooltip_content = html_print_image('images/'.$group['icon'], true).' '.__('Group').': <b>'.$group_aux['name'].'</b>';
|
||||||
$group_aux['tooltip_content'] = $tooltip_content;
|
$group_aux['tooltip_content'] = $tooltip_content;
|
||||||
|
|
||||||
$group_aux['children'] = [];
|
$group_aux['children'] = [];
|
||||||
@ -4975,10 +4975,10 @@ function graph_monitor_wheel($width=550, $height=600, $filter=false)
|
|||||||
if ($filter['group'] != 0) {
|
if ($filter['group'] != 0) {
|
||||||
$filter_subgroups = '';
|
$filter_subgroups = '';
|
||||||
if (!$filter['dont_show_subgroups']) {
|
if (!$filter['dont_show_subgroups']) {
|
||||||
$filter_subgroups = ' || parent = '.$filter['group'];
|
$filter_subgroups = ' || parent IN ('.$filter['group'].')';
|
||||||
}
|
}
|
||||||
|
|
||||||
$groups = db_get_all_rows_sql('SELECT * FROM tgrupo where id_grupo = '.$filter['group'].$filter_subgroups);
|
$groups = db_get_all_rows_sql('SELECT * FROM tgrupo where id_grupo IN ('.$filter['group'].') '.$filter_subgroups);
|
||||||
|
|
||||||
$groups_ax = [];
|
$groups_ax = [];
|
||||||
foreach ($groups as $g) {
|
foreach ($groups as $g) {
|
||||||
|
@ -6912,12 +6912,12 @@ function html_print_label_input_block(
|
|||||||
function html_print_go_top()
|
function html_print_go_top()
|
||||||
{
|
{
|
||||||
$output = '</div>';
|
$output = '</div>';
|
||||||
$output .= '<div onclick="topFunction()" id="top_btn" title="Go to top">';
|
$output .= '<div onclick="topFunction()" id="top_btn" class="forced_title" data-title="'.__('Go to top').'" data-use_title_for_force_title="1">';
|
||||||
$output .= '<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">';
|
$output .= '<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="forced_title" data-title="'.__('Go to top').'" data-use_title_for_force_title="1">';
|
||||||
$output .= '<title>Dark / 20 / arrow@svg</title>';
|
// $output .= '<title>'.__('Go to top').'</title>';
|
||||||
$output .= '<desc>Created with Sketch.</desc>';
|
$output .= '<desc>Created with Sketch.</desc>';
|
||||||
$output .= '<g id="Dark-/-20-/-arrow" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">';
|
$output .= '<g id="Dark-/-20-/-arrow" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" class="forced_title" data-title="'.__('Go to top').'" data-use_title_for_force_title="1">';
|
||||||
$output .= '<path d="M3.41005051,6.39052429 C3.91472805,5.90987901 4.70885153,5.8729063 5.25805922,6.27960615 L5.38994949,6.39052429 L10,10.78 L14.6100505,6.39052429 C15.1147281,5.90987901 15.9088515,5.8729063 16.4580592,6.27960615 L16.5899495,6.39052429 C17.094627,6.87116957 17.1334484,7.62747765 16.7064135,8.15053259 L16.5899495,8.27614237 L10.9899495,13.6094757 C10.4852719,14.090121 9.69114847,14.1270937 9.14194078,13.7203939 L9.01005051,13.6094757 L3.41005051,8.27614237 C2.8633165,7.75544332 2.8633165,6.91122335 3.41005051,6.39052429 Z" id="Path-8" fill="#14524f" fill-rule="nonzero" transform="translate(10.000000, 10.000000) rotate(90.000000) translate(-10.000000, -10.000000) "></path>';
|
$output .= '<path d="M3.41005051,6.39052429 C3.91472805,5.90987901 4.70885153,5.8729063 5.25805922,6.27960615 L5.38994949,6.39052429 L10,10.78 L14.6100505,6.39052429 C15.1147281,5.90987901 15.9088515,5.8729063 16.4580592,6.27960615 L16.5899495,6.39052429 C17.094627,6.87116957 17.1334484,7.62747765 16.7064135,8.15053259 L16.5899495,8.27614237 L10.9899495,13.6094757 C10.4852719,14.090121 9.69114847,14.1270937 9.14194078,13.7203939 L9.01005051,13.6094757 L3.41005051,8.27614237 C2.8633165,7.75544332 2.8633165,6.91122335 3.41005051,6.39052429 Z" id="Path-8" fill="#14524f" fill-rule="nonzero" transform="translate(10.000000, 10.000000) rotate(90.000000) translate(-10.000000, -10.000000) " class="forced_title" data-title="'.__('Go to top').'" data-use_title_for_force_title="1"></path>';
|
||||||
$output .= '</g>';
|
$output .= '</g>';
|
||||||
$output .= '</svg>';
|
$output .= '</svg>';
|
||||||
$output .= '</div>';
|
$output .= '</div>';
|
||||||
|
@ -68,6 +68,8 @@ function menu_print_menu(&$menu)
|
|||||||
$sec2 = 'godmode/alerts/alert_commands';
|
$sec2 = 'godmode/alerts/alert_commands';
|
||||||
} else if ($sec2 === 'enterprise/godmode/setup/edit_skin') {
|
} else if ($sec2 === 'enterprise/godmode/setup/edit_skin') {
|
||||||
$sec2 = 'enterprise/godmode/setup/setup_skins';
|
$sec2 = 'enterprise/godmode/setup/setup_skins';
|
||||||
|
} else if ($sec2 === 'operation/agentes/networkmap.dinamic') {
|
||||||
|
$sec2 = 'operation/agentes/pandora_networkmap';
|
||||||
} else if ($sec2 === 'godmode/gis_maps/configure_gis_map') {
|
} else if ($sec2 === 'godmode/gis_maps/configure_gis_map') {
|
||||||
$map_id = (string) get_parameter('map_id');
|
$map_id = (string) get_parameter('map_id');
|
||||||
if (empty($map_id) === false) {
|
if (empty($map_id) === false) {
|
||||||
|
@ -860,6 +860,19 @@ function servers_get_info($id_server=-1)
|
|||||||
$id_modulo = 0;
|
$id_modulo = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SERVER_TYPE_NETFLOW:
|
||||||
|
$server['img'] = html_print_image(
|
||||||
|
'images/netflow@svg.svg',
|
||||||
|
true,
|
||||||
|
[
|
||||||
|
'title' => __('Netflow server'),
|
||||||
|
'class' => 'main_menu_icon invert_filter',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
$server['type'] = 'netflow';
|
||||||
|
$id_modulo = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$server['img'] = '';
|
$server['img'] = '';
|
||||||
$server['type'] = 'unknown';
|
$server['type'] = 'unknown';
|
||||||
|
@ -321,16 +321,20 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals
|
|||||||
$group_name = db_get_value('nombre', 'tgrupo', 'id_grupo', $id_group);
|
$group_name = db_get_value('nombre', 'tgrupo', 'id_grupo', $id_group);
|
||||||
$agent_name = db_get_value('nombre', 'tagente', 'id_agente', $module['id_agente']);
|
$agent_name = db_get_value('nombre', 'tagente', 'id_agente', $module['id_agente']);
|
||||||
|
|
||||||
/*
|
if ($user_access_node && check_acl($config['id_user'], $id_group, 'AW')) {
|
||||||
if ($user_access_node && check_acl($config['id_user'], $id_group, 'AW')) {
|
|
||||||
// Actions table
|
// Actions table
|
||||||
echo '<div class="actions_treeview" style="text-align: right">';
|
echo '<div class="actions_treeview flex flex-evenly">';
|
||||||
echo '<a target=_blank href="'.$console_url.'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$module['id_agente'].'&tab=module&edit_module=1&id_agent_module='.$module['id_agente_modulo'].$url_hash.'">';
|
echo '<a target=_blank href="'.$console_url.'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$module['id_agente'].'&tab=module&edit_module=1&id_agent_module='.$module['id_agente_modulo'].$url_hash.'">';
|
||||||
html_print_submit_button(__('Go to module edition'), 'upd_button', false, 'class="sub config"');
|
html_print_submit_button(
|
||||||
|
__('Go to module edition'),
|
||||||
|
'upd_button',
|
||||||
|
false,
|
||||||
|
['class' => 'secondary mini']
|
||||||
|
);
|
||||||
echo '</a>';
|
echo '</a>';
|
||||||
|
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
}*/
|
}
|
||||||
|
|
||||||
// id_module and id_agent hidden
|
// id_module and id_agent hidden
|
||||||
echo '<div id="ids" class="invisible">';
|
echo '<div id="ids" class="invisible">';
|
||||||
@ -921,9 +925,50 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
|
|||||||
false,
|
false,
|
||||||
'',
|
'',
|
||||||
'white-box-content mrgn_top_0 mrgn_btn_0px border-bottom-gray',
|
'white-box-content mrgn_top_0 mrgn_btn_0px border-bottom-gray',
|
||||||
'white_table_flex margin-bottom-20'
|
'white_table_flex'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ($user_access_node && check_acl($config['id_user'], $agent['id_grupo'], 'AW')) {
|
||||||
|
$buttons_act = '<div style="text-align: right" class="margin-bottom-20 margin-top-20 flex flex-evenly">';
|
||||||
|
|
||||||
|
if ($agent['id_os'] == CLUSTER_OS_ID) {
|
||||||
|
$cluster = PandoraFMS\Cluster::loadFromAgentId(
|
||||||
|
$agent['id_agente']
|
||||||
|
);
|
||||||
|
$buttons_act .= '<a target=_blank href="'.$console_url.'index.php?sec=reporting&sec2=operation/cluster/cluster&op=update&id='.$cluster->id().'">';
|
||||||
|
$buttons_act .= html_print_submit_button(
|
||||||
|
__('Go to cluster edition'),
|
||||||
|
'upd_button',
|
||||||
|
false,
|
||||||
|
['class' => 'secondary mini'],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$buttons_act .= '<a target=_blank href="'.$console_url.'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.$ent.'&tab=module">';
|
||||||
|
$buttons_act .= html_print_submit_button(
|
||||||
|
__('Go to module creation'),
|
||||||
|
'upd_button',
|
||||||
|
false,
|
||||||
|
['class' => 'secondary mini'],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
$buttons_act .= '<a target=_blank href="'.$console_url.'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.$ent.'">';
|
||||||
|
$buttons_act .= html_print_submit_button(
|
||||||
|
__('Go to agent edition'),
|
||||||
|
'upd_button',
|
||||||
|
false,
|
||||||
|
['class' => 'secondary mini'],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$buttons_act .= '</a>';
|
||||||
|
$buttons_act .= '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo $buttons_act;
|
||||||
|
|
||||||
if (empty($server_data) === false && is_metaconsole() === true) {
|
if (empty($server_data) === false && is_metaconsole() === true) {
|
||||||
metaconsole_restore_db();
|
metaconsole_restore_db();
|
||||||
}
|
}
|
||||||
|
@ -6944,7 +6944,7 @@ function ui_get_favicon()
|
|||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
if (empty($config['custom_favicon'])) {
|
if (empty($config['custom_favicon'])) {
|
||||||
return (!is_metaconsole()) ? 'images/pandora.ico' : 'enterprise/meta/images/favicon_meta.ico';
|
return (!is_metaconsole()) ? 'images/pandora.ico' : '/images/favicon_meta.ico';
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'images/custom_favicon/'.$config['custom_favicon'];
|
return 'images/custom_favicon/'.$config['custom_favicon'];
|
||||||
@ -8022,4 +8022,22 @@ function ui_print_tree(
|
|||||||
$output .= '</ul>';
|
$output .= '</ul>';
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function ui_update_name_fav_element($id_element, $section, $label)
|
||||||
|
{
|
||||||
|
$label = io_safe_output($label);
|
||||||
|
if (strlen($label) > 18) {
|
||||||
|
$label = io_safe_input(substr($label, 0, 18).'...');
|
||||||
|
}
|
||||||
|
|
||||||
|
db_process_sql_update(
|
||||||
|
'tfavmenu_user',
|
||||||
|
['label' => $label],
|
||||||
|
[
|
||||||
|
'section' => $section,
|
||||||
|
'id_element' => $id_element,
|
||||||
|
]
|
||||||
|
);
|
||||||
}
|
}
|
@ -844,7 +844,7 @@ function edit_node(data_node, dblClick) {
|
|||||||
"update_fictional_node(" + node_selected.id_db + ");"
|
"update_fictional_node(" + node_selected.id_db + ");"
|
||||||
);
|
);
|
||||||
|
|
||||||
$("#node_options-node_name-2 input").attr(
|
$("#button-upd_only_node").attr(
|
||||||
"onclick",
|
"onclick",
|
||||||
"update_node_name(" + node_selected.id_db + ");"
|
"update_node_name(" + node_selected.id_db + ");"
|
||||||
);
|
);
|
||||||
@ -3886,6 +3886,9 @@ function draw_elements_graph() {
|
|||||||
.attr("node_id", function(d) {
|
.attr("node_id", function(d) {
|
||||||
return d.id + networkmap_id;
|
return d.id + networkmap_id;
|
||||||
})
|
})
|
||||||
|
.attr("style", function(d) {
|
||||||
|
return d.id === 0 ? "filter: invert(0%)" : "";
|
||||||
|
})
|
||||||
.attr("id", "image2995")
|
.attr("id", "image2995")
|
||||||
.classed("dragable_node", true) //own dragable
|
.classed("dragable_node", true) //own dragable
|
||||||
.on("mouseover", function(d) {
|
.on("mouseover", function(d) {
|
||||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -764,6 +764,7 @@ class ClusterWizard extends \HTML
|
|||||||
'action' => $target_url,
|
'action' => $target_url,
|
||||||
'method' => 'POST',
|
'method' => 'POST',
|
||||||
'extra' => 'autocomplete="false"',
|
'extra' => 'autocomplete="false"',
|
||||||
|
'id' => 'cluster-edit-'.($this->page + 1),
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($load_success === false && $this->page !== 0) {
|
if ($load_success === false && $this->page !== 0) {
|
||||||
@ -1245,17 +1246,16 @@ class ClusterWizard extends \HTML
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Submit button.
|
// Submit button.
|
||||||
$form['inputs'][] = [
|
$form['submit-external-input'] = [
|
||||||
'arguments' => [
|
'name' => 'next',
|
||||||
'name' => 'next',
|
'label' => $str,
|
||||||
'label' => $str,
|
'type' => 'submit',
|
||||||
'type' => 'submit',
|
'attributes' => [
|
||||||
'attributes' => [
|
'icon' => 'wand',
|
||||||
'icon' => 'wand',
|
'mode' => 'primary',
|
||||||
'mode' => 'primary',
|
'form' => 'cluster-edit-'.($this->page + 1),
|
||||||
],
|
|
||||||
'return' => true,
|
|
||||||
],
|
],
|
||||||
|
'return' => true,
|
||||||
];
|
];
|
||||||
|
|
||||||
return $form;
|
return $form;
|
||||||
|
@ -1002,6 +1002,10 @@ class Manager implements PublicLogin
|
|||||||
$res = $this->put($values);
|
$res = $this->put($values);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($res !== false) {
|
||||||
|
ui_update_name_fav_element($this->dashboardId, 'Dashboard_', $name);
|
||||||
|
}
|
||||||
|
|
||||||
$result = [
|
$result = [
|
||||||
'error' => ($res === false) ? 1 : 0,
|
'error' => ($res === false) ? 1 : 0,
|
||||||
'error_mesage' => __('Error create or update dashboard'),
|
'error_mesage' => __('Error create or update dashboard'),
|
||||||
|
@ -12,6 +12,10 @@
|
|||||||
stroke-width: 5;
|
stroke-width: 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.node_image {
|
||||||
|
filter: invert(100%) brightness(125%);
|
||||||
|
}
|
||||||
|
|
||||||
.node_children {
|
.node_children {
|
||||||
stroke: #00f;
|
stroke: #00f;
|
||||||
}
|
}
|
||||||
@ -33,3 +37,8 @@
|
|||||||
.holding_area_link {
|
.holding_area_link {
|
||||||
stroke-dasharray: 12, 3;
|
stroke-dasharray: 12, 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img.circle-relations {
|
||||||
|
width: 12px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
@ -11889,6 +11889,13 @@ label:has(span.label-alert-agent) {
|
|||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info_table.events > tbody > tr > td {
|
td[id^="table_info_box"] a {
|
||||||
border-bottom: 1px solid #dedede !important;
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.info_table.events > tbody > tr > td {
|
||||||
|
border-bottom: 1px solid #dedede !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.break-word {
|
||||||
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
@ -844,3 +844,21 @@ a.mini-pandora-pagination {
|
|||||||
input.mini-search-input {
|
input.mini-search-input {
|
||||||
height: 30px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
td#password_manage-captions_newpassword-0,
|
||||||
|
td#password_manage-fields_newpassword-0,
|
||||||
|
td#password_manage-captions_repeatpassword-0,
|
||||||
|
td#password_manage-fields_repeatpassword-0,
|
||||||
|
td#password_manage-captions_currentpassword-0,
|
||||||
|
td#password_manage-fields_currentpassword-0,
|
||||||
|
td#advanced-passwordManage_table-0,
|
||||||
|
td#home_screen_table-captions_homescreen-0,
|
||||||
|
td#home_screen_table-fields_homescreen-0,
|
||||||
|
td#advanced-homescreen_table-0 {
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.w75p#rightcolumn {
|
||||||
|
margin-right: 0%;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
@ -1315,7 +1315,7 @@ if ($searchPage) {
|
|||||||
true,
|
true,
|
||||||
$sec2,
|
$sec2,
|
||||||
]
|
]
|
||||||
) == false
|
) === ENTERPRISE_NOT_HOOK
|
||||||
) {
|
) {
|
||||||
include 'general/noaccess.php';
|
include 'general/noaccess.php';
|
||||||
} else {
|
} else {
|
||||||
|
@ -131,7 +131,7 @@
|
|||||||
<div style='padding-bottom: 50px'>
|
<div style='padding-bottom: 50px'>
|
||||||
<?php
|
<?php
|
||||||
$version = '7.0NG.770';
|
$version = '7.0NG.770';
|
||||||
$build = '230403';
|
$build = '230411';
|
||||||
$banner = "v$version Build $build";
|
$banner = "v$version Build $build";
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
|
||||||
|
@ -25,6 +25,11 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
* ============================================================================
|
* ============================================================================
|
||||||
*/
|
*/
|
||||||
|
:root {
|
||||||
|
--primary-color: #14524f;
|
||||||
|
--secondary-color: #ffffff;
|
||||||
|
--input-border: #c0ccdc;
|
||||||
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "lato";
|
font-family: "lato";
|
||||||
@ -1505,3 +1510,39 @@ div.nodata_container {
|
|||||||
.visual-console-container-dashboard a:visited {
|
.visual-console-container-dashboard a:visited {
|
||||||
color: inherit !important;
|
color: inherit !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* SVG icons mask */
|
||||||
|
.module_background_state {
|
||||||
|
mask: url(../../../images/modules@svg.svg) no-repeat center / contain;
|
||||||
|
-webkit-mask: url(../../../images/modules@svg.svg) no-repeat center / contain;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert_background_state {
|
||||||
|
mask: url(../../../images/alert@svg.svg) no-repeat center / contain;
|
||||||
|
-webkit-mask: url(../../../images/alert@svg.svg) no-repeat center / contain;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.main_menu_icon,
|
||||||
|
img.main_menu_icon[src$=".svg"] {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.os-big-icon[src$=".svg"] {
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.noresizevc.graph.adapted_sparse
|
||||||
|
div.flot-x-axis.flot-x1-axis.xAxis.x1Axis
|
||||||
|
> div.flot-tick-label.tickLabel:nth-child(odd) {
|
||||||
|
visibility: hidden !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.noresizevc.graph.adapted_sparse
|
||||||
|
div.flot-x-axis.flot-x1-axis.xAxis.x1Axis
|
||||||
|
> div.flot-tick-label.tickLabel:first-child {
|
||||||
|
visibility: visible !important;
|
||||||
|
}
|
||||||
|
@ -213,8 +213,8 @@ class Agent
|
|||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
['class' => 'invert_filter os-big-icon'],
|
||||||
true
|
false
|
||||||
).'</div>';
|
).'</div>';
|
||||||
$html .= '<div class="agent_list_ips">';
|
$html .= '<div class="agent_list_ips">';
|
||||||
$html .= $ip.' - '.groups_get_name($this->agent['id_grupo'], true);
|
$html .= $ip.' - '.groups_get_name($this->agent['id_grupo'], true);
|
||||||
|
@ -206,6 +206,7 @@ class ModuleGraph
|
|||||||
|
|
||||||
$graph = grafico_modulo_sparse($params);
|
$graph = grafico_modulo_sparse($params);
|
||||||
if ($this->draw_events) {
|
if ($this->draw_events) {
|
||||||
|
$this->width = 100;
|
||||||
$graph .= '<br>';
|
$graph .= '<br>';
|
||||||
$graph .= graphic_module_events(
|
$graph .= graphic_module_events(
|
||||||
$this->id,
|
$this->id,
|
||||||
|
@ -310,11 +310,10 @@ foreach ($rows as $row) {
|
|||||||
$rowTable++;
|
$rowTable++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($iterator1 > 5) {
|
// PRINT COUNT TOTAL.
|
||||||
// PRINT COUNT TOTAL.
|
$table->colspan[$rowTable][0] = 10;
|
||||||
$table->data[$rowTable][0] = '<b>'.__('Total').': </b>'.$iterator1;
|
$table->data[$rowTable][0] = '<b>'.__('Total').': </b>'.$iterator1;
|
||||||
$rowTable++;
|
$rowTable++;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$idModuleInventory = $row['id_module_inventory'];
|
$idModuleInventory = $row['id_module_inventory'];
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
// Pandora FMS - http://pandorafms.com
|
// Pandora FMS - http://pandorafms.com
|
||||||
// ==================================================
|
// ==================================================
|
||||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
// Copyright (c) 2005-2023 Artica Soluciones Tecnologicas
|
||||||
// Please see http://pandorafms.org for full contribution list
|
// Please see http://pandorafms.org for full contribution list
|
||||||
// This program is free software; you can redistribute it and/or
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU General Public License
|
// modify it under the terms of the GNU General Public License
|
||||||
@ -11,7 +11,7 @@
|
|||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// 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.
|
||||||
// Load global vars
|
// Load global vars.
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
check_login();
|
check_login();
|
||||||
@ -39,7 +39,7 @@ if (defined('_activeTab_') && _activeTab_ != '_activeTab_') {
|
|||||||
$tab = $activeTab;
|
$tab = $activeTab;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Networkmap id required
|
// Networkmap id required.
|
||||||
if (!isset($id)) {
|
if (!isset($id)) {
|
||||||
db_pandora_audit(
|
db_pandora_audit(
|
||||||
AUDIT_LOG_ACL_VIOLATION,
|
AUDIT_LOG_ACL_VIOLATION,
|
||||||
@ -49,7 +49,7 @@ if (!isset($id)) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the group for ACL
|
// Get the group for ACL.
|
||||||
if (!isset($store_group)) {
|
if (!isset($store_group)) {
|
||||||
$store_group = db_get_value('id_group', 'tmap', 'id', $id);
|
$store_group = db_get_value('id_group', 'tmap', 'id', $id);
|
||||||
if ($store_group === false) {
|
if ($store_group === false) {
|
||||||
@ -62,7 +62,7 @@ if (!isset($store_group)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ACL for the networkmap permission
|
// ACL for the networkmap permission.
|
||||||
if (!isset($networkmap_read)) {
|
if (!isset($networkmap_read)) {
|
||||||
$networkmap_read = check_acl($config['id_user'], $store_group, 'MR');
|
$networkmap_read = check_acl($config['id_user'], $store_group, 'MR');
|
||||||
}
|
}
|
||||||
@ -91,12 +91,12 @@ $strict_user = db_get_value('strict_acl', 'tusuario', 'id_user', $config['id_use
|
|||||||
$networkmap = db_get_row('tmap', 'id', $id);
|
$networkmap = db_get_row('tmap', 'id', $id);
|
||||||
$pure = (int) get_parameter('pure', 0);
|
$pure = (int) get_parameter('pure', 0);
|
||||||
|
|
||||||
// Main code
|
// Main code.
|
||||||
if ($pure == 1) {
|
if ($pure == 1) {
|
||||||
$buttons['screen'] = [
|
$buttons['screen'] = [
|
||||||
'active' => false,
|
'active' => false,
|
||||||
'text' => '<a href="index.php?sec=network&'.'sec2=operation/agentes/networkmap.dinamic&'.'activeTab=radial_dynamic&id_networkmap='.$id.'">'.html_print_image(
|
'text' => '<a href="index.php?sec=network&'.'sec2=operation/agentes/networkmap.dinamic&'.'activeTab=radial_dynamic&id_networkmap='.$id.'">'.html_print_image(
|
||||||
'images/normal_screen.png',
|
'images/exit_fullscreen@svg.svg',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('Normal screen'),
|
'title' => __('Normal screen'),
|
||||||
@ -109,7 +109,7 @@ if ($pure == 1) {
|
|||||||
$buttons['screen'] = [
|
$buttons['screen'] = [
|
||||||
'active' => false,
|
'active' => false,
|
||||||
'text' => '<a href="index.php?sec=network&'.'sec2=operation/agentes/networkmap.dinamic&'.'pure=1&activeTab=radial_dynamic&id_networkmap='.$id.'">'.html_print_image(
|
'text' => '<a href="index.php?sec=network&'.'sec2=operation/agentes/networkmap.dinamic&'.'pure=1&activeTab=radial_dynamic&id_networkmap='.$id.'">'.html_print_image(
|
||||||
'images/full_screen.png',
|
'images/fullscreen@svg.svg',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('Full screen'),
|
'title' => __('Full screen'),
|
||||||
@ -120,7 +120,7 @@ if ($pure == 1) {
|
|||||||
$buttons['list'] = [
|
$buttons['list'] = [
|
||||||
'active' => false,
|
'active' => false,
|
||||||
'text' => '<a href="index.php?sec=networkmapconsole&'.'sec2=operation/agentes/pandora_networkmap">'.html_print_image(
|
'text' => '<a href="index.php?sec=networkmapconsole&'.'sec2=operation/agentes/pandora_networkmap">'.html_print_image(
|
||||||
'images/list.png',
|
'images/file-collection@svg.svg',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('List of networkmap'),
|
'title' => __('List of networkmap'),
|
||||||
@ -132,16 +132,24 @@ if ($pure == 1) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($dashboard != 1) {
|
if ($dashboard != 1) {
|
||||||
ui_print_page_header(
|
// Header.
|
||||||
|
ui_print_standard_header(
|
||||||
io_safe_output($networkmap['name']),
|
io_safe_output($networkmap['name']),
|
||||||
'images/bricks.png',
|
'images/bricks.png',
|
||||||
false,
|
false,
|
||||||
'network_map_enterprise_list',
|
'network_map_enterprise_list',
|
||||||
false,
|
false,
|
||||||
$buttons,
|
$buttons,
|
||||||
false,
|
[
|
||||||
'',
|
[
|
||||||
$config['item_title_size_text']
|
'link' => '',
|
||||||
|
'label' => __('Topology maps'),
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Network maps'),
|
||||||
|
],
|
||||||
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -208,14 +216,14 @@ switch ($networkmap['generation_method']) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set filter
|
// Set filter.
|
||||||
$filter = networkmap_get_filter($layout);
|
$filter = networkmap_get_filter($layout);
|
||||||
|
|
||||||
if (!isset($text_filter)) {
|
if (!isset($text_filter)) {
|
||||||
$text_filter = '';
|
$text_filter = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate dot file
|
// Generate dot file.
|
||||||
$graph = networkmap_generate_hash(
|
$graph = networkmap_generate_hash(
|
||||||
__('Pandora FMS'),
|
__('Pandora FMS'),
|
||||||
$group,
|
$group,
|
||||||
|
@ -507,6 +507,7 @@ else if ($update_networkmap || $copy_networkmap || $delete) {
|
|||||||
$values,
|
$values,
|
||||||
['id' => $id]
|
['id' => $id]
|
||||||
);
|
);
|
||||||
|
ui_update_name_fav_element($id, 'Network_map', $name);
|
||||||
}
|
}
|
||||||
|
|
||||||
$result_txt = ui_print_result_message(
|
$result_txt = ui_print_result_message(
|
||||||
|
@ -517,6 +517,7 @@ if (is_ajax() === true) {
|
|||||||
$return['error'] = false;
|
$return['error'] = false;
|
||||||
error_log('Failed to reset map '.$map_id);
|
error_log('Failed to reset map '.$map_id);
|
||||||
} else {
|
} else {
|
||||||
|
ui_update_name_fav_element($map_id, 'Network_map', $new_values['name']);
|
||||||
$return['error'] = true;
|
$return['error'] = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -156,7 +156,6 @@ if ($ag_freestring !== '' || $moduletype !== '' || $datatype !== ''
|
|||||||
$userRequest = (bool) get_parameter('uptbutton');
|
$userRequest = (bool) get_parameter('uptbutton');
|
||||||
if ($userRequest === false) {
|
if ($userRequest === false) {
|
||||||
$autosearch = true;
|
$autosearch = true;
|
||||||
$status = AGENT_MODULE_STATUS_NOT_NORMAL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_metaconsole() === false) {
|
if (is_metaconsole() === false) {
|
||||||
|
@ -1443,10 +1443,21 @@ $alerttab['active'] = ($tab === 'alert');
|
|||||||
// Inventory.
|
// Inventory.
|
||||||
$inventoryCount = db_get_num_rows('SELECT id_agent_module_inventory FROM tagent_module_inventory WHERE id_agente = '.$agent['id_agente']);
|
$inventoryCount = db_get_num_rows('SELECT id_agent_module_inventory FROM tagent_module_inventory WHERE id_agente = '.$agent['id_agente']);
|
||||||
|
|
||||||
$inventorytab = enterprise_hook('inventory_tab');
|
if ($inventoryCount > 0) {
|
||||||
|
$inventorytab['text'] = html_print_menu_button(
|
||||||
|
[
|
||||||
|
'href' => 'index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=inventory&id_agente='.$id_agente,
|
||||||
|
'image' => 'images/hardware-software-component@svg.svg',
|
||||||
|
'title' => __('Inventory'),
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
if ($inventorytab === ENTERPRISE_NOT_HOOK || $inventoryCount === 0) {
|
if ($tab === 'inventory') {
|
||||||
$inventorytab = '';
|
$inventorytab['active'] = true;
|
||||||
|
} else {
|
||||||
|
$inventorytab['active'] = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Collection.
|
// Collection.
|
||||||
@ -1466,15 +1477,13 @@ if ($policyTab === ENTERPRISE_NOT_HOOK) {
|
|||||||
$policyTab = '';
|
$policyTab = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Omnishell.
|
// Omnishell.
|
||||||
if (function_exists('count_tasks_agent')) {
|
$tasks = enterprise_hook('count_tasks_agent', [$id_agente]);
|
||||||
$tasks = count_tasks_agent($id_agente);
|
|
||||||
if ($tasks === true) {
|
if ($tasks === true) {
|
||||||
$omnishellTab = enterprise_hook('omnishell_tab');
|
$omnishellTab = enterprise_hook('omnishell_tab');
|
||||||
if ($omnishellTab == -1) {
|
if ($omnishellTab == -1) {
|
||||||
$omnishellTab = '';
|
$omnishellTab = '';
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,12 @@ $filter['ip_src'] = get_parameter('ip_src', '');
|
|||||||
$filter['dst_port'] = get_parameter('dst_port', '');
|
$filter['dst_port'] = get_parameter('dst_port', '');
|
||||||
$filter['src_port'] = get_parameter('src_port', '');
|
$filter['src_port'] = get_parameter('src_port', '');
|
||||||
$filter['advanced_filter'] = get_parameter('advanced_filter', '');
|
$filter['advanced_filter'] = get_parameter('advanced_filter', '');
|
||||||
$filter['router_ip'] = get_parameter('router_ip');
|
$filter['netflow_monitoring'] = (bool) get_parameter('netflow_monitoring');
|
||||||
|
$filter['netflow_monitoring_interval'] = (int) get_parameter('netflow_monitoring_interval', 300);
|
||||||
|
$filter['traffic_max'] = get_parameter('traffic_max', 0);
|
||||||
|
$filter['traffic_critical'] = get_parameter('traffic_critical', 0);
|
||||||
|
$filter['traffic_warning'] = get_parameter('traffic_warning', 0);
|
||||||
|
|
||||||
|
|
||||||
// Read chart configuration.
|
// Read chart configuration.
|
||||||
$chart_type = get_parameter('chart_type', 'netflow_area');
|
$chart_type = get_parameter('chart_type', 'netflow_area');
|
||||||
@ -360,6 +365,67 @@ $advanced_toggle .= '<td colspan="2">'.$radio_buttons.'</td>';
|
|||||||
$advanced_toggle .= '<td><b>'.__('Source ip').'</b></td>';
|
$advanced_toggle .= '<td><b>'.__('Source ip').'</b></td>';
|
||||||
$advanced_toggle .= '<td colspan="2">'.html_print_input_text('router_ip', $filter['router_ip'], false, 40, 80, true).'</td>';
|
$advanced_toggle .= '<td colspan="2">'.html_print_input_text('router_ip', $filter['router_ip'], false, 40, 80, true).'</td>';
|
||||||
|
|
||||||
|
$advanced_toggle .= '</tr>';
|
||||||
|
|
||||||
|
// Netflow server options.
|
||||||
|
$advanced_toggle .= '<tr>';
|
||||||
|
|
||||||
|
$advanced_toggle .= "<td style='font-weight:bold;'>".__('Enable Netflow monitoring').ui_print_help_tip(__('Allows you to create an agent that monitors the traffic volume of this filter. It also creates a module that measures if the traffic of any IP of this filter exceeds a certain threshold. A text type module will be created with the traffic rate for each IP within this filter every five minutes (the 10 IP\'s with the most traffic). Only available for Enterprise version.'), true).'</td>';
|
||||||
|
$advanced_toggle .= '<td colspan="2">'.html_print_checkbox_switch(
|
||||||
|
'netflow_monitoring',
|
||||||
|
1,
|
||||||
|
(bool) $filter['netflow_monitoring'],
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
'displayMonitoringFilter()',
|
||||||
|
).'</td>';
|
||||||
|
|
||||||
|
$advanced_toggle .= '<tr id="netlofw_monitoring_filters">';
|
||||||
|
$advanced_toggle .= "<td style='font-weight:bold;'>".__('Netflow monitoring interval').ui_print_help_tip(__('Netflow monitoring interval in secs.'), true).'</td>';
|
||||||
|
$advanced_toggle .= '<td colspan="2">'.html_print_input_number(
|
||||||
|
[
|
||||||
|
'step' => 1,
|
||||||
|
'name' => 'netflow_monitoring_interval',
|
||||||
|
'id' => 'netflow_monitoring_interval',
|
||||||
|
'value' => $filter['netflow_monitoring_interval'],
|
||||||
|
]
|
||||||
|
).'</td>';
|
||||||
|
|
||||||
|
$advanced_toggle .= "<td style='font-weight:bold;'>".__('Maximum traffic value of the filter').ui_print_help_tip(__('Specifies the maximum rate (in bytes/sec) of traffic in the filter. It is then used to calculate the % of maximum traffic per IP.'), true).'</td>';
|
||||||
|
$advanced_toggle .= '<td colspan="2">'.html_print_input_number(
|
||||||
|
[
|
||||||
|
'step' => 1,
|
||||||
|
'name' => 'traffic_max',
|
||||||
|
'id' => 'traffic_max',
|
||||||
|
'value' => $filter['traffic_max'],
|
||||||
|
]
|
||||||
|
).'</td>';
|
||||||
|
|
||||||
|
|
||||||
|
$advanced_toggle .= '</tr>';
|
||||||
|
$advanced_toggle .= '<tr id="netlofw_monitoring_thresholds">';
|
||||||
|
|
||||||
|
$advanced_toggle .= "<td style='font-weight:bold;'>".__('CRITICAL threshold for the maximum % of traffic for an IP.').ui_print_help_tip(__('If this % is exceeded by any IP within the filter, a CRITICAL status will be generated.'), true).'</td>';
|
||||||
|
$advanced_toggle .= '<td colspan="2">'.html_print_input_number(
|
||||||
|
[
|
||||||
|
'step' => 0.01,
|
||||||
|
'name' => 'traffic_critical',
|
||||||
|
'id' => 'traffic_critical',
|
||||||
|
'value' => $filter['traffic_critical'],
|
||||||
|
]
|
||||||
|
).'</td>';
|
||||||
|
|
||||||
|
$advanced_toggle .= "<td style='font-weight:bold;'>".__('WARNING threshold for the maximum % of traffic of an IP.').ui_print_help_tip(__('If this % is exceeded by any IP within the filter, a WARNING status will be generated.'), true).'</td>';
|
||||||
|
$advanced_toggle .= '<td colspan="2">'.html_print_input_number(
|
||||||
|
[
|
||||||
|
'step' => 0.01,
|
||||||
|
'name' => 'traffic_warning',
|
||||||
|
'id' => 'traffic_warning',
|
||||||
|
'value' => $filter['traffic_warning'],
|
||||||
|
]
|
||||||
|
).'</td>';
|
||||||
|
|
||||||
|
|
||||||
$advanced_toggle .= '</tr>';
|
$advanced_toggle .= '</tr>';
|
||||||
|
|
||||||
$advanced_toggle .= '</table>';
|
$advanced_toggle .= '</table>';
|
||||||
@ -713,6 +779,26 @@ ui_include_time_picker();
|
|||||||
// Show the normal filter
|
// Show the normal filter
|
||||||
$(".filter_normal").show();
|
$(".filter_normal").show();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function displayMonitoringFilter () {
|
||||||
|
var checked = $('#checkbox-netflow_monitoring').prop('checked');
|
||||||
|
|
||||||
|
if(checked == false) {
|
||||||
|
// Reset values.
|
||||||
|
$("#netflow_monitoring_interval").val(300);
|
||||||
|
$("#traffic_max").val(0);
|
||||||
|
$("#traffic_critical").val(0);
|
||||||
|
$("#traffic_warning").val(0);
|
||||||
|
|
||||||
|
// Hide filters.
|
||||||
|
$("#netlofw_monitoring_filters").hide();
|
||||||
|
$("#netlofw_monitoring_thresholds").hide();
|
||||||
|
} else {
|
||||||
|
// Show filters.
|
||||||
|
$("#netlofw_monitoring_filters").show();
|
||||||
|
$("#netlofw_monitoring_thresholds").show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Ask the user to define a name for the filter in order to save it
|
// Ask the user to define a name for the filter in order to save it
|
||||||
function defineFilterName () {
|
function defineFilterName () {
|
||||||
@ -736,7 +822,6 @@ ui_include_time_picker();
|
|||||||
|
|
||||||
$("#filter_id").change(function () {
|
$("#filter_id").change(function () {
|
||||||
var filter_type;
|
var filter_type;
|
||||||
|
|
||||||
// Hide information and name/group row
|
// Hide information and name/group row
|
||||||
$(".filter_save").hide();
|
$(".filter_save").hide();
|
||||||
|
|
||||||
@ -755,6 +840,12 @@ ui_include_time_picker();
|
|||||||
$("#text-router_ip").val('');
|
$("#text-router_ip").val('');
|
||||||
$("#textarea_advanced_filter").val('');
|
$("#textarea_advanced_filter").val('');
|
||||||
$("#aggregate").val('');
|
$("#aggregate").val('');
|
||||||
|
$("#traffic_max").val('');
|
||||||
|
$("#traffic_critical").val('');
|
||||||
|
$("#traffic_warning").val('');
|
||||||
|
$("#netflow_monitoring_interval").val(300);
|
||||||
|
$('#checkbox-netflow_monitoring').prop('checked', false);
|
||||||
|
|
||||||
|
|
||||||
// Hide update filter button
|
// Hide update filter button
|
||||||
$("#submit-update_button").hide();
|
$("#submit-update_button").hide();
|
||||||
@ -824,18 +915,31 @@ ui_include_time_picker();
|
|||||||
$("#textarea_advanced_filter").val(val);
|
$("#textarea_advanced_filter").val(val);
|
||||||
if (i == 'aggregate')
|
if (i == 'aggregate')
|
||||||
$("#aggregate").val(val);
|
$("#aggregate").val(val);
|
||||||
|
if (i == 'netflow_monitoring')
|
||||||
|
$("#checkbox-netflow_monitoring").prop('checked', val == "0" ? false : true);
|
||||||
|
// Hide or show monitoring filters.
|
||||||
|
displayMonitoringFilter();
|
||||||
|
if (i == 'netflow_monitoring_interval')
|
||||||
|
$("#netflow_monitoring_interval").val(val);
|
||||||
|
if (i == 'traffic_max')
|
||||||
|
$("#traffic_max").val(val);
|
||||||
|
if (i == 'traffic_critical')
|
||||||
|
$("#traffic_critical").val(val);
|
||||||
|
if (i == 'traffic_warning')
|
||||||
|
$("#traffic_warning").val(val);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
<?php echo ', "json");'; ?>
|
<?php echo ', "json");'; ?>
|
||||||
|
|
||||||
// Shows update filter button
|
// Shows update filter button
|
||||||
$("#submit-update_button").show();
|
$("#submit-update_button").show();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).ready( function() {
|
$(document).ready( function() {
|
||||||
|
displayMonitoringFilter();
|
||||||
// Update visibility of controls.
|
// Update visibility of controls.
|
||||||
nf_view_click_period();
|
nf_view_click_period();
|
||||||
// Hide update filter button
|
// Hide update filter button
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.770
|
%define version 7.0NG.770
|
||||||
%define release 230403
|
%define release 230411
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.770
|
%define version 7.0NG.770
|
||||||
%define release 230403
|
%define release 230411
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.770
|
%define version 7.0NG.770
|
||||||
%define release 230403
|
%define release 230411
|
||||||
%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
|
||||||
|
@ -2185,6 +2185,12 @@ CREATE TABLE IF NOT EXISTS `tnetflow_filter` (
|
|||||||
`advanced_filter` TEXT,
|
`advanced_filter` TEXT,
|
||||||
`filter_args` TEXT,
|
`filter_args` TEXT,
|
||||||
`aggregate` VARCHAR(60),
|
`aggregate` VARCHAR(60),
|
||||||
|
`netflow_monitoring` TINYINT UNSIGNED NOT NULL default 0,
|
||||||
|
`traffic_max` INTEGER NOT NULL default 0,
|
||||||
|
`traffic_critical` FLOAT(20,2) NOT NULL default 0,
|
||||||
|
`traffic_warning` FLOAT(20,2) NOT NULL default 0,
|
||||||
|
`netflow_monitoring_interval` INT UNSIGNED NOT NULL DEFAULT 300,
|
||||||
|
`utimestamp` INT UNSIGNED NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY (`id_sg`)
|
PRIMARY KEY (`id_sg`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||||
|
|
||||||
|
@ -120,42 +120,17 @@ if (empty($wizard->errMessages) === false) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$buttons_input = '';
|
||||||
if (empty($form) === false) {
|
if (empty($form) === false) {
|
||||||
// Print form (prepared in ClusterWizard).
|
// Print form (prepared in ClusterWizard).
|
||||||
|
$submit = $form['submit-external-input'];
|
||||||
|
unset($form['submit-external-input']);
|
||||||
|
|
||||||
HTML::printForm($form, false, ($wizard->page < 6));
|
HTML::printForm($form, false, ($wizard->page < 6));
|
||||||
|
$buttons_input .= HTML::printInput($submit);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print always go back button.
|
// Print always go back button.
|
||||||
HTML::printForm($wizard->getGoBackForm(), false);
|
$buttons_input .= HTML::printForm($wizard->getGoBackForm(), true);
|
||||||
|
|
||||||
html_print_action_buttons(
|
html_print_action_buttons($buttons_input);
|
||||||
'',
|
|
||||||
[]
|
|
||||||
);
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(document).ready(function() {
|
|
||||||
var buttonnext = $('#button-next').parent().html();
|
|
||||||
$('#button-next').hide();
|
|
||||||
var buttonnext = buttonnext.replace('button-next','button-next_copy');
|
|
||||||
var buttonback = $('#button-submit').parent().html();
|
|
||||||
$('#button-submit').hide();
|
|
||||||
var buttonback = buttonback.replace('button-submit','button-submit_copy');
|
|
||||||
var buttonalert = $('#button-add').parent().html();
|
|
||||||
var buttonalert = buttonalert.replace('button-add','button-add_copy');
|
|
||||||
$('.action_buttons_right_content').parent().html(buttonnext+buttonback+buttonalert);
|
|
||||||
var style = $('#principal_action_buttons').attr('style');
|
|
||||||
$('#principal_action_buttons').attr('style',style+' justify-content: unset;');
|
|
||||||
|
|
||||||
// Button next/finish on action buttons.
|
|
||||||
$('#button-next_copy').click(function(){
|
|
||||||
$('#button-next').trigger('click');
|
|
||||||
});
|
|
||||||
// Button back on action buttons.
|
|
||||||
$('#button-submit_copy').click(function(){
|
|
||||||
$('#button-submit').trigger('click');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-server
|
package: pandorafms-server
|
||||||
Version: 7.0NG.770-230403
|
Version: 7.0NG.770-230411
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -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.770-230403"
|
pandora_version="7.0NG.770-230411"
|
||||||
|
|
||||||
package_cpan=0
|
package_cpan=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -764,3 +764,10 @@ tentacle_service_watchdog 1
|
|||||||
# Enable (1) or disable (0) the parameter of mysql ssl certification (mysql_ssl_verify_server_cert) (enabled by default).
|
# Enable (1) or disable (0) the parameter of mysql ssl certification (mysql_ssl_verify_server_cert) (enabled by default).
|
||||||
|
|
||||||
verify_mysql_ssl_cert 1
|
verify_mysql_ssl_cert 1
|
||||||
|
|
||||||
|
# Enable (1) or disable (0) the Pandora FMS Netflow Server (PANDORA FMS ENTERPRISE ONLY).
|
||||||
|
netflowserver 0
|
||||||
|
|
||||||
|
# Number of threads for the Pandora FMS Netflow Server (PANDORA FMS ENTERPRISE ONLY).
|
||||||
|
netflowserver_threads 1
|
||||||
|
|
||||||
|
@ -46,7 +46,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.770";
|
my $pandora_version = "7.0NG.770";
|
||||||
my $pandora_build = "230403";
|
my $pandora_build = "230411";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
# Setup hash
|
# Setup hash
|
||||||
@ -559,6 +559,8 @@ sub pandora_load_config {
|
|||||||
|
|
||||||
$pa_config->{"unknown_block_size"} = 1000; # 7.0.769
|
$pa_config->{"unknown_block_size"} = 1000; # 7.0.769
|
||||||
|
|
||||||
|
$pa_config->{"netflowserver"} = 0; # 7.0.770
|
||||||
|
$pa_config->{"netflowserver_threads"} = 1; # 7.0.770
|
||||||
$pa_config->{"ha_mode"} = "pacemaker"; # 7.0.770
|
$pa_config->{"ha_mode"} = "pacemaker"; # 7.0.770
|
||||||
$pa_config->{"ha_file"} = undef; # 7.0.770
|
$pa_config->{"ha_file"} = undef; # 7.0.770
|
||||||
$pa_config->{"ha_hosts_file"} = '/var/spool/pandora/data_in/conf/pandora_ha_hosts.conf'; # 7.0.770
|
$pa_config->{"ha_hosts_file"} = '/var/spool/pandora/data_in/conf/pandora_ha_hosts.conf'; # 7.0.770
|
||||||
@ -1365,6 +1367,12 @@ sub pandora_load_config {
|
|||||||
elsif ($parametro =~ m/^dataserver_smart_queue\s([0-1])/i) {
|
elsif ($parametro =~ m/^dataserver_smart_queue\s([0-1])/i) {
|
||||||
$pa_config->{'dataserver_smart_queue'} = clean_blank($1);
|
$pa_config->{'dataserver_smart_queue'} = clean_blank($1);
|
||||||
}
|
}
|
||||||
|
elsif ($parametro =~ m/^netflowserver\s([0-1])/i) {
|
||||||
|
$pa_config->{'netflowserver'} = clean_blank($1);
|
||||||
|
}
|
||||||
|
elsif ($parametro =~ m/^netflowserver_threads\s+([0-9]*)/i) {
|
||||||
|
$pa_config->{'netflowserver_threads'}= clean_blank($1);
|
||||||
|
}
|
||||||
elsif ($parametro =~ m/^ha_connect_retries\s+([0-9]*)/i) {
|
elsif ($parametro =~ m/^ha_connect_retries\s+([0-9]*)/i) {
|
||||||
$pa_config->{'ha_connect_retries'} = clean_blank($1);
|
$pa_config->{'ha_connect_retries'} = clean_blank($1);
|
||||||
}
|
}
|
||||||
|
@ -296,7 +296,7 @@ our @ServerTypes = qw (
|
|||||||
dataserver
|
dataserver
|
||||||
networkserver
|
networkserver
|
||||||
snmpconsole
|
snmpconsole
|
||||||
reconserver
|
discoveryserver
|
||||||
pluginserver
|
pluginserver
|
||||||
predictionserver
|
predictionserver
|
||||||
wmiserver
|
wmiserver
|
||||||
@ -307,6 +307,7 @@ our @ServerTypes = qw (
|
|||||||
icmpserver
|
icmpserver
|
||||||
snmpserver
|
snmpserver
|
||||||
satelliteserver
|
satelliteserver
|
||||||
|
transactionalserver
|
||||||
mfserver
|
mfserver
|
||||||
syncserver
|
syncserver
|
||||||
wuxserver
|
wuxserver
|
||||||
@ -315,6 +316,8 @@ our @ServerTypes = qw (
|
|||||||
migrationserver
|
migrationserver
|
||||||
alertserver
|
alertserver
|
||||||
correlationserver
|
correlationserver
|
||||||
|
ncmserver
|
||||||
|
netflowserver
|
||||||
);
|
);
|
||||||
our @AlertStatus = ('Execute the alert', 'Do not execute the alert', 'Do not execute the alert, but increment its internal counter', 'Cease the alert', 'Recover the alert', 'Reset internal counter');
|
our @AlertStatus = ('Execute the alert', 'Do not execute the alert', 'Do not execute the alert, but increment its internal counter', 'Cease the alert', 'Recover the alert', 'Reset internal counter');
|
||||||
|
|
||||||
@ -7269,13 +7272,15 @@ sub process_inventory_data ($$$$$$$) {
|
|||||||
|
|
||||||
# Empty list
|
# Empty list
|
||||||
next unless defined ($list->{'data'});
|
next unless defined ($list->{'data'});
|
||||||
|
|
||||||
foreach my $data (@{$list->{'data'}}) {
|
foreach my $data (@{$list->{'data'}}) {
|
||||||
|
#Empty data.
|
||||||
|
next if (ref($data) eq 'HASH');
|
||||||
|
|
||||||
$data_list .= $data . "\n";
|
$data_list .= $data . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
next if ($data_list eq '');
|
|
||||||
process_inventory_module_data ($pa_config, $data_list, $server_id, $agent_name, $module_name, $interval, $timestamp, $dbh);
|
process_inventory_module_data ($pa_config, $data_list, $server_id, $agent_name, $module_name, $interval, $timestamp, $dbh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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.770";
|
my $pandora_version = "7.0NG.770";
|
||||||
my $pandora_build = "230403";
|
my $pandora_build = "230411";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||||
|
@ -78,6 +78,7 @@ our @EXPORT = qw(
|
|||||||
PROVISIONINGSERVER
|
PROVISIONINGSERVER
|
||||||
MIGRATIONSERVER
|
MIGRATIONSERVER
|
||||||
NCMSERVER
|
NCMSERVER
|
||||||
|
NETFLOWSERVER
|
||||||
METACONSOLE_LICENSE
|
METACONSOLE_LICENSE
|
||||||
OFFLINE_LICENSE
|
OFFLINE_LICENSE
|
||||||
DISCOVERY_HOSTDEVICES
|
DISCOVERY_HOSTDEVICES
|
||||||
@ -202,6 +203,7 @@ use constant MIGRATIONSERVER => 20;
|
|||||||
use constant ALERTSERVER => 21;
|
use constant ALERTSERVER => 21;
|
||||||
use constant CORRELATIONSERVER => 22;
|
use constant CORRELATIONSERVER => 22;
|
||||||
use constant NCMSERVER => 23;
|
use constant NCMSERVER => 23;
|
||||||
|
use constant NETFLOWSERVER => 24;
|
||||||
|
|
||||||
# Module status
|
# Module status
|
||||||
use constant MODULE_NORMAL => 0;
|
use constant MODULE_NORMAL => 0;
|
||||||
@ -2844,6 +2846,8 @@ sub get_server_name {
|
|||||||
return "MIGRATIONSERVER" if ($server_type eq MIGRATIONSERVER);
|
return "MIGRATIONSERVER" if ($server_type eq MIGRATIONSERVER);
|
||||||
return "ALERTSERVER" if ($server_type eq ALERTSERVER);
|
return "ALERTSERVER" if ($server_type eq ALERTSERVER);
|
||||||
return "CORRELATIONSERVER" if ($server_type eq CORRELATIONSERVER);
|
return "CORRELATIONSERVER" if ($server_type eq CORRELATIONSERVER);
|
||||||
|
return "NCMSERVER" if ($server_type eq NCMSERVER);
|
||||||
|
return "NETFLOWSERVER" if ($server_type eq NETFLOWSERVER);
|
||||||
|
|
||||||
return "UNKNOWN";
|
return "UNKNOWN";
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.770
|
%define version 7.0NG.770
|
||||||
%define release 230403
|
%define release 230411
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
@ -49,6 +49,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
mkdir -p $RPM_BUILD_ROOT%{_bindir}/
|
mkdir -p $RPM_BUILD_ROOT%{_bindir}/
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pandora/
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pandora/
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pandora/conf.d
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/tentacle/
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/tentacle/
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/conf
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/conf
|
||||||
@ -60,6 +61,7 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/trans
|
|||||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/commands
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/commands
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/pandora/
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/pandora/
|
||||||
mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/
|
mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf.d/
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/
|
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/
|
||||||
@ -89,6 +91,7 @@ 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
|
install -m 0644 util/pandora_server_logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/pandora_server
|
||||||
fi
|
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/pandora_server_sec.conf.template $RPM_BUILD_ROOT%{_sysconfdir}/pandora/conf.d/pandora_server_sec.conf.template
|
||||||
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
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sudoers.d
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sudoers.d
|
||||||
@ -228,6 +231,9 @@ exit 0
|
|||||||
%defattr(600,root,root)
|
%defattr(600,root,root)
|
||||||
/etc/pandora/pandora_server.conf.new
|
/etc/pandora/pandora_server.conf.new
|
||||||
|
|
||||||
|
%defattr(600,root,root)
|
||||||
|
/etc/pandora/conf.d/pandora_server_sec.conf.template
|
||||||
|
|
||||||
%defattr(664,root,root)
|
%defattr(664,root,root)
|
||||||
/etc/tentacle/tentacle_server.conf.new
|
/etc/tentacle/tentacle_server.conf.new
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.770
|
%define version 7.0NG.770
|
||||||
%define release 230403
|
%define release 230411
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
@ -67,6 +67,7 @@ mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/data_in/trans
|
|||||||
mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/data_in/commands
|
mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/data_in/commands
|
||||||
mkdir -p $RPM_BUILD_ROOT/var/log/pandora/
|
mkdir -p $RPM_BUILD_ROOT/var/log/pandora/
|
||||||
mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/
|
mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf.d/
|
||||||
mkdir -p $RPM_BUILD_ROOT%{prefix}/tentacle/conf/
|
mkdir -p $RPM_BUILD_ROOT%{prefix}/tentacle/conf/
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/lib/perl5/
|
mkdir -p $RPM_BUILD_ROOT/usr/lib/perl5/
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1/
|
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1/
|
||||||
@ -78,6 +79,7 @@ cp -aRf bin/tentacle_server $RPM_BUILD_ROOT/usr/bin/
|
|||||||
|
|
||||||
cp -aRf conf/pandora_* $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/
|
cp -aRf conf/pandora_* $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/
|
||||||
cp -aRf conf/pandora_server.conf.new $RPM_BUILD_ROOT/etc/pandora/
|
cp -aRf conf/pandora_server.conf.new $RPM_BUILD_ROOT/etc/pandora/
|
||||||
|
cp -aRf conf/pandora_server_sec.conf.template $RPM_BUILD_ROOT/etc/pandora/conf.d/pandora_server_sec.conf.template
|
||||||
cp -aRf conf/tentacle_* $RPM_BUILD_ROOT%{prefix}/tentacle/conf/
|
cp -aRf conf/tentacle_* $RPM_BUILD_ROOT%{prefix}/tentacle/conf/
|
||||||
cp -aRf conf/tentacle_server.conf.new $RPM_BUILD_ROOT/etc/tentacle/
|
cp -aRf conf/tentacle_server.conf.new $RPM_BUILD_ROOT/etc/tentacle/
|
||||||
cp -aRf util $RPM_BUILD_ROOT%{prefix}/pandora_server/
|
cp -aRf util $RPM_BUILD_ROOT%{prefix}/pandora_server/
|
||||||
@ -202,6 +204,7 @@ rm -Rf %{prefix}pandora_server
|
|||||||
rm -Rf /var/log/pandora
|
rm -Rf /var/log/pandora
|
||||||
rm -Rf /usr/lib/perl5/PandoraFMS/
|
rm -Rf /usr/lib/perl5/PandoraFMS/
|
||||||
rm -Rf /etc/pandora/pandora_server.conf*
|
rm -Rf /etc/pandora/pandora_server.conf*
|
||||||
|
rm -Rf /etc/pandora/conf.d/*
|
||||||
rm -Rf /etc/tentacle/tentacle_server.conf*
|
rm -Rf /etc/tentacle/tentacle_server.conf*
|
||||||
rm -Rf /var/spool/pandora
|
rm -Rf /var/spool/pandora
|
||||||
rm -Rf /etc/init.d/pandora_server /etc/init.d/tentacle_serverd
|
rm -Rf /etc/init.d/pandora_server /etc/init.d/tentacle_serverd
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.770"
|
PI_VERSION="7.0NG.770"
|
||||||
PI_BUILD="230403"
|
PI_BUILD="230411"
|
||||||
|
|
||||||
MODE=$1
|
MODE=$1
|
||||||
if [ $# -gt 1 ]; then
|
if [ $# -gt 1 ]; then
|
||||||
|
@ -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.770 Build 230403";
|
my $version = "7.0NG.770 Build 230411";
|
||||||
|
|
||||||
# Pandora server configuration
|
# Pandora server configuration
|
||||||
my %conf;
|
my %conf;
|
||||||
|
@ -642,6 +642,9 @@ sub ha_main_pandora($) {
|
|||||||
|
|
||||||
# Execute resync actions.
|
# Execute resync actions.
|
||||||
enterprise_hook('pandoraha_resync_dbs', [$conf, $dbh, $DB_Host, \@HA_DB_Hosts]);
|
enterprise_hook('pandoraha_resync_dbs', [$conf, $dbh, $DB_Host, \@HA_DB_Hosts]);
|
||||||
|
|
||||||
|
# Synchronize nodes.
|
||||||
|
enterprise_hook('pandoraha_sync_node', [$conf, $dbh]);
|
||||||
};
|
};
|
||||||
log_message($conf, 'WARNING', $@) if ($@);
|
log_message($conf, 'WARNING', $@) if ($@);
|
||||||
|
|
||||||
|
@ -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.770 Build 230403";
|
my $version = "7.0NG.770 Build 230411";
|
||||||
|
|
||||||
# save program name for logging
|
# save program name for logging
|
||||||
my $progname = basename($0);
|
my $progname = basename($0);
|
||||||
|
@ -123,7 +123,7 @@ foreach my $op (@operation){
|
|||||||
my $wmi_query = 'SELECT ' . $config->{'fieldsList'} . ' FROM ' . $config->{'wmiClass'} . ($config->{'queryFilter'} ? ' WHERE ' . $config->{'queryFilter'} : '');
|
my $wmi_query = 'SELECT ' . $config->{'fieldsList'} . ' FROM ' . $config->{'wmiClass'} . ($config->{'queryFilter'} ? ' WHERE ' . $config->{'queryFilter'} : '');
|
||||||
|
|
||||||
# Build wmic command
|
# Build wmic command
|
||||||
my $wmi_command = $config->{'wmicPath'} . ' -U ' . $config->{'user'} . '%' . $config->{'pass'} . ($config->{'namespace'} ? ' --namespace="' . $config->{'namespace'} . '"' : '') . ' //' . $config->{'host'} . ' "' . $wmi_query . '"';
|
my $wmi_command = $config->{'wmicPath'} . ' -U ' . "'" . $config->{'user'} . '%' . $config->{'pass'} . "'" . ($config->{'namespace'} ? ' --namespace="' . $config->{'namespace'} . '"' : '') . ' //' . $config->{'host'} . ' "' . $wmi_query . '"';
|
||||||
|
|
||||||
# Run wmic and parse output
|
# Run wmic and parse output
|
||||||
my $output = `$wmi_command 2>/dev/null`;
|
my $output = `$wmi_command 2>/dev/null`;
|
||||||
@ -173,4 +173,4 @@ foreach my $k (keys %{$fields_values}){
|
|||||||
my $result = eval $operation;
|
my $result = eval $operation;
|
||||||
if (defined($result)){
|
if (defined($result)){
|
||||||
print $result . "\n";
|
print $result . "\n";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user