Merge branch 'develop' into ent-10185-filtros-personalizados-para-el-visor-de-datos-de-logs
This commit is contained in:
commit
410a5efcd5
|
@ -1,73 +0,0 @@
|
|||
Name: xprobe2
|
||||
Version: 0.3
|
||||
Release: 2
|
||||
Summary: Tool to detect OS remotely by TCP/IP fingerprinting
|
||||
License: GPLv2
|
||||
Group: Network/Security
|
||||
URL: http://xprobe.sourceforge.net/
|
||||
Packager: Sancho Lerena <slerena@gmail.com>
|
||||
Source: http://dl.sf.net/xprobe/xprobe2-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}
|
||||
Provides: %{name}-%{version}
|
||||
Requires: libpcap
|
||||
BuildRequires: gcc-c++ libpcap-devel
|
||||
|
||||
#This is for SUSE build service, to avoid enforce FHS paths
|
||||
#!BuildIgnore: post-build-checks
|
||||
|
||||
%description
|
||||
Xprobe is an alternative to some tools which are heavily dependent upon the
|
||||
usage of the TCP protocol for remote active operating system fingerprinting.
|
||||
|
||||
Xprobe I combines various remote active operating system fingerprinting methods
|
||||
using the ICMP protocol, which were discovered during the "ICMP Usage in
|
||||
Scanning" research project, into a simple, fast, efficient and a powerful way
|
||||
to detect an underlying operating system a targeted host is using.
|
||||
|
||||
Xprobe2 is an active operating system fingerprinting tool with a different
|
||||
approach to operating system fingerprinting. Xprobe2 rely on fuzzy signature
|
||||
matching, probabilistic guesses, multiple matches simultaneously, and a
|
||||
signature database.
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
%build
|
||||
./configure --with-libpcap-libraries=/usr/lib --with-libpcap-includes=/usr/include/pcap --mandir=%{_mandir} --disable-schemas-install
|
||||
make
|
||||
|
||||
%install
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
ln -s /usr/local/bin/xprobe2 /usr/bin
|
||||
|
||||
%preun
|
||||
|
||||
%postun
|
||||
|
||||
%files
|
||||
|
||||
%defattr(755,root,root)
|
||||
/usr/local/etc
|
||||
/usr/local/etc/xprobe2
|
||||
|
||||
%defattr(644,root,root)
|
||||
%doc AUTHORS CHANGELOG COPYING CREDITS README TODO docs/*
|
||||
%doc /usr/share/man/man1/xprobe2.1.gz
|
||||
/usr/local/etc/xprobe2/xprobe2.conf
|
||||
|
||||
%defattr(755,root,root)
|
||||
/usr/local/bin/xprobe2
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Dec 18 2009 Sancho Lerena <slerena@gmail.com> 3.2-2
|
||||
- A lot of changes to be ready for all RPM plattforms available on build.opensuse.org
|
||||
|
||||
* Tue Dec 08 2009 Sancho Lerena <slerena@gmail.com> 3.2-1
|
||||
- First RPM Spec for SUSE Systems, based on CentOS Spec from Dag Wieers
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
Get the original xprobe2-0.3 from Sourceforge:
|
||||
|
||||
http://downloads.sourceforge.net/project/xprobe/xprobe2/Xprobe2%200.3/xprobe2-0.3.tar.gz
|
||||
|
||||
Uncompress it under, for example /tmp/xprobe2-0.3 directory
|
||||
|
||||
Copy the diff file at /tmp
|
||||
|
||||
Execute the patch command:
|
||||
|
||||
patch -p1 < ../xprobe2-0.3.diff.patch
|
||||
|
||||
This should look like:
|
||||
|
||||
patching file CHANGELOG
|
||||
patching file config.status
|
||||
patching file configure
|
||||
patching file libs-external/USI++/src/config.h
|
||||
patching file libs-external/USI++/src/config.log
|
||||
patching file libs-external/USI++/src/config.status
|
||||
patching file libs-external/USI++/src/ip.cc
|
||||
patching file libs-external/USI++/src/Makefile
|
||||
patching file libs-external/USI++/src/misc.cc
|
||||
patching file libs-external/USI++/src/usi++/arp.h
|
||||
patching file libs-external/USI++/src/usi++/config.h
|
||||
patching file libs-external/USI++/src/usi++/datalink.h
|
||||
patching file libs-external/USI++/src/usi++/icmp.h
|
||||
patching file libs-external/USI++/src/usi++/if.h
|
||||
patching file libs-external/USI++/src/usi++/ip.h
|
||||
patching file libs-external/USI++/src/usi++/Layer2.h
|
||||
patching file libs-external/USI++/src/usi++/README
|
||||
patching file libs-external/USI++/src/usi++/RX.h
|
||||
patching file libs-external/USI++/src/usi++/tcp.h
|
||||
patching file libs-external/USI++/src/usi++/TX.h
|
||||
patching file libs-external/USI++/src/usi++/TX_IP.h
|
||||
patching file libs-external/USI++/src/usi++/udp.h
|
||||
patching file libs-external/USI++/src/usi++/usi++
|
||||
patching file libs-external/USI++/src/usi++/usi++.h
|
||||
patching file libs-external/USI++/src/usi++/usi-structs.h
|
||||
patching file libs-external/USI++/usi++/config.h
|
||||
patching file libs-external/USI++/usi++/tcp.h
|
||||
patching file Makefile
|
||||
patching file src/config.h
|
||||
patching file src/defines.h
|
||||
patching file src/Makefile
|
||||
patching file src/xplib/Makefile
|
||||
patching file src/xpmodules/alive_probe/Makefile
|
||||
patching file src/xpmodules/alive_probe/portscanner/Makefile
|
||||
patching file src/xpmodules/alive_probe/ttl_calc/Makefile
|
||||
patching file src/xpmodules/Makefile
|
||||
patching file src/xpmodules/os_probe/icmp_addrmask/Makefile
|
||||
patching file src/xpmodules/os_probe/icmp_echo_id/Makefile
|
||||
patching file src/xpmodules/os_probe/icmp_inforeq/Makefile
|
||||
patching file src/xpmodules/os_probe/icmp_port_unreach/Makefile
|
||||
patching file src/xpmodules/os_probe/icmp_timestamp/Makefile
|
||||
patching file src/xpmodules/os_probe/Makefile
|
||||
patching file src/xpmodules/os_probe/smb/Makefile
|
||||
patching file src/xpmodules/os_probe/snmp/Makefile
|
||||
patching file src/xpmodules/os_probe/tcp_handshake/Makefile
|
||||
patching file src/xpmodules/os_probe/tcp_rst/Makefile
|
||||
|
||||
Your patched code is now ready to be used.
|
|
@ -300,7 +300,6 @@ server_dependencies=" \
|
|||
bind-utils \
|
||||
whois \
|
||||
cpanminus \
|
||||
http://firefly.artica.es/centos7/xprobe2-0.3-12.2.x86_64.rpm \
|
||||
http://firefly.artica.es/centos7/wmic-1.4-1.el7.x86_64.rpm \
|
||||
https://firefly.artica.es/centos7/pandorawmic-1.0.0-1.x86_64.rpm"
|
||||
execute_cmd "yum install -y $server_dependencies" "Installing Pandora FMS Server dependencies"
|
||||
|
@ -328,7 +327,6 @@ execute_cmd "yum install -y $oracle_dependencies || yum reinstall -y $oracle_dep
|
|||
|
||||
#ipam dependencies
|
||||
ipam_dependencies=" \
|
||||
http://firefly.artica.es/centos7/xprobe2-0.3-12.2.x86_64.rpm \
|
||||
perl(NetAddr::IP) \
|
||||
perl(Sys::Syslog) \
|
||||
perl(DBI) \
|
||||
|
|
|
@ -357,7 +357,6 @@ server_dependencies=" \
|
|||
java \
|
||||
bind-utils \
|
||||
whois \
|
||||
http://firefly.artica.es/centos7/xprobe2-0.3-12.2.x86_64.rpm \
|
||||
http://firefly.artica.es/centos7/wmic-1.4-1.el7.x86_64.rpm \
|
||||
https://firefly.artica.es/centos8/pandorawmic-1.0.0-1.x86_64.rpm"
|
||||
execute_cmd "dnf install -y $server_dependencies" "Installing Pandora FMS Server dependencies"
|
||||
|
@ -385,7 +384,6 @@ execute_cmd "dnf install -y $oracle_dependencies" "Installing Oracle Instant cli
|
|||
|
||||
#ipam dependencies
|
||||
ipam_dependencies=" \
|
||||
http://firefly.artica.es/centos7/xprobe2-0.3-12.2.x86_64.rpm \
|
||||
perl(NetAddr::IP) \
|
||||
perl(Sys::Syslog) \
|
||||
perl(DBI) \
|
||||
|
|
|
@ -253,7 +253,6 @@ server_dependencies=" \
|
|||
openssh-client \
|
||||
postfix \
|
||||
unzip \
|
||||
xprobe \
|
||||
coreutils \
|
||||
libio-compress-perl \
|
||||
libmoosex-role-timer-perl \
|
||||
|
@ -358,7 +357,6 @@ source '/root/.profile' &>> "$LOGFILE"
|
|||
|
||||
#ipam dependencies
|
||||
ipam_dependencies=" \
|
||||
xprobe \
|
||||
libnetaddr-ip-perl \
|
||||
coreutils \
|
||||
libdbd-mysql-perl \
|
||||
|
|
|
@ -125,7 +125,6 @@ RUN dnf install -y --setopt=tsflags=nodocs \
|
|||
bind-utils \
|
||||
whois \
|
||||
libnsl \
|
||||
http://firefly.artica.es/centos7/xprobe2-0.3-12.2.x86_64.rpm \
|
||||
http://firefly.artica.es/centos7/wmic-1.4-1.el7.x86_64.rpm \
|
||||
https://firefly.artica.es/centos8/pandorawmic-1.0.0-1.x86_64.rpm ; dnf clean all
|
||||
|
||||
|
@ -136,7 +135,7 @@ RUN dnf install -y http://firefly.artica.es/centos8/perl-Crypt-OpenSSL-AES-0.02-
|
|||
# Instant client Oracle
|
||||
RUN dnf install -y https://download.oracle.com/otn_software/linux/instantclient/19800/oracle-instantclient19.8-basic-19.8.0.0.0-1.x86_64.rpm https://download.oracle.com/otn_software/linux/instantclient/19800/oracle-instantclient19.8-sqlplus-19.8.0.0.0-1.x86_64.rpm
|
||||
# Install IPAM dependencies
|
||||
RUN dnf install -y http://firefly.artica.es/centos7/xprobe2-0.3-12.2.x86_64.rpm "perl(NetAddr::IP)" "perl(Sys::Syslog)" "perl(DBI)" "perl(XML::Simple)" "perl(Geo::IP)" "perl(IO::Socket::INET6)" "perl(XML::Twig)" "perl(DBD::mysql)" --setopt=tsflags=nodocs
|
||||
RUN dnf install -y "perl(NetAddr::IP)" "perl(Sys::Syslog)" "perl(DBI)" "perl(XML::Simple)" "perl(Geo::IP)" "perl(IO::Socket::INET6)" "perl(XML::Twig)" "perl(DBD::mysql)" --setopt=tsflags=nodocs
|
||||
|
||||
|
||||
EXPOSE 80 443 41121 162/udp
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.770-230428
|
||||
Version: 7.0NG.770-230505
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.770-230428"
|
||||
pandora_version="7.0NG.770-230505"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -1023,7 +1023,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.770';
|
||||
use constant AGENT_BUILD => '230428';
|
||||
use constant AGENT_BUILD => '230505';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.770
|
||||
%define release 230428
|
||||
%define release 230505
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.770
|
||||
%define release 230428
|
||||
%define release 230505
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.770"
|
||||
PI_BUILD="230428"
|
||||
PI_BUILD="230505"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{230428}
|
||||
{230505}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.770 Build 230428")
|
||||
#define PANDORA_VERSION ("7.0NG.770 Build 230505")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.770(Build 230428))"
|
||||
VALUE "ProductVersion", "(7.0NG.770(Build 230505))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.770-230428
|
||||
Version: 7.0NG.770-230505
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.770-230428"
|
||||
pandora_version="7.0NG.770-230505"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
START TRANSACTION;
|
||||
|
||||
ALTER TABLE tpolicy_group_agents CONVERT TO CHARACTER SET UTF8MB4;
|
||||
ALTER TABLE tevent_sound CONVERT TO CHARACTER SET UTF8MB4;
|
||||
ALTER TABLE tsesion_filter CONVERT TO CHARACTER SET UTF8MB4;
|
||||
CREATE TABLE IF NOT EXISTS `tsesion_filter` (
|
||||
`id_filter` INT NOT NULL AUTO_INCREMENT,
|
||||
`id_name` TEXT NULL,
|
||||
|
@ -35,4 +38,6 @@ CREATE TABLE IF NOT EXISTS `tsesion_filter_log_viewer` (
|
|||
PRIMARY KEY (`id_filter`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
ALTER TABLE `talert_template_module_actions` ADD COLUMN `recovered` TINYINT NOT NULL DEFAULT 0;
|
||||
|
||||
COMMIT;
|
||||
|
|
Binary file not shown.
|
@ -38,6 +38,11 @@ ui_require_css_file('maintenance');
|
|||
<br>
|
||||
|
||||
<?php
|
||||
html_print_image(
|
||||
'images/pandora_tinylogo.png',
|
||||
false,
|
||||
['class' => 'responsive flex margn']
|
||||
);
|
||||
html_print_image(
|
||||
'images/maintenance.png',
|
||||
false,
|
||||
|
|
|
@ -38,6 +38,11 @@ ui_require_css_file('maintenance');
|
|||
<br>
|
||||
|
||||
<?php
|
||||
html_print_image(
|
||||
'images/pandora_tinylogo.png',
|
||||
false,
|
||||
['class' => 'responsive flex margn']
|
||||
);
|
||||
html_print_image(
|
||||
'images/maintenance.png',
|
||||
false,
|
||||
|
|
|
@ -50,6 +50,11 @@ $data['check_php_version'] = phpversion();
|
|||
<br>
|
||||
|
||||
<?php
|
||||
html_print_image(
|
||||
'images/pandora_tinylogo.png',
|
||||
false,
|
||||
['class' => 'responsive flex margn']
|
||||
);
|
||||
html_print_image(
|
||||
'images/maintenance.png',
|
||||
false,
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
/**
|
||||
* Agents deploy view.
|
||||
*
|
||||
* @category Agents deploy
|
||||
* @package Pandora FMS
|
||||
* @subpackage Opensource
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* 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 for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
global $config;
|
||||
|
||||
require_once $config['homedir'].'/include/class/AgentDeployWizard.class.php';
|
||||
|
||||
$ajaxPage = 'godmode/agentes/agent_deploy';
|
||||
|
||||
// Control call flow.
|
||||
try {
|
||||
// User access and validation is being processed on class constructor.
|
||||
$adw = new AgentDeployWizard($ajaxPage);
|
||||
} catch (Exception $e) {
|
||||
if (is_ajax()) {
|
||||
echo json_encode(['error' => '[AgentDeployWizard]'.$e->getMessage() ]);
|
||||
exit;
|
||||
} else {
|
||||
echo '[AgentDeployWizard]'.$e->getMessage();
|
||||
}
|
||||
|
||||
// Stop this execution, but continue 'globally'.
|
||||
return;
|
||||
}
|
||||
|
||||
// AJAX controller.
|
||||
if (is_ajax()) {
|
||||
$method = get_parameter('method');
|
||||
|
||||
if (method_exists($adw, $method) === true) {
|
||||
if ($adw->ajaxMethod($method) === true) {
|
||||
$adw->{$method}();
|
||||
} else {
|
||||
$adw->error('Unavailable method.');
|
||||
}
|
||||
} else {
|
||||
$adw->error('Method not found. ['.$method.']');
|
||||
}
|
||||
|
||||
// Stop any execution.
|
||||
exit;
|
||||
} else {
|
||||
// Run.
|
||||
$adw->run();
|
||||
}
|
|
@ -419,6 +419,9 @@ ui_toggle(
|
|||
'filter-datatable-main box-flat white_table_graph fixed_filter_bar'
|
||||
);
|
||||
|
||||
|
||||
require_once 'godmode/agentes/agent_deploy.php';
|
||||
|
||||
// Data table.
|
||||
$selected = true;
|
||||
$selectNameUp = false;
|
||||
|
@ -1025,23 +1028,35 @@ if ($agents !== false) {
|
|||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
||||
// Create agent button.
|
||||
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente">';
|
||||
echo '<form id="create-agent" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente"></form>';
|
||||
|
||||
$buttons = html_print_button(
|
||||
__('Create agent'),
|
||||
'crt-2',
|
||||
false,
|
||||
'',
|
||||
[
|
||||
'icon' => 'next',
|
||||
'onClick' => "document.getElementById('create-agent').submit();",
|
||||
],
|
||||
true
|
||||
).html_print_button(
|
||||
__('Deploy agent'),
|
||||
'modal_deploy_agent',
|
||||
false,
|
||||
'',
|
||||
[],
|
||||
true
|
||||
);
|
||||
|
||||
html_print_action_buttons(
|
||||
html_print_submit_button(
|
||||
__('Create agent'),
|
||||
'crt-2',
|
||||
false,
|
||||
[ 'icon' => 'next' ],
|
||||
true
|
||||
),
|
||||
$buttons,
|
||||
[
|
||||
'type' => 'data_table',
|
||||
'class' => 'fixed_action_buttons',
|
||||
'right_content' => $tablePagination,
|
||||
]
|
||||
);
|
||||
echo '</form>';
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -73,6 +73,8 @@ $table->headstyle[8] = 'text-align:right;width: 120px;';
|
|||
$table->titleclass = 'tabletitle';
|
||||
$table->titlestyle = 'text-transform:uppercase;';
|
||||
|
||||
$table->style[6] = 'display: flex;align-items: center;';
|
||||
|
||||
$table->head = [];
|
||||
$table->head[0] = __('Name');
|
||||
$table->head[1] = __('Status');
|
||||
|
@ -166,8 +168,16 @@ foreach ($servers as $server) {
|
|||
}
|
||||
|
||||
$data[6] = $server['threads'].' : '.$server['queued_modules'];
|
||||
if ($server['queued_modules'] > 200) {
|
||||
$data[6] .= clippy_context_help('server_queued_modules');
|
||||
if ($server['queued_modules'] > 500) {
|
||||
$data[6] .= ' <div class="inline"><a onclick="show_dialog();" >'.html_print_image(
|
||||
'images/info-warning.svg',
|
||||
true,
|
||||
[
|
||||
'width' => 16,
|
||||
'heght' => 16,
|
||||
'class' => 'pulsate clickable',
|
||||
]
|
||||
).'</a></div>';
|
||||
}
|
||||
|
||||
$data[7] = ui_print_timestamp($server['keepalive'], true);
|
||||
|
@ -306,3 +316,26 @@ if ($tiny) {
|
|||
} else {
|
||||
html_print_table($table);
|
||||
}
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function show_dialog() {
|
||||
confirmDialog({
|
||||
title: "<?php echo __('Excesive Queued.'); ?>",
|
||||
message: "<?php echo __('You have too many items in the processing queue. This can happen if your server is overloaded and/or improperly configured. This could be something temporary, or a bottleneck. If it is associated with a delay in monitoring, with modules going to unknown, try increasing the number of threads.'); ?>",
|
||||
strOKButton: "<?php echo __('Close'); ?>",
|
||||
hideCancelButton: true,
|
||||
size: 675,
|
||||
});
|
||||
}
|
||||
|
||||
function runIt() {
|
||||
$('.pulsate').animate({
|
||||
opacity: '1'
|
||||
}, 1000);
|
||||
$('.pulsate').animate({
|
||||
opacity: '0.6'
|
||||
}, 1000, runIt);
|
||||
}
|
||||
runIt();
|
||||
</script>
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="18px" height="20px" viewBox="0 0 18 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->
|
||||
<title>apple-grey@svg</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Mockups" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Deploy-agents---1-Default" transform="translate(-1075.000000, -276.000000)" fill="#95A3BF">
|
||||
<g id="Popup" transform="translate(640.000000, 90.000000)">
|
||||
<g id="Content" transform="translate(0.000000, 13.000000)">
|
||||
<g id="OS" transform="translate(20.000000, 133.000000)">
|
||||
<g transform="translate(400.000000, 26.000000)" id="Icons/Dark/20/apple-grey">
|
||||
<g transform="translate(14.000000, 14.000000)">
|
||||
<path d="M11.0828122,4.66404762 C10.7880362,4.75190476 10.3713494,4.8197619 9.83853445,4.86785714 C9.86251847,3.67395238 10.1724148,2.64414286 10.7728685,1.77985714 C11.3622782,0.921142857 12.3579468,0.327809524 13.7615808,0 C13.7703023,0.022952381 13.7815833,0.0689047619 13.7923903,0.132714286 C13.8032922,0.19652381 13.8141466,0.240285714 13.8229629,0.264380952 C13.8229629,0.296095238 13.8250958,0.336619048 13.8294565,0.384714286 C13.8316843,0.433238095 13.8338173,0.472619048 13.8338173,0.505761905 C13.8338173,0.994428571 13.7180209,1.53852381 13.4868548,2.13947619 C13.2487683,2.74042857 12.8774426,3.2932381 12.3753897,3.79795238 C11.9452415,4.22971429 11.512913,4.5192381 11.0828122,4.66404762 Z M16.4425298,13.0888571 C15.8926037,12.2968095 15.6174985,11.4019048 15.6174985,10.4085714 C15.6174985,9.5027619 15.8752556,8.67347619 16.3946566,7.9212381 C16.6741226,7.511 17.1282548,7.03942857 17.759044,6.50233333 C17.3442058,5.98890476 16.9296519,5.58995238 16.5148137,5.30038095 C15.7637252,4.78038095 14.9144254,4.51928571 13.9648762,4.51928571 C13.3993084,4.51928571 12.7092701,4.65528571 11.8972735,4.92733333 C11.1158495,5.20157143 10.5436931,5.33614286 10.1855444,5.33614286 C9.91475245,5.33614286 9.36477894,5.21690476 8.53500766,4.97585714 C7.69689412,4.73519048 6.99164067,4.61590476 6.41739875,4.61590476 C5.04419506,4.61590476 3.91320154,5.19242857 3.0180667,6.3462381 C2.11643815,7.51538095 1.66666667,9.01561905 1.66666667,10.840381 C1.66666667,12.7818571 2.25399078,14.7951429 3.42641124,16.8875714 C4.61414166,18.9625238 5.81485948,20 7.02647912,20 C7.4326433,20 7.96081314,19.8639524 8.60511116,19.5919524 C9.25121034,19.3268571 9.81886376,19.1948095 10.3056067,19.1948095 C10.8233013,19.1948095 11.4257932,19.3231429 12.1111389,19.5787619 C12.8360157,19.8355238 13.394995,19.9635238 13.785944,19.9635238 C14.8077297,19.9635238 15.8313165,19.1787619 16.8618236,17.6081429 C17.5300582,16.6067619 18.0211619,15.6057619 18.3333333,14.604381 C17.6214914,14.3870952 16.9928825,13.8827143 16.4425298,13.0888571 Z" id="Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.1 KiB |
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->
|
||||
<title>Dark / 14 / info@svg</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Dark-/-14-/-info" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Icons/Elements/Help-mini" fill="#f3b200">
|
||||
<path d="M7,0 C10.8659932,0 14,3.13400675 14,7 C14,10.8659932 10.8659932,14 7,14 C3.13400675,14 0,10.8659932 0,7 C0,3.13400675 3.13400675,0 7,0 Z M7,6 C6.44771525,6 6,6.44771525 6,7 L6,7 L6,10 C6,10.5522847 6.44771525,11 7,11 C7.55228475,11 8,10.5522847 8,10 L8,10 L8,7 C8,6.44771525 7.55228475,6 7,6 Z M7,3 C6.44771525,3 6,3.44771525 6,4 C6,4.55228475 6.44771525,5 7,5 C7.55228475,5 8,4.55228475 8,4 C8,3.44771525 7.55228475,3 7,3 Z" id="Elements-/-Help-mini"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 959 B |
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->
|
||||
<title>linux-grey@svg</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Mockups" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Deploy-agents---1-Default" transform="translate(-874.000000, -276.000000)" fill="#95A3BF">
|
||||
<g id="Popup" transform="translate(640.000000, 90.000000)">
|
||||
<g id="Content" transform="translate(0.000000, 13.000000)">
|
||||
<g id="OS" transform="translate(20.000000, 133.000000)">
|
||||
<g transform="translate(200.000000, 26.000000)" id="Icons/Dark/20/linux-grey">
|
||||
<g transform="translate(14.000000, 14.000000)">
|
||||
<path d="M6.05225389,3.20954057 C6.42861474,1.34333636 8.08089847,0 9.99996946,0 C11.9190404,0 13.5713642,1.34333636 13.9476317,3.20954057 L14.397366,5.43926559 C14.6324332,6.60521489 15.0956343,7.71417739 15.7607024,8.70352628 L16.5345709,9.85472888 C17.0175053,10.5730638 17.3332393,11.3846923 17.4639063,12.2310009 C18.2329747,12.2955877 18.9071095,12.7847088 19.1973769,13.5044304 L19.8529783,15.1299008 C20.1835124,15.9493693 19.9444452,16.8867047 19.2607103,17.4516393 L16.7485713,19.5277773 C16.017103,20.132312 14.9625673,20.1591121 14.2008323,19.5925775 L13.1892566,18.8401758 C13.1758833,18.8303091 13.1626566,18.8201757 13.1495766,18.8099091 C12.6530021,18.943376 12.1306009,19.0147095 11.5914264,19.0147095 L8.40851254,19.0147095 C7.86936465,19.0147095 7.34699014,18.9435094 6.85044236,18.8099091 C6.83737566,18.8201757 6.8241623,18.8303091 6.81078894,18.8401758 L5.79923999,19.5925775 C5.03749161,20.1591121 3.98300923,20.132312 3.25151425,19.5277773 L0.739281919,17.4516393 C0.0556237114,16.8867047 -0.183466827,15.9493693 0.147041917,15.1299008 L0.802702062,13.5044304 C1.09295605,12.7847488 1.7670309,12.2956277 2.5359793,12.2310142 C2.66667293,11.3846923 2.98240697,10.5730638 3.4653014,9.85472888 L4.23918314,8.70352628 C4.90425131,7.71417739 5.36743902,6.60521489 5.60258621,5.43926559 L6.05225389,3.20954057 Z M14.4593662,12.6344951 C14.1793655,12.8439356 13.9522984,13.1251229 13.8081647,13.4584303 L12.7840157,15.8284357 C12.2670412,16.1305697 11.6694799,16.2983034 11.0462251,16.2983034 L8.95375377,16.2983034 C8.33053903,16.2983034 7.73301768,16.1305697 7.21605652,15.828569 L6.19182754,13.4584303 C6.04776055,13.1250962 5.8207067,12.8438956 5.54062607,12.6344551 C5.57495948,12.2047608 5.69187975,11.7800665 5.89138686,11.3843723 L7.56905731,8.05680482 L7.579124,8.06677818 C8.91622035,9.3927945 11.0840786,9.3927945 12.4211616,8.06677818 L12.4310149,8.05700483 L14.1085654,11.384359 C14.3081658,11.7800799 14.4249661,12.2047875 14.4593662,12.6344951 Z M12.0542674,5.69209283 L12.0542674,4.07456918 L10.684731,4.07456918 L10.684731,5.14285159 C10.9753717,5.20165172 11.2601056,5.29829194 11.5313329,5.43278558 L12.0542674,5.69209283 Z M9.31519458,5.14291826 L9.31519458,4.07456918 L7.94565816,4.07456918 L7.94565816,5.69226616 L8.46895267,5.43278558 C8.74007328,5.29834527 9.02468726,5.20173172 9.31519458,5.14291826 Z M2.71007303,13.5818973 C2.4300724,13.5818973 2.17827183,13.7509643 2.07428493,14.0088316 L1.41863012,15.6343019 C1.3084552,15.9075025 1.38815005,16.2199032 1.61604389,16.4083036 L4.12827622,18.4844417 C4.37210344,18.6859088 4.72359757,18.6948421 4.97751814,18.5060417 L5.98906708,17.75364 C6.24174765,17.5657729 6.33202786,17.2307055 6.20761424,16.9428382 L4.9330247,13.9934982 C4.82513113,13.7437643 4.57755724,13.5818973 4.30362329,13.5818973 L2.71007303,13.5818973 Z M17.925774,14.0088316 C17.8217738,13.7509643 17.5700399,13.5818973 17.2899059,13.5818973 L15.6964356,13.5818973 C15.422435,13.5818973 15.1749678,13.7437643 15.0669675,13.9934982 L13.7924313,16.9428382 C13.6680311,17.2307055 13.7582979,17.5657729 14.0109652,17.75364 L15.0225674,18.5060417 C15.2764347,18.6948421 15.6279021,18.6859088 15.8717694,18.4844417 L18.3840417,16.4083036 C18.6119089,16.2199032 18.6916424,15.9075025 18.5813755,15.6343019 L17.925774,14.0088316 Z M9.08143405,6.64758832 C9.65976869,6.36081434 10.3405169,6.36081434 10.9188515,6.64758832 L11.583213,6.97701572 L11.4527594,7.10638935 C10.6505043,7.90200448 9.34978132,7.90200448 8.54752618,7.10638935 L8.41707256,6.97701572 L9.08143405,6.64758832 Z" id="Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.5 KiB |
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->
|
||||
<title>windows-grey@svg</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Mockups" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Deploy-agents---1-Default" transform="translate(-674.000000, -276.000000)" fill="#95A3BF">
|
||||
<g id="Popup" transform="translate(640.000000, 90.000000)">
|
||||
<g id="Content" transform="translate(0.000000, 13.000000)">
|
||||
<g id="OS" transform="translate(20.000000, 133.000000)">
|
||||
<g transform="translate(0.000000, 26.000000)" id="Icons/Dark/20/windows-grey">
|
||||
<g transform="translate(14.000000, 14.000000)">
|
||||
<path d="M0,0 L9.16666667,0 L9.16666667,9.16666667 L0,9.16666667 L0,0 Z M10.8333333,0 L10.8333333,9.16666667 L20,9.16666667 L20,0 L10.8333333,0 Z M0,10.8333333 L0,20 L9.16666667,20 L9.16666667,10.8333333 L0,10.8333333 Z M10.8333333,10.8333333 L10.8333333,20 L20,20 L20,10.8333333 L10.8333333,10.8333333 Z" id="Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
|
@ -0,0 +1,782 @@
|
|||
<?php
|
||||
/**
|
||||
* Agent deploy wizard
|
||||
*
|
||||
* @category Class
|
||||
* @package Pandora FMS
|
||||
* @subpackage Agent deploy wizard
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
global $config;
|
||||
|
||||
/**
|
||||
* Provides functionality for agent deploy wizard.
|
||||
*/
|
||||
class AgentDeployWizard
|
||||
{
|
||||
|
||||
/**
|
||||
* Url of controller.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $ajaxController;
|
||||
|
||||
/**
|
||||
* References datatables object identifier.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $tableId;
|
||||
|
||||
/**
|
||||
* Allowed methods to be called using AJAX request.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $AJAXMethods = ['loadModal'];
|
||||
|
||||
|
||||
/**
|
||||
* Checks if target method is available to be called using AJAX.
|
||||
*
|
||||
* @param string $method Target method.
|
||||
*
|
||||
* @return boolean True allowed, false not.
|
||||
*/
|
||||
public function ajaxMethod($method)
|
||||
{
|
||||
return in_array($method, $this->AJAXMethods);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generates a JSON error.
|
||||
*
|
||||
* @param string $msg Error message.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function error($msg)
|
||||
{
|
||||
echo json_encode(
|
||||
['error' => $msg]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Minor function to dump json message as ajax response.
|
||||
*
|
||||
* @param string $type Type: result || error.
|
||||
* @param string $msg Message.
|
||||
* @param boolean $delete Deletion messages.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function ajaxMsg($type, $msg, $delete=false)
|
||||
{
|
||||
if ($type === 'error') {
|
||||
$msg_title = ($delete === true) ? 'Failed while removing' : 'Failed while saving';
|
||||
} else {
|
||||
$msg_title = ($delete === true) ? 'Successfully deleted' : 'Successfully saved into keystore';
|
||||
}
|
||||
|
||||
echo json_encode(
|
||||
[ $type => __($msg_title).':<br>'.$msg ]
|
||||
);
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Initializes object and validates user access.
|
||||
*
|
||||
* @param string $ajax_controller Path of ajaxController, is the 'page'
|
||||
* variable sent in ajax calls.
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
public function __construct($ajax_controller)
|
||||
{
|
||||
global $config;
|
||||
|
||||
// Check access.
|
||||
check_login();
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AR') === false) {
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_ACL_VIOLATION,
|
||||
'Trying to access agent deploy wizard'
|
||||
);
|
||||
|
||||
if (is_ajax()) {
|
||||
echo json_encode(['error' => 'noaccess']);
|
||||
} else {
|
||||
include 'general/noaccess.php';
|
||||
}
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
$this->ajaxController = $ajax_controller;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prints inputs for modal "Deploy agents".
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function loadModal()
|
||||
{
|
||||
ob_start();
|
||||
echo '<div id="wizard-modal-content">';
|
||||
echo $this->getModalContent();
|
||||
echo '</div>';
|
||||
echo ob_get_clean();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Run AgentDeployWizard.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
global $config;
|
||||
|
||||
if (check_acl($config['id_user'], 0, 'AR') === false) {
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_ACL_VIOLATION,
|
||||
'Trying to access agent deploy.'
|
||||
);
|
||||
include 'general/noaccess.php';
|
||||
return;
|
||||
}
|
||||
|
||||
ui_require_css_file('agent_deploy_wizard');
|
||||
|
||||
// Auxiliar div for agent deploy modal.
|
||||
echo '<div id="agent_deploy_modal" class="invisible"></div>';
|
||||
|
||||
echo $this->loadJS();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generates content of modal.
|
||||
*
|
||||
* @return string Modal content.
|
||||
*/
|
||||
public function getModalContent()
|
||||
{
|
||||
global $config;
|
||||
|
||||
ob_start();
|
||||
|
||||
$inputs = [];
|
||||
|
||||
// Container div for stepper.
|
||||
$stepper_container = html_print_div(
|
||||
[
|
||||
'id' => 'stepper_container',
|
||||
'class' => 'stepper',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'id' => 'modal_header',
|
||||
'class' => 'margin-bottom-10',
|
||||
'content' => $stepper_container,
|
||||
]
|
||||
);
|
||||
|
||||
// Deploy configuration.
|
||||
$tableConfiguration = new stdClass();
|
||||
$tableConfiguration->class = 'filter-table-adv w100p';
|
||||
$tableConfiguration->data = [];
|
||||
$tableConfiguration->style = [];
|
||||
$tableConfiguration->cellclass = [];
|
||||
$tableConfiguration->colspan = [];
|
||||
$tableConfiguration->rowclass['os'] = 'margin-bottom-5';
|
||||
$tableConfiguration->rowstyle['block2'] = 'display: flex; justify-content: space-between;';
|
||||
$tableConfiguration->rowspan = [];
|
||||
|
||||
$windows_label_img = html_print_image(
|
||||
'/images/windows-grey@svg.svg',
|
||||
true,
|
||||
['class' => 'installer-title-icon main_menu_icon']
|
||||
);
|
||||
|
||||
$windows_label = html_print_div(
|
||||
[
|
||||
'style' => 'display: flex;align-items: center; margin-top: 5px;margin-bottom: 5px;',
|
||||
'content' => $windows_label_img.'Windows',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$linux_label_img = html_print_image(
|
||||
'/images/linux-grey@svg.svg',
|
||||
true,
|
||||
['class' => 'installer-title-icon main_menu_icon']
|
||||
);
|
||||
|
||||
$linux_label = html_print_div(
|
||||
[
|
||||
'style' => 'display: flex;align-items: center; margin-top: 5px;margin-bottom: 5px;',
|
||||
'content' => $linux_label_img.'Unix / Linux',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$mac_label_img = html_print_image(
|
||||
'/images/apple-grey@svg.svg',
|
||||
true,
|
||||
['class' => 'installer-title-icon main_menu_icon']
|
||||
);
|
||||
|
||||
$mac_label = html_print_div(
|
||||
[
|
||||
'style' => 'display: flex;align-items: center; margin-top: 5px;margin-bottom: 5px;',
|
||||
'content' => $mac_label_img.'Mac OS',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
// Operating System switch buttons.
|
||||
$switchButtons = [];
|
||||
$switchButtons[] = html_print_radio_button_extended(
|
||||
'os',
|
||||
0,
|
||||
$windows_label,
|
||||
0,
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
true
|
||||
);
|
||||
$switchButtons[] = html_print_radio_button_extended(
|
||||
'os',
|
||||
1,
|
||||
$linux_label,
|
||||
0,
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
true
|
||||
);
|
||||
$switchButtons[] = html_print_radio_button_extended(
|
||||
'os',
|
||||
2,
|
||||
$mac_label,
|
||||
0,
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
true
|
||||
);
|
||||
|
||||
$sub_tip = '<span class="input_sub_placeholder_normal">'.__('Please note that all OS must be 64-bit based architecture').'</span>';
|
||||
|
||||
$tableConfiguration->data['os'][] = html_print_label_input_block(
|
||||
__('Choose your OS'),
|
||||
html_print_div(
|
||||
[
|
||||
'id' => 'os_selector',
|
||||
'class' => 'switch_radio_button custom-switch-radio-button',
|
||||
'content' => implode('', $switchButtons),
|
||||
],
|
||||
true
|
||||
).$sub_tip
|
||||
);
|
||||
|
||||
$server_add_help_tip = ui_print_help_tip(
|
||||
__('Use your %s Data Server IP address here. It must be possible to establish a connection from the agent to port 41121/tcp of this address.', get_product_name()),
|
||||
true
|
||||
);
|
||||
|
||||
$tableConfiguration->data['block2'][0] = html_print_label_input_block(
|
||||
__('Server address').$server_add_help_tip,
|
||||
html_print_input_text(
|
||||
'server_addr',
|
||||
$_SERVER['SERVER_ADDR'],
|
||||
'',
|
||||
16,
|
||||
100,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
'w260px'
|
||||
)
|
||||
);
|
||||
|
||||
$tableConfiguration->data['block2'][1] = html_print_label_input_block(
|
||||
__('Group'),
|
||||
html_print_select_groups(
|
||||
false,
|
||||
'AR',
|
||||
false,
|
||||
'group',
|
||||
$group,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'w260px',
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
false,
|
||||
'id_grupo',
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
'260px',
|
||||
false,
|
||||
true,
|
||||
)
|
||||
);
|
||||
|
||||
echo '<div id="config_page">';
|
||||
echo '<form id="form_generate_installer" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/agent_deploy">';
|
||||
|
||||
if ($config['language'] === 'es') {
|
||||
$instructions_url = 'https://pandorafms.com/manual/es/documentation/02_installation/05_configuration_agents';
|
||||
} else {
|
||||
$instructions_url = 'https://pandorafms.com/manual/en/documentation/02_installation/05_configuration_agents';
|
||||
}
|
||||
|
||||
$instructions_link = '<a class="green-link" style="font-size: 15px;" href="'.$instructions_url.'" target="_blank">'.__('view the following instructions').'</a>';
|
||||
|
||||
$more_info_link = html_print_div(
|
||||
[
|
||||
'id' => 'config_form_more_info',
|
||||
'class' => 'warn-box',
|
||||
'content' => __('If you need more information regarding agents').', '.$instructions_link,
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$table_config = html_print_div(
|
||||
[
|
||||
'style' => 'flex: 1;',
|
||||
'content' => html_print_table($tableConfiguration, true),
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'id' => 'config_form',
|
||||
'class' => 'white_table_flex agent_details_col modal-content',
|
||||
'content' => $table_config.$more_info_link,
|
||||
]
|
||||
);
|
||||
|
||||
html_print_div(
|
||||
['id' => 'footer_separator']
|
||||
);
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'id' => 'config_buttonset',
|
||||
'class' => 'ui-dialog-buttonset',
|
||||
'content' => html_print_submit_button(
|
||||
__('Generate installer'),
|
||||
'generate_installer',
|
||||
false,
|
||||
[],
|
||||
true,
|
||||
),
|
||||
]
|
||||
);
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
|
||||
echo '<div id="installer_page">';
|
||||
echo '<div id="installer_data" class="white_table_flex agent_details_col modal-content">';
|
||||
|
||||
// Start of Unix / Linux installer section.
|
||||
$title = html_print_image(
|
||||
'/images/linux-grey@svg.svg',
|
||||
true,
|
||||
['class' => 'installer-title-icon main_menu_icon svg-brightness-0']
|
||||
);
|
||||
|
||||
$title .= '<span class="header_title">'.__('Linux agent').'</span>';
|
||||
|
||||
$content = html_print_div(
|
||||
[
|
||||
'class' => 'installer-title',
|
||||
'content' => $title,
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$content .= '<span>'.__('Run the following command in the shell of your Linux server to perform the installation of the generated agent:').'</span>';
|
||||
$content .= html_print_code_picker('run_command_box_linux', '', 'installer-code-fragment', false, true);
|
||||
|
||||
$content .= '<span>'.__('Once installed, you must run the following command to start the software agent service:').'</span>';
|
||||
$content .= html_print_code_picker('start_service_box_linux', '', 'installer-code-fragment', true, true);
|
||||
|
||||
if ($config['language'] === 'es') {
|
||||
$linux_dependencies_url = 'https://pandorafms.com/manual/es/documentation/02_installation/01_installing#requisitos_para_el_agente';
|
||||
} else {
|
||||
$linux_dependencies_url = 'https://pandorafms.com/manual/en/documentation/02_installation/01_installing#agent_requirements';
|
||||
}
|
||||
|
||||
$linux_dependencies_link = '<a class="green-link" href="'.$linux_dependencies_url.'" target="_blank">'.__('dependencies').'</a>';
|
||||
|
||||
$content .= '<span>'.__('For the correct operation of the Linux agent it is necessary that the server has installed the following ').$linux_dependencies_link.'</span>';
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'id' => 'linux_installer',
|
||||
'class' => 'white_table_flex agent_details_col',
|
||||
'style' => 'margin-bottom: 20px',
|
||||
'content' => $content,
|
||||
]
|
||||
);
|
||||
|
||||
// Start of Windows installer section.
|
||||
$title = html_print_image(
|
||||
'/images/windows-grey@svg.svg',
|
||||
true,
|
||||
['class' => 'installer-title-icon main_menu_icon svg-brightness-0']
|
||||
);
|
||||
|
||||
$title .= '<span class="header_title">'.__('Windows agent').'</span>';
|
||||
|
||||
$content = html_print_div(
|
||||
[
|
||||
'class' => 'installer-title',
|
||||
'content' => $title,
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$content .= '<span>'.__('Run the following command in cmd.exe as an administrator:').'</span>';
|
||||
$content .= html_print_code_picker('run_command_box_windows', '', 'installer-code-fragment', false, true);
|
||||
|
||||
$content .= '<span>'.__('Once installed, you must run the following command to start the software agent service:').'</span>';
|
||||
$content .= html_print_code_picker('start_service_box_windows', '', 'installer-code-fragment', true, true);
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'id' => 'win_installer',
|
||||
'class' => 'white_table_flex agent_details_col',
|
||||
'style' => 'margin-bottom: 20px',
|
||||
'content' => $content,
|
||||
]
|
||||
);
|
||||
|
||||
// Start of MacOS installer section.
|
||||
$title = html_print_image(
|
||||
'/images/apple-grey@svg.svg',
|
||||
true,
|
||||
['class' => 'installer-title-icon main_menu_icon svg-brightness-0']
|
||||
);
|
||||
|
||||
$title .= '<span class="header_title">'.__('Mac agent').'</span>';
|
||||
|
||||
$content = html_print_div(
|
||||
[
|
||||
'class' => 'installer-title',
|
||||
'content' => $title,
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$mac_warn_box = html_print_div(
|
||||
[
|
||||
'id' => 'warn_box_mac',
|
||||
'class' => 'warn-box',
|
||||
'content' => __('To complete the installation process, please perform a manual installation and configure the server address to XXX and specify the group as XXX. Thank you for your cooperation.'),
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'id' => 'mac_installer',
|
||||
'class' => 'white_table_flex agent_details_col',
|
||||
'style' => 'margin-bottom: 20px',
|
||||
'content' => $content.$mac_warn_box,
|
||||
]
|
||||
);
|
||||
|
||||
// Footer.
|
||||
html_print_div(['id' => 'footer_separator']);
|
||||
|
||||
echo '</div>';
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'id' => 'installer_buttonset',
|
||||
'class' => 'flex-row',
|
||||
'style' => '',
|
||||
'content' => html_print_button(
|
||||
__('Change configuration'),
|
||||
'change_configuration',
|
||||
false,
|
||||
'',
|
||||
['class' => 'secondary'],
|
||||
true,
|
||||
).html_print_button(
|
||||
__('Done'),
|
||||
'done',
|
||||
false,
|
||||
'',
|
||||
['style' => 'min-width: 0;'],
|
||||
true
|
||||
),
|
||||
]
|
||||
);
|
||||
|
||||
echo '</div>';
|
||||
|
||||
return ob_get_clean();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Loads JS content.
|
||||
*
|
||||
* @return string JS content.
|
||||
*/
|
||||
public function loadJS()
|
||||
{
|
||||
ob_start();
|
||||
|
||||
ui_require_javascript_file('stepper', 'include/javascript/', true);
|
||||
|
||||
// Javascript content.
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
/**
|
||||
* Cleanup current dom entries.
|
||||
*/
|
||||
function cleanupDOM() {
|
||||
$('#div-identifier').empty();
|
||||
$('#div-product').empty();
|
||||
$('#div-username').empty();
|
||||
$('#div-password').empty();
|
||||
$('#div-extra_1').empty();
|
||||
$('#div-extra_2').empty();
|
||||
}
|
||||
|
||||
/**
|
||||
* Process ajax responses and shows a dialog with results.
|
||||
*/
|
||||
function showMsg(data) {
|
||||
var title = "<?php echo __('Success'); ?>";
|
||||
var text = '';
|
||||
var failed = 0;
|
||||
try {
|
||||
data = JSON.parse(data);
|
||||
text = data['result'];
|
||||
} catch (err) {
|
||||
title = "<?php echo __('Failed'); ?>";
|
||||
text = err.message;
|
||||
failed = 1;
|
||||
}
|
||||
if (!failed && data['error'] != undefined) {
|
||||
title = "<?php echo __('Failed'); ?>";
|
||||
text = data['error'];
|
||||
failed = 1;
|
||||
}
|
||||
if (data['report'] != undefined) {
|
||||
data['report'].forEach(function (item){
|
||||
text += '<br>'+item;
|
||||
});
|
||||
}
|
||||
|
||||
$('#msg').empty();
|
||||
$('#msg').html(text);
|
||||
$('#msg').dialog({
|
||||
width: 450,
|
||||
position: {
|
||||
my: 'center',
|
||||
at: 'center',
|
||||
of: window,
|
||||
collision: 'fit'
|
||||
},
|
||||
title: title,
|
||||
buttons: [
|
||||
{
|
||||
class: "ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next",
|
||||
text: 'OK',
|
||||
click: function(e) {
|
||||
if (!failed) {
|
||||
$(".ui-dialog-content").dialog("close");
|
||||
$('.info').hide();
|
||||
cleanupDOM();
|
||||
dt_keystore.draw(false);
|
||||
} else {
|
||||
$(this).dialog('close');
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
function generate_installer() {
|
||||
$('#config_page').hide();
|
||||
$('#installer_page').show();
|
||||
|
||||
var os_val = $('input[name="os"]:checked').val();
|
||||
var server_addr_val = $('input[name="server_addr"]').val();
|
||||
var group_val = $('[name="group"] option:selected').text();
|
||||
|
||||
var win_installer_command = `Invoke-WebRequest -Uri https://firefly.pandorafms.com/pandorafms/latest/Windows/Pandora%20FMS%20Windows%20Agent%20v7.0NG.x86_64.exe -OutFile \$\{env:tmp\}\\\pandora-agent-windows.exe; & \$\{env:tmp\}\\\pandora-agent-windows.exe /S --ip ${server_addr_val} --group \"${group_val}\" --remote_config 1`;
|
||||
var linux_installer_command = `export PANDORA_SERVER_IP='${server_addr_val}' && \\ \nexport PANDORA_REMOTE_CONFIG=1 && \\ \nexport PANDORA_GROUP='${group_val}' && \\ \ncurl -Ls https://pfms.me/agent-deploy | bash`;
|
||||
var mac_installer_text = `To complete the installation process, please perform a manual installation and configure the server IP to ${server_addr_val} and specify the group as ${group_val}. Thank you for your cooperation`;
|
||||
var linux_service_start = "/etc/init.d/pandora_agent_daemon start";
|
||||
var win_service_start = "NET START PandoraFMSAgent";
|
||||
|
||||
switch (os_val) {
|
||||
case '0':
|
||||
$('#run_command_box_windows').text(win_installer_command);
|
||||
$('#start_service_box_windows').text(win_service_start);
|
||||
$('#linux_installer').hide();
|
||||
$('#mac_installer').hide();
|
||||
$('#win_installer').show();
|
||||
break;
|
||||
|
||||
case '1':
|
||||
$('#run_command_box_linux').text(linux_installer_command);
|
||||
$('#start_service_box_linux').text(linux_service_start);
|
||||
$('#win_installer').hide();
|
||||
$('#mac_installer').hide();
|
||||
$('#linux_installer').show();
|
||||
break;
|
||||
|
||||
case '2':
|
||||
$('#warn_box_mac').text(mac_installer_text);
|
||||
$('#win_installer').hide();
|
||||
$('#linux_installer').hide();
|
||||
$('#mac_installer').show();
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function display_deploy_configuration() {
|
||||
$('#installer_page').hide();
|
||||
$('#config_page').show();
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads modal from AJAX.
|
||||
*/
|
||||
function show_agent_install_modal() {
|
||||
var title = '<?php echo __('Deploy agent'); ?>';
|
||||
var method = '';
|
||||
|
||||
load_modal({
|
||||
target: $('#agent_deploy_modal'),
|
||||
form: 'modal_form',
|
||||
url: '<?php echo ui_get_full_url('ajax.php', false, false, false); ?>',
|
||||
ajax_callback: showMsg,
|
||||
cleanup: cleanupDOM,
|
||||
modal: {
|
||||
title: title,
|
||||
},
|
||||
extradata: [
|
||||
{
|
||||
name: 'identifier',
|
||||
}
|
||||
],
|
||||
onload: function() {
|
||||
display_deploy_configuration();
|
||||
|
||||
var stepper_step_names = [];
|
||||
stepper_step_names.push('<?php echo __('Configuration'); ?>');
|
||||
stepper_step_names.push('<?php echo __('Installer'); ?>');
|
||||
|
||||
var stepper_container = $('#stepper_container');
|
||||
var stepper = new Stepper(stepper_container, stepper_step_names);
|
||||
|
||||
stepper.render();
|
||||
|
||||
// Initial step: 1.
|
||||
stepper.selectStep(1);
|
||||
|
||||
$("#form_generate_installer").on('submit', function(e) {
|
||||
// We only want the form to be submitted for field validation.
|
||||
e.preventDefault();
|
||||
generate_installer();
|
||||
stepper.selectStep(2);
|
||||
});
|
||||
|
||||
$("#button-change_configuration").on('click', function() {
|
||||
display_deploy_configuration();
|
||||
stepper.selectStep(1);
|
||||
});
|
||||
|
||||
$("#button-done").on('click', function() {
|
||||
$(".ui-dialog-content").dialog("close");
|
||||
$('.info').hide();
|
||||
cleanupDOM();
|
||||
dt_keystore.draw(false);
|
||||
});
|
||||
},
|
||||
onshow: {
|
||||
page: '<?php echo $this->ajaxController; ?>',
|
||||
method: 'loadModal'
|
||||
},
|
||||
onsubmit: {
|
||||
page: '<?php echo $this->ajaxController; ?>',
|
||||
method: method
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
var page = 0;
|
||||
|
||||
$("#button-modal_deploy_agent").on('click', function() {
|
||||
show_agent_install_modal();
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
// EOF Javascript content.
|
||||
return ob_get_clean();
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -570,7 +570,7 @@ class TipsWindow
|
|||
$sql = sprintf(
|
||||
'SELECT id, name AS language, title, text, url, enable
|
||||
FROM twelcome_tip t
|
||||
LEFT JOIN tlanguage l ON t.id_lang = l.id_language COLLATE utf8mb4_unicode_ci
|
||||
LEFT JOIN tlanguage l ON t.id_lang COLLATE utf8mb4_unicode_ci = CONVERT(l.id_language USING utf8mb4) COLLATE utf8mb4_unicode_ci
|
||||
%s %s %s',
|
||||
$filter,
|
||||
$order,
|
||||
|
@ -582,7 +582,7 @@ class TipsWindow
|
|||
$sqlCount = sprintf(
|
||||
'SELECT count(*)
|
||||
FROM twelcome_tip t
|
||||
LEFT JOIN tlanguage l ON t.id_lang = l.id_language COLLATE utf8mb4_unicode_ci
|
||||
LEFT JOIN tlanguage l ON t.id_lang COLLATE utf8mb4_unicode_ci = CONVERT(l.id_language USING utf8mb4) COLLATE utf8mb4_unicode_ci
|
||||
%s',
|
||||
$filter
|
||||
);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC230428';
|
||||
$build_version = 'PC230505';
|
||||
$pandora_version = 'v7.0NG.770';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -5241,7 +5241,7 @@ function graph_monitor_wheel($width=550, $height=600, $filter=false)
|
|||
'name' => __('Main node'),
|
||||
'type' => 'center_node',
|
||||
'children' => iterate_group_array($data_groups, $data_agents),
|
||||
'color' => '#3F3F3F',
|
||||
'color' => ($config['style'] === 'pandora_black') ? '#111' : '#FFF',
|
||||
];
|
||||
|
||||
if (empty($graph_data['children'])) {
|
||||
|
|
|
@ -6932,4 +6932,40 @@ function html_print_go_top()
|
|||
$output .= '</div>';
|
||||
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render a code picker fragment with default Pandora styles.
|
||||
*
|
||||
* @param string $id,
|
||||
* @param string $content Content.
|
||||
* @param string $classes Classes for code picker.
|
||||
* @param boolean $single_line If true, code picker will be displayed as a single line of code.
|
||||
* @param boolean $return Return output if set to true.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function html_print_code_picker(
|
||||
string $id,
|
||||
string $content='',
|
||||
string $classes='',
|
||||
bool $single_line=false,
|
||||
bool $return=false
|
||||
) {
|
||||
$single_line_class = '';
|
||||
|
||||
if ($single_line === true) {
|
||||
$single_line_class = 'single-line ';
|
||||
}
|
||||
|
||||
$output = '<div class="code-fragment '.$single_line_class.$classes.'">';
|
||||
$output .= '<pre style="margin: 0;"><code class="code-font" id="'.$id.'" style="display: block; white-space: pre-wrap;">'.$content.'</code></pre>';
|
||||
$output .= '</div>';
|
||||
|
||||
if ($return === true) {
|
||||
return $output;
|
||||
} else {
|
||||
echo $output;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1770,7 +1770,7 @@ function ui_require_javascript_file($name, $path='include/javascript/', $echo_ta
|
|||
|
||||
if (is_metaconsole()
|
||||
&& (isset($config['requirements_use_base_url']) === false
|
||||
|| $config['requirements_use_base_url'] === false) && $filename !== 'include/javascript/select2.min.js'
|
||||
|| $config['requirements_use_base_url'] === false)
|
||||
) {
|
||||
$config['js'][$name] = '../../'.$filename;
|
||||
} else {
|
||||
|
|
|
@ -825,8 +825,7 @@ function sunburst(recipient, data, width, height, tooltip = true) {
|
|||
if (height === "auto") {
|
||||
height = width;
|
||||
}
|
||||
// var width = 960,
|
||||
// height = 700;
|
||||
|
||||
var radius = Math.min(width, height) / 2;
|
||||
|
||||
var x = d3.scale.linear().range([0, 2 * Math.PI]);
|
||||
|
@ -857,7 +856,11 @@ function sunburst(recipient, data, width, height, tooltip = true) {
|
|||
return Math.max(0, y(d.y));
|
||||
})
|
||||
.outerRadius(function(d) {
|
||||
return Math.max(0, y(d.y + d.dy));
|
||||
if (d.children || d.depth === 4) {
|
||||
return Math.max(0, y(d.y + d.dy));
|
||||
} else {
|
||||
return Math.max(0, y(d.y + d.dy)) + 20;
|
||||
}
|
||||
});
|
||||
|
||||
var g = svg
|
||||
|
@ -879,6 +882,7 @@ function sunburst(recipient, data, width, height, tooltip = true) {
|
|||
: color((d.children ? d : d.parent).name);
|
||||
})
|
||||
.style("cursor", "pointer")
|
||||
.style("stroke-width", "0.2")
|
||||
.on("click", click)
|
||||
.on("mouseover", tooltip === "1" ? over_user : "")
|
||||
.on("mouseout", out_user)
|
||||
|
@ -888,23 +892,38 @@ function sunburst(recipient, data, width, height, tooltip = true) {
|
|||
if (d.type === "central_service") {
|
||||
return 0;
|
||||
}
|
||||
|
||||
var ang = ((x(d.x + d.dx / 2) - Math.PI / 2) / Math.PI) * 180;
|
||||
return ang > 90 ? 180 + ang : ang;
|
||||
if (calculate_angle(d) < 20) {
|
||||
return ang;
|
||||
} else {
|
||||
return Math.trunc(ang) == 90 || Math.trunc(ang) == 89
|
||||
? ang - 90
|
||||
: 90 + ang;
|
||||
}
|
||||
}
|
||||
|
||||
var text = g
|
||||
.append("text")
|
||||
.attr("transform", function(d) {
|
||||
return (
|
||||
"translate(" +
|
||||
arc.centroid(d) +
|
||||
")rotate(" +
|
||||
computeTextRotation(d) +
|
||||
")"
|
||||
);
|
||||
if (typeof d.show_name != "undefined" && d.show_name) {
|
||||
return (
|
||||
"translate(" +
|
||||
arc.centroid(d) +
|
||||
")rotate(" +
|
||||
computeTextRotation(d) +
|
||||
")"
|
||||
);
|
||||
}
|
||||
})
|
||||
.attr("x", function(d) {
|
||||
return computeTextRotation(d) > 180 ? -40 : -30;
|
||||
if (typeof d.show_name != "undefined" && d.show_name) {
|
||||
if (calculate_angle(d) < 20) {
|
||||
return (d.name.length + 15) * -1;
|
||||
} else {
|
||||
return (d.name.length + 25) * -1;
|
||||
}
|
||||
}
|
||||
})
|
||||
.attr("dx", "6") // margin
|
||||
.attr("dy", function(d) {
|
||||
|
@ -914,17 +933,30 @@ function sunburst(recipient, data, width, height, tooltip = true) {
|
|||
return ".35em";
|
||||
}) // vertical-align
|
||||
.attr("opacity", function(d) {
|
||||
if (
|
||||
(typeof d.show_name != "undefined" && d.show_name) ||
|
||||
d.type === "central_service"
|
||||
)
|
||||
if (typeof d.show_name != "undefined" && d.show_name) {
|
||||
return 1;
|
||||
else return 0;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
})
|
||||
.text(function(d) {
|
||||
if (d.name.length > 20) {
|
||||
var resta = d.name.length - 12;
|
||||
var string = d.name.slice(
|
||||
d.name.length / 2 - resta / 2,
|
||||
d.name.length / 2 + resta / 2
|
||||
);
|
||||
var split = d.name.split(`${string}`);
|
||||
return `${split[0]}...${split[1]}`;
|
||||
}
|
||||
return d.name;
|
||||
})
|
||||
.style("font-size", "10px")
|
||||
.style("font-size", "11px")
|
||||
.style("fill", function(d) {
|
||||
if (d.color !== "#82b92e") {
|
||||
return "white";
|
||||
}
|
||||
})
|
||||
// Makes svg elements invisible to events
|
||||
.style("pointer-events", "none");
|
||||
|
||||
|
@ -972,7 +1004,11 @@ function sunburst(recipient, data, width, height, tooltip = true) {
|
|||
);
|
||||
})
|
||||
.attr("x", function(d) {
|
||||
return computeTextRotation(d) > 180 ? -40 : -30;
|
||||
if (calculate_angle(d) < 20) {
|
||||
return (d.name.length + 15) * -1;
|
||||
} else {
|
||||
return (d.name.length + 25) * -1;
|
||||
}
|
||||
})
|
||||
.transition()
|
||||
.duration(250)
|
||||
|
@ -1074,6 +1110,15 @@ function sunburst(recipient, data, width, height, tooltip = true) {
|
|||
function hide_tooltip() {
|
||||
$("#tooltip").hide();
|
||||
}
|
||||
|
||||
function calculate_angle(d) {
|
||||
var start_angle = Math.max(0, Math.min(2 * Math.PI, x(d.x)));
|
||||
start_angle = (start_angle * 180) / Math.PI;
|
||||
var end_angle = Math.max(0, Math.min(2 * Math.PI, x(d.x + d.dx)));
|
||||
end_angle = (end_angle * 180) / Math.PI;
|
||||
|
||||
return end_angle - start_angle;
|
||||
}
|
||||
}
|
||||
|
||||
function createGauge(
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
function Stepper(container, steps) {
|
||||
if (container instanceof jQuery) {
|
||||
this.container = container[0];
|
||||
} else {
|
||||
this.container = container;
|
||||
}
|
||||
|
||||
this.steps = [];
|
||||
|
||||
for (var i = 1; i <= steps.length; i++) {
|
||||
var stepContainer = document.createElement("div");
|
||||
stepContainer.className = "step-container";
|
||||
var step = document.createElement("span");
|
||||
step.className = "step";
|
||||
step.textContent = i;
|
||||
var text = document.createElement("div");
|
||||
text.className = "step-text";
|
||||
text.textContent = steps[i - 1];
|
||||
stepContainer.appendChild(step);
|
||||
stepContainer.appendChild(text);
|
||||
this.steps.push(stepContainer);
|
||||
}
|
||||
}
|
||||
|
||||
Stepper.prototype.render = function() {
|
||||
var separator = document.createElement("div");
|
||||
separator.className = "step-separator";
|
||||
var stepsContainer = document.createElement("div");
|
||||
stepsContainer.className = "steps";
|
||||
|
||||
for (var i = 0; i < this.steps.length; i++) {
|
||||
if (i > 0) {
|
||||
stepsContainer.appendChild(separator.cloneNode());
|
||||
}
|
||||
stepsContainer.appendChild(this.steps[i]);
|
||||
}
|
||||
|
||||
this.container.innerHTML = "";
|
||||
this.container.appendChild(stepsContainer);
|
||||
};
|
||||
|
||||
Stepper.prototype.selectStep = function(step) {
|
||||
for (var i = 0; i < this.steps.length; i++) {
|
||||
if (i < step - 1) {
|
||||
this.steps[i].querySelector(".step").classList.add("visited");
|
||||
this.steps[i].querySelector(".step-text").classList.remove("active");
|
||||
var separators = this.container.querySelectorAll(".step-separator");
|
||||
if (separators[i]) {
|
||||
separators[i].classList.add("visited");
|
||||
}
|
||||
} else if (i === step - 1) {
|
||||
this.steps[i].querySelector(".step").classList.add("active");
|
||||
this.steps[i].querySelector(".step-text").classList.add("active");
|
||||
this.steps[i].querySelector(".step").classList.remove("visited");
|
||||
} else {
|
||||
this.steps[i]
|
||||
.querySelector(".step")
|
||||
.classList.remove("visited", "active");
|
||||
|
||||
this.steps[i].querySelector(".step-text").classList.remove("active");
|
||||
|
||||
var separators = this.container.querySelectorAll(".step-separator");
|
||||
|
||||
if (separators[i - 1]) {
|
||||
separators[i - 1].classList.remove("visited");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
|
@ -0,0 +1,97 @@
|
|||
#agent_deploy_modal {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#footer_separator {
|
||||
position: absolute;
|
||||
bottom: 57px;
|
||||
border-top: 1px solid #c1ccdc;
|
||||
width: 100%;
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
#stepper_container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#modal_header {
|
||||
background-color: #f6f7fb;
|
||||
border-radius: 10px;
|
||||
width: 100%;
|
||||
height: 76px;
|
||||
/* padding: 10px; */
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#config_form_more_info {
|
||||
margin-bottom: 5px !important;
|
||||
}
|
||||
|
||||
#stepper_container {
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
#table1-os-0 {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#os_selector {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#os_selector > label {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
display: flex;
|
||||
margin-bottom: 20px;
|
||||
min-height: 400px;
|
||||
flex-direction: column;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.installer-code-fragment {
|
||||
margin-bottom: 15px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.installer-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.installer-title-icon {
|
||||
margin-right: 9px;
|
||||
}
|
||||
|
||||
.green-link {
|
||||
color: #1d7873 !important;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.green-link:hover {
|
||||
color: #0d312f !important;
|
||||
}
|
||||
|
||||
.custom-switch-radio-button > label {
|
||||
color: #444 !important;
|
||||
}
|
||||
|
||||
.custom-switch-radio-button input:checked + label img {
|
||||
filter: brightness(100);
|
||||
}
|
||||
|
||||
.svg-brightness-0 {
|
||||
filter: brightness(0);
|
||||
}
|
|
@ -151,6 +151,14 @@
|
|||
src: local("Nunito-Regular"), url(../../fonts/nunito.woff) format("woff");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "firacode-regular";
|
||||
src: url("../fonts/FiraCode-Regular.woff") format("woff");
|
||||
src: local("FiraCode-Regular"),
|
||||
url(../../fonts/FiraCode-Regular.woff) format("woff");
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
* {
|
||||
font-size: 9pt;
|
||||
line-height: 16pt;
|
||||
|
@ -479,6 +487,11 @@ select:-internal-list-box {
|
|||
max-width: 250px;
|
||||
}
|
||||
|
||||
.w260px {
|
||||
width: 260px;
|
||||
max-width: 260px;
|
||||
}
|
||||
|
||||
.w280px {
|
||||
width: 280px;
|
||||
max-width: 280px;
|
||||
|
@ -1212,6 +1225,14 @@ p.center {
|
|||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.margin-top-5 {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.margin-bottom-5 {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.margin-top-10 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
@ -11528,6 +11549,11 @@ p.trademark-copyright {
|
|||
color: #8a96a6;
|
||||
}
|
||||
|
||||
.input_sub_placeholder_normal {
|
||||
font-size: 13px;
|
||||
color: #8a96a6;
|
||||
}
|
||||
|
||||
.input_sub_placeholder_warning {
|
||||
color: #ffb900;
|
||||
font-style: italic;
|
||||
|
@ -11956,6 +11982,214 @@ div.parent_graph > p.legend_background > table > tbody > tr {
|
|||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.warn-box {
|
||||
background: #fffbdf;
|
||||
color: #454545;
|
||||
font-size: 15px;
|
||||
border-radius: 5px;
|
||||
padding: 15px;
|
||||
padding-left: 30px;
|
||||
position: relative;
|
||||
margin: 25px 0px;
|
||||
}
|
||||
.warn-box::before {
|
||||
content: "|";
|
||||
color: #dd9900;
|
||||
position: absolute;
|
||||
left: 4px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
height: 77%;
|
||||
background: #dd9900;
|
||||
border-radius: 12px;
|
||||
width: 4px;
|
||||
}
|
||||
.err-box {
|
||||
background: #fbdada;
|
||||
color: #454545;
|
||||
font-size: 15px;
|
||||
border-radius: 5px;
|
||||
padding: 15px;
|
||||
padding-left: 30px;
|
||||
position: relative;
|
||||
margin: 25px 0px;
|
||||
}
|
||||
.err-box::before {
|
||||
content: "|";
|
||||
color: red;
|
||||
position: absolute;
|
||||
left: 4px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
height: 77%;
|
||||
background: red;
|
||||
border-radius: 12px;
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
.signature {
|
||||
color: #8a96a6;
|
||||
font-size: 13px;
|
||||
font-weight: 300;
|
||||
margin-right: auto;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.link {
|
||||
color: #82b92e;
|
||||
text-decoration: none;
|
||||
}
|
||||
.signature a {
|
||||
color: #82b92e;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.steps {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.step {
|
||||
font-size: 15px;
|
||||
border: 2px solid #c0ccdc;
|
||||
color: #999;
|
||||
border-radius: 30px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.step.active {
|
||||
background-color: #0d312f !important;
|
||||
color: #ffffff !important;
|
||||
border-color: #0d312f !important;
|
||||
}
|
||||
|
||||
.step.visited {
|
||||
background-color: #1d7873 !important;
|
||||
color: #ffffff !important;
|
||||
border-color: #1d7873 !important;
|
||||
}
|
||||
|
||||
.steps {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.step-separator {
|
||||
flex: 1;
|
||||
height: calc(50% - 12px);
|
||||
border: none;
|
||||
border-top: 2px solid transparent;
|
||||
border-image: repeating-linear-gradient(
|
||||
to right,
|
||||
#c0ccdc 0,
|
||||
#c0ccdc 4px,
|
||||
transparent 4px,
|
||||
transparent 8px
|
||||
)
|
||||
1 0;
|
||||
position: relative;
|
||||
transform: translateY(-14px);
|
||||
}
|
||||
|
||||
.step-separator.visited {
|
||||
border-top: 2px solid #1d7873 !important;
|
||||
border-image: none;
|
||||
}
|
||||
|
||||
.step-separator:last-child {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.step-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.step-text {
|
||||
font-size: 12px;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.step-text.active {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.code-fragment {
|
||||
background-color: #1f2435;
|
||||
color: #eaeaea;
|
||||
overflow-y: scroll;
|
||||
height: 100px;
|
||||
padding: 10px;
|
||||
font-family: "firacode-regular";
|
||||
font-size: 14px;
|
||||
padding-left: 25px;
|
||||
padding-right: 25px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.code-fragment.single-line {
|
||||
height: 20px !important;
|
||||
overflow-y: hidden !important;
|
||||
}
|
||||
|
||||
.code-font {
|
||||
font-family: "firacode-regular" !important;
|
||||
}
|
||||
|
||||
/* Webkit-based browsers */
|
||||
.code-fragment::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
}
|
||||
|
||||
.code-fragment::-webkit-scrollbar-track {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.code-fragment::-webkit-scrollbar-thumb {
|
||||
background-color: rgba(255, 255, 255, 0.25);
|
||||
border-radius: 4px;
|
||||
width: 6px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.code-fragment::-webkit-scrollbar-thumb:hover {
|
||||
background-color: rgba(255, 255, 255, 0.25);
|
||||
}
|
||||
|
||||
/* Firefox */
|
||||
.code-fragment::-moz-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
}
|
||||
|
||||
.code-fragment::-moz-scrollbar-track {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.code-fragment::-moz-scrollbar-thumb {
|
||||
background-color: rgba(255, 255, 255, 0.25);
|
||||
border-radius: 4px;
|
||||
width: 6px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.code-fragment::-moz-scrollbar-thumb:hover {
|
||||
background-color: rgba(255, 255, 255, 0.25);
|
||||
}
|
||||
|
||||
.legend-font-small {
|
||||
font-size: 7px !important;
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
<div style='padding-bottom: 50px'>
|
||||
<?php
|
||||
$version = '7.0NG.770';
|
||||
$build = '230428';
|
||||
$build = '230505';
|
||||
$banner = "v$version Build $build";
|
||||
error_reporting(0);
|
||||
|
||||
|
|
|
@ -55,15 +55,24 @@ if (check_acl($config['id_user'], 0, 'ER') === false
|
|||
return;
|
||||
}
|
||||
|
||||
ob_start('ui_process_page_head');
|
||||
ob_start();
|
||||
echo '<html>';
|
||||
echo '<head>';
|
||||
|
||||
echo '<title>'.__('Accoustic console').'</title>';
|
||||
ui_require_css_file('wizard');
|
||||
ui_require_css_file('discovery');
|
||||
?>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title><?php echo __('Accoustic console'); ?>)</title>
|
||||
<link rel="stylesheet" href="../../include/styles/pandora_minimal.css?v=<?php echo $config['current_package']; ?>" type="text/css" />
|
||||
<link rel="stylesheet" href="../../include/styles/js/jquery-ui.min.css?v=<?php echo $config['current_package']; ?>" type="text/css" />
|
||||
<link rel="stylesheet" href="../../include/styles/js/jquery-ui_custom.css?v=<?php echo $config['current_package']; ?>" type="text/css" />
|
||||
<link rel="stylesheet" href="../../include/styles/select2.min.css?v=<?php echo $config['current_package']; ?>" type="text/css" />
|
||||
<link rel="stylesheet" href="../../include/styles/wizard.css?v=<?php echo $config['current_package']; ?>" type="text/css" />
|
||||
<link rel="stylesheet" href="../../include/styles/discovery.css?v=<?php echo $config['current_package']; ?>" type="text/css" />
|
||||
<script type='text/javascript' src='../../include/javascript/pandora_ui.js?v=<?php echo $config['current_package']; ?>'></script>
|
||||
<script type='text/javascript' src='../../include/javascript/jquery.current.js?v=<?php echo $config['current_package']; ?>'></script>
|
||||
<script type='text/javascript' src='../../include/javascript/jquery.pandora.js?v=<?php echo $config['current_package']; ?>'></script>
|
||||
<script type='text/javascript' src='../../include/javascript/jquery-ui.min.js?v=<?php echo $config['current_package']; ?>'></script>
|
||||
<script type='text/javascript' src='../../include/javascript/select2.min.js?v=<?php echo $config['current_package']; ?>'></script>
|
||||
<script type='text/javascript' src='../../include/javascript/pandora.js?v=<?php echo $config['current_package']; ?>'></script>
|
||||
|
||||
<style type='text/css'>
|
||||
* {
|
||||
margin: 0;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.770
|
||||
%define release 230428
|
||||
%define release 230505
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.770
|
||||
%define release 230428
|
||||
%define release 230505
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.770
|
||||
%define release 230428
|
||||
%define release 230505
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -572,6 +572,7 @@ CREATE TABLE IF NOT EXISTS `talert_template_module_actions` (
|
|||
`fires_max` INT UNSIGNED DEFAULT 0,
|
||||
`module_action_threshold` INT NOT NULL DEFAULT 0,
|
||||
`last_execution` BIGINT NOT NULL DEFAULT 0,
|
||||
`recovered` TINYINT NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`id`),
|
||||
FOREIGN KEY (`id_alert_template_module`) REFERENCES talert_template_modules(`id`)
|
||||
ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
|
@ -2610,7 +2611,7 @@ CREATE TABLE IF NOT EXISTS `tpolicy_group_agents` (
|
|||
ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
FOREIGN KEY (`id_agent`) REFERENCES `tagente`(`id_agente`)
|
||||
ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tdashboard`
|
||||
|
@ -4237,7 +4238,7 @@ CREATE TABLE `tevent_sound` (
|
|||
`name` TEXT NULL,
|
||||
`sound` TEXT NULL,
|
||||
`active` TINYINT NOT NULL DEFAULT '1',
|
||||
PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tsesion_filter`
|
||||
|
@ -4251,7 +4252,7 @@ CREATE TABLE IF NOT EXISTS `tsesion_filter` (
|
|||
`type` TEXT NULL,
|
||||
`user` TEXT NULL,
|
||||
PRIMARY KEY (`id_filter`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `twelcome_tip` (
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package: pandorafms-server
|
||||
Version: 7.0NG.770-230428
|
||||
Version: 7.0NG.770-230505
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
Installed-Size: 640
|
||||
Maintainer: ÁRTICA ST <info@artica.es>
|
||||
Homepage: http://pandorafms.org/
|
||||
Depends: perl (>= 5.8), libdbi-perl, libdbd-mysql-perl, libtime-format-perl, libnetaddr-ip-perl, libtime-format-perl, libxml-simple-perl, libxml-twig-perl, libhtml-parser-perl, snmp, snmpd, traceroute, xprobe2, nmap, sudo, libwww-perl, libsocket6-perl, libio-socket-inet6-perl, libio-socket-ssl-perl, snmp-mibs-downloader, libjson-perl, libnet-telnet-perl, libencode-locale-perl, libgeo-ip-perl
|
||||
Depends: perl (>= 5.8), libdbi-perl, libdbd-mysql-perl, libtime-format-perl, libnetaddr-ip-perl, libtime-format-perl, libxml-simple-perl, libxml-twig-perl, libhtml-parser-perl, snmp, snmpd, traceroute, nmap, sudo, libwww-perl, libsocket6-perl, libio-socket-inet6-perl, libio-socket-ssl-perl, snmp-mibs-downloader, libjson-perl, libnet-telnet-perl, libencode-locale-perl, libgeo-ip-perl
|
||||
Description: Pandora FMS is a monitoring system for big IT environments. It uses remote tests, or local agents to grab information. Pandora supports all standard OS (Linux, AIX, HP-UX, Solaris and Windows XP,2000/2003), and support multiple setups in HA enviroments. This is the server package. Server makes the remote checks and process information transfer by Pandora FMS agents to the server.
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.770-230428"
|
||||
pandora_version="7.0NG.770-230505"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -242,13 +242,6 @@ mta_address localhost
|
|||
# Set 0 if want eMail deliver shared mail by all destination.
|
||||
mail_in_separate 1
|
||||
|
||||
|
||||
# xprobe2: Optional package to detect OS types using advanced TCP/IP
|
||||
# fingerprinting tecniques, much more accurates than stadard nmap.
|
||||
# If not provided, nmap is used insted xprobe2
|
||||
|
||||
xprobe2 /usr/local/bin/xprobe2
|
||||
|
||||
# nmap: If provided, is used to detect OS type with recon server using
|
||||
# advanded OS fingerprint technique. Xprobe2 gives more accurate results
|
||||
# Nmap is also used to do TCP port scanning in detected host.
|
||||
|
|
|
@ -238,13 +238,6 @@ mta_address localhost
|
|||
# Set 0 if want eMail deliver shared mail by all destination.
|
||||
mail_in_separate 1
|
||||
|
||||
|
||||
# xprobe2: Optional package to detect OS types using advanced TCP/IP
|
||||
# fingerprinting tecniques, much more accurates than stadard nmap.
|
||||
# If not provided, nmap is used insted xprobe2
|
||||
|
||||
xprobe2 /usr/local/bin/xprobe2
|
||||
|
||||
# nmap: If provided, is used to detect OS type with recon server using
|
||||
# advanded OS fingerprint technique. Xprobe2 gives more accurate results
|
||||
# Nmap is also used to do TCP port scanning in detected host.
|
||||
|
|
|
@ -302,13 +302,6 @@ dataserver_threads 1
|
|||
# Set 0 if want eMail deliver shared mail by all destination.
|
||||
mail_in_separate 1
|
||||
|
||||
|
||||
# xprobe2: Optional package to detect OS types using advanced TCP/IP
|
||||
# fingerprinting tecniques, much more accurates than stadard nmap.
|
||||
# If not provided, nmap is used insted xprobe2
|
||||
|
||||
xprobe2 /usr/bin/xprobe2
|
||||
|
||||
# nmap: If provided, is used to detect OS type with recon server using
|
||||
# advanded OS fingerprint technique. Xprobe2 gives more accurate results
|
||||
# Nmap is also used to do TCP port scanning in detected host.
|
||||
|
|
|
@ -252,12 +252,6 @@ dataserver_threads 2
|
|||
|
||||
#mta_encryption none
|
||||
|
||||
# xprobe2: Optional package to detect OS types using advanced TCP/IP
|
||||
# fingerprinting tecniques, much more accurates than stadard nmap.
|
||||
# If not provided, nmap is used insted xprobe2
|
||||
|
||||
#xprobe2 c:\pandora_server\bin\xprobe2
|
||||
|
||||
# nmap: If provided, is used to detect OS type with recon server using
|
||||
# advanded OS fingerprint technique. Xprobe2 gives more accurate results
|
||||
# Nmap is also used to do TCP port scanning in detected host.
|
||||
|
|
|
@ -302,13 +302,6 @@ dataserver_threads 1
|
|||
# Set 0 if want eMail deliver shared mail by all destination.
|
||||
mail_in_separate 1
|
||||
|
||||
|
||||
# xprobe2: Optional package to detect OS types using advanced TCP/IP
|
||||
# fingerprinting tecniques, much more accurates than stadard nmap.
|
||||
# If not provided, nmap is used insted xprobe2
|
||||
|
||||
xprobe2 /usr/bin/xprobe2
|
||||
|
||||
# nmap: If provided, is used to detect OS type with recon server using
|
||||
# advanded OS fingerprint technique. Xprobe2 gives more accurate results
|
||||
# Nmap is also used to do TCP port scanning in detected host.
|
||||
|
|
|
@ -46,7 +46,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.770";
|
||||
my $pandora_build = "230428";
|
||||
my $pandora_build = "230505";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
@ -371,9 +371,6 @@ sub pandora_load_config {
|
|||
|
||||
# SNMP enterprise retries (for braa)
|
||||
$pa_config->{"braa_retries"} = 3; # 5.0
|
||||
|
||||
# Xprobe2 for recon OS fingerprinting and tcpscan (optional)
|
||||
$pa_config->{"xprobe2"} = "/usr/bin/xprobe2";
|
||||
|
||||
# Winexe allows to exec commands on remote windows systems (optional)
|
||||
$pa_config->{"winexe"} = "/usr/bin/winexe";
|
||||
|
@ -927,9 +924,6 @@ sub pandora_load_config {
|
|||
elsif ($parametro =~ m/^braa_retries\s+([0-9]*)/i) {
|
||||
$pa_config->{"braa_retries"} = clean_blank($1);
|
||||
}
|
||||
elsif ($parametro =~ m/^xprobe2\s(.*)/i) {
|
||||
$pa_config->{'xprobe2'}= clean_blank($1);
|
||||
}
|
||||
elsif ($parametro =~ m/^winexe\s(.*)/i) {
|
||||
$pa_config->{'winexe'}= clean_blank($1);
|
||||
}
|
||||
|
|
|
@ -804,11 +804,6 @@ sub pandora_process_alert ($$$$$$$$;$$) {
|
|||
db_do($dbh, 'UPDATE ' . $table . ' SET times_fired = 0,
|
||||
internal_counter = 0 WHERE id = ?', $id);
|
||||
|
||||
# Reset action thresholds
|
||||
if (defined ($alert->{'id_template_module'})) {
|
||||
db_do($dbh, 'UPDATE talert_template_module_actions SET last_execution = 0 WHERE id_alert_template_module = ?', $id);
|
||||
}
|
||||
|
||||
if ($pa_config->{'alertserver'} == 1 || $pa_config->{'alertserver_queue'} == 1) {
|
||||
pandora_queue_alert($pa_config, $dbh, [$data, $agent, $module,
|
||||
$alert, 0, $timestamp, 0, $extra_macros, $is_correlated_alert]);
|
||||
|
@ -919,7 +914,7 @@ sub pandora_execute_alert {
|
|||
@actions = get_db_rows ($dbh,
|
||||
'SELECT taa.name as action_name, taa.*, tac.*, tatma.id AS id_alert_templ_module_actions,
|
||||
tatma.id_alert_template_module, tatma.id_alert_action, tatma.fires_min,
|
||||
tatma.fires_max, tatma.module_action_threshold, tatma.last_execution
|
||||
tatma.fires_max, tatma.module_action_threshold, tatma.last_execution, tatma.recovered
|
||||
FROM talert_template_module_actions tatma, talert_actions taa, talert_commands tac
|
||||
WHERE tatma.id_alert_action = taa.id
|
||||
AND taa.id_alert_command = tac.id
|
||||
|
@ -1030,10 +1025,13 @@ sub pandora_execute_alert {
|
|||
|
||||
# Check the action threshold (template_action_threshold takes precedence over action_threshold)
|
||||
my $threshold = 0;
|
||||
$action->{'last_execution'} = 0 unless defined ($action->{'last_execution'});
|
||||
my $recovered = 0;
|
||||
$action->{'last_execution'} = 0 unless defined ($action->{'last_execution'});
|
||||
$action->{'recovered'} = 0 unless defined ($action->{'recovered'});
|
||||
|
||||
$threshold = $action->{'action_threshold'} if (defined ($action->{'action_threshold'}) && $action->{'action_threshold'} > 0);
|
||||
$threshold = $action->{'module_action_threshold'} if (defined ($action->{'module_action_threshold'}) && $action->{'module_action_threshold'} > 0);
|
||||
if (time () >= ($action->{'last_execution'} + $threshold)) {
|
||||
if ((time () >= ($action->{'last_execution'} + $threshold)) || ($alert_mode == RECOVERED_ALERT && $action->{'recovered'} == 0)) {
|
||||
my $monitoring_event_custom_data = '';
|
||||
|
||||
push(@{$custom_data->{'actions'}}, safe_output($action->{'action_name'}));
|
||||
|
@ -1043,13 +1041,33 @@ sub pandora_execute_alert {
|
|||
$event_generated = 1;
|
||||
$monitoring_event_custom_data = $custom_data;
|
||||
}
|
||||
|
||||
pandora_execute_action ($pa_config, $data, $agent, $alert, $alert_mode, $action, $module, $dbh, $timestamp, $extra_macros, $monitoring_event_custom_data);
|
||||
|
||||
pandora_execute_action ($pa_config, $data, $agent, $alert, $alert_mode, $action, $module, $dbh, $timestamp, $extra_macros, $monitoring_event_custom_data);
|
||||
} else {
|
||||
if (defined ($module)) {
|
||||
logger ($pa_config, "Skipping action " . safe_output($action->{'name'}) . " for alert '" . safe_output($alert->{'name'}) . "' module '" . safe_output($module->{'nombre'}) . "'.", 10);
|
||||
if($alert_mode == RECOVERED_ALERT) {
|
||||
# Reset action thresholds and set recovered
|
||||
if (defined ($alert->{'id_template_module'})) {
|
||||
db_do($dbh, 'UPDATE talert_template_module_actions SET recovered = 1 WHERE id_alert_template_module = ?', $alert->{'id_template_module'});
|
||||
}
|
||||
} else {
|
||||
logger ($pa_config, "Skipping action " . safe_output($action->{'name'}) . " for alert '" . safe_output($alert->{'name'}) . "'.", 10);
|
||||
# Action executed again, set recovered to 0.
|
||||
db_do($dbh, 'UPDATE talert_template_module_actions SET recovered = 0 WHERE id_alert_template_module = ?', $alert->{'id_template_module'});
|
||||
}
|
||||
} else {
|
||||
if($alert_mode == RECOVERED_ALERT) {
|
||||
if (defined ($alert->{'id_template_module'})) {
|
||||
if (defined ($module)) {
|
||||
logger ($pa_config, "Skipping recover action " . safe_output($action->{'name'}) . " for alert '" . safe_output($alert->{'name'}) . "' module '" . safe_output($module->{'nombre'}) . "'.", 10);
|
||||
} else {
|
||||
logger ($pa_config, "Skipping recover action " . safe_output($action->{'name'}) . " for alert '" . safe_output($alert->{'name'}) . "'.", 10);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (defined ($module)) {
|
||||
logger ($pa_config, "Skipping action " . safe_output($action->{'name'}) . " for alert '" . safe_output($alert->{'name'}) . "' module '" . safe_output($module->{'nombre'}) . "'.", 10);
|
||||
} else {
|
||||
logger ($pa_config, "Skipping action " . safe_output($action->{'name'}) . " for alert '" . safe_output($alert->{'name'}) . "'.", 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6671,43 +6689,44 @@ sub pandora_get_os ($$) {
|
|||
return 10;
|
||||
}
|
||||
|
||||
if ($os =~ m/Windows/i) {
|
||||
if ($os =~ m/Windows.*?(?=\(\d+%\))/i) {
|
||||
return 9;
|
||||
}
|
||||
if ($os =~ m/Cisco/i) {
|
||||
if ($os =~ m/Cisco.*?(?=\(\d+%\))/i) {
|
||||
return 7;
|
||||
}
|
||||
if ($os =~ m/SunOS/i || $os =~ m/Solaris/i) {
|
||||
if ($os =~ m/SunOS.*?(?=\(\d+%\))/i || $os =~ m/Solaris.*?(?=\(\d+%\))/i) {
|
||||
return 2;
|
||||
}
|
||||
if ($os =~ m/AIX/i) {
|
||||
if ($os =~ m/AIX.*?(?=\(\d+%\))/i) {
|
||||
return 3;
|
||||
}
|
||||
if ($os =~ m/HP\-UX/i) {
|
||||
if ($os =~ m/HP\-UX.*?(?=\(\d+%\))/i) {
|
||||
return 5;
|
||||
}
|
||||
if ($os =~ m/Apple/i || $os =~ m/Darwin/i) {
|
||||
if ($os =~ m/Apple.*?(?=\(\d+%\))/i || $os =~ m/Darwin.*?(?=\(\d+%\))/i) {
|
||||
return 8;
|
||||
}
|
||||
if ($os =~ m/Linux/i) {
|
||||
if ($os =~ m/Linux.*?(?=\(\d+%\))/i) {
|
||||
return 1;
|
||||
}
|
||||
if ($os =~ m/Enterasys/i || $os =~ m/3com/i) {
|
||||
if ($os =~ m/Enterasys.*?(?=\(\d+%\))/i || $os =~ m/3com.*?(?=\(\d+%\))/i) {
|
||||
return 11;
|
||||
}
|
||||
if ($os =~ m/Octopods/i) {
|
||||
if ($os =~ m/Octopods.*?(?=\(\d+%\))/i) {
|
||||
return 13;
|
||||
}
|
||||
if ($os =~ m/embedded/i) {
|
||||
if ($os =~ m/embedded.*?(?=\(\d+%\))/i) {
|
||||
return 14;
|
||||
}
|
||||
if ($os =~ m/android/i) {
|
||||
if ($os =~ m/android.*?(?=\(\d+%\))/i) {
|
||||
return 15;
|
||||
}
|
||||
if ($os =~ m/BSD/i) {
|
||||
if ($os =~ m/BSD.*?(?=\(\d+%\))/i) {
|
||||
return 4;
|
||||
}
|
||||
|
||||
|
||||
# Search for a custom OS
|
||||
my $os_id = get_db_value ($dbh, 'SELECT id_os FROM tconfig_os WHERE name LIKE ?', '%' . $os . '%');
|
||||
if (defined ($os_id)) {
|
||||
|
|
|
@ -150,7 +150,7 @@ sub data_producer ($) {
|
|||
OR (status = -1 AND interval_sweep > 0 AND (utimestamp + interval_sweep) < UNIX_TIMESTAMP()))', $server_id);
|
||||
} else {
|
||||
@rows = get_db_rows ($dbh, 'SELECT * FROM trecon_task
|
||||
WHERE (id_recon_server = ? OR id_recon_server = ANY(SELECT id_server FROM tserver WHERE status <> 1 AND server_type = ?))
|
||||
WHERE (id_recon_server = ? OR id_recon_server NOT IN (SELECT id_server FROM tserver WHERE status = 1 AND server_type = ?))
|
||||
AND disabled = 0
|
||||
AND ((utimestamp = 0 AND interval_sweep != 0 OR status = 1)
|
||||
OR (status = -1 AND interval_sweep > 0 AND (utimestamp + interval_sweep) < UNIX_TIMESTAMP()))', $server_id, DISCOVERYSERVER);
|
||||
|
@ -407,7 +407,7 @@ sub exec_recon_script ($$$) {
|
|||
}
|
||||
|
||||
################################################################################
|
||||
# Guess the OS using xprobe2 or nmap.
|
||||
# Guess the OS using nmap.
|
||||
################################################################################
|
||||
sub PandoraFMS::Recon::Base::guess_os($$;$) {
|
||||
my ($self, $device, $string_flag) = @_;
|
||||
|
@ -426,26 +426,18 @@ sub PandoraFMS::Recon::Base::guess_os($$;$) {
|
|||
return OS_SWITCH if ($device_type eq 'switch');
|
||||
return OS_OTHER;
|
||||
}
|
||||
|
||||
# Use xprobe2 if available
|
||||
if (-x $self->{'pa_config'}->{'xprobe2'}) {
|
||||
my $return = `"$self->{pa_config}->{xprobe2}" $device 2>$DEVNULL`;
|
||||
if ($? == 0) {
|
||||
if($return =~ /Running OS:(.*)/) {
|
||||
my $str_os = $1;
|
||||
return $str_os if is_enabled($string_flag);
|
||||
return pandora_get_os($self->{'dbh'}, $str_os);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Use nmap by default
|
||||
if (-x $self->{'pa_config'}->{'nmap'}) {
|
||||
my $return = `"$self->{pa_config}->{nmap}" -F -O $device 2>$DEVNULL`;
|
||||
my $return = `"$self->{pa_config}->{nmap}" -sSU -T5 -F -O --osscan-limit $device 2>$DEVNULL`;
|
||||
return OS_OTHER if ($? != 0);
|
||||
|
||||
if ($return =~ /Aggressive OS guesses:\s*(.*)/) {
|
||||
my $str_os = $1;
|
||||
my $str_os;
|
||||
if ($return =~ /Aggressive OS guesses:\s*(.*)|OS details:\s(.*)/) {
|
||||
if($1 ne "") {
|
||||
$str_os = $1;
|
||||
} else {
|
||||
$str_os = $2;
|
||||
}
|
||||
return $str_os if is_enabled($string_flag);
|
||||
return pandora_get_os($self->{'dbh'}, $str_os);
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ sub data_producer ($) {
|
|||
@rows = get_db_rows ($dbh,
|
||||
'SELECT tagent_module_inventory.id_agent_module_inventory, tagent_module_inventory.flag, tagent_module_inventory.timestamp
|
||||
FROM tagente, tagent_module_inventory, tmodule_inventory
|
||||
WHERE (server_name = ? OR server_name = ANY(SELECT name FROM tserver WHERE status <> 1 AND server_type = ?))
|
||||
WHERE (server_name = ? OR server_name NOT IN (SELECT name FROM tserver WHERE status = 1 AND server_type = ?))
|
||||
AND tmodule_inventory.id_module_inventory = tagent_module_inventory.id_module_inventory
|
||||
AND tmodule_inventory.id_os IS NOT NULL
|
||||
AND tagente.id_agente = tagent_module_inventory.id_agente
|
||||
|
@ -138,7 +138,7 @@ sub data_producer ($) {
|
|||
@rows = get_db_rows ($dbh,
|
||||
'SELECT tagent_module_inventory.id_agent_module_inventory, tagent_module_inventory.flag, tagent_module_inventory.timestamp
|
||||
FROM tagente, tagent_module_inventory, tmodule_inventory
|
||||
WHERE (server_name = ? OR server_name = ANY(SELECT name FROM tserver WHERE status <> 1 AND server_type = ?))
|
||||
WHERE (server_name = ? OR server_name NOT IN (SELECT name FROM tserver WHERE status = 1 AND server_type = ?))
|
||||
AND tmodule_inventory.id_module_inventory = tagent_module_inventory.id_module_inventory
|
||||
AND tmodule_inventory.id_os IS NOT NULL
|
||||
AND tagente.id_agente = tagent_module_inventory.id_agente
|
||||
|
|
|
@ -112,7 +112,7 @@ sub data_producer ($) {
|
|||
} else {
|
||||
@rows = get_db_rows ($dbh, 'SELECT tagente_modulo.id_agente_modulo, tagente_modulo.flag, tagente_estado.last_execution_try, tagente_estado.current_interval + tagente_estado.last_execution_try AS time_left, last_execution_try
|
||||
FROM tagente, tagente_modulo, tagente_estado
|
||||
WHERE ((server_name = ?) OR (server_name = ANY(SELECT name FROM tserver WHERE status <> 1 AND server_type = ?)))
|
||||
WHERE ((server_name = ?) OR (server_name NOT IN (SELECT name FROM tserver WHERE status = 1 AND server_type = ?)))
|
||||
AND tagente_modulo.id_agente = tagente.id_agente
|
||||
AND tagente.disabled = 0
|
||||
AND tagente_modulo.disabled = 0
|
||||
|
|
|
@ -110,7 +110,7 @@ sub data_producer ($) {
|
|||
} else {
|
||||
@rows = get_db_rows ($dbh, 'SELECT DISTINCT(tagente_modulo.id_agente_modulo), tagente_modulo.flag, tagente_estado.current_interval + tagente_estado.last_execution_try AS time_left, last_execution_try
|
||||
FROM tagente, tagente_modulo, tagente_estado
|
||||
WHERE ((server_name = ?) OR (server_name = ANY(SELECT name FROM tserver WHERE status <> 1 AND server_type = ?)))
|
||||
WHERE ((server_name = ?) OR (server_name NOT IN (SELECT name FROM tserver WHERE status = 1 AND server_type = ?)))
|
||||
AND tagente_modulo.id_agente = tagente.id_agente
|
||||
AND tagente.disabled = 0
|
||||
AND tagente_modulo.disabled = 0
|
||||
|
|
|
@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.770";
|
||||
my $pandora_build = "230428";
|
||||
my $pandora_build = "230505";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||
|
|
|
@ -114,9 +114,9 @@ sub data_producer ($) {
|
|||
tagente_modulo.flag, last_execution_try
|
||||
FROM tagente, tagente_modulo, tagente_estado
|
||||
WHERE ((server_name = ?)
|
||||
OR (server_name = ANY(SELECT name
|
||||
OR (server_name NOT IN (SELECT name
|
||||
FROM tserver
|
||||
WHERE status <> 1 AND server_type = ?))
|
||||
WHERE status = 1 AND server_type = ?))
|
||||
OR ((server_name = 0 OR server_name IS NULL) AND 1=?)
|
||||
)
|
||||
AND tagente_modulo.id_agente = tagente.id_agente
|
||||
|
|
|
@ -109,7 +109,7 @@ sub data_producer ($) {
|
|||
} else {
|
||||
@rows = get_db_rows ($dbh, 'SELECT DISTINCT(tagente_modulo.id_agente_modulo), tagente_modulo.flag, tagente_estado.current_interval + tagente_estado.last_execution_try AS time_left, last_execution_try
|
||||
FROM tagente, tagente_modulo, tagente_estado, tserver
|
||||
WHERE ((server_name = ?) OR (server_name = ANY(SELECT name FROM tserver WHERE status <> 1 AND server_type = ?)))
|
||||
WHERE ((server_name = ?) OR (server_name NOT IN (SELECT name FROM tserver WHERE status = 1 AND server_type = ?)))
|
||||
AND tagente_modulo.id_agente = tagente.id_agente
|
||||
AND tagente.disabled = 0
|
||||
AND tagente_modulo.disabled = 0
|
||||
|
|
|
@ -137,7 +137,7 @@ sub data_producer ($) {
|
|||
} else {
|
||||
@rows = get_db_rows ($dbh, 'SELECT DISTINCT(tagente_modulo.id_agente_modulo), tagente_modulo.flag, tagente_estado.current_interval + tagente_estado.last_execution_try AS time_left, last_execution_try
|
||||
FROM tagente, tagente_modulo, tagente_estado, tserver
|
||||
WHERE ((server_name = ?) OR (server_name = ANY(SELECT server_name FROM tserver WHERE status <> 1 AND server_type = ?)))
|
||||
WHERE ((server_name = ?) OR (server_name NOT IN (SELECT server_name FROM tserver WHERE status = 1 AND server_type = ?)))
|
||||
AND tagente_modulo.id_agente = tagente.id_agente
|
||||
AND tagente.disabled = 0
|
||||
AND tagente_modulo.disabled = 0
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.770
|
||||
%define release 230428
|
||||
%define release 230505
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.770
|
||||
%define release 230428
|
||||
%define release 230505
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.770"
|
||||
PI_BUILD="230428"
|
||||
PI_BUILD="230505"
|
||||
|
||||
MODE=$1
|
||||
if [ $# -gt 1 ]; then
|
||||
|
@ -214,7 +214,7 @@ install () {
|
|||
echo "The complete installation guide is at: https://pandorafms.com/docs/"
|
||||
echo " "
|
||||
echo "Debian-based distribution do:"
|
||||
echo " # apt-get install snmp snmpd libjson-perllibio-socket-inet6-perl libsocket6-perl libxml-simple-perl libxml-twig-perl libnetaddr-ip-perl libdbi-perl libnetaddr-ip-perl libhtml-parser-perl wmi-client xprobe2 snmp-mibs-downloader"
|
||||
echo " # apt-get install snmp snmpd libjson-perllibio-socket-inet6-perl libsocket6-perl libxml-simple-perl libxml-twig-perl libnetaddr-ip-perl libdbi-perl libnetaddr-ip-perl libhtml-parser-perl wmi-client snmp-mibs-downloader"
|
||||
echo " "
|
||||
echo "For CentOS / RHEL do: "
|
||||
echo " "
|
||||
|
@ -226,13 +226,13 @@ install () {
|
|||
perl-HTML-Encoding perl-HTML-Tree perl-NetAddr-IP perl-IO-Socket-INET6 perl-Socket6
|
||||
perl-TimeDate perl-XML-Simple perl-XML-Twig perl-libwww-perl mysql-client"
|
||||
echo " "
|
||||
echo " You also will need to install (optionally) xprobe2 and wmiclient from rpm (download from our website)"
|
||||
echo " You also will need to install (optionally) wmiclient from rpm (download from our website)"
|
||||
echo " "
|
||||
echo "For FreeBSD do : "
|
||||
echo " "
|
||||
echo " Install following tools from ports or packages."
|
||||
echo " Recommended: p5-DBI p5-NetAddr-IP p5-XML-Simple p5-XML-Twig p5-HTML-Parser p5-DBD-mysql p5-Socket6 p5-IO-Socket-INET6 p5-JSON"
|
||||
echo " Optional: nmap xprobe"
|
||||
echo " Optional: nmap"
|
||||
echo " "
|
||||
echo " And install Geo::IP manually."
|
||||
echo " "
|
||||
|
|
|
@ -35,7 +35,7 @@ use PandoraFMS::Config;
|
|||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.770 Build 230428";
|
||||
my $version = "7.0NG.770 Build 230505";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
|
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
|||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.770 Build 230428";
|
||||
my $version = "7.0NG.770 Build 230505";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
|
|
@ -60,6 +60,7 @@ Where OPTIONS could be:
|
|||
-inUsage Show only input usage (in percentage) - 1, or not 0.
|
||||
-outUsage Show only output usage (in percentage) - 1, or not 0.
|
||||
-f We treat unkonwn duplex as full duplex.
|
||||
-max Value that replaces ifSpeed when you have a port chanel with multiple interfaces.
|
||||
|
||||
Note: You can also use snmpget/snmpwalk argument notation,
|
||||
e.g. -v is equal to -version, -c to -community, etc.
|
||||
|
@ -140,6 +141,9 @@ sub update_config_key ($) {
|
|||
if ($arg eq 'f') {
|
||||
return "unknown_fullduplex";
|
||||
}
|
||||
if ($arg eq 'max') {
|
||||
return "max_interfaces";
|
||||
}
|
||||
}
|
||||
|
||||
################################################################################
|
||||
|
@ -258,12 +262,17 @@ sub prepare_tree {
|
|||
$speed{'oid'} .= $config->{'x86_indexes'}{'ifSpeed'}.$ifIndex;
|
||||
}
|
||||
|
||||
my $speed = snmp_get(\%speed);
|
||||
if (ref($speed) eq "HASH") {
|
||||
$speed = int $speed->{'data'};
|
||||
my $speed = 0;
|
||||
if (empty($config->{'max_interfaces'})) {
|
||||
$speed = snmp_get(\%speed);
|
||||
if (ref($speed) eq "HASH") {
|
||||
$speed = int $speed->{'data'};
|
||||
} else {
|
||||
# Ignore, cannot retrieve inOctets.
|
||||
next;
|
||||
}
|
||||
} else {
|
||||
# Ignore, cannot retrieve inOctets.
|
||||
next;
|
||||
$speed = $config->{'max_interfaces'};
|
||||
}
|
||||
|
||||
{
|
||||
|
|
|
@ -54,7 +54,6 @@ RUN dnf install -y vim wget bzip2 curl && \
|
|||
php-zip \
|
||||
php-xmlrpc \
|
||||
nmap \
|
||||
xprobe2 \
|
||||
mysql-server \
|
||||
mysql \
|
||||
htop \
|
||||
|
@ -76,7 +75,6 @@ RUN dnf install -y vim wget bzip2 curl && \
|
|||
perl-IO-Socket-SSL \
|
||||
nmap \
|
||||
sudo \
|
||||
xprobe2 \
|
||||
make \
|
||||
perl-CPAN \
|
||||
perl-JSON \
|
||||
|
|
Loading…
Reference in New Issue