Merge branch 'develop' into ent-11001-15457-tips-solo-en-espanol
This commit is contained in:
commit
01ec39bde0
|
@ -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.
|
|
@ -82,6 +82,10 @@ check_root_permissions () {
|
|||
## Main
|
||||
echo "Starting PandoraFMS External DB deployment EL8 ver. $S_VERSION"
|
||||
|
||||
if ! grep --version &>> $LOGFILE ; then echo 'Error grep is not detected on the system, grep tool is needed for installation.'; exit -1 ;fi
|
||||
if ! sed --version &>> $LOGFILE ; then echo 'Error grep is not detected on the system, grep tool is needed for installation.'; exit -1 ;fi
|
||||
|
||||
|
||||
# Centos Version
|
||||
if [ ! "$(grep -Ei 'centos|rocky|Almalinux|Red Hat Enterprise' /etc/redhat-release)" ]; then
|
||||
printf "\n ${red}Error this is not a Centos/Rocky/Almalinux Base system, this installer is compatible with RHEL/Almalinux/Centos/Rockylinux systems only${reset}\n"
|
||||
|
|
|
@ -89,6 +89,9 @@ check_root_permissions () {
|
|||
## Main
|
||||
echo "Starting PandoraFMS External DB deployment Ubuntu 22.04 ver. $S_VERSION"
|
||||
|
||||
if ! grep --version &>> $LOGFILE ; then echo 'Error grep is not detected on the system, grep tool is needed for installation.'; exit -1 ;fi
|
||||
if ! sed --version &>> $LOGFILE ; then echo 'Error grep is not detected on the system, grep tool is needed for installation.'; exit -1 ;fi
|
||||
|
||||
# Ubuntu Version
|
||||
if [ ! "$(grep -Ei 'Ubuntu' /etc/lsb-release)" ]; then
|
||||
printf "\n ${red}Error this is not a Ubuntu system, this installer is compatible with Ubuntu systems only${reset}\n"
|
||||
|
|
|
@ -1,12 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
#export PANDORA_SERVER_IP='newdemos.artica.es' && curl -sSL http://firefly.artica.es/projects/pandora_deploy_agent.sh | bash
|
||||
#export PANDORA_SERVER_IP='newdemos.artica.es' && curl -sSL http://firefly.pandorafms.com/projects/pandora_deploy_agent.sh | bash
|
||||
|
||||
# define variables
|
||||
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
|
||||
S_VERSION='2022052301'
|
||||
S_VERSION='2023050901'
|
||||
LOGFILE="/tmp/pandora-agent-deploy-$(date +%F).log"
|
||||
|
||||
#Check if possible to get os version
|
||||
if [ ! -e /etc/os-release ]; then
|
||||
echo ' > Imposible to determinate the OS version for this machine, please make sure you are intalling in a compatible OS'
|
||||
echo ' > More info: https://pandorafms.com/manual/en/documentation/02_installation/01_installing#minimum_software_requirements'
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# Ansi color code variables
|
||||
red="\e[0;91m"
|
||||
green="\e[0;92m"
|
||||
|
@ -49,7 +56,7 @@ check_cmd_status () {
|
|||
}
|
||||
|
||||
check_repo_connection () {
|
||||
execute_cmd "ping -c 2 firefly.artica.es" "Checking Community repo"
|
||||
execute_cmd "ping -c 2 firefly.pandorafms.com" "Checking Community repo"
|
||||
}
|
||||
|
||||
check_root_permissions () {
|
||||
|
@ -73,7 +80,7 @@ cd unix && ./pandora_agent_installer --install
|
|||
|
||||
install_autodiscover () {
|
||||
local arch=$1
|
||||
wget http://firefly.artica.es/projects/autodiscover-linux.zip
|
||||
wget http://firefly.pandorafms.com/projects/autodiscover-linux.zip
|
||||
unzip autodiscover-linux.zip
|
||||
chmod +x $arch/autodiscover
|
||||
mv -f $arch/autodiscover /etc/pandora/plugins/autodiscover
|
||||
|
@ -84,6 +91,9 @@ echo "Starting PandoraFMS Agent deployment ver. $S_VERSION"
|
|||
|
||||
execute_cmd "[ $PANDORA_SERVER_IP ]" 'Check Server IP Address' 'Please define env variable PANDORA_SERVER_IP'
|
||||
|
||||
if ! grep --version &>> $LOGFILE ; then echo 'Error grep is not detected on the system, grep tool is needed for installation.'; exit -1 ;fi
|
||||
if ! sed --version &>> $LOGFILE ; then echo 'Error sed is not detected on the system, sed tool is needed for installation.'; exit -1 ;fi
|
||||
|
||||
#Detect OS
|
||||
os_name=$(grep ^PRETTY_NAME= /etc/os-release | cut -d '=' -f2 | tr -d '"')
|
||||
execute_cmd "echo $os_name" "OS detected: ${os_name}"
|
||||
|
@ -148,7 +158,7 @@ if [[ $OS_RELEASE =~ 'rhel' ]] || [[ $OS_RELEASE =~ 'fedora' ]]; then
|
|||
echo -e "${cyan}Installing agent dependencies...${reset}" ${green}OK${reset}
|
||||
|
||||
# Insatall pandora agent
|
||||
$package_manager_cmd install -y http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm &>> $LOGFILE
|
||||
$package_manager_cmd install -y http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm &>> $LOGFILE
|
||||
echo -en "${cyan}Installing Pandora FMS agent...${reset}"
|
||||
check_cmd_status 'Error installing Pandora FMS agent'
|
||||
[[ $PANDORA_AGENT_SSL ]] && execute_cmd "$package_manager_cmd install -y perl-IO-Socket-SSL" "Installing SSL libraries for encrypted connection"
|
||||
|
@ -158,7 +168,7 @@ fi
|
|||
if [[ $OS_RELEASE == 'debian' ]]; then
|
||||
execute_cmd "apt update" 'Updating repos'
|
||||
execute_cmd "apt install -y perl wget curl unzip procps python3 python3-pip" 'Installing agent dependencies'
|
||||
execute_cmd 'wget http://firefly.artica.es/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz' 'Downloading Pandora FMS agent package'
|
||||
execute_cmd 'wget http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz' 'Downloading Pandora FMS agent package'
|
||||
execute_cmd 'install_tarball pandorafms_agent_linux-7.0NG.tar.gz' 'Installing Pandora FMS agent'
|
||||
[[ $PANDORA_AGENT_SSL ]] && execute_cmd 'apt install -y libio-socket-ssl-perl' "Installing SSL libraries for encrypted connection"
|
||||
cd $HOME/pandora_deploy_tmp
|
||||
|
@ -204,4 +214,4 @@ execute_cmd '/etc/init.d/pandora_agent_daemon restart' 'Starting Pandora Agent'
|
|||
cd
|
||||
execute_cmd 'rm -rf $HOME/pandora_deploy_tmp' 'Cleaning up temporay files'
|
||||
|
||||
echo -e "${green}PandoraFMS Agent installed and running, sending data to: $PANDORA_SERVER_IP${reset}"
|
||||
echo -e "${green}PandoraFMS Agent installed and running, sending data to: $PANDORA_SERVER_IP${reset}"
|
||||
|
|
|
@ -11,7 +11,7 @@ PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf
|
|||
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
|
||||
|
||||
|
||||
S_VERSION='202304111'
|
||||
S_VERSION='2023050901'
|
||||
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
|
||||
|
||||
# define default variables
|
||||
|
@ -31,6 +31,13 @@ LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
|
|||
[ "$PANDORA_BETA" ] || PANDORA_BETA=0
|
||||
[ "$PANDORA_LTS" ] || PANDORA_LTS=1
|
||||
|
||||
#Check if possible to get os version
|
||||
if [ ! -e /etc/os-release ]; then
|
||||
echo ' > Imposible to determinate the OS version for this machine, please make sure you are intalling in a compatible OS'
|
||||
echo ' > More info: https://pandorafms.com/manual/en/documentation/02_installation/01_installing#minimum_software_requirements'
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# Ansi color code variables
|
||||
red="\e[0;91m"
|
||||
green="\e[0;92m"
|
||||
|
@ -85,7 +92,7 @@ check_pre_pandora () {
|
|||
}
|
||||
|
||||
check_repo_connection () {
|
||||
execute_cmd "ping -c 2 firefly.artica.es" "Checking Community repo"
|
||||
execute_cmd "ping -c 2 firefly.pandorafms.com" "Checking Community repo"
|
||||
execute_cmd "ping -c 2 support.pandorafms.com" "Checking Enterprise repo"
|
||||
}
|
||||
|
||||
|
@ -105,6 +112,12 @@ check_root_permissions () {
|
|||
## Main
|
||||
echo "Starting PandoraFMS Community deployment ver. $S_VERSION"
|
||||
|
||||
#check tools
|
||||
if ! grep --version &>> $LOGFILE ; then echo 'Error grep is not detected on the system, grep tool is needed for installation.'; exit -1 ;fi
|
||||
if ! sed --version &>> $LOGFILE ; then echo 'Error sed is not detected on the system, sed tool is needed for installation.'; exit -1 ;fi
|
||||
if ! curl --version &>> $LOGFILE ; then echo 'Error curl is not detected on the system, curl tool is needed for installation.'; exit -1 ;fi
|
||||
if ! ping -V &>> $LOGFILE ; then echo 'Error ping is not detected on the system, ping tool is needed for installation.'; exit -1 ;fi
|
||||
|
||||
# Centos Version
|
||||
if [ ! "$(grep -i centos /etc/redhat-release)" ]; then
|
||||
printf "${red}Error this is not a Centos Base system, this installer is compatible with Centos systems only${reset}\n"
|
||||
|
@ -118,7 +131,7 @@ os_name=$(grep ^PRETTY_NAME= /etc/os-release | cut -d '=' -f2 | tr -d '"')
|
|||
execute_cmd "echo $os_name" "OS detected: ${os_name}"
|
||||
|
||||
echo -en "${cyan}Check Centos Version...${reset}"
|
||||
[ $(sed -nr 's/VERSION_ID+=\s*"([0-9])"$/\1/p' /etc/os-release) -eq '7' ]
|
||||
[[ $(sed -nr 's/VERSION_ID+=\s*"([0-9])"$/\1/p' /etc/os-release) -eq '7' ]]
|
||||
check_cmd_status 'Error OS version, Centos 7 is expected'
|
||||
|
||||
# initialice logfile
|
||||
|
@ -273,7 +286,7 @@ console_dependencies=" \
|
|||
libzstd \
|
||||
openldap-clients \
|
||||
chromium \
|
||||
http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"
|
||||
http://firefly.pandorafms.com/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"
|
||||
execute_cmd "yum install -y $console_dependencies" "Installing Pandora FMS Console dependencies"
|
||||
|
||||
# Server dependencies
|
||||
|
@ -300,9 +313,9 @@ 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"
|
||||
http://firefly.pandorafms.com/centos7/xprobe2-0.3-12.2.x86_64.rpm \
|
||||
http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm \
|
||||
https://firefly.pandorafms.com/centos7/pandorawmic-1.0.0-1.x86_64.rpm"
|
||||
execute_cmd "yum install -y $server_dependencies" "Installing Pandora FMS Server dependencies"
|
||||
|
||||
# install cpan dependencies
|
||||
|
@ -311,13 +324,13 @@ execute_cmd "cpanm -i Thread::Semaphore" "Installing Thread::Semaphore"
|
|||
|
||||
# SDK VMware perl dependencies
|
||||
vmware_dependencies=" \
|
||||
http://firefly.artica.es/centos8/VMware-vSphere-Perl-SDK-6.5.0-4566394.x86_64.rpm \
|
||||
http://firefly.pandorafms.com/centos8/VMware-vSphere-Perl-SDK-6.5.0-4566394.x86_64.rpm \
|
||||
perl-JSON \
|
||||
perl-Archive-Zip \
|
||||
openssl-devel \
|
||||
perl-Crypt-CBC \
|
||||
perl-Digest-SHA \
|
||||
http://firefly.artica.es/centos7/perl-Crypt-OpenSSL-AES-0.02-1.el7.x86_64.rpm"
|
||||
http://firefly.pandorafms.com/centos7/perl-Crypt-OpenSSL-AES-0.02-1.el7.x86_64.rpm"
|
||||
execute_cmd "yum install -y $vmware_dependencies" "Installing SDK VMware perl dependencies"
|
||||
|
||||
# Instant client Oracle
|
||||
|
@ -328,7 +341,7 @@ 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 \
|
||||
http://firefly.pandorafms.com/centos7/xprobe2-0.3-12.2.x86_64.rpm \
|
||||
perl(NetAddr::IP) \
|
||||
perl(Sys::Syslog) \
|
||||
perl(DBI) \
|
||||
|
@ -451,20 +464,20 @@ export MYSQL_PWD=$DBPASS
|
|||
#Define packages
|
||||
#Define packages
|
||||
if [ "$PANDORA_LTS" -eq '1' ] ; then
|
||||
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_server-7.0NG.noarch.rpm"
|
||||
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_console-7.0NG.noarch.rpm"
|
||||
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_agent_linux-7.0NG.noarch.rpm"
|
||||
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_server-7.0NG.noarch.rpm"
|
||||
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_console-7.0NG.noarch.rpm"
|
||||
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_agent_linux-7.0NG.noarch.rpm"
|
||||
elif [ "$PANDORA_LTS" -ne '1' ] ; then
|
||||
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm"
|
||||
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.noarch.rpm"
|
||||
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
|
||||
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm"
|
||||
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.noarch.rpm"
|
||||
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
|
||||
fi
|
||||
|
||||
# if beta is enable
|
||||
if [ "$PANDORA_BETA" -eq '1' ] ; then
|
||||
PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm"
|
||||
PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_console-latest.noarch.rpm"
|
||||
PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
|
||||
PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm"
|
||||
PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.noarch.rpm"
|
||||
PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
|
||||
fi
|
||||
|
||||
# Downloading Pandora Packages
|
||||
|
@ -617,7 +630,16 @@ net.core.optmem_max = 81920
|
|||
|
||||
EO_KO
|
||||
|
||||
[ -d /dev/lxd/ ] || execute_cmd "sysctl --system" "Applying Kernel optimization"
|
||||
echo -en "${cyan}Applying Kernel optimization... ${reset}"
|
||||
sysctl --system &>> $LOGFILE
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${red}Fail${reset}"
|
||||
echo -e "${yellow}Your kernel could not be optimized, you may be running this script in a virtualized environment with no support for accessing the kernel.${reset}"
|
||||
echo -e "${yellow}This system can be used for testing but is not recommended for a production environment.${reset}"
|
||||
echo "$old_sysctl_file" > old_sysctl_file
|
||||
else
|
||||
echo -e "${green}OK${reset}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Fix pandora_server.{log,error} permissions to allow Console check them
|
||||
|
@ -704,7 +726,7 @@ cat > /etc/issue.net << EOF_banner
|
|||
|
||||
Welcome to Pandora FMS appliance on CentOS
|
||||
------------------------------------------
|
||||
Go to Public http://$ipplublic/pandora_console$to to login web console
|
||||
Go to Public http://$ipplublic/pandora_console to login web console
|
||||
$(ip addr | grep -w "inet" | grep -v "127.0.0.1" | grep -v "172.17.0.1" | awk '{print $2}' | awk -F '/' '{print "Go to Local http://"$1"/pandora_console to login web console"}')
|
||||
|
||||
You can find more information at http://pandorafms.com
|
||||
|
@ -725,4 +747,4 @@ execute_cmd "rm -rf $HOME/pandora_deploy_tmp" "Removing temporary files"
|
|||
GREEN='\033[01;32m'
|
||||
NONE='\033[0m'
|
||||
printf " -> Go to Public ${green}http://"$ipplublic"/pandora_console${reset} to manage this server"
|
||||
ip addr | grep -w "inet" | grep -v "127.0.0.1" | grep -v -e "172.1[0-9].0.1" | awk '{print $2}' | awk -v g=$GREEN -v n=$NONE -F '/' '{printf "\n -> Go to Local "g"http://"$1"/pandora_console"n" to manage this server \n -> Use these credentials to log in Pandora Console "g"[ User: admin / Password: pandora ]"n" \n"}'
|
||||
ip addr | grep -w "inet" | grep -v "127.0.0.1" | grep -v -e "172.1[0-9].0.1" | awk '{print $2}' | awk -v g=$GREEN -v n=$NONE -F '/' '{printf "\n -> Go to Local "g"http://"$1"/pandora_console"n" to manage this server \n -> Use these credentials to log in Pandora Console "g"[ User: admin / Password: pandora ]"n" \n"}'
|
||||
|
|
|
@ -14,7 +14,7 @@ PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf
|
|||
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
|
||||
|
||||
|
||||
S_VERSION='202304111'
|
||||
S_VERSION='2023050901'
|
||||
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
|
||||
|
||||
# define default variables
|
||||
|
@ -35,10 +35,18 @@ LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
|
|||
[ "$PANDORA_LTS" ] || PANDORA_LTS=1
|
||||
[ "$PANDORA_BETA" ] || PANDORA_BETA=0
|
||||
|
||||
#Check if possible to get os version
|
||||
if [ ! -e /etc/os-release ]; then
|
||||
echo ' > Imposible to determinate the OS version for this machine, please make sure you are intalling in a compatible OS'
|
||||
echo ' > More info: https://pandorafms.com/manual/en/documentation/02_installation/01_installing#minimum_software_requirements'
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# Ansi color code variables
|
||||
red="\e[0;91m"
|
||||
green="\e[0;92m"
|
||||
cyan="\e[0;36m"
|
||||
yellow="\e[33m"
|
||||
reset="\e[0m"
|
||||
|
||||
# Functions
|
||||
|
@ -90,7 +98,7 @@ check_pre_pandora () {
|
|||
}
|
||||
|
||||
check_repo_connection () {
|
||||
execute_cmd "ping -c 2 firefly.artica.es" "Checking Community repo"
|
||||
execute_cmd "ping -c 2 firefly.pandorafms.com" "Checking Community repo"
|
||||
execute_cmd "ping -c 2 support.pandorafms.com" "Checking Enterprise repo"
|
||||
}
|
||||
|
||||
|
@ -121,6 +129,12 @@ installing_docker () {
|
|||
## Main
|
||||
echo "Starting PandoraFMS Community deployment EL8 ver. $S_VERSION"
|
||||
|
||||
#check tools
|
||||
if ! grep --version &>> $LOGFILE ; then echo 'Error grep is not detected on the system, grep tool is needed for installation.'; exit -1 ;fi
|
||||
if ! sed --version &>> $LOGFILE ; then echo 'Error sed is not detected on the system, sed tool is needed for installation.'; exit -1 ;fi
|
||||
if ! curl --version &>> $LOGFILE ; then echo 'Error curl is not detected on the system, curl tool is needed for installation.'; exit -1 ;fi
|
||||
if ! ping -V &>> $LOGFILE ; then echo 'Error ping is not detected on the system, ping tool is needed for installation.'; exit -1 ;fi
|
||||
|
||||
# Centos Version
|
||||
if [ ! "$(grep -Ei 'centos|rocky|Almalinux|Red Hat Enterprise' /etc/redhat-release)" ]; then
|
||||
printf "\n ${red}Error this is not a Centos/Rocky/Almalinux Base system, this installer is compatible with RHEL/Almalinux/Centos/Rockylinux systems only${reset}\n"
|
||||
|
@ -129,8 +143,8 @@ fi
|
|||
|
||||
|
||||
echo -en "${cyan}Check Centos Version...${reset}"
|
||||
[ $(sed -nr 's/VERSION_ID+=\s*"([0-9]).*"$/\1/p' /etc/os-release) -eq '8' ]
|
||||
check_cmd_status 'Error OS version, RHEL/Almalinux/Centos/Rockylinux 8+ is expected'
|
||||
[[ $(sed -nr 's/VERSION_ID+=\s*"([0-9]).*"$/\1/p' /etc/os-release) -eq '8' ]]
|
||||
check_cmd_status 'Error OS version, RHEL/Almalinux/Centos/Rockylinux 8.x is expected'
|
||||
|
||||
#Detect OS
|
||||
os_name=$(grep ^PRETTY_NAME= /etc/os-release | cut -d '=' -f2 | tr -d '"')
|
||||
|
@ -327,11 +341,11 @@ console_dependencies=" \
|
|||
mod_ssl \
|
||||
libzstd \
|
||||
openldap-clients \
|
||||
http://firefly.artica.es/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \
|
||||
http://firefly.artica.es/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \
|
||||
http://firefly.artica.es/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \
|
||||
http://firefly.artica.es/centos7/wmic-1.4-1.el7.x86_64.rpm \
|
||||
http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"
|
||||
http://firefly.pandorafms.com/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \
|
||||
http://firefly.pandorafms.com/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \
|
||||
http://firefly.pandorafms.com/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \
|
||||
http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm \
|
||||
http://firefly.pandorafms.com/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"
|
||||
execute_cmd "dnf install -y $console_dependencies" "Installing Pandora FMS Console dependencies"
|
||||
|
||||
# Server dependencies
|
||||
|
@ -357,9 +371,9 @@ 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"
|
||||
http://firefly.pandorafms.com/centos7/xprobe2-0.3-12.2.x86_64.rpm \
|
||||
http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm \
|
||||
https://firefly.pandorafms.com/centos8/pandorawmic-1.0.0-1.x86_64.rpm"
|
||||
execute_cmd "dnf install -y $server_dependencies" "Installing Pandora FMS Server dependencies"
|
||||
|
||||
# SDK VMware perl dependencies
|
||||
|
@ -373,8 +387,8 @@ vmware_dependencies=" \
|
|||
perl-Math-Random-ISAAC \
|
||||
perl-JSON \
|
||||
perl-Crypt-SSLeay \
|
||||
http://firefly.artica.es/centos8/perl-Crypt-OpenSSL-AES-0.02-1.el8.x86_64.rpm \
|
||||
http://firefly.artica.es/centos8/VMware-vSphere-Perl-SDK-6.5.0-4566394.x86_64.rpm"
|
||||
http://firefly.pandorafms.com/centos8/perl-Crypt-OpenSSL-AES-0.02-1.el8.x86_64.rpm \
|
||||
http://firefly.pandorafms.com/centos8/VMware-vSphere-Perl-SDK-6.5.0-4566394.x86_64.rpm"
|
||||
execute_cmd "dnf install -y $vmware_dependencies" "Installing SDK VMware perl dependencies"
|
||||
|
||||
# Instant client Oracle
|
||||
|
@ -385,7 +399,7 @@ 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 \
|
||||
http://firefly.pandorafms.com/centos7/xprobe2-0.3-12.2.x86_64.rpm \
|
||||
perl(NetAddr::IP) \
|
||||
perl(Sys::Syslog) \
|
||||
perl(DBI) \
|
||||
|
@ -507,20 +521,20 @@ export MYSQL_PWD=$DBPASS
|
|||
|
||||
#Define packages
|
||||
if [ "$PANDORA_LTS" -eq '1' ] ; then
|
||||
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_server-7.0NG.noarch.rpm"
|
||||
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_console-7.0NG.noarch.rpm"
|
||||
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_agent_linux-7.0NG.noarch.rpm"
|
||||
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_server-7.0NG.noarch.rpm"
|
||||
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_console-7.0NG.noarch.rpm"
|
||||
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_agent_linux-7.0NG.noarch.rpm"
|
||||
elif [ "$PANDORA_LTS" -ne '1' ] ; then
|
||||
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm"
|
||||
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.noarch.rpm"
|
||||
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
|
||||
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm"
|
||||
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.noarch.rpm"
|
||||
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
|
||||
fi
|
||||
|
||||
# if beta is enable
|
||||
if [ "$PANDORA_BETA" -eq '1' ] ; then
|
||||
PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm"
|
||||
PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_console-latest.noarch.rpm"
|
||||
PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
|
||||
PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm"
|
||||
PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.noarch.rpm"
|
||||
PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
|
||||
fi
|
||||
|
||||
# Downloading Pandora Packages
|
||||
|
@ -654,6 +668,9 @@ EOF_ENV
|
|||
# Kernel optimization
|
||||
|
||||
if [ "$SKIP_KERNEL_OPTIMIZATIONS" -eq '0' ] ; then
|
||||
|
||||
old_sysctl_file=$(cat /etc/sysctl.conf)
|
||||
|
||||
cat >> /etc/sysctl.conf <<EO_KO
|
||||
# Pandora FMS Optimization
|
||||
|
||||
|
@ -680,7 +697,17 @@ net.core.optmem_max = 81920
|
|||
|
||||
EO_KO
|
||||
|
||||
[ -d /dev/lxd/ ] || execute_cmd "sysctl --system" "Applying Kernel optimization"
|
||||
echo -en "${cyan}Applying Kernel optimization... ${reset}"
|
||||
sysctl --system &>> $LOGFILE
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${red}Fail${reset}"
|
||||
echo -e "${yellow}Your kernel could not be optimized, you may be running this script in a virtualized environment with no support for accessing the kernel.${reset}"
|
||||
echo -e "${yellow}This system can be used for testing but is not recommended for a production environment.${reset}"
|
||||
echo "$old_sysctl_file" > old_sysctl_file
|
||||
else
|
||||
echo -e "${green}OK${reset}"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# Fix pandora_server.{log,error} permissions to allow Console check them
|
||||
|
@ -767,7 +794,7 @@ cat > /etc/issue.net << EOF_banner
|
|||
|
||||
Welcome to Pandora FMS appliance on RHEL/Rocky Linux 8
|
||||
------------------------------------------
|
||||
Go to Public http://$ipplublic/pandora_console$to to login web console
|
||||
Go to Public http://$ipplublic/pandora_console to login web console
|
||||
$(ip addr | grep -w "inet" | grep -v "127.0.0.1" | grep -v "172.17.0.1" | awk '{print $2}' | awk -F '/' '{print "Go to Local http://"$1"/pandora_console to login web console"}')
|
||||
|
||||
You can find more information at http://pandorafms.com
|
||||
|
@ -788,4 +815,4 @@ execute_cmd "rm -rf $HOME/pandora_deploy_tmp" "Removing temporary files"
|
|||
GREEN='\033[01;32m'
|
||||
NONE='\033[0m'
|
||||
printf " -> Go to Public ${green}http://"$ipplublic"/pandora_console${reset} to manage this server"
|
||||
ip addr | grep -w "inet" | grep -v "127.0.0.1" | grep -v -e "172.1[0-9].0.1" | awk '{print $2}' | awk -v g=$GREEN -v n=$NONE -F '/' '{printf "\n -> Go to Local "g"http://"$1"/pandora_console"n" to manage this server \n -> Use these credentials to log in Pandora Console "g"[ User: admin / Password: pandora ]"n" \n"}'
|
||||
ip addr | grep -w "inet" | grep -v "127.0.0.1" | grep -v -e "172.1[0-9].0.1" | awk '{print $2}' | awk -v g=$GREEN -v n=$NONE -F '/' '{printf "\n -> Go to Local "g"http://"$1"/pandora_console"n" to manage this server \n -> Use these credentials to log in Pandora Console "g"[ User: admin / Password: pandora ]"n" \n"}'
|
||||
|
|
|
@ -17,7 +17,7 @@ PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
|
|||
WORKDIR=/opt/pandora/deploy
|
||||
|
||||
|
||||
S_VERSION='202304181'
|
||||
S_VERSION='2023050901'
|
||||
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
|
||||
rm -f $LOGFILE &> /dev/null # remove last log before start
|
||||
|
||||
|
@ -37,6 +37,12 @@ rm -f $LOGFILE &> /dev/null # remove last log before start
|
|||
[ "$PANDORA_BETA" ] || PANDORA_BETA=0
|
||||
[ "$PANDORA_LTS" ] || PANDORA_LTS=1
|
||||
|
||||
#Check if possible to get os version
|
||||
if [ ! -e /etc/os-release ]; then
|
||||
echo ' > Imposible to determinate the OS version for this machine, please make sure you are intalling in a compatible OS'
|
||||
echo ' > More info: https://pandorafms.com/manual/en/documentation/02_installation/01_installing#minimum_software_requirements'
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# Ansi color code variables
|
||||
red="\e[0;91m"
|
||||
|
@ -90,7 +96,7 @@ check_pre_pandora () {
|
|||
}
|
||||
|
||||
check_repo_connection () {
|
||||
execute_cmd "ping -c 2 firefly.artica.es" "Checking Community repo"
|
||||
execute_cmd "ping -c 2 firefly.pandorafms.com" "Checking Community repo"
|
||||
execute_cmd "ping -c 2 support.pandorafms.com" "Checking Enterprise repo"
|
||||
}
|
||||
|
||||
|
@ -125,6 +131,12 @@ installing_docker () {
|
|||
## Main
|
||||
echo "Starting PandoraFMS Community deployment Ubuntu 22.04 ver. $S_VERSION"
|
||||
|
||||
#check tools
|
||||
if ! grep --version &>> $LOGFILE ; then echo 'Error grep is not detected on the system, grep tool is needed for installation.'; exit -1 ;fi
|
||||
if ! sed --version &>> $LOGFILE ; then echo 'Error sed is not detected on the system, sed tool is needed for installation.'; exit -1 ;fi
|
||||
if ! curl --version &>> $LOGFILE ; then echo 'Error curl is not detected on the system, curl tool is needed for installation.'; exit -1 ;fi
|
||||
if ! ping -V &>> $LOGFILE ; then echo 'Error ping is not detected on the system, ping tool is needed for installation.'; exit -1 ;fi
|
||||
|
||||
# Ubuntu Version
|
||||
if [ ! "$(grep -Ei 'Ubuntu' /etc/lsb-release)" ]; then
|
||||
printf "\n ${red}Error this is not a Ubuntu system, this installer is compatible with Ubuntu systems only${reset}\n"
|
||||
|
@ -133,7 +145,7 @@ fi
|
|||
|
||||
|
||||
echo -en "${cyan}Check Ubuntu Version...${reset}"
|
||||
[ $(sed -nr 's/VERSION_ID+=\s*"([0-9][0-9].[0-9][0-9])"$/\1/p' /etc/os-release) == "22.04" ]
|
||||
[[ $(sed -nr 's/VERSION_ID+=\s*"([0-9][0-9].[0-9][0-9])"$/\1/p' /etc/os-release) == "22.04" ]]
|
||||
check_cmd_status 'Error OS version, Ubuntu 22.04 is expected'
|
||||
|
||||
#Detect OS
|
||||
|
@ -281,8 +293,8 @@ execute_cmd "apt install -y $server_dependencies" "Installing Pandora FMS Server
|
|||
execute_cmd "installing_docker" "Installing Docker for debug"
|
||||
|
||||
# wmic and pandorawmic
|
||||
execute_cmd "curl -O https://firefly.artica.es/pandorafms/utils/bin/wmic" "Downloading wmic"
|
||||
execute_cmd "curl -O https://firefly.artica.es/pandorafms/utils/bin/pandorawmic" "Downloading pandorawmic"
|
||||
execute_cmd "curl -O https://firefly.pandorafms.com/pandorafms/utils/bin/wmic" "Downloading wmic"
|
||||
execute_cmd "curl -O https://firefly.pandorafms.com/pandorafms/utils/bin/pandorawmic" "Downloading pandorawmic"
|
||||
echo -en "${cyan}Installing wmic and pandorawmic...${reset}"
|
||||
chmod +x pandorawmic wmic &>> "$LOGFILE" && \
|
||||
cp -a wmic /usr/bin/ &>> "$LOGFILE" && \
|
||||
|
@ -293,7 +305,7 @@ check_cmd_status "Error Installing phanromjs"
|
|||
echo -en "${cyan}Installing phantomjs...${reset}"
|
||||
export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
|
||||
export OPENSSL_CONF=/etc/ssl
|
||||
curl -LSs -O "https://firefly.artica.es/pandorafms/utils/$PHANTOM_JS.tar.bz2" &>> "$LOGFILE" && \
|
||||
curl -LSs -O "https://firefly.pandorafms.com/pandorafms/utils/$PHANTOM_JS.tar.bz2" &>> "$LOGFILE" && \
|
||||
tar xvjf "$PHANTOM_JS.tar.bz2" &>> "$LOGFILE" && \
|
||||
mv $PHANTOM_JS/bin/phantomjs /usr/bin &>> "$LOGFILE" && \
|
||||
/usr/bin/phantomjs --version &>> "$LOGFILE"
|
||||
|
@ -323,7 +335,7 @@ vmware_dependencies="\
|
|||
libsoap-lite-perl \
|
||||
libmodule-build-perl"
|
||||
execute_cmd "apt install -y $vmware_dependencies" "Installing VMware SDK dependencies"
|
||||
execute_cmd "wget https://firefly.artica.es/pandorafms/utils/VMware-vSphere-Perl-SDK-7.0.0-16453907.x86_64.tar.gz" "Downloading VMware SDK"
|
||||
execute_cmd "wget https://firefly.pandorafms.com/pandorafms/utils/VMware-vSphere-Perl-SDK-7.0.0-16453907.x86_64.tar.gz" "Downloading VMware SDK"
|
||||
echo -en "${cyan}Installing VMware SDK...${reset}"
|
||||
tar xvzf VMware-vSphere-Perl-SDK-7.0.0-16453907.x86_64.tar.gz &>> "$LOGFILE"
|
||||
cd vmware-vsphere-cli-distrib/ &>> "$LOGFILE"
|
||||
|
@ -458,19 +470,19 @@ execute_cmd "systemctl restart mysql" "Configuring and restarting database engin
|
|||
|
||||
#Define packages
|
||||
if [ "$PANDORA_LTS" -eq '1' ] ; then
|
||||
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandorafms/latest/Tarball/LTS/pandorafms_server-7.0NG.tar.gz"
|
||||
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandorafms/latest/Tarball/LTS/pandorafms_console-7.0NG.tar.gz"
|
||||
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/Tarball/LTS/pandorafms_agent_linux-7.0NG.tar.gz"
|
||||
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/LTS/pandorafms_server-7.0NG.tar.gz"
|
||||
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/LTS/pandorafms_console-7.0NG.tar.gz"
|
||||
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/LTS/pandorafms_agent_linux-7.0NG.tar.gz"
|
||||
elif [ "$PANDORA_LTS" -ne '1' ] ; then
|
||||
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandorafms/latest/Tarball/pandorafms_server-7.0NG.tar.gz"
|
||||
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandorafms/latest/Tarball/pandorafms_console-7.0NG.tar.gz"
|
||||
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz"
|
||||
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_server-7.0NG.tar.gz"
|
||||
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_console-7.0NG.tar.gz"
|
||||
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz"
|
||||
fi
|
||||
|
||||
if [ "$PANDORA_BETA" -eq '1' ] ; then
|
||||
PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_server-latest_x86_64.tar.gz"
|
||||
PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_console-latest.tar.gz"
|
||||
PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz"
|
||||
PANDORA_SERVER_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_server-latest_x86_64.tar.gz"
|
||||
PANDORA_CONSOLE_PACKAGE="http://firefly.pandorafms.com/pandora_enterprise_nightlies/pandorafms_console-latest.tar.gz"
|
||||
PANDORA_AGENT_PACKAGE="http://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.tar.gz"
|
||||
fi
|
||||
|
||||
# Downloading Pandora Packages
|
||||
|
@ -681,7 +693,16 @@ net.core.optmem_max = 81920
|
|||
|
||||
EO_KO
|
||||
|
||||
[ -d /dev/lxd/ ] || execute_cmd "sysctl --system" "Applying Kernel optimization"
|
||||
echo -en "${cyan}Applying Kernel optimization... ${reset}"
|
||||
sysctl --system &>> $LOGFILE
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${red}Fail${reset}"
|
||||
echo -e "${yellow}Your kernel could not be optimized, you may be running this script in a virtualized environment with no support for accessing the kernel.${reset}"
|
||||
echo -e "${yellow}This system can be used for testing but is not recommended for a production environment.${reset}"
|
||||
echo "$old_sysctl_file" > old_sysctl_file
|
||||
else
|
||||
echo -e "${green}OK${reset}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Fix pandora_server.{log,error} permissions to allow Console check them
|
||||
|
@ -778,7 +799,7 @@ cat > /etc/issue.net << EOF_banner
|
|||
|
||||
Welcome to Pandora FMS appliance on Ubuntu
|
||||
------------------------------------------
|
||||
Go to Public http://$ipplublic/pandora_console$to to login web console
|
||||
Go to Public http://$ipplublic/pandora_console to login web console
|
||||
$(ip addr | grep -w "inet" | grep -v "127.0.0.1" | grep -v "172.17.0.1" | awk '{print $2}' | awk -F '/' '{print "Go to Local http://"$1"/pandora_console to login web console"}')
|
||||
|
||||
You can find more information at http://pandorafms.com
|
||||
|
@ -799,4 +820,4 @@ execute_cmd "rm -rf $WORKDIR" "Removing temporary files"
|
|||
GREEN='\033[01;32m'
|
||||
NONE='\033[0m'
|
||||
printf " -> Go to Public ${green}http://"$ipplublic"/pandora_console${reset} to manage this server"
|
||||
ip addr | grep -w "inet" | grep -v "127.0.0.1" | grep -v -e "172.1[0-9].0.1" | awk '{print $2}' | awk -v g=$GREEN -v n=$NONE -F '/' '{printf "\n -> Go to Local "g"http://"$1"/pandora_console"n" to manage this server \n -> Use these credentials to log in Pandora Console "g"[ User: admin / Password: pandora ]"n" \n"}'
|
||||
ip addr | grep -w "inet" | grep -v "127.0.0.1" | grep -v -e "172.1[0-9].0.1" | awk '{print $2}' | awk -v g=$GREEN -v n=$NONE -F '/' '{printf "\n -> Go to Local "g"http://"$1"/pandora_console"n" to manage this server \n -> Use these credentials to log in Pandora Console "g"[ User: admin / Password: pandora ]"n" \n"}'
|
||||
|
|
|
@ -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 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.770, AIX version
|
||||
# Version 7.0NG.771, AIX version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.770, FreeBSD Version
|
||||
# Version 7.0NG.771, FreeBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.770, HP-UX Version
|
||||
# Version 7.0NG.771, HP-UX Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.770, GNU/Linux
|
||||
# Version 7.0NG.771, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.770, GNU/Linux
|
||||
# Version 7.0NG.771, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.770, Solaris Version
|
||||
# Version 7.0NG.771, Solaris Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Base config file for Pandora FMS Windows Agent
|
||||
# (c) 2006-2021 Artica Soluciones Tecnologicas
|
||||
# Version 7.0NG.770
|
||||
# Version 7.0NG.771
|
||||
# This program is Free Software, you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public Licence as published by the Free Software
|
||||
# Foundation; either version 2 of the Licence or any later version
|
||||
|
|
|
@ -2018,7 +2018,7 @@ sub pandora_agent_run () {
|
|||
$Xml = $xml_header . $Xml . "</agent_data>";
|
||||
|
||||
# Save XML data file
|
||||
my $temp_file = $Conf{'temporal'} . '/' . $Conf{'agent_name'} . '.' . time () . '.data';
|
||||
my $temp_file = $Conf{'temporal'} . '/' . md5($Conf{'agent_name'}) . '.' . time () . '.data';
|
||||
if (-l $temp_file && !unlink($temp_file)) {
|
||||
error ("File '$temp_file' already exists as a symlink and could not be removed: $!");
|
||||
return 1;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.770, AIX version
|
||||
# Version 7.0NG.771, AIX version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.770
|
||||
# Version 7.0NG.771
|
||||
# FreeBSD/IPSO version
|
||||
# Licenced under GPL licence, 2003-2007 Sancho Lerena
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.770, HPUX Version
|
||||
# Version 7.0NG.771, HPUX Version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.770
|
||||
# Version 7.0NG.771
|
||||
# Licensed under GPL license v2,
|
||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.770
|
||||
# Version 7.0NG.771
|
||||
# Licensed under GPL license v2,
|
||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.770
|
||||
# Version 7.0NG.771
|
||||
# Licensed under GPL license v2,
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.770, Solaris version
|
||||
# Version 7.0NG.771, Solaris version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.770, AIX version
|
||||
# Version 7.0NG.771, AIX version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.770-230425
|
||||
Version: 7.0NG.771-230530
|
||||
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-230425"
|
||||
pandora_version="7.0NG.771-230530"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -31,7 +31,7 @@ fi
|
|||
if [ "$#" -ge 2 ]; then
|
||||
VERSION="$2"
|
||||
else
|
||||
VERSION="7.0NG.770"
|
||||
VERSION="7.0NG.771"
|
||||
fi
|
||||
|
||||
# Path for the generated DMG file
|
||||
|
|
|
@ -19,11 +19,11 @@
|
|||
<choice id="com.pandorafms.pandorafms_src" visible="false">
|
||||
<pkg-ref id="com.pandorafms.pandorafms_src"/>
|
||||
</choice>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.770" onConclusion="none">pandorafms_src.pdk</pkg-ref>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.771" onConclusion="none">pandorafms_src.pdk</pkg-ref>
|
||||
<choice id="com.pandorafms.pandorafms_uninstall" visible="true" customLocation="/Applications">
|
||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall"/>
|
||||
</choice>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.770" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
|
||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.771" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
|
||||
<!-- <installation-check script="check()" />
|
||||
<script>
|
||||
<![CDATA[
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
<key>CFBundleIconFile</key> <string>pandorafms.icns</string>
|
||||
<key>CFBundleIdentifier</key> <string>com.pandorafms.pandorafms_uninstall</string>
|
||||
|
||||
<key>CFBundleVersion</key> <string>7.0NG.770</string>
|
||||
<key>CFBundleGetInfoString</key> <string>7.0NG.770 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
|
||||
<key>CFBundleShortVersionString</key> <string>7.0NG.770</string>
|
||||
<key>CFBundleVersion</key> <string>7.0NG.771</string>
|
||||
<key>CFBundleGetInfoString</key> <string>7.0NG.771 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
|
||||
<key>CFBundleShortVersionString</key> <string>7.0NG.771</string>
|
||||
|
||||
<key>NSPrincipalClass</key><string>NSApplication</string>
|
||||
<key>NSMainNibFile</key><string>MainMenu</string>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.770, GNU/Linux
|
||||
# Version 7.0NG.771, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.770, FreeBSD Version
|
||||
# Version 7.0NG.771, FreeBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.770, HP-UX Version
|
||||
# Version 7.0NG.771, HP-UX Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.770, GNU/Linux
|
||||
# Version 7.0NG.771, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.770, GNU/Linux
|
||||
# Version 7.0NG.771, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.770, NetBSD Version
|
||||
# Version 7.0NG.771, NetBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.770, Solaris Version
|
||||
# Version 7.0NG.771, Solaris Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1022,8 +1022,8 @@ my $Sem = undef;
|
|||
# Semaphore used to control the number of threads
|
||||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.770';
|
||||
use constant AGENT_BUILD => '230425';
|
||||
use constant AGENT_VERSION => '7.0NG.771';
|
||||
use constant AGENT_BUILD => '230530';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
@ -4377,7 +4377,7 @@ while (1) {
|
|||
$Xml = $xml_header . $Xml . "</agent_data>";
|
||||
|
||||
# Save XML data file
|
||||
my $temp_file = $Conf{'temporal'} . '/' . $Conf{'agent_name'} . '.' . time () . '.data';
|
||||
my $temp_file = $Conf{'temporal'} . '/' . md5($Conf{'agent_name'}) . '.' . time () . '.data';
|
||||
error ("File '$temp_file' already exists as a symlink and could not be removed: $!") if (-l $temp_file && !unlink($temp_file));
|
||||
open (TEMP_FILE, "> $temp_file") || error ("Could not write XML data file: $!");
|
||||
print TEMP_FILE $Xml;
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#
|
||||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.770
|
||||
%define release 230425
|
||||
%define version 7.0NG.771
|
||||
%define release 230530
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#
|
||||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.770
|
||||
%define release 230425
|
||||
%define version 7.0NG.771
|
||||
%define release 230530
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
|
||||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.770"
|
||||
PI_BUILD="230425"
|
||||
PI_VERSION="7.0NG.771"
|
||||
PI_BUILD="230530"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Base config file for Pandora FMS Windows Agent
|
||||
# (c) 2006-2023 Pandora FMS
|
||||
# Version 7.0NG.770
|
||||
# Version 7.0NG.771
|
||||
# This program is Free Software, you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public Licence as published by the Free Software
|
||||
# Foundation; either version 2 of the Licence or any later version
|
||||
|
|
|
@ -3,7 +3,7 @@ AllowLanguageSelection
|
|||
{Yes}
|
||||
|
||||
AppName
|
||||
{Pandora FMS Windows Agent v7.0NG.770}
|
||||
{Pandora FMS Windows Agent v7.0NG.771}
|
||||
|
||||
ApplicationID
|
||||
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
|
||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{230425}
|
||||
{230530}
|
||||
|
||||
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 230425")
|
||||
#define PANDORA_VERSION ("7.0NG.771 Build 230530")
|
||||
|
||||
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 230425))"
|
||||
VALUE "ProductVersion", "(7.0NG.771(Build 230530))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.770-230425
|
||||
Version: 7.0NG.771-230530
|
||||
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-230425"
|
||||
pandora_version="7.0NG.771-230530"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -185,7 +185,7 @@ if (isset($config['force_instant_logout']) === true
|
|||
header_remove('Set-Cookie');
|
||||
setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/');
|
||||
|
||||
if ($config['auth'] === 'saml') {
|
||||
if ($config['auth'] === 'saml' && empty($public_hash) === true) {
|
||||
include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php';
|
||||
$as = new SimpleSAML_Auth_Simple('PandoraFMS');
|
||||
$as->logout();
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
],
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "8.0.0"
|
||||
"php": "8.0.2"
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
"mpdf/mpdf": "^8.0.15",
|
||||
"swiftmailer/swiftmailer": "^6.0",
|
||||
"amphp/parallel-functions": "^1.0",
|
||||
"chrome-php/chrome": "^1.7.1",
|
||||
"chrome-php/chrome": "^1.8.1",
|
||||
"artica/phpchartjs": "^1.0",
|
||||
"tinymce/tinymce": "^6.4"
|
||||
},
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -31,7 +31,7 @@ global $config;
|
|||
|
||||
check_login();
|
||||
// ACL Check.
|
||||
if (!check_acl($config['id_user'], 0, 'AR')) {
|
||||
if (check_acl($config['id_user'], 0, 'AR') === 0 && check_acl($config['id_user'], 0, 'RR') === 0) {
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_ACL_VIOLATION,
|
||||
'Trying to access Module Groups view'
|
||||
|
|
|
@ -186,10 +186,6 @@ function pandora_realtime_graphs()
|
|||
|
||||
$table->data[] = $data;
|
||||
|
||||
if ($graph == 'snmp_interface' || $graph == 'snmp_module') {
|
||||
echo snmp_browser_print_container(true, '100%', '60%', 'none');
|
||||
}
|
||||
|
||||
// Print the relative path to AJAX calls.
|
||||
html_print_input_hidden('rel_path', get_parameter('rel_path', ''));
|
||||
|
||||
|
@ -224,7 +220,7 @@ function pandora_realtime_graphs()
|
|||
false,
|
||||
'',
|
||||
'white-box-content',
|
||||
'box-flat white_table_graph'
|
||||
'box-flat white_table_graph fixed_filter_bar'
|
||||
);
|
||||
|
||||
$chart[time()]['graph'] = '0';
|
||||
|
@ -266,6 +262,16 @@ function pandora_realtime_graphs()
|
|||
]
|
||||
);
|
||||
|
||||
if ($graph == 'snmp_interface' || $graph == 'snmp_module') {
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'white_box',
|
||||
'id' => 'graph_snmp_interface',
|
||||
'content' => snmp_browser_print_container(true, '100%', '60%', '', false, false),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
// echo $canvas;
|
||||
// Define a custom action to save
|
||||
// the OID selected in the SNMP browser to the form.
|
||||
|
|
|
@ -453,7 +453,7 @@ function resource_exportation_extension_main()
|
|||
true
|
||||
)
|
||||
);
|
||||
$table->data[0][] = html_print_button(__('Export'), '', false, 'export_to_ptr(\'report\');', ['mode' => 'link'], true);
|
||||
$table->data[0][] = html_print_button(__('Export'), '', false, 'export_to_ptr("report");', ['mode' => 'link'], true);
|
||||
|
||||
$table->data[1][] = html_print_label_input_block(
|
||||
__('Visual console'),
|
||||
|
@ -465,7 +465,7 @@ function resource_exportation_extension_main()
|
|||
true
|
||||
)
|
||||
);
|
||||
$table->data[1][] = html_print_button(__('Export'), '', false, 'export_to_ptr(\'visual_console\');', ['mode' => 'link'], true);
|
||||
$table->data[1][] = html_print_button(__('Export'), '', false, 'export_to_ptr("visual_console");', ['mode' => 'link'], true);
|
||||
|
||||
if ($hook_enterprise === true) {
|
||||
add_rows_for_enterprise($table->data);
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
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,
|
||||
`text` TEXT NULL,
|
||||
`period` TEXT NULL,
|
||||
`ip` TEXT NULL,
|
||||
`type` TEXT NULL,
|
||||
`user` TEXT NULL,
|
||||
PRIMARY KEY (`id_filter`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `tsesion_filter_log_viewer` (
|
||||
`id_filter` INT NOT NULL AUTO_INCREMENT,
|
||||
`id_name` TEXT NULL,
|
||||
`id_group_filter` TEXT NULL,
|
||||
`id_search_mode` INT NULL,
|
||||
`order` VARCHAR(45) NULL,
|
||||
`search` VARCHAR(255) NULL,
|
||||
`group_id` INT NULL,
|
||||
`date_range` TINYINT NULL,
|
||||
`start_date_defined` VARCHAR(45) NULL,
|
||||
`start_date_time` VARCHAR(45) NULL,
|
||||
`start_date_date` VARCHAR(45) NULL,
|
||||
`start_date_date_range` VARCHAR(45) NULL,
|
||||
`start_date_time_range` VARCHAR(45) NULL,
|
||||
`end_date_date_range` VARCHAR(45) NULL,
|
||||
`end_date_time_range` VARCHAR(45) NULL,
|
||||
`agent` VARCHAR(255) NULL,
|
||||
`source` VARCHAR(255) NULL,
|
||||
`display_mode` INT NULL,
|
||||
`capture_model` INT NULL,
|
||||
`graph_type` INT NULL,
|
||||
PRIMARY KEY (`id_filter`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
ALTER TABLE `talert_template_module_actions` ADD COLUMN `recovered` TINYINT NOT NULL DEFAULT 0;
|
||||
|
||||
COMMIT;
|
|
@ -62,4 +62,22 @@ INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`
|
|||
SELECT @last_id := LAST_INSERT_ID();
|
||||
INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`,`filename`,`path`) VALUES (@last_id,'zoom_en_graficas.png','images/tips/');
|
||||
|
||||
ALTER TABLE `tnetwork_component` ADD COLUMN `target_ip` VARCHAR(255) NOT NULL DEFAULT '';
|
||||
|
||||
UPDATE `tnetwork_component`
|
||||
SET module_enabled=1
|
||||
WHERE name='Cisco _nameOID_ power state';
|
||||
|
||||
ALTER TABLE `tlayout_data`
|
||||
ADD COLUMN `recursive_group` TINYINT NOT NULL DEFAULT '0' AFTER `fill_color`;
|
||||
|
||||
ALTER TABLE `tusuario`
|
||||
ADD COLUMN `metaconsole_section` VARCHAR(255) NOT NULL DEFAULT 'Default' AFTER `data_section`;
|
||||
|
||||
ALTER TABLE `tusuario`
|
||||
ADD COLUMN `metaconsole_data_section` VARCHAR(255) NOT NULL DEFAULT '' AFTER `metaconsole_section`;
|
||||
|
||||
ALTER TABLE `tusuario`
|
||||
ADD COLUMN `metaconsole_default_event_filter` INT UNSIGNED NOT NULL DEFAULT 0 AFTER `default_event_filter`;
|
||||
|
||||
COMMIT;
|
||||
|
|
Binary file not shown.
|
@ -263,7 +263,7 @@ switch ($login_screen) {
|
|||
}
|
||||
|
||||
if ($config['auth'] == 'saml') {
|
||||
echo '<div id="log_nick" class="login_nick invisible" >';
|
||||
echo '<div id="log_nick" class="login_nick invisible '.$style_theme.'" >';
|
||||
html_print_input_text_extended(
|
||||
'nick',
|
||||
'',
|
||||
|
@ -294,7 +294,7 @@ switch ($login_screen) {
|
|||
echo '</div>';
|
||||
|
||||
echo '<div id="log_button" class="login_button invisible">';
|
||||
html_print_submit_button(__('Login as admin'), 'login_button', false, [ 'fixed_id' => 'submit-login_button', 'class' => 'next_login']);
|
||||
html_print_submit_button(__('Let's go'), 'login_button', false, [ 'fixed_id' => 'submit-login_button', 'class' => 'next_login']);
|
||||
echo '</div>';
|
||||
|
||||
echo '<div class="login_button" id="remove_button">';
|
||||
|
@ -303,7 +303,7 @@ switch ($login_screen) {
|
|||
'input_saml',
|
||||
false,
|
||||
[
|
||||
'fixed_id' => 'submit-login_button',
|
||||
'fixed_id' => 'submit-admin_button',
|
||||
'class' => 'next_login',
|
||||
'onclick' => 'show_normal_menu()',
|
||||
'id' => 'input_saml',
|
||||
|
@ -833,13 +833,15 @@ html_print_div(['id' => 'forced_title_layer', 'class' => 'forced_title_layer', '
|
|||
?>
|
||||
<script type="text/javascript" language="javascript">
|
||||
function show_normal_menu() {
|
||||
document.getElementById('input_saml').style.display = 'none';
|
||||
event.preventDefault();
|
||||
const style = '<?php echo $style_theme; ?>';
|
||||
|
||||
document.getElementById('remove_button').style.display = 'none';
|
||||
document.getElementById('log_nick').style.display = 'block';
|
||||
document.getElementById('log_pass').style.display = 'block';
|
||||
document.getElementById('log_nick').className = `login_nick ${style}`;
|
||||
document.getElementById('log_pass').className = `login_pass ${style}`;
|
||||
document.getElementById('log_button').style.display = 'block';
|
||||
document.getElementById('remove_button').style.display = 'none';
|
||||
document.getElementById('log_nick').className = 'login_nick';
|
||||
document.getElementById('log_pass').className = 'login_pass';
|
||||
}
|
||||
|
||||
switch ("<?php echo $login_screen; ?>") {
|
||||
|
|
|
@ -33,6 +33,15 @@ require_once 'include/config.php';
|
|||
global $config;
|
||||
|
||||
check_login();
|
||||
// ACL Check.
|
||||
if (check_acl($config['id_user'], 0, 'AR') === 0) {
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_ACL_VIOLATION,
|
||||
'Trying to access Default view'
|
||||
);
|
||||
include 'general/noaccess.php';
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once 'include/functions_reporting.php';
|
||||
require_once 'include/functions_tactical.php';
|
||||
|
@ -202,22 +211,58 @@ if (!empty($news)) {
|
|||
|
||||
$output_news = '<div id="news_board" class="new">';
|
||||
foreach ($news as $article) {
|
||||
$image = false;
|
||||
$default = false;
|
||||
if ($article['text'] == '&lt;p style="text-align: center; font-size: 13px;"&gt;Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -&amp;gt; Site news.&lt;/p&gt; ') {
|
||||
$image = true;
|
||||
$article['subject'] = __('Welcome to Pandora FMS Console');
|
||||
$default = true;
|
||||
}
|
||||
|
||||
$text_bbdd = io_safe_output($article['text']);
|
||||
$text = html_entity_decode($text_bbdd);
|
||||
$output_news .= '<span class="green_title">'.$article['subject'].'</span>';
|
||||
|
||||
$output_news .= '<div class="new-board">';
|
||||
$output_news .= '<div class="new-board-header">';
|
||||
$output_news .= '<span class="new-board-title">'.$article['subject'].'</span>';
|
||||
$output_news .= '<span class="new-board-author">'.__('By').' '.$article['author'].' '.ui_print_timestamp($article['timestamp'], true).'</span>';
|
||||
$output_news .= '</div>';
|
||||
$output_news .= '<div class="new content">';
|
||||
$output_news .= '<p>'.__('by').' <b>'.$article['author'].'</b> <i>'.ui_print_timestamp($article['timestamp'], true).'</i> '.$comparation_suffix.'</p>';
|
||||
if ($image) {
|
||||
$output_news .= '<center><img src="./images/welcome_image.png" alt="img colabora con nosotros - Support" width="191" height="207"></center>';
|
||||
|
||||
if ($default) {
|
||||
$output_news .= '<div class="default-new">';
|
||||
$output_news .= '<div class="default-image-new">';
|
||||
$output_news .= '<img src="./images/welcome_image.svg" alt="img colabora con nosotros - Support">';
|
||||
$output_news .= '</div><div class="default-text-new">';
|
||||
|
||||
$output_news .= '
|
||||
<p>'.__('Welcome to our monitoring tool so grand,').'
|
||||
<br>'.__('Where data insights are at your command.').'
|
||||
<br>'.__('Sales, marketing, operations too,').'
|
||||
<br>'.__("Customer support, we've got you.").'
|
||||
</p>
|
||||
|
||||
<p>'.__('Our interface is user-friendly,').'
|
||||
<br>'.__("Customize your dashboard, it's easy.").'
|
||||
<br>'.__('Set up alerts and gain insights so keen,').'
|
||||
<br>'.__("Optimize your data, like you've never seen.").'
|
||||
</p>
|
||||
|
||||
<p>'.__('Unleash its power now, and join the pro league,').'
|
||||
<br>'.__('Unlock the potential of your data to intrigue.').'
|
||||
<br>'.__('Monitoring made simple, efficient and fun,').'
|
||||
<br>'.__('Discover a whole new way to get things done.').'
|
||||
</p>
|
||||
|
||||
<p>'.__('And take control of your IT once and for all.').'</p>
|
||||
|
||||
<span>'.__('You can replace this message with a personalized one at Admin tools -> Site news.').'</span>
|
||||
';
|
||||
|
||||
$output_news .= '</div></div>';
|
||||
} else {
|
||||
$output_news .= nl2br($text);
|
||||
}
|
||||
|
||||
$output_news .= nl2br($text);
|
||||
$output_news .= '</div>';
|
||||
$output_news .= '</div></div>';
|
||||
}
|
||||
|
||||
$output_news .= '</div>';
|
||||
|
|
|
@ -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();
|
||||
}
|
|
@ -295,25 +295,25 @@ if (enterprise_installed() === true) {
|
|||
$cps_val = $cps;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Parent agents.
|
||||
$paramsParentAgent = [];
|
||||
$paramsParentAgent['return'] = true;
|
||||
$paramsParentAgent['show_helptip'] = false;
|
||||
$paramsParentAgent['input_name'] = 'id_parent';
|
||||
$paramsParentAgent['print_hidden_input_idagent'] = true;
|
||||
$paramsParentAgent['hidden_input_idagent_name'] = 'id_agent_parent';
|
||||
$paramsParentAgent['hidden_input_idagent_value'] = $id_parent;
|
||||
$paramsParentAgent['value'] = db_get_value('alias', 'tagente', 'id_agente', $id_parent);
|
||||
$paramsParentAgent['selectbox_id'] = 'cascade_protection_module';
|
||||
$paramsParentAgent['javascript_is_function_select'] = true;
|
||||
$paramsParentAgent['cascade_protection'] = true;
|
||||
$paramsParentAgent['input_style'] = 'width: 100%;';
|
||||
// Parent agents.
|
||||
$paramsParentAgent = [];
|
||||
$paramsParentAgent['return'] = true;
|
||||
$paramsParentAgent['show_helptip'] = false;
|
||||
$paramsParentAgent['input_name'] = 'id_parent';
|
||||
$paramsParentAgent['print_hidden_input_idagent'] = true;
|
||||
$paramsParentAgent['hidden_input_idagent_name'] = 'id_agent_parent';
|
||||
$paramsParentAgent['hidden_input_idagent_value'] = $id_parent;
|
||||
$paramsParentAgent['value'] = db_get_value('alias', 'tagente', 'id_agente', $id_parent);
|
||||
$paramsParentAgent['selectbox_id'] = 'cascade_protection_module';
|
||||
$paramsParentAgent['javascript_is_function_select'] = true;
|
||||
$paramsParentAgent['cascade_protection'] = true;
|
||||
$paramsParentAgent['input_style'] = 'width: 100%;';
|
||||
|
||||
if ($id_agente !== 0) {
|
||||
// Deletes the agent's offspring.
|
||||
$paramsParentAgent['delete_offspring_agents'] = $id_agente;
|
||||
}
|
||||
if ($id_agente !== 0) {
|
||||
// Deletes the agent's offspring.
|
||||
$paramsParentAgent['delete_offspring_agents'] = $id_agente;
|
||||
}
|
||||
|
||||
$listIcons = gis_get_array_list_icons();
|
||||
|
@ -631,15 +631,18 @@ $tableAdvancedAgent->style = [];
|
|||
$tableAdvancedAgent->cellclass = [];
|
||||
$tableAdvancedAgent->colspan = [];
|
||||
$tableAdvancedAgent->rowspan = [];
|
||||
// Secondary groups.
|
||||
$tableAdvancedAgent->data['secondary_groups'][] = html_print_label_input_block(
|
||||
__('Secondary groups'),
|
||||
html_print_select_agent_secondary(
|
||||
$agent,
|
||||
$id_agente,
|
||||
['selected_post' => $secondary_groups]
|
||||
)
|
||||
);
|
||||
|
||||
if (enterprise_installed() === true) {
|
||||
// Secondary groups.
|
||||
$tableAdvancedAgent->data['secondary_groups'][] = html_print_label_input_block(
|
||||
__('Secondary groups'),
|
||||
html_print_select_agent_secondary(
|
||||
$agent,
|
||||
$id_agente,
|
||||
['selected_post' => $secondary_groups]
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Parent agent.
|
||||
$tableAdvancedAgent->data['parent_agent'][] = html_print_label_input_block(
|
||||
|
@ -795,8 +798,6 @@ if (enterprise_installed() === true) {
|
|||
'',
|
||||
'w540px',
|
||||
'',
|
||||
// Autocomplete.
|
||||
'new-password'
|
||||
);
|
||||
} else {
|
||||
$urlAddressInput = html_print_input_text(
|
||||
|
@ -903,18 +904,16 @@ $tableAdvancedAgent->data['safe_operation'][] = html_print_label_input_block(
|
|||
)
|
||||
);
|
||||
|
||||
if (enterprise_installed() === true) {
|
||||
ui_toggle(
|
||||
html_print_table($tableAdvancedAgent, true),
|
||||
'<span class="subsection_header_title">'.__('Advanced options').'</span>',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
'white_box_content',
|
||||
'no-border white_table_graph'
|
||||
);
|
||||
}
|
||||
ui_toggle(
|
||||
html_print_table($tableAdvancedAgent, true),
|
||||
'<span class="subsection_header_title">'.__('Advanced options').'</span>',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
'white_box_content',
|
||||
'no-border white_table_graph'
|
||||
);
|
||||
|
||||
// Custom fields.
|
||||
$customOutputData = '';
|
||||
|
|
|
@ -1525,8 +1525,8 @@ if ($update_module === true || $create_module === true) {
|
|||
$percentage_warning = 0;
|
||||
$warning_inverse = 0;
|
||||
} else if ($warning_threshold_check_type === 'warning_inverse') {
|
||||
$warning_inverse = (int) get_parameter('warning_inverse_string_sent');
|
||||
$percentage_warning = 0;
|
||||
$warning_inverse = (int) get_parameter('warning_inverse_string_sent');
|
||||
$percentage_warning = 0;
|
||||
} else {
|
||||
$percentage_warning = (int) get_parameter('warning_inverse_string_sent');
|
||||
$warning_inverse = 0;
|
||||
|
@ -1538,15 +1538,20 @@ if ($update_module === true || $create_module === true) {
|
|||
$percentage_critical = 0;
|
||||
$critical_inverse = 0;
|
||||
} else if ($critical_threshold_check_type === 'critical_inverse') {
|
||||
$critical_inverse = (int) get_parameter('critical_inverse_string_sent');
|
||||
$percentage_critical = 0;
|
||||
$critical_inverse = (int) get_parameter('critical_inverse_string_sent');
|
||||
$percentage_critical = 0;
|
||||
} else {
|
||||
$percentage_critical = (int) get_parameter('critical_inverse_string_sent');
|
||||
$critical_inverse = 0;
|
||||
}
|
||||
|
||||
// Inverse string checkbox.
|
||||
if ($id_module_type === MODULE_TYPE_GENERIC_DATA_STRING || $id_module_type === MODULE_TYPE_ASYNC_STRING) {
|
||||
if ($id_module_type === MODULE_TYPE_GENERIC_DATA_STRING
|
||||
|| $id_module_type === MODULE_TYPE_ASYNC_STRING
|
||||
|| $id_module_type === MODULE_TYPE_REMOTE_TCP_STRING
|
||||
|| $id_module_type === MODULE_TYPE_REMOTE_CMD_STRING
|
||||
|| $id_module_type === MODULE_TYPE_REMOTE_SNMP_STRING
|
||||
) {
|
||||
// Warning inverse string checkbox.
|
||||
$warning_string_checkbox = get_parameter('warning_inverse_string');
|
||||
if (!empty($warning_string_checkbox) && $warning_string_checkbox === 'warning_inverse_string') {
|
||||
|
@ -2024,10 +2029,10 @@ if ($create_module) {
|
|||
|
||||
// MODULE ENABLE/DISABLE
|
||||
// =====================.
|
||||
if ($enable_module) {
|
||||
/*
|
||||
if ($enable_module) {
|
||||
$result = modules_change_disabled($enable_module, 0);
|
||||
$module_name = modules_get_agentmodule_name($enable_module);
|
||||
|
||||
// Write for conf disable if remote_config.
|
||||
$configuration_data = enterprise_hook(
|
||||
'config_agents_get_module_from_conf',
|
||||
|
@ -2041,10 +2046,8 @@ if ($enable_module) {
|
|||
|
||||
// Force Update when disabled for save disabled in conf.
|
||||
$old_configuration_data = $configuration_data;
|
||||
|
||||
// Successfull action.
|
||||
$success_action = $result;
|
||||
|
||||
$success_action = $result;
|
||||
if ($result === NOERR) {
|
||||
db_pandora_audit(
|
||||
|
@ -2057,9 +2060,11 @@ if ($enable_module) {
|
|||
'Fail to enable #'.$enable_module.' | '.$module_name.' | '.io_safe_output($agent['alias'])
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($disable_module) {
|
||||
if ($disable_module) {
|
||||
|
||||
hd($disable_module, true);
|
||||
$result = modules_change_disabled($disable_module, 1);
|
||||
$module_name = modules_get_agentmodule_name($disable_module);
|
||||
|
||||
|
@ -2083,18 +2088,20 @@ if ($disable_module) {
|
|||
|
||||
|
||||
if ($result === NOERR) {
|
||||
hd($disable_module, true);
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_MODULE_MANAGEMENT,
|
||||
'Disable #'.$disable_module.' | '.$module_name.' | '.io_safe_output($agent['alias'])
|
||||
);
|
||||
} else {
|
||||
hd($disable_module, true);
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_MODULE_MANAGEMENT,
|
||||
'Fail to disable #'.$disable_module.' | '.$module_name.' | '.io_safe_output($agent['alias'])
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
// Fix to stop the module from being added to the agent's conf
|
||||
// when an error occurred while updating or inserting. or enable disable module.
|
||||
if ($update_module || $create_module
|
||||
|
@ -2521,10 +2528,10 @@ switch ($tab) {
|
|||
});
|
||||
|
||||
// Change description when edit port
|
||||
$( "#text-tcp_port" ).change(function() {
|
||||
/*$( "#text-tcp_port" ).change(function() {
|
||||
$( "#textarea_description" ).text(`Checks port ${$( "#text-tcp_port" ).val()} is opened`);
|
||||
});
|
||||
|
||||
});*/
|
||||
|
||||
// Set the position and width of the subtab
|
||||
/*
|
||||
function agent_wizard_tab_setup() {
|
||||
|
|
|
@ -46,7 +46,7 @@ $custom_fields = array_map(
|
|||
function ($field) {
|
||||
$field['secure'] = (bool) $field['secure'];
|
||||
if ($field['secure']) {
|
||||
$field['value'] = io_input_password($field['value']);
|
||||
$field['value'] = io_input_password(io_safe_output($field['value']));
|
||||
}
|
||||
|
||||
return $field;
|
||||
|
@ -75,7 +75,7 @@ if ($add_inventory_module) {
|
|||
'interval' => $interval,
|
||||
'username' => $username,
|
||||
'password' => $password,
|
||||
'custom_fields' => $custom_fields_enabled && !empty($custom_fields) ? base64_encode(json_encode($custom_fields)) : '',
|
||||
'custom_fields' => $custom_fields_enabled && !empty($custom_fields) ? base64_encode(json_encode(io_safe_output($custom_fields), JSON_UNESCAPED_UNICODE)) : '',
|
||||
];
|
||||
|
||||
$result = db_process_sql_insert('tagent_module_inventory', $values);
|
||||
|
@ -119,7 +119,7 @@ if ($add_inventory_module) {
|
|||
'interval' => $interval,
|
||||
'username' => $username,
|
||||
'password' => $password,
|
||||
'custom_fields' => $custom_fields_enabled && !empty($custom_fields) ? base64_encode(json_encode($custom_fields)) : '',
|
||||
'custom_fields' => $custom_fields_enabled && !empty($custom_fields) ? base64_encode(json_encode(io_safe_output($custom_fields, true), JSON_UNESCAPED_UNICODE)) : '',
|
||||
];
|
||||
|
||||
$result = db_process_sql_update('tagent_module_inventory', $values, ['id_agent_module_inventory' => $id_agent_module_inventory, 'id_agente' => $id_agente]);
|
||||
|
|
|
@ -229,7 +229,7 @@ if ($enable_agent > 0) {
|
|||
);
|
||||
}
|
||||
|
||||
if ($disable_agent > 0) {
|
||||
if ($disable_agent > 0 && $agent_to_delete === 0) {
|
||||
$result = db_process_sql_update('tagente', ['disabled' => 1], ['id_agente' => $disable_agent]);
|
||||
$alias = io_safe_output(agents_get_alias($disable_agent));
|
||||
|
||||
|
@ -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;
|
||||
|
@ -762,7 +765,9 @@ if ($agents !== false) {
|
|||
}
|
||||
|
||||
if (empty($agent['alias']) === true) {
|
||||
$agent['alias'] = $agent['nombre'];
|
||||
$agent['alias'] = io_safe_output($agent['nombre']);
|
||||
} else {
|
||||
$agent['alias'] = io_safe_output($agent['alias']);
|
||||
}
|
||||
|
||||
$additionalDataAgentName = [];
|
||||
|
@ -1025,23 +1030,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>';
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -769,7 +769,17 @@ if ($modules !== false) {
|
|||
}
|
||||
|
||||
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === true) {
|
||||
$data[0] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&edit_module=1&id_agent_module='.$module['id_agente_modulo'].'">';
|
||||
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
|
||||
$linked = policies_is_module_linked($module['id_agente_modulo']);
|
||||
$adopt = policies_is_module_adopt($module['id_agente_modulo']);
|
||||
if ($linked !== false && $adopt === false) {
|
||||
$data[0] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&edit_module=1&id_agent_module='.$module['id_agente_modulo'].'&id_policy_module='.$module['id_policy_module'].'">';
|
||||
} else {
|
||||
$data[0] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&edit_module=1&id_agent_module='.$module['id_agente_modulo'].'">';
|
||||
}
|
||||
} else {
|
||||
$data[0] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&edit_module=1&id_agent_module='.$module['id_agente_modulo'].'">';
|
||||
}
|
||||
}
|
||||
|
||||
if ((bool) $module['disabled'] === true) {
|
||||
|
@ -830,8 +840,8 @@ if ($modules !== false) {
|
|||
$linked = policies_is_module_linked($module['id_agente_modulo']);
|
||||
$adopt = policies_is_module_adopt($module['id_agente_modulo']);
|
||||
|
||||
if ($linked !== false) {
|
||||
if ($adopt === true) {
|
||||
if ((bool) $linked !== false) {
|
||||
if ((bool) $adopt === true) {
|
||||
$img = 'images/policies_brick.png';
|
||||
$title = '('.__('Adopted').') '.$policyInfo['name_policy'];
|
||||
} else {
|
||||
|
@ -839,7 +849,7 @@ if ($modules !== false) {
|
|||
$title = $policyInfo['name_policy'];
|
||||
}
|
||||
} else {
|
||||
if ($adopt === true) {
|
||||
if ((bool) $adopt === true) {
|
||||
$img = 'images/policies_not_brick.png';
|
||||
$title = '('.__('Unlinked').') ('.__('Adopted').') '.$policyInfo['name_policy'];
|
||||
} else {
|
||||
|
@ -872,6 +882,10 @@ if ($modules !== false) {
|
|||
$title
|
||||
);
|
||||
|
||||
if (strlen($module['ip_target']) !== 0) {
|
||||
$title .= '<br/>IP: '.$module['ip_target'];
|
||||
}
|
||||
|
||||
// This module is initialized ? (has real data).
|
||||
if ($status === STATUS_MODULE_NO_DATA) {
|
||||
$data[2] .= html_print_image(
|
||||
|
@ -995,7 +1009,7 @@ if ($modules !== false) {
|
|||
$data[8] .= html_print_menu_button(
|
||||
[
|
||||
'href' => 'index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&delete_module='.$module['id_agente_modulo'],
|
||||
'onClick' => "if (!confirm(\' '.__('Are you sure?').'\')) return false;",
|
||||
'onClick' => 'javascript: if (!confirm(\''.__('Are you sure?').'\')) return false;',
|
||||
'image' => 'images/delete.svg',
|
||||
'title' => __('Delete'),
|
||||
],
|
||||
|
@ -1091,8 +1105,9 @@ $createModuleTable->data[0][] = html_print_label_input_block(
|
|||
false,
|
||||
'',
|
||||
false,
|
||||
'max-width:300px;'
|
||||
)
|
||||
'width:350px;'
|
||||
),
|
||||
['div_style' => 'margin-top: 25px;'],
|
||||
);
|
||||
|
||||
$createModuleTable->data[1][] = html_print_label_input_block(
|
||||
|
@ -1120,8 +1135,9 @@ $modalCreateModule .= html_print_div(
|
|||
'modal_button_create',
|
||||
false,
|
||||
[
|
||||
'icon' => 'next',
|
||||
'mode' => 'mini secondary',
|
||||
'icon' => 'next',
|
||||
'mode' => 'mini secondary',
|
||||
'style' => 'margin-top: 140px;',
|
||||
],
|
||||
true
|
||||
),
|
||||
|
@ -1148,8 +1164,8 @@ html_print_div(
|
|||
draggable: true,
|
||||
modal: true,
|
||||
close: false,
|
||||
height: 222,
|
||||
width: 480,
|
||||
height: 400,
|
||||
width: 495,
|
||||
overlay: {
|
||||
opacity: 0.5,
|
||||
background: "black"
|
||||
|
|
|
@ -509,7 +509,7 @@ $tableBasicThresholds->data['warning_threshold'][0] .= html_print_input_text(
|
|||
10,
|
||||
1024,
|
||||
true,
|
||||
$disabledBecauseInPolicy || $edit === false,
|
||||
$disabledBecauseInPolicy,
|
||||
false,
|
||||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
|
@ -524,6 +524,11 @@ $tableBasicThresholds->data['switch_warning_threshold'][0] .= html_print_div(
|
|||
true
|
||||
);
|
||||
|
||||
// CHANGE TO CRITICAL STATUS
|
||||
$tableBasicThresholds->data['caption_warning_time'][0] .= __('Change to critical status after');
|
||||
$tableBasicThresholds->data['warning_time'][0] .= html_print_input_text('warning_time', $warning_time, '', 5, 15, true);
|
||||
$tableBasicThresholds->data['warning_time'][1] .= ' <b>'.__('intervals in warning status.').'</b>';
|
||||
|
||||
// CRITICAL THRESHOLD.
|
||||
$tableBasicThresholds->rowclass['caption_critical_threshold'] = 'field_half_width pdd_t_10px';
|
||||
$tableBasicThresholds->rowclass['critical_threshold'] = 'field_half_width';
|
||||
|
@ -607,7 +612,7 @@ $tableBasicThresholds->data['critical_threshold'][0] .= html_print_input_text(
|
|||
$classdisabledBecauseInPolicy
|
||||
);
|
||||
|
||||
$table_simple->rowstyle['thresholds_table'] = 'margin-top: 15px;height: 340px;width: 100%';
|
||||
$table_simple->rowstyle['thresholds_table'] = 'margin-top: 15px;height: 400px;width: 100%';
|
||||
$table_simple->cellclass['thresholds_table'][0] = 'table_section half_section_left';
|
||||
$table_simple->data['thresholds_table'][0] = html_print_table($tableBasicThresholds, true);
|
||||
if (modules_is_string_type($id_module_type) === false || (bool) $edit === true) {
|
||||
|
@ -685,6 +690,7 @@ if ((int) $moduletype === MODULE_DATA) {
|
|||
// If it is a non policy form, the module_interval will not provided and will.
|
||||
// be taken the agent interval (this code is at configurar_agente.php).
|
||||
} else {
|
||||
$interval = ($interval === '') ? '300' : $interval;
|
||||
$outputExecutionInterval = html_print_extended_select_for_time('module_interval', $interval, '', '', '0', false, true, false, false, $classdisabledBecauseInPolicy, $disabledBecauseInPolicy);
|
||||
}
|
||||
|
||||
|
@ -694,6 +700,8 @@ if (isset($module['id_policy_module']) === true) {
|
|||
}
|
||||
|
||||
$cps_array[-1] = __('Disabled');
|
||||
$cps_array[0] = __('Enabled');
|
||||
|
||||
if ($cps_module > 0) {
|
||||
$cps_array[$cps_module] = __('Enabled');
|
||||
} else {
|
||||
|
@ -705,7 +713,9 @@ if ($cps_module > 0) {
|
|||
}
|
||||
}
|
||||
|
||||
$cps_array[$cps_inc] = __('Enabled');
|
||||
if ($cps_inc > -1) {
|
||||
$cps_array[$cps_inc] = __('Enabled');
|
||||
}
|
||||
}
|
||||
|
||||
// JS Scripts for ff thresholds.
|
||||
|
@ -1040,8 +1050,8 @@ $table_advanced->data['textarea_description_instructions'][1] = html_print_texta
|
|||
|
||||
$table_advanced->rowclass['caption_textarea_crit_warn_instructions'] = 'field_half_width pdd_t_10px';
|
||||
$table_advanced->rowclass['textarea_crit_warn_instructions'] = 'field_half_width';
|
||||
$table_advanced->data['caption_textarea_crit_warn_instructions'][1] = __('Warning instructions');
|
||||
$table_advanced->data['caption_textarea_crit_warn_instructions'][0] = __('Critical instructions');
|
||||
$table_advanced->data['caption_textarea_crit_warn_instructions'][1] = __('Warning instructions');
|
||||
$table_advanced->data['textarea_crit_warn_instructions'][0] = html_print_textarea(
|
||||
'critical_instructions',
|
||||
5,
|
||||
|
@ -1934,7 +1944,7 @@ $(document).ready (function () {
|
|||
var thisLabel = $(this).attr('for');
|
||||
$('#'+thisLabel).prop('checked', true);
|
||||
$('#'+thisLabel).siblings().prop('checked', false);
|
||||
|
||||
|
||||
if ($('#radius-percentage_warning').prop('checked') === true || $('#radius-percentage_critical').prop('checked') === true) {
|
||||
$("#svg_dinamic").hide();
|
||||
} else {
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
global $config;
|
||||
require_once $config['homedir'].'/include/class/CredentialStore.class.php';
|
||||
require_once $config['homedir'].'/operation/snmpconsole/snmp_browser.php';
|
||||
require_once $config['homedir'].'/include/functions_snmp_browser.php';
|
||||
$snmp_browser_path = (is_metaconsole() === true) ? '../../' : '';
|
||||
$snmp_browser_path .= 'include/javascript/pandora_snmp_browser.js';
|
||||
|
@ -310,7 +311,7 @@ $data[2] .= html_print_button(
|
|||
__('SNMP Walk'),
|
||||
'snmp_walk',
|
||||
false,
|
||||
'snmpBrowserWindow()',
|
||||
'snmpBrowserWindow('.$id_agente.')',
|
||||
[ 'mode' => 'link' ],
|
||||
true
|
||||
);
|
||||
|
@ -390,14 +391,16 @@ $data[1] = html_print_input_text(
|
|||
$data[2] = __('Auth password').ui_print_help_tip(__('The pass length must be eight character minimum.'), true);
|
||||
$data[3] = html_print_input_password(
|
||||
'snmp3_auth_pass',
|
||||
'',
|
||||
$snmp3_auth_pass,
|
||||
'',
|
||||
15,
|
||||
60,
|
||||
true,
|
||||
$disabledBecauseInPolicy,
|
||||
false,
|
||||
$largeclassdisabledBecauseInPolicy
|
||||
$largeclassdisabledBecauseInPolicy,
|
||||
'off',
|
||||
true
|
||||
);
|
||||
$data[3] .= html_print_input_hidden_extended('active_snmp_v3', 0, 'active_snmp_v3_mmen', true);
|
||||
if ($snmp_version != 3) {
|
||||
|
@ -412,14 +415,16 @@ $data[1] = html_print_select(['DES' => __('DES'), 'AES' => __('AES')], 'snmp3_pr
|
|||
$data[2] = __('Privacy pass').ui_print_help_tip(__('The pass length must be eight character minimum.'), true);
|
||||
$data[3] = html_print_input_password(
|
||||
'snmp3_privacy_pass',
|
||||
'',
|
||||
$snmp3_privacy_pass,
|
||||
'',
|
||||
15,
|
||||
60,
|
||||
true,
|
||||
$disabledBecauseInPolicy,
|
||||
false,
|
||||
$largeclassdisabledBecauseInPolicy
|
||||
$largeclassdisabledBecauseInPolicy,
|
||||
'off',
|
||||
true
|
||||
);
|
||||
|
||||
if ($snmp_version != 3) {
|
||||
|
@ -731,12 +736,6 @@ $(document).ready (function () {
|
|||
$("#text-custom_ip_target").hide();
|
||||
}
|
||||
});
|
||||
|
||||
// Add input password values with js to hide it in browser inspector.
|
||||
$('#password-snmp3_auth_pass').val('<?php echo $snmp3_auth_pass; ?>');
|
||||
$('#password-snmp3_privacy_pass').val('<?php echo $snmp3_privacy_pass; ?>');
|
||||
|
||||
observerInputPassword();
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -103,7 +103,19 @@ if (!empty($macros)) {
|
|||
}
|
||||
|
||||
if ($m_hide) {
|
||||
$data[1] = html_print_input_password($m['macro'], '', '', 100, 1024, true);
|
||||
$data[1] = html_print_input_password(
|
||||
$m['macro'],
|
||||
io_output_password($m['value']),
|
||||
'',
|
||||
100,
|
||||
1024,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'off',
|
||||
true
|
||||
);
|
||||
array_push($password_fields, $m);
|
||||
} else {
|
||||
$data[1] = html_print_input_text(
|
||||
|
@ -141,18 +153,24 @@ foreach ($password_fields as $k => $p) {
|
|||
?>
|
||||
<script type="text/javascript">
|
||||
function changePluginSelect() {
|
||||
if (flag_load_plugin_component) {
|
||||
if (typeof flag_load_plugin_component !== 'undefined' && flag_load_plugin_component) {
|
||||
flag_load_plugin_component = false;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const moduleId = <?php echo $id_agent_module; ?>;
|
||||
|
||||
load_plugin_description($("#id_plugin").val());
|
||||
|
||||
load_plugin_macros_fields('simple-macro');
|
||||
load_plugin_macros_fields('simple-macro', moduleId);
|
||||
|
||||
forced_title_callback();
|
||||
|
||||
$('select#id_plugin').select2('close');
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
changePluginSelect();
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -103,6 +103,9 @@ if (isset($id_agent_module) === true && $id_agent_module !== 0) {
|
|||
if ($id_policy_module > 0) {
|
||||
$module = enterprise_hook('policies_get_module', [$id_policy_module]);
|
||||
$plugin_parameter = $module['plugin_parameter'];
|
||||
} else if ($id_agent_module > 0) {
|
||||
$module = modules_get_agentmodule($id_agent_module);
|
||||
$plugin_parameter = $module['plugin_parameter'];
|
||||
} else {
|
||||
$plugin_parameter = '';
|
||||
}
|
||||
|
@ -190,7 +193,7 @@ $actionButtons .= html_print_button(
|
|||
__('Debug'),
|
||||
'btn_debugModule',
|
||||
$disableDebug,
|
||||
'loadDebugWindow()',
|
||||
'',
|
||||
[
|
||||
'icon' => 'cog',
|
||||
'mode' => 'mini secondary ',
|
||||
|
|
|
@ -148,7 +148,7 @@ $data[2] = html_print_label_input_block(
|
|||
__('Password'),
|
||||
html_print_input_password(
|
||||
'plugin_pass',
|
||||
'',
|
||||
$plugin_pass,
|
||||
'',
|
||||
15,
|
||||
60,
|
||||
|
|
|
@ -1430,10 +1430,10 @@ ui_print_spinner('Loading');
|
|||
$table = new stdClass();
|
||||
$table->id = 'editor';
|
||||
$table->width = '100%';
|
||||
$table->colspan['module'][1] = '5';
|
||||
$table->colspan['module'][1] = '6';
|
||||
$table->data = [];
|
||||
$table->data['module'] = [];
|
||||
$table->data['module'][0] = '';
|
||||
// $table->data['module'][0] = '';
|
||||
$table->data['module'][1] = '<h4>'.__('Modules').'</h4>';
|
||||
|
||||
// List of modules, empty, it is populated by javascript.
|
||||
|
@ -1457,7 +1457,7 @@ $table->data['module'][1] = "
|
|||
[
|
||||
'border' => '0',
|
||||
'alt' => __('Delete'),
|
||||
'class' => 'invert_filter',
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).'</a>'."</td>
|
||||
</tr>
|
||||
|
@ -1576,14 +1576,12 @@ function insert_downtime_agent($id_downtime, $user_groups_ad)
|
|||
} else {
|
||||
// If is selected 'Any', get all the agents.
|
||||
if (count($agents) === 1 && (int) $agents[0] === -2) {
|
||||
if ($recursion === true) {
|
||||
$filter_group = groups_get_children_ids(
|
||||
$filter_group,
|
||||
false,
|
||||
true,
|
||||
'AW'
|
||||
);
|
||||
};
|
||||
$filter_group = groups_get_children_ids(
|
||||
$filter_group,
|
||||
false,
|
||||
true,
|
||||
'AW'
|
||||
);
|
||||
|
||||
$agents = db_get_all_rows_filter(
|
||||
'tagente',
|
||||
|
@ -1781,7 +1779,6 @@ function insert_downtime_agent($id_downtime, $user_groups_ad)
|
|||
//Avoid freak states.
|
||||
if (action_in_progress)
|
||||
return;
|
||||
|
||||
//Check if the row editor module exists
|
||||
if ($('#loading_' + id_agent).length > 0) {
|
||||
//The row exists
|
||||
|
@ -1791,7 +1788,6 @@ function insert_downtime_agent($id_downtime, $user_groups_ad)
|
|||
if ($('#module_editor_' + id_agent).length == 0) {
|
||||
$("#list-agent_" + id_agent).after(
|
||||
$("#loading-loading").clone().attr('id', 'loading_' + id_agent));
|
||||
|
||||
jQuery.post ('ajax.php',
|
||||
{"page": "include/ajax/planned_downtime.ajax",
|
||||
"get_modules_downtime": 1,
|
||||
|
@ -1801,15 +1797,15 @@ function insert_downtime_agent($id_downtime, $user_groups_ad)
|
|||
function (data) {
|
||||
if (data['correct']) {
|
||||
//Check if the row editor module exists
|
||||
if ($('#loading_' + id_agent).length > 0) {
|
||||
if ($('#list-agent_' + id_agent).length > 0) {
|
||||
//The row exists
|
||||
$('#loading_' + id_agent).remove();
|
||||
|
||||
//$('#loading_' + id_agent).remove();
|
||||
|
||||
$("#list-agent_" + id_agent).after(
|
||||
$("#editor-module").clone()
|
||||
.attr('id', 'module_editor_' + id_agent)
|
||||
.hide());
|
||||
|
||||
|
||||
fill_row_editor(id_agent, data);
|
||||
}
|
||||
}
|
||||
|
@ -2041,7 +2037,7 @@ function insert_downtime_agent($id_downtime, $user_groups_ad)
|
|||
var datetime_from = <?php echo json_encode(strtotime($once_date_from.' '.$once_time_from)); ?>;
|
||||
var datetime_now = <?php echo json_encode($utimestamp); ?>;
|
||||
var create = <?php echo json_encode($create); ?>;
|
||||
if (!create && (type_execution == 'periodically' || (type_execution == 'once' && datetime_from < datetime_now))) {
|
||||
if (!create && (type_execution == 'periodically' && (type_execution == 'once' && datetime_from < datetime_now))) {
|
||||
$("input#submit-updbutton, input#submit-add_item, table#list a").click(function (e) {
|
||||
if (!confirm("<?php echo __('WARNING: If you edit this scheduled downtime, the data of future SLA reports may be altered'); ?>")) {
|
||||
e.preventDefault();
|
||||
|
|
|
@ -133,7 +133,7 @@ if (is_ajax()) {
|
|||
}
|
||||
}
|
||||
|
||||
$style = ((int) $field_hidden === 1) ? '-webkit-text-security: disc;' : '';
|
||||
$style = ((int) $field_hidden === 1) ? '-webkit-text-security: disc; font-family: text-security-disc;' : '';
|
||||
|
||||
if (!empty($field_value)) {
|
||||
$field_value = io_safe_output($field_value);
|
||||
|
|
|
@ -1032,7 +1032,7 @@ foreach ($simple_alerts as $alert) {
|
|||
|
||||
$data[4] .= html_print_input_image(
|
||||
'update',
|
||||
'images/builder.png',
|
||||
'images/builder@svg.svg',
|
||||
1,
|
||||
'',
|
||||
true,
|
||||
|
|
|
@ -369,7 +369,7 @@ for ($i = 1; $i <= $config['max_macro_fields']; $i++) {
|
|||
$selected,
|
||||
!$is_management_allowed,
|
||||
'cursor: \'pointer\'',
|
||||
'class="hide_inputs"',
|
||||
['input_class' => 'hide_inputs'],
|
||||
true
|
||||
)
|
||||
);
|
||||
|
@ -413,16 +413,16 @@ $(document).ready (function () {
|
|||
$(".hide_inputs").each(function(index) {
|
||||
var $input_in_row = $(this).closest('tr').find('.field_value');
|
||||
if($(this).is(':checked')) {
|
||||
$input_in_row.prop('style', '-webkit-text-security: disc;');
|
||||
$input_in_row.prop('style', '-webkit-text-security: disc; font-family: text-security-disc;');
|
||||
} else {
|
||||
$input_in_row.prop('style', '');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(".hide_inputs").click(function() {
|
||||
var $input_in_row = $(this).closest('tr').find('.field_value');
|
||||
if($(this).is(':checked')) {
|
||||
$input_in_row.prop('style', '-webkit-text-security: disc;');
|
||||
$input_in_row.prop('style', '-webkit-text-security: disc; font-family: text-security-disc;');
|
||||
} else {
|
||||
$input_in_row.prop('style', '');
|
||||
}
|
||||
|
|
|
@ -98,16 +98,15 @@ if (count($groups) > 0) {
|
|||
|
||||
|
||||
echo '<div id="tactic_view">';
|
||||
echo '<table style="width: 100%;">';
|
||||
echo '<tr>';
|
||||
echo '<td class="tactical_group_left_column">';
|
||||
echo '<div class="tactical_group_left_columns">';
|
||||
echo '<div class="tactical_group_left_column">';
|
||||
$table_col1 = new stdClass();
|
||||
$table_col1->class = 'no-class';
|
||||
$table_col1->data = [];
|
||||
$table_col1->rowclass[] = '';
|
||||
$table_col1->headstyle[0] = 'text-align:center;';
|
||||
$table_col1->width = '100%';
|
||||
$table_col1->data[0][0] = groups_get_heat_map_agents($id_groups, 450, 100);
|
||||
$table_col1->data[0][0] = groups_get_heat_map_agents($id_groups, 330, 100);
|
||||
$table_col1->data[1][0] = tactical_groups_get_agents_and_monitoring($id_groups);
|
||||
|
||||
$distribution_by_so = '<table cellpadding=0 cellspacing=0 class="databox pies graph-distribution-so" width=100%><tr><td style="width:50%;">';
|
||||
|
@ -130,8 +129,8 @@ ui_toggle(
|
|||
false
|
||||
);
|
||||
|
||||
echo '</td>';
|
||||
echo '<td class="tactical_group_left_column">';
|
||||
echo '</div>';
|
||||
echo '<div class="tactical_group_left_column">';
|
||||
$table_col2 = new stdClass();
|
||||
$table_col2->class = 'no-class';
|
||||
$table_col2->data = [];
|
||||
|
@ -158,8 +157,9 @@ ui_toggle(
|
|||
false,
|
||||
false
|
||||
);
|
||||
echo '</td>';
|
||||
echo '<td class="tactical_group_right_column">';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '<div class="tactical_group_right_column">';
|
||||
$table_col3 = new stdClass();
|
||||
$table_col3->class = 'no-class';
|
||||
$table_col3->data = [];
|
||||
|
@ -179,7 +179,7 @@ try {
|
|||
__('Alias'),
|
||||
__('Status'),
|
||||
__('Alerts'),
|
||||
__('Ultimo contacto remoto'),
|
||||
__('Last remote contact'),
|
||||
];
|
||||
|
||||
// Load datatables user interface.
|
||||
|
@ -216,9 +216,8 @@ ui_toggle(
|
|||
false,
|
||||
false
|
||||
);
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
echo '</table>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '<div id="modal-info-agent"></div>'
|
||||
|
||||
?>
|
||||
|
|
|
@ -109,7 +109,7 @@ if ($create_profiles) {
|
|||
} else {
|
||||
foreach ($profiles_id as $profile) {
|
||||
// Check profiles permissions for non admin user.
|
||||
if (is_user_admin($config['user_id']) === false) {
|
||||
if (is_user_admin($config['id_user']) === false) {
|
||||
$user_profiles = profile_get_profiles(
|
||||
[
|
||||
'pandora_management' => '<> 1',
|
||||
|
@ -122,7 +122,7 @@ if ($create_profiles) {
|
|||
AUDIT_LOG_ACL_VIOLATION,
|
||||
'Trying to add administrator profile whith standar user for user '.io_safe_input($user)
|
||||
);
|
||||
exit;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ if ($create_profiles) {
|
|||
AUDIT_LOG_ACL_VIOLATION,
|
||||
'Trying to add profile group without permission for user '.io_safe_input($user)
|
||||
);
|
||||
exit;
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($users_id as $user) {
|
||||
|
@ -141,7 +141,7 @@ if ($create_profiles) {
|
|||
AUDIT_LOG_ACL_VIOLATION,
|
||||
'Trying to edit user without permission for user '.io_safe_input($user)
|
||||
);
|
||||
exit;
|
||||
continue;
|
||||
}
|
||||
|
||||
$profile_data = db_get_row_filter('tusuario_perfil', ['id_usuario' => $user, 'id_perfil' => $profile, 'id_grupo' => $group]);
|
||||
|
|
|
@ -808,7 +808,7 @@ $table->data['edit1'][1] = '<table width="100%">';
|
|||
1
|
||||
);
|
||||
|
||||
$table->data['edit3'][2] = __('SMNP community');
|
||||
$table->data['edit3'][2] = __('SNMP community');
|
||||
$table->data['edit3'][3] = html_print_input_text(
|
||||
'snmp_community',
|
||||
'',
|
||||
|
|
|
@ -77,6 +77,7 @@ $min = (int) get_parameter('min');
|
|||
$tcp_send = (string) get_parameter('tcp_send');
|
||||
$tcp_rcv = (string) get_parameter('tcp_rcv');
|
||||
$tcp_port = (int) get_parameter('tcp_port');
|
||||
$target_ip = (string) get_parameter('target_ip');
|
||||
$snmp_oid = (string) get_parameter('snmp_oid');
|
||||
$snmp_community = (string) get_parameter('snmp_community');
|
||||
$id_module_group = (int) get_parameter('id_module_group');
|
||||
|
@ -360,6 +361,7 @@ if ($is_management_allowed === true && $create_component) {
|
|||
'tcp_send' => $tcp_send,
|
||||
'tcp_rcv' => $tcp_rcv,
|
||||
'tcp_port' => $tcp_port,
|
||||
'target_ip' => $target_ip,
|
||||
'snmp_oid' => $snmp_oid,
|
||||
'snmp_community' => $snmp_community,
|
||||
'id_module_group' => $id_module_group,
|
||||
|
@ -465,6 +467,7 @@ if ($is_management_allowed === true && $update_component) {
|
|||
'tcp_send' => $tcp_send,
|
||||
'tcp_rcv' => $tcp_rcv,
|
||||
'tcp_port' => $tcp_port,
|
||||
'target_ip' => $target_ip,
|
||||
'snmp_oid' => $snmp_oid,
|
||||
'snmp_community' => $snmp_community,
|
||||
'id_module_group' => $id_module_group,
|
||||
|
|
|
@ -60,6 +60,7 @@ if ($create_network_from_module) {
|
|||
$max = $data_module['max'];
|
||||
$min = $data_module['min'];
|
||||
$module_interval = $data_module['module_interval'];
|
||||
$target_ip = $data_module['target_ip'];
|
||||
$tcp_port = $data_module['tcp_port'];
|
||||
$tcp_rcv = $data_module['tcp_rcv'];
|
||||
$tcp_send = $data_module['tcp_send'];
|
||||
|
@ -120,6 +121,7 @@ if (isset($id)) {
|
|||
$max = $component['max'];
|
||||
$min = $component['min'];
|
||||
$module_interval = $component['module_interval'];
|
||||
$target_ip = $component['target_ip'];
|
||||
$tcp_port = $component['tcp_port'];
|
||||
$tcp_rcv = $component['tcp_rcv'];
|
||||
$tcp_send = $component['tcp_send'];
|
||||
|
@ -207,6 +209,7 @@ if (isset($id)) {
|
|||
$max = '0';
|
||||
$min = '0';
|
||||
$module_interval = '300';
|
||||
$target_ip = '';
|
||||
$tcp_port = '';
|
||||
$tcp_rcv = '';
|
||||
$tcp_send = '';
|
||||
|
|
|
@ -327,7 +327,7 @@ $table->data[10][2] = __('Discard unknown events');
|
|||
$table->data[10][3] = html_print_checkbox(
|
||||
'throw_unknown_events',
|
||||
1,
|
||||
network_components_is_disable_type_event($id, EVENTS_GOING_UNKNOWN),
|
||||
network_components_is_disable_type_event(($id === 0) ? false : $id, EVENTS_GOING_UNKNOWN),
|
||||
true
|
||||
);
|
||||
|
||||
|
|
|
@ -50,8 +50,19 @@ $snmp_versions['2c'] = 'v. 2c';
|
|||
$snmp_versions['3'] = 'v. 3';
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('Port');
|
||||
$data[1] = html_print_input_text('tcp_port', $tcp_port, '', 5, 20, true);
|
||||
$data[0] = __('Target IP');
|
||||
$data[1] = html_print_input_text_extended(
|
||||
'target_ip',
|
||||
$target_ip,
|
||||
'target_ip',
|
||||
'',
|
||||
30,
|
||||
10000,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true
|
||||
);
|
||||
$data[2] = __('SNMP version');
|
||||
$data[3] = html_print_select(
|
||||
$snmp_versions,
|
||||
|
@ -66,19 +77,11 @@ $data[3] = html_print_select(
|
|||
''
|
||||
);
|
||||
|
||||
push_table_row($data, 'snmp_port');
|
||||
push_table_row($data, 'row1');
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('SNMP Enterprise String');
|
||||
$data[1] = html_print_input_text(
|
||||
'snmp_oid',
|
||||
$snmp_oid,
|
||||
'',
|
||||
30,
|
||||
400,
|
||||
true
|
||||
);
|
||||
|
||||
$data[0] = __('Port');
|
||||
$data[1] = html_print_input_text('tcp_port', $tcp_port, '', 5, 20, true);
|
||||
$data[2] = __('SNMP community');
|
||||
$data[3] = html_print_input_text(
|
||||
'snmp_community',
|
||||
|
@ -89,17 +92,16 @@ $data[3] = html_print_input_text(
|
|||
true
|
||||
);
|
||||
|
||||
push_table_row($data, 'snmp_2');
|
||||
|
||||
push_table_row($data, 'snmp_port');
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('Auth user');
|
||||
$data[0] = __('SNMP Enterprise String');
|
||||
$data[1] = html_print_input_text(
|
||||
'snmp3_auth_user',
|
||||
$snmp3_auth_user,
|
||||
'snmp_oid',
|
||||
$snmp_oid,
|
||||
'',
|
||||
15,
|
||||
60,
|
||||
30,
|
||||
400,
|
||||
true
|
||||
);
|
||||
$data[2] = __('Auth password');
|
||||
|
@ -117,20 +119,18 @@ $data[3] .= html_print_input_hidden_extended(
|
|||
'active_snmp_v3_mncfn',
|
||||
true
|
||||
);
|
||||
push_table_row($data, 'field_snmpv3_row1');
|
||||
|
||||
push_table_row($data, 'snmp_2');
|
||||
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('Privacy method');
|
||||
$data[1] = html_print_select(
|
||||
[
|
||||
'DES' => __('DES'),
|
||||
'AES' => __('AES'),
|
||||
],
|
||||
'snmp3_privacy_method',
|
||||
$snmp3_privacy_method,
|
||||
'',
|
||||
'',
|
||||
$data[0] = __('Auth user');
|
||||
$data[1] = html_print_input_text(
|
||||
'snmp3_auth_user',
|
||||
$snmp3_auth_user,
|
||||
'',
|
||||
15,
|
||||
60,
|
||||
true
|
||||
);
|
||||
$data[2] = __('Privacy pass');
|
||||
|
@ -142,17 +142,18 @@ $data[3] = html_print_input_password(
|
|||
60,
|
||||
true
|
||||
);
|
||||
push_table_row($data, 'field_snmpv3_row2');
|
||||
|
||||
push_table_row($data, 'field_snmpv3_row1');
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('Auth method');
|
||||
$data[0] = __('Privacy method');
|
||||
$data[1] = html_print_select(
|
||||
[
|
||||
'MD5' => __('MD5'),
|
||||
'SHA' => __('SHA'),
|
||||
'DES' => __('DES'),
|
||||
'AES' => __('AES'),
|
||||
],
|
||||
'snmp3_auth_method',
|
||||
$snmp3_auth_method,
|
||||
'snmp3_privacy_method',
|
||||
$snmp3_privacy_method,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
|
@ -172,6 +173,37 @@ $data[3] = html_print_select(
|
|||
'',
|
||||
true
|
||||
);
|
||||
|
||||
push_table_row($data, 'field_snmpv3_row2');
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('Auth method');
|
||||
$data[1] = html_print_select(
|
||||
[
|
||||
'MD5' => __('MD5'),
|
||||
'SHA' => __('SHA'),
|
||||
],
|
||||
'snmp3_auth_method',
|
||||
$snmp3_auth_method,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true
|
||||
);
|
||||
$data[2] = __('Name OID').' '.ui_print_help_icon('xxx', true);
|
||||
$data[3] = html_print_input_text_extended(
|
||||
'name_oid',
|
||||
$name_oid,
|
||||
'name_oid',
|
||||
'',
|
||||
30,
|
||||
10000,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true
|
||||
);
|
||||
|
||||
push_table_row($data, 'field_snmpv3_row3');
|
||||
|
||||
$data = [];
|
||||
|
@ -188,20 +220,6 @@ $data[1] = html_print_extended_select_for_post_process(
|
|||
true
|
||||
);
|
||||
|
||||
$data[2] = __('Name OID').' '.ui_print_help_icon('xxx', true);
|
||||
$data[3] = html_print_input_text_extended(
|
||||
'name_oid',
|
||||
$name_oid,
|
||||
'name_oid',
|
||||
'',
|
||||
30,
|
||||
10000,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true
|
||||
);
|
||||
|
||||
push_table_row($data, 'field_process');
|
||||
|
||||
// Advanced stuff.
|
||||
|
|
|
@ -74,8 +74,8 @@ if ($id) {
|
|||
|
||||
// Header Buttons.
|
||||
$buttons = [];
|
||||
$buttons[] = ['text' => '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_edit">'.html_print_image('images/logs@svg.svg', true, ['title' => __('Filter list')]).'</a>'];
|
||||
$buttons[] = ['text' => '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_edit_form">'.html_print_image('images/plus@svg.svg', true, ['title' => __('Add filter')]).'</a>'];
|
||||
$buttons[] = ['text' => '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_edit">'.html_print_image('images/logs@svg.svg', true, ['title' => __('Filter list'), 'main_menu_icon' => true]).'</a>'];
|
||||
$buttons[] = ['text' => '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_edit_form">'.html_print_image('images/plus@svg.svg', true, ['title' => __('Add filter'), 'main_menu_icon' => true]).'</a>'];
|
||||
// Header Caption.
|
||||
$headerTitle = ($id) ? __('Update filter') : __('Create filter');
|
||||
|
||||
|
|
|
@ -182,7 +182,7 @@ if ($delete_item) {
|
|||
$buttons['graph_container'] = [
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_container">'.html_print_image(
|
||||
'images/graph-container.png',
|
||||
'images/graph-container@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Graph container'),
|
||||
|
|
|
@ -309,7 +309,7 @@ if ($edit_graph === true) {
|
|||
'graph_editor' => [
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&edit_graph=1&id='.$id_graph.'">'.html_print_image(
|
||||
'images/builder.png',
|
||||
'images/builder@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Graph editor'),
|
||||
|
|
|
@ -95,7 +95,7 @@ $subsection = reporting_enterprise_add_graph_template_subsection('', $buttons);
|
|||
$buttons['graph_container'] = [
|
||||
'active' => true,
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_container">'.html_print_image(
|
||||
'images/graph-container.png',
|
||||
'images/graph-container.svg@svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Graph container'),
|
||||
|
|
|
@ -100,7 +100,7 @@ if ($enterpriseEnable) {
|
|||
$buttons['graph_container'] = [
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_container">'.html_print_image(
|
||||
'images/graph-container.png',
|
||||
'images/graph-container@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Graphs containers'),
|
||||
|
|
|
@ -1219,11 +1219,9 @@ $class = 'databox filters';
|
|||
<?php
|
||||
html_print_select(
|
||||
$servers,
|
||||
'combo_server',
|
||||
'combo_server_sql',
|
||||
$server_name,
|
||||
'',
|
||||
$nothing,
|
||||
$nothing_value
|
||||
''
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
|
|
|
@ -518,8 +518,9 @@ foreach ($items as $item) {
|
|||
}
|
||||
|
||||
$agent_name_db = implode('<br>', $agent_name_db);
|
||||
|
||||
$module_name_db = implode('<br>', $modules);
|
||||
if (is_array($modules) === true) {
|
||||
$module_name_db = implode('<br>', $modules);
|
||||
}
|
||||
} else {
|
||||
$agent_id = agents_get_agent_id_by_module_id($item['id_agent_module']);
|
||||
$agent_name = agents_get_name($agent_id);
|
||||
|
|
|
@ -2197,9 +2197,12 @@ switch ($action) {
|
|||
'id_custom'
|
||||
);
|
||||
if ($values['treport_custom_sql_id'] == 0) {
|
||||
$values['external_source'] = get_parameter(
|
||||
'sql'
|
||||
);
|
||||
$sql = get_parameter('sql', '');
|
||||
if ($sql !== '') {
|
||||
$good_format = db_validate_sql($sql);
|
||||
}
|
||||
|
||||
$values['external_source'] = $sql;
|
||||
}
|
||||
|
||||
$values['historical_db'] = get_parameter(
|
||||
|
@ -2207,7 +2210,14 @@ switch ($action) {
|
|||
);
|
||||
$values['top_n_value'] = get_parameter('max_items');
|
||||
|
||||
$values['server_name'] = get_parameter('combo_server');
|
||||
if ($values['type'] === 'sql_graph_hbar'
|
||||
|| ($values['type'] === 'sql_graph_vbar')
|
||||
|| ($values['type'] === 'sql_graph_pie')
|
||||
) {
|
||||
$values['server_name'] = get_parameter('combo_server_sql');
|
||||
} else {
|
||||
$values['server_name'] = get_parameter('combo_server');
|
||||
}
|
||||
} else if ($values['type'] == 'url') {
|
||||
$values['external_source'] = get_parameter('url');
|
||||
} else if ($values['type'] == 'event_report_group') {
|
||||
|
@ -2936,9 +2946,12 @@ switch ($action) {
|
|||
'id_custom'
|
||||
);
|
||||
if ($values['treport_custom_sql_id'] == 0) {
|
||||
$values['external_source'] = get_parameter(
|
||||
'sql'
|
||||
);
|
||||
$sql = get_parameter('sql', '');
|
||||
if ($sql !== '') {
|
||||
$good_format = db_validate_sql($sql);
|
||||
}
|
||||
|
||||
$values['external_source'] = $sql;
|
||||
}
|
||||
|
||||
$values['historical_db'] = get_parameter(
|
||||
|
@ -3684,7 +3697,7 @@ if ($idReport != 0) {
|
|||
|
||||
$tab_builder = ($activeTab === 'item_editor') ? 'reporting_item_editor_tab' : '';
|
||||
|
||||
if ($action !== 'update') {
|
||||
if (is_metaconsole() === true || $action !== 'update') {
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
$textReportName,
|
||||
|
|
|
@ -208,7 +208,7 @@ $table->data[2][] = html_print_label_input_block(
|
|||
if ($action === 'new') {
|
||||
$backgroundColorInput = html_print_input_color(
|
||||
'background_color',
|
||||
'white',
|
||||
'#FFFFFF',
|
||||
'background_color',
|
||||
false,
|
||||
true
|
||||
|
@ -408,7 +408,6 @@ $(document).ready (function () {
|
|||
});
|
||||
|
||||
$( "button[type=submit]" ).click(function( event ) {
|
||||
console.log('aaaaaaaaaaa');
|
||||
if (parseInt($('input[name=width]').val()) < 1024){
|
||||
alert('Default width is '+$('input[name=width]').val()+'px, smaller than minimum -> 1024px');
|
||||
$('input[name=width]').val('1024');
|
||||
|
|
|
@ -202,15 +202,6 @@ function visual_map_main() {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
//Resize the view to adapt the screen size.
|
||||
if ($("#main").length) {
|
||||
//Console
|
||||
$("#frame_view").height($("#main").height() - 75);
|
||||
} else {
|
||||
//Metaconsole
|
||||
$("#frame_view").height($("#page").height() - 75);
|
||||
}
|
||||
}
|
||||
|
||||
function cancel_button_palette_callback() {
|
||||
|
@ -2426,10 +2417,10 @@ function loadFieldsFromDB(item) {
|
|||
});
|
||||
}
|
||||
|
||||
function setAspectRatioBackground(side) {
|
||||
function setAspectRatioBackground(side, id) {
|
||||
toggle_item_palette();
|
||||
|
||||
parameter = Array();
|
||||
var parameter = Array();
|
||||
parameter.push({
|
||||
name: "page",
|
||||
value: "include/ajax/visual_console_builder.ajax"
|
||||
|
@ -2440,18 +2431,20 @@ function setAspectRatioBackground(side) {
|
|||
value: $("#background_img").attr("src")
|
||||
});
|
||||
|
||||
parameter.push({ name: "id_visual_console", value: id });
|
||||
|
||||
jQuery.ajax({
|
||||
url: "ajax.php",
|
||||
data: parameter,
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
old_width = parseInt(
|
||||
var old_width = parseInt(
|
||||
$("#background")
|
||||
.css("width")
|
||||
.replace("px", "")
|
||||
);
|
||||
old_height = parseInt(
|
||||
var old_height = parseInt(
|
||||
$("#background")
|
||||
.css("height")
|
||||
.replace("px", "")
|
||||
|
@ -2464,8 +2457,12 @@ function setAspectRatioBackground(side) {
|
|||
old_height = 768;
|
||||
}
|
||||
|
||||
img_width = data[0];
|
||||
img_height = data[1];
|
||||
var img_width = data[0];
|
||||
var img_height = data[1];
|
||||
|
||||
var ratio = 0;
|
||||
var height = 0;
|
||||
var width = 0;
|
||||
|
||||
if (side == "width") {
|
||||
ratio = old_width / img_width;
|
||||
|
@ -5821,14 +5818,14 @@ function deleteDB(idElement) {
|
|||
}
|
||||
|
||||
function activeToolboxButton(id, active) {
|
||||
if ($("input." + id + "[name=button_toolbox2]").length == 0) {
|
||||
if ($("button." + id + "[name=" + id + "]").length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (active) {
|
||||
$("input." + id + "[name=button_toolbox2]").removeAttr("disabled");
|
||||
$("button." + id + "[name=" + id + "]").removeAttr("disabled");
|
||||
} else {
|
||||
$("input." + id + "[name=button_toolbox2]").attr("disabled", true);
|
||||
$("button." + id + "[name=" + id + "]").attr("disabled", true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6446,9 +6443,9 @@ function eventsBackground() {
|
|||
|
||||
function move_elements_resize(original_width, original_height, width, height) {
|
||||
jQuery.each($(".item"), function(key, value) {
|
||||
item = value;
|
||||
var item = value;
|
||||
idItem = $(item).attr("id");
|
||||
classItem = $(item)
|
||||
var classItem = $(item)
|
||||
.attr("class")
|
||||
.replace("item", "")
|
||||
.replace("ui-draggable", "")
|
||||
|
@ -6456,22 +6453,22 @@ function move_elements_resize(original_width, original_height, width, height) {
|
|||
.replace(/^\s+/g, "")
|
||||
.replace(/\s+$/g, "");
|
||||
|
||||
old_height = parseInt(
|
||||
var old_height = parseInt(
|
||||
$(item)
|
||||
.css("top")
|
||||
.replace("px", "")
|
||||
);
|
||||
old_width = parseInt(
|
||||
var old_width = parseInt(
|
||||
$(item)
|
||||
.css("left")
|
||||
.replace("px", "")
|
||||
);
|
||||
|
||||
ratio_width = width / original_width;
|
||||
ratio_height = height / original_height;
|
||||
var ratio_width = width / original_width;
|
||||
var ratio_height = height / original_height;
|
||||
|
||||
new_height = old_height * ratio_height;
|
||||
new_width = old_width * ratio_width;
|
||||
var new_height = old_height * ratio_height;
|
||||
var new_width = old_width * ratio_width;
|
||||
|
||||
var values = {};
|
||||
|
||||
|
|
|
@ -92,14 +92,14 @@ html_print_input_hidden('metaconsole', (is_metaconsole() === true) ? 1 : 0);
|
|||
visual_map_editor_print_hack_translate_strings();
|
||||
visual_map_editor_print_item_palette($visualConsole['id'], $background);
|
||||
|
||||
if (is_metaconsole() === false) {
|
||||
if (is_metaconsole() === true) {
|
||||
echo '<div id="frame_view" class="frame_view_meta">';
|
||||
} else {
|
||||
echo '<div id="frame_view" class="frame_view_node mrgn_top_meta_35px">';
|
||||
echo '<div id="frame_view" class="frame_view_node">';
|
||||
}
|
||||
|
||||
echo '<div id="background" class="" style="top:0px;
|
||||
margin: 0px auto;border: 1px lightgray solid; width: '.$widthBackground.'px; height: '.$heightBackground.'px;background-color: '.$visualConsole['background_color'].';">';
|
||||
margin: 0px auto;border: 1px lightgray solid; width: '.$widthBackground.'px; height: '.$heightBackground.'px;background-color: '.$visualConsole['background_color'].';z-index:0;">';
|
||||
echo "<div id='background_grid'
|
||||
style='position: absolute; display: none; overflow: hidden;
|
||||
background: url(".ui_get_full_url('images/console/background/white_boxed.jpg', false, false, false).');
|
||||
|
|
|
@ -833,7 +833,7 @@ $buttons['wizard'] = [
|
|||
if ($config['legacy_vc']) {
|
||||
$buttons['editor'] = [
|
||||
'active' => false,
|
||||
'text' => '<a href="'.$url_base.$action.'&tab=editor&id_visual_console='.$idVisualConsole.'">'.html_print_image('images/builder.png', true, ['title' => __('Builder'), 'class' => 'invert_filter']).'</a>',
|
||||
'text' => '<a href="'.$url_base.$action.'&tab=editor&id_visual_console='.$idVisualConsole.'">'.html_print_image('images/builder@svg.svg', true, ['title' => __('Builder'), 'class' => 'invert_filter']).'</a>',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -389,9 +389,9 @@ if (empty($create) === false || empty($view) === false) {
|
|||
$disabled = ($locked === true) ? 'readonly="readonly"' : '';
|
||||
|
||||
if (empty($create) === true) {
|
||||
$formAction = 'index.php?sec=gservers&sec2=godmode/servers/plugin&tab=$tab&update_plugin='.$plugin_id.'&pure='.$config['pure'];
|
||||
$formAction = 'index.php?sec=gservers&sec2=godmode/servers/plugin&tab='.$tab.'&update_plugin='.$plugin_id.'&pure='.$config['pure'];
|
||||
} else {
|
||||
$formAction = 'index.php?sec=gservers&sec2=godmode/servers/plugin&tab=$tab&create_plugin=1&pure='.$config['pure'];
|
||||
$formAction = 'index.php?sec=gservers&sec2=godmode/servers/plugin&tab='.$tab.'&create_plugin=1&pure='.$config['pure'];
|
||||
}
|
||||
|
||||
$formPluginType = [
|
||||
|
@ -403,7 +403,7 @@ if (empty($create) === false || empty($view) === false) {
|
|||
|
||||
$table = new stdClass();
|
||||
$table->id = 'table-form';
|
||||
$table->class = 'filter-table-adv';
|
||||
$table->class = 'databox filter-table-adv';
|
||||
$table->style = [];
|
||||
$table->data['plugin_name_captions'] = $data;
|
||||
$table->size[0] = '50%';
|
||||
|
@ -625,22 +625,14 @@ if (empty($create) === false || empty($view) === false) {
|
|||
$datam = [];
|
||||
$buttons = '';
|
||||
if (!$locked) {
|
||||
$datam[0] = '<a id="add_macro_btn" href="javascript:;">'.'<span class="bolder">'.__('Add macro').'</span>'.' '.html_print_image(
|
||||
'images/add.png',
|
||||
true,
|
||||
['class' => 'invert_filter']
|
||||
).'</a>';
|
||||
$datam[0] .= '<div id="next_macro" class="invisible">'.$i.'</div>';
|
||||
$datam[0] .= '<div id="next_row" class="invisible">'.$next_name_number.'</div>';
|
||||
|
||||
$buttons = html_print_anchor(
|
||||
[
|
||||
'id' => 'add_macro_btn',
|
||||
'href' => 'javascript:;',
|
||||
'content' => html_print_image(
|
||||
'content' => '<span>'.__('Add macro').'</span>'.html_print_image(
|
||||
'images/plus@svg.svg',
|
||||
true,
|
||||
['class' => 'invert_filter']
|
||||
['class' => 'invert_filter main_menu_icon']
|
||||
),
|
||||
],
|
||||
true
|
||||
|
@ -660,10 +652,10 @@ if (empty($create) === false || empty($view) === false) {
|
|||
'id' => 'delete_macro_button',
|
||||
'style' => $delete_macro_style,
|
||||
'href' => 'javascript:;',
|
||||
'content' => html_print_image(
|
||||
'content' => '<span>'.__('Remove macro').'</span>'.html_print_image(
|
||||
'images/delete.svg',
|
||||
true,
|
||||
['class' => 'main_menu_icon invert_filter']
|
||||
['class' => 'main_menu_icon invert_filter mrgn_right_10px']
|
||||
),
|
||||
],
|
||||
true
|
||||
|
@ -1097,7 +1089,7 @@ if (empty($create) === false || empty($view) === false) {
|
|||
}
|
||||
|
||||
if ($management_allowed === true) {
|
||||
echo '<form name="plugin" method="POST" action="index.php?sec=gservers&sec2=godmode/servers/plugin&tab=$tab&create=1&pure='.$config['pure'].'">';
|
||||
echo '<form name="plugin" method="POST" action="index.php?sec=gservers&sec2=godmode/servers/plugin&tab='.$tab.'&create=1&pure='.$config['pure'].'">';
|
||||
|
||||
html_print_action_buttons(
|
||||
html_print_submit_button(
|
||||
|
@ -1207,7 +1199,7 @@ ui_require_javascript_file('pandora_modules');
|
|||
delete_macro_form('table-form-plugin_');
|
||||
update_preview();
|
||||
}
|
||||
$('div#delete_macro_button>a').click(delete_macro_click_event);
|
||||
$('a#delete_macro_button').click(delete_macro_click_event);
|
||||
|
||||
update_preview();
|
||||
|
||||
|
|
|
@ -93,10 +93,6 @@ if (is_metaconsole() === true) {
|
|||
}
|
||||
}
|
||||
|
||||
$str = 'This extension makes registering server plugins an easier task.';
|
||||
$str .= ' Here you can upload a server plugin in .pspz zipped format.';
|
||||
$str .= ' Please refer to the official documentation on how to obtain and use Server Plugins.';
|
||||
|
||||
$output = '<div class="new_task">';
|
||||
$output .= '<div class="image_task">';
|
||||
$output .= html_print_image(
|
||||
|
@ -108,7 +104,7 @@ $output .= '</div>';
|
|||
$output .= '<div class="text_task">';
|
||||
$output .= '<h3>'.__('Plugin registration').'</h3>';
|
||||
$output .= '<p id="description_task">';
|
||||
$output .= __($str);
|
||||
$output .= __('This extension makes registering server plugins an easier task. Here you can upload a server plugin in .pspz zipped format. Please refer to the official documentation on how to obtain and use Server Plugins.');
|
||||
$output .= '<br><br>';
|
||||
$output .= __('You can get more plugins in our');
|
||||
$output .= '<a href="https://pandorafms.com/Library/Library/">';
|
||||
|
|
|
@ -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');
|
||||
|
@ -165,11 +167,22 @@ foreach ($servers as $server) {
|
|||
break;
|
||||
}
|
||||
|
||||
$data[6] = $server['threads'].' : '.$server['queued_modules'];
|
||||
if ($server['queued_modules'] > 200) {
|
||||
$data[6] .= clippy_context_help('server_queued_modules');
|
||||
$data[6] = '';
|
||||
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',
|
||||
'style' => 'margin-left: -25px;',
|
||||
]
|
||||
).'</a></div> ';
|
||||
}
|
||||
|
||||
$data[6] .= $server['threads'].' : '.$server['queued_modules'];
|
||||
|
||||
$data[7] = ui_print_timestamp($server['keepalive'], true);
|
||||
|
||||
|
||||
|
@ -306,3 +319,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>
|
||||
|
|
|
@ -147,6 +147,10 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) {
|
|||
|
||||
$result = db_get_row('tnews', 'id_news', $id_news);
|
||||
|
||||
if ($result['text'] == '&lt;p style="text-align: center; font-size: 13px;"&gt;Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -&amp;gt; Site news.&lt;/p&gt; ') {
|
||||
header('Location: '.ui_get_full_url('index.php?sec=gextensions&sec2=godmode/setup/news'));
|
||||
}
|
||||
|
||||
if ($result !== false) {
|
||||
$subject = $result['subject'];
|
||||
$text = $result['text'];
|
||||
|
@ -355,42 +359,37 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) {
|
|||
echo '</tr></thead>';
|
||||
|
||||
|
||||
$color = 1;
|
||||
foreach ($rows as $row) {
|
||||
if ($color == 1) {
|
||||
$tdcolor = 'datos';
|
||||
$color = 0;
|
||||
if ($row['text'] == '&lt;p style="text-align: center; font-size: 13px;"&gt;Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -&amp;gt; Site news.&lt;/p&gt; ') {
|
||||
echo '<tr><td><b>'.__('Welcome to Pandora FMS Console').'</b></td>';
|
||||
} else {
|
||||
$tdcolor = 'datos2';
|
||||
$color = 1;
|
||||
echo "<tr><td><b><a href='index.php?sec=gsetup&sec2=godmode/setup/news&form_edit=1&id_news=".$row['id_news']."'>".$row['subject'].'</a></b></td>';
|
||||
}
|
||||
|
||||
echo "<tr><td class='$tdcolor'><b><a href='index.php?sec=gsetup&sec2=godmode/setup/news&form_edit=1&id_news=".$row['id_news']."'>".$row['subject'].'</a></b></td>';
|
||||
|
||||
if ($row['modal']) {
|
||||
echo "<td class='$tdcolor'>".__('Modal').'</b></td>';
|
||||
echo '<td>'.__('Modal').'</b></td>';
|
||||
} else {
|
||||
echo "<td class='$tdcolor'>".__('Board').'</b></td>';
|
||||
echo '<td>'.__('Board').'</b></td>';
|
||||
}
|
||||
|
||||
echo "<td class='$tdcolor'>".$row['author'].'</b></td>';
|
||||
echo '<td>'.$row['author'].'</b></td>';
|
||||
$utimestamp = time_w_fixed_tz($row['timestamp']);
|
||||
echo "<td class='$tdcolor'>".date($config['date_format'], $utimestamp).'</b></td>';
|
||||
echo '<td>'.date($config['date_format'], $utimestamp).'</b></td>';
|
||||
if ($row['expire']) {
|
||||
$expire_utimestamp = time_w_fixed_tz($row['expire_timestamp']);
|
||||
$expire_in_secs = ($expire_utimestamp - $utimestamp);
|
||||
|
||||
if ($expire_in_secs <= 0) {
|
||||
echo "<td class='$tdcolor'>".__('Expired').'</b></td>';
|
||||
echo '<td>'.__('Expired').'</b></td>';
|
||||
} else {
|
||||
$expire_in = human_time_description_raw($expire_in_secs, false, 'large');
|
||||
echo "<td class='$tdcolor'>".$expire_in.'</b></td>';
|
||||
echo '<td>'.$expire_in.'</b></td>';
|
||||
}
|
||||
} else {
|
||||
echo "<td class='$tdcolor'>".__('No').'</b></td>';
|
||||
echo '<td>'.__('No').'</b></td>';
|
||||
}
|
||||
|
||||
echo '<td class="'.$tdcolor.' table_action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/news&id_news='.$row['id_news'].'&borrar='.$row['id_news'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['border' => '0', 'class' => 'invert_filter']).'</a></td></tr>';
|
||||
echo '<td class="'.$tdcolor.' table_action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/news&id_news='.$row['id_news'].'&borrar='.$row['id_news'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['border' => '0', 'class' => 'invert_filter main_menu_icon']).'</a></td></tr>';
|
||||
}
|
||||
|
||||
echo '</table>';
|
||||
|
|
|
@ -24,7 +24,7 @@ global $config;
|
|||
|
||||
check_login();
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true && is_user_admin($config['id_user']) === false) {
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === false && is_user_admin($config['id_user']) === false) {
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_ACL_VIOLATION,
|
||||
'Trying to access Setup Management'
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue